Share dialog

This commit is contained in:
stojce 2014-03-02 14:36:01 +01:00
parent 8310ce1e25
commit 5f73b76be7
6 changed files with 152 additions and 0 deletions

View file

@ -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);
}

View file

@ -0,0 +1,13 @@
//
// snapshotShareDialog.cpp
// hifi
//
// Created by Stojce Slavkovski on 2/16/14.
//
//
#include "snapshotShareDialog.h"
#include "ui_shareSnapshot.h"

View 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__) */

View 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
View file

@ -0,0 +1,9 @@
//
// snapshotShareDialog.cpp
// hifi
//
// Created by Stojce Slavkovski on 2/16/14.
//
//
#include "snapshotShareDialog.h"

14
snapshotShareDialog.h Normal file
View 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__) */