diff --git a/PictureDialog.cpp b/PictureDialog.cpp index 18fdf29..12d9fe0 100755 --- a/PictureDialog.cpp +++ b/PictureDialog.cpp @@ -21,7 +21,9 @@ #include "ui_PictureDialog.h" #include "SidebarGenerator.h" #include "StandardPaths.h" +#include "UiModLabel.h" +#include #include #include #include @@ -347,3 +349,25 @@ fileDialogPreSave: settings.setValue("CopyPicture", fileDialog.saveState()); settings.endGroup(); } + +void PictureDialog::on_labPicture_mouseDoubleClicked() +{ + QDialog *pictureWidget = new QDialog(this); + QRect rec = QApplication::desktop()->screenGeometry(); + + UiModLabel *pictureLabel = new UiModLabel(pictureWidget); + pictureLabel->setPixmap(ui->labPicture->pixmap()->scaled(rec.width(), rec.height(), Qt::KeepAspectRatio, Qt::SmoothTransformation)); + QObject::connect(pictureLabel, SIGNAL(mouseDoubleClicked()), pictureWidget, SLOT(close())); + + pictureWidget->setWindowFlags(pictureWidget->windowFlags()^Qt::WindowContextHelpButtonHint); + pictureWidget->setWindowTitle(tr("Show picture")); + pictureWidget->setStyleSheet("background-color: black;"); + pictureWidget->showFullScreen(); + pictureWidget->setModal(true); + pictureWidget->exec(); + + pictureLabel->deleteLater(); + delete pictureLabel; + pictureWidget->deleteLater(); + delete pictureWidget; +} diff --git a/PictureDialog.h b/PictureDialog.h index 4175080..b93bac3 100755 --- a/PictureDialog.h +++ b/PictureDialog.h @@ -42,6 +42,7 @@ private slots: void on_cmdClose_clicked(); void on_cmdExport_clicked(); void on_cmdCopy_clicked(); + void on_labPicture_mouseDoubleClicked(); private: ProfileDatabase *profileDB; diff --git a/PictureDialog.ui b/PictureDialog.ui index 62ce0b5..7761fe3 100755 --- a/PictureDialog.ui +++ b/PictureDialog.ui @@ -7,7 +7,7 @@ 0 0 960 - 536 + 572 @@ -28,85 +28,92 @@ + + + 0 + 0 + + + + Qt::AlignCenter + - - - Qt::Vertical + + + QFrame::NoFrame - - - 0 - 0 - + + QFrame::Plain - - - - - - 4 + + 0 - - 4 - - - 4 - - - 4 - - - - - - 0 - 0 - - - - <span style=" font-weight:600;">Title: </span>%6<br> + + + 4 + + + 4 + + + 4 + + + 4 + + + + + + 0 + 0 + + + + <span style=" font-weight:600;">Title: </span>%6<br> <span style=" font-weight:600;">Location: </span>%1, %2, %3 <br> <span style=" font-weight:600;">Players: </span>%4<br> <span style=" font-weight:600;">Crew ID: </span>%5 - - - true - - - - - - - Export picture - - - Export - - - - - - - Copy - - - - - - - Close - - - Close - - - - + + + true + + + + + + + Export picture + + + Export + + + + + + + Copy + + + + + + + Close + + + Close + + + + + diff --git a/gta5sync.pro b/gta5sync.pro index d071c71..50a4df8 100755 --- a/gta5sync.pro +++ b/gta5sync.pro @@ -88,6 +88,8 @@ DISTFILES += res/app.rc \ lang/gta5sync_ru.ts \ lang/qt_ru.qm +INCLUDEPATH += ./uimod + win32: RC_FILE += res/app.rc # QT4 ONLY STUFF