QTfrontend/hwform.cpp
changeset 5651 a7de68f4f87f
parent 5567 44c9a577b082
child 5734 d710db47a1ef
--- 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();