mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-16 06:17:17 +02:00
Share dialog
This commit is contained in:
parent
8310ce1e25
commit
5f73b76be7
6 changed files with 152 additions and 0 deletions
|
@ -9,6 +9,7 @@
|
|||
#include "Snapshot.h"
|
||||
|
||||
#include <FileUtils.h>
|
||||
#include <ui/snapshotShareDialog.cpp>
|
||||
|
||||
#include <QDateTime>
|
||||
#include <QFileInfo>
|
||||
|
@ -41,6 +42,8 @@ void Snapshot::saveSnapshot(QGLWidget* widget, QString username, glm::vec3 locat
|
|||
QString fileName = FileUtils::standardPath(SNAPSHOTS_DIRECTORY);
|
||||
fileName.append(QString(FILENAME_PATH_FORMAT.arg(username, now.toString(DATETIME_FORMAT), formattedLocation)));
|
||||
shot.save(fileName, 0, 100);
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
13
interface/src/ui/SnapshotShareDialog.cpp
Normal file
13
interface/src/ui/SnapshotShareDialog.cpp
Normal file
|
@ -0,0 +1,13 @@
|
|||
//
|
||||
// snapshotShareDialog.cpp
|
||||
// hifi
|
||||
//
|
||||
// Created by Stojce Slavkovski on 2/16/14.
|
||||
//
|
||||
//
|
||||
|
||||
#include "snapshotShareDialog.h"
|
||||
|
||||
#include "ui_shareSnapshot.h"
|
||||
|
||||
|
14
interface/src/ui/SnapshotShareDialog.h
Normal file
14
interface/src/ui/SnapshotShareDialog.h
Normal file
|
@ -0,0 +1,14 @@
|
|||
//
|
||||
// snapshotShareDialog.h
|
||||
// hifi
|
||||
//
|
||||
// Created by Stojce Slavkovski on 2/16/14.
|
||||
//
|
||||
//
|
||||
|
||||
#ifndef __hifi__snapshotShareDialog__
|
||||
#define __hifi__snapshotShareDialog__
|
||||
|
||||
#include <iostream>
|
||||
|
||||
#endif /* defined(__hifi__snapshotShareDialog__) */
|
99
interface/ui/shareSnapshot.ui
Normal file
99
interface/ui/shareSnapshot.ui
Normal file
|
@ -0,0 +1,99 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>Dialog</class>
|
||||
<widget class="QDialog" name="Dialog">
|
||||
<property name="windowModality">
|
||||
<enum>Qt::NonModal</enum>
|
||||
</property>
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>808</width>
|
||||
<height>577</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="cursor">
|
||||
<cursorShape>PointingHandCursor</cursorShape>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Share with community</string>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">background-color: rgb(255, 255, 255);</string>
|
||||
</property>
|
||||
<widget class="QWidget" name="verticalLayoutWidget">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>-1</x>
|
||||
<y>-1</y>
|
||||
<width>681</width>
|
||||
<height>511</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<widget class="QLabel" name="snapshotWidget">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">background-color: #000;</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Notes about this image</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
<widget class="QTextEdit" name="textEdit">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="shareButton">
|
||||
<property name="styleSheet">
|
||||
<string notr="true"> background-color: #333333;
|
||||
border-width: 0;
|
||||
border-radius: 9px;
|
||||
border-radius: 9px;
|
||||
font-family: Arial;
|
||||
font-size: 18px;
|
||||
font-weight: 100;
|
||||
color: #FFFFFF;
|
||||
width: 120px;
|
||||
height: 50px;</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Share</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
9
snapshotShareDialog.cpp
Normal file
9
snapshotShareDialog.cpp
Normal file
|
@ -0,0 +1,9 @@
|
|||
//
|
||||
// snapshotShareDialog.cpp
|
||||
// hifi
|
||||
//
|
||||
// Created by Stojce Slavkovski on 2/16/14.
|
||||
//
|
||||
//
|
||||
|
||||
#include "snapshotShareDialog.h"
|
14
snapshotShareDialog.h
Normal file
14
snapshotShareDialog.h
Normal file
|
@ -0,0 +1,14 @@
|
|||
//
|
||||
// snapshotShareDialog.h
|
||||
// hifi
|
||||
//
|
||||
// Created by Stojce Slavkovski on 2/16/14.
|
||||
//
|
||||
//
|
||||
|
||||
#ifndef __hifi__snapshotShareDialog__
|
||||
#define __hifi__snapshotShareDialog__
|
||||
|
||||
#include <iostream>
|
||||
|
||||
#endif /* defined(__hifi__snapshotShareDialog__) */
|
Loading…
Reference in a new issue