QTfrontend/ui/page/pagedata.cpp
changeset 9829 1804dd141015
parent 9080 9b42757d7e71
child 9998 736015b847e3
--- a/QTfrontend/ui/page/pagedata.cpp	Mon Dec 23 13:51:51 2013 -0500
+++ b/QTfrontend/ui/page/pagedata.cpp	Mon Dec 23 23:08:40 2013 +0400
@@ -26,6 +26,7 @@
 #include <QDebug>
 #include <QProgressBar>
 #include <QBuffer>
+#include <QDesktopServices>
 
 #include "pagedata.h"
 #include "databrowser.h"
@@ -48,10 +49,23 @@
     return pageLayout;
 }
 
+QLayout * PageDataDownload::footerLayoutDefinition()
+{
+    QHBoxLayout * bottomLayout = new QHBoxLayout();
+    bottomLayout->setStretch(0, 1);
+
+    pbOpenDir = addButton(tr("Open packages directory"), bottomLayout, 1, false);
+
+    bottomLayout->setStretch(2, 1);
+
+    return bottomLayout;
+}
+
 void PageDataDownload::connectSignals()
 {
     connect(web, SIGNAL(anchorClicked(QUrl)), this, SLOT(request(const QUrl&)));
     connect(this, SIGNAL(goBack()), this, SLOT(onPageLeave()));
+    connect(pbOpenDir, SIGNAL(clicked()), this, SLOT(openPackagesDir()));
 }
 
 PageDataDownload::PageDataDownload(QWidget* parent) : AbstractPage(parent)
@@ -193,3 +207,9 @@
         //DataManager::instance().reload();
     }
 }
+
+void PageDataDownload::openPackagesDir()
+{
+    QString path = QDir::toNativeSeparators(cfgdir->absolutePath() + "/Data");
+    QDesktopServices::openUrl(QUrl("file:///" + path));
+}