allow accessing the snapshot folder from the about page in the frontend (button could use a nicer icon)
--- a/QTfrontend/about.cpp Mon Aug 22 17:54:04 2011 +0400
+++ b/QTfrontend/about.cpp Mon Aug 22 16:20:28 2011 +0200
@@ -39,7 +39,6 @@
mainLayout->addWidget(imageLabel, 0, 0, 2, 1);
QLabel *lbl1 = new QLabel(this);
-
lbl1->setOpenExternalLinks(true);
lbl1->setText(
"<style type=\"text/css\">"
--- a/QTfrontend/hwform.cpp Mon Aug 22 17:54:04 2011 +0400
+++ b/QTfrontend/hwform.cpp Mon Aug 22 16:20:28 2011 +0200
@@ -37,6 +37,7 @@
#include <QCryptographicHash>
#include <QSignalMapper>
#include <QShortcut>
+#include <QDesktopServices>
#include "hwform.h"
#include "game.h"
@@ -218,6 +219,7 @@
connect(ui.pageRoomsList->BtnAdmin, SIGNAL(clicked()), pageSwitchMapper, SLOT(map()));
pageSwitchMapper->setMapping(ui.pageRoomsList->BtnAdmin, ID_PAGE_ADMIN);
+ connect(ui.pageInfo->BtnSnapshots, SIGNAL(clicked()), this, SLOT(OpenSnapshotFolder()));
connect(ui.pageInfo->BtnBack, SIGNAL(clicked()), this, SLOT(GoBack()));
connect(ui.pageGameStats->BtnBack, SIGNAL(clicked()), this, SLOT(GoBack()));
@@ -576,6 +578,12 @@
ammoSchemeModel->Save();
}
+void HWForm::OpenSnapshotFolder()
+{
+ QString path = QDir::toNativeSeparators(cfgdir->absolutePath() + "/Screenshots");
+ QDesktopServices::openUrl(QUrl("file:///" + path));
+}
+
void HWForm::btnExitPressed()
{
eggTimer.start();
--- a/QTfrontend/hwform.h Mon Aug 22 17:54:04 2011 +0400
+++ b/QTfrontend/hwform.h Mon Aug 22 16:20:28 2011 +0200
@@ -72,6 +72,7 @@
void GoToNewScheme();
void GoToPage(int id);
void GoBack();
+ void OpenSnapshotFolder();
QString getDemoArguments();
void AssociateFiles();
void btnExitPressed();
--- a/QTfrontend/pageinfo.cpp Mon Aug 22 17:54:04 2011 +0400
+++ b/QTfrontend/pageinfo.cpp Mon Aug 22 16:20:28 2011 +0200
@@ -29,6 +29,7 @@
pageLayout->setColumnStretch(1, 1);
pageLayout->setColumnStretch(2, 1);
+ BtnSnapshots = addButton(":/res/Star.png", pageLayout, 1, 2, true);
BtnBack = addButton(":/res/Exit.png", pageLayout, 1, 0, true);
about = new About(this);
--- a/QTfrontend/pageinfo.h Mon Aug 22 17:54:04 2011 +0400
+++ b/QTfrontend/pageinfo.h Mon Aug 22 16:20:28 2011 +0200
@@ -30,6 +30,7 @@
public:
PageInfo(QWidget* parent = 0);
+ QPushButton *BtnSnapshots;
QPushButton *BtnBack;
About *about;
};