changeset 83:11aaa9214cfb

Add back to folder selection button
author Andre Heinecke <andre.heinecke@intevation.de>
date Thu, 18 Jun 2015 18:55:00 +0200
parents 9a03703622b8
children 90c297a2a3dd
files src/mainwindow.cpp src/mainwindow.h
diffstat 2 files changed, 14 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/mainwindow.cpp	Thu Jun 18 17:58:34 2015 +0200
+++ b/src/mainwindow.cpp	Thu Jun 18 18:55:00 2015 +0200
@@ -62,6 +62,12 @@
 
     setCentralWidget(tabWidget);
 
+    QPushButton *backBtn = new QPushButton;
+    backBtn->setIcon(QApplication::style()->standardIcon(QStyle::SP_ArrowBack));
+    backBtn->setToolTip(tr("Back to exam selection."));
+    tabWidget->setCornerWidget(backBtn, Qt::TopLeftCorner);
+
+    connect (backBtn, &QPushButton::clicked, this, &MainWindow::goBack);
     connect (mPlayer, &PNGPlayer::error, this, &MainWindow::showErrorMessage);
     connect (mPlayer, &PNGPlayer::advance, mDataView, &MetaDataView::selectNextRow);
     connect (mPlayer, &PNGPlayer::back, mDataView, &MetaDataView::selectPrevRow);
@@ -222,3 +228,8 @@
     connect(next, &QShortcut::activated, mDataView, &MetaDataView::selectNextRow);
     connect(prev, &QShortcut::activated, mDataView, &MetaDataView::selectPrevRow);
 }
+
+void MainWindow::goBack() {
+    hide();
+    showWithFolderSelect();
+}
--- a/src/mainwindow.h	Thu Jun 18 17:58:34 2015 +0200
+++ b/src/mainwindow.h	Thu Jun 18 18:55:00 2015 +0200
@@ -78,6 +78,9 @@
     void showPictureNameStatus(const QString& fileName, int current,
             int max, const QString& timestamp );
 
+    /** @brief Go back to the folder seleciton. */
+    void goBack();
+
 private:
     QSettings mSettings;
 
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)