diff src/mainwindow.cpp @ 3:248d5d1cdb38

Add functionalty to control buttons and make picture resizable
author Andre Heinecke <andre.heinecke@intevation.de>
date Mon, 23 Mar 2015 19:10:01 +0100
parents 97d2c8869c39
children 107e435cb569
line wrap: on
line diff
--- a/src/mainwindow.cpp	Mon Mar 23 16:34:42 2015 +0100
+++ b/src/mainwindow.cpp	Mon Mar 23 19:10:01 2015 +0100
@@ -36,7 +36,7 @@
 MainWindow::MainWindow() :
     mDataView(NULL) {
     setStatusBar(new QStatusBar());
-    resize(1190, 500);
+    //resize(1190, 500);
 
     setupGUI();
     readSettings();
@@ -59,8 +59,11 @@
 
     connect (mPlayer, &PNGPlayer::error, this, &MainWindow::showErrorMessage);
     connect (mPlayer, &PNGPlayer::advance, mDataView, &MetaDataView::selectNextRow);
+    connect (mPlayer, &PNGPlayer::back, mDataView, &MetaDataView::selectPrevRow);
+    connect (mPlayer, &PNGPlayer::jumpToFrame, mDataView, &MetaDataView::selectRow);
     connect (mDataView, &MetaDataView::selectionChanged, mPlayer,
              &PNGPlayer::showPicture);
+    mPlayer->setSpeed(mSettings.value(REPLAY_SPEED_KEY, REPLAY_SPEED_DEFAULT).toInt());
 }
 
 void MainWindow::showErrorMessage(const QString& errMsg) {
@@ -144,4 +147,5 @@
     qDebug() << "Parsed: " << metaData.filePath();
     mCurFolder = folder;
     mPlayer->setBaseDir(folder);
+    mDataView->selectNextRow();
 }
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)