From 4da12a279684952b910be2c2fb0b14189b58459b Mon Sep 17 00:00:00 2001 From: Rafael <Syping@users.noreply.github.com> Date: Mon, 21 Mar 2016 21:54:46 +0100 Subject: [PATCH] picture dialog improved --- PictureDialog.cpp | 5 +++++ PictureDialog.h | 3 +++ PictureDialog.ui | 46 ++++++++++++++++++++++++++++++++++++++++------ 3 files changed, 48 insertions(+), 6 deletions(-) diff --git a/PictureDialog.cpp b/PictureDialog.cpp index 5c3b0fc..586d45a 100755 --- a/PictureDialog.cpp +++ b/PictureDialog.cpp @@ -61,3 +61,8 @@ void PictureDialog::setJsonString(SnapmaticPicture *picture) ui->labJSON->setText(jsonDrawString.arg(locX, locY, locZ, plyrsStr, crewID)); } + +void PictureDialog::on_cmdClose_clicked() +{ + this->close(); +} diff --git a/PictureDialog.h b/PictureDialog.h index 96e6f00..e0b7e3d 100755 --- a/PictureDialog.h +++ b/PictureDialog.h @@ -35,6 +35,9 @@ public: void setJsonString(SnapmaticPicture *picture); ~PictureDialog(); +private slots: + void on_cmdClose_clicked(); + private: Ui::PictureDialog *ui; QString jsonDrawString; diff --git a/PictureDialog.ui b/PictureDialog.ui index 7a5cabe..1efafe2 100755 --- a/PictureDialog.ui +++ b/PictureDialog.ui @@ -34,13 +34,47 @@ </widget> </item> <item> - <widget class="QLabel" name="labJSON"> - <property name="text"> - <string>Location: X: %1 Y: %2 Z: %3 -Players: %4 -Crew ID: %5</string> + <layout class="QHBoxLayout" name="hlJSON"> + <property name="leftMargin"> + <number>4</number> </property> - </widget> + <property name="topMargin"> + <number>4</number> + </property> + <property name="rightMargin"> + <number>4</number> + </property> + <property name="bottomMargin"> + <number>4</number> + </property> + <item> + <widget class="QLabel" name="labJSON"> + <property name="text"> + <string><span style=" font-weight:600;">Location:</span> X: %1, Y: %2, Z: %3 <br><span style=" font-weight:600;">Players:</span> %4<br><span style=" font-weight:600;">Crew ID:</span> %5</string> + </property> + </widget> + </item> + <item> + <spacer name="hsJSON"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>0</width> + <height>0</height> + </size> + </property> + </spacer> + </item> + <item> + <widget class="QPushButton" name="cmdClose"> + <property name="text"> + <string>Close</string> + </property> + </widget> + </item> + </layout> </item> </layout> </widget>