comparison 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
comparison
equal deleted inserted replaced
2:97d2c8869c39 3:248d5d1cdb38
34 #include <QVBoxLayout> 34 #include <QVBoxLayout>
35 35
36 MainWindow::MainWindow() : 36 MainWindow::MainWindow() :
37 mDataView(NULL) { 37 mDataView(NULL) {
38 setStatusBar(new QStatusBar()); 38 setStatusBar(new QStatusBar());
39 resize(1190, 500); 39 //resize(1190, 500);
40 40
41 setupGUI(); 41 setupGUI();
42 readSettings(); 42 readSettings();
43 setAcceptDrops(true); 43 setAcceptDrops(true);
44 //QIcon windowIcon = QIcon(":/icon-64.png"); 44 //QIcon windowIcon = QIcon(":/icon-64.png");
57 57
58 setCentralWidget(tabWidget); 58 setCentralWidget(tabWidget);
59 59
60 connect (mPlayer, &PNGPlayer::error, this, &MainWindow::showErrorMessage); 60 connect (mPlayer, &PNGPlayer::error, this, &MainWindow::showErrorMessage);
61 connect (mPlayer, &PNGPlayer::advance, mDataView, &MetaDataView::selectNextRow); 61 connect (mPlayer, &PNGPlayer::advance, mDataView, &MetaDataView::selectNextRow);
62 connect (mPlayer, &PNGPlayer::back, mDataView, &MetaDataView::selectPrevRow);
63 connect (mPlayer, &PNGPlayer::jumpToFrame, mDataView, &MetaDataView::selectRow);
62 connect (mDataView, &MetaDataView::selectionChanged, mPlayer, 64 connect (mDataView, &MetaDataView::selectionChanged, mPlayer,
63 &PNGPlayer::showPicture); 65 &PNGPlayer::showPicture);
66 mPlayer->setSpeed(mSettings.value(REPLAY_SPEED_KEY, REPLAY_SPEED_DEFAULT).toInt());
64 } 67 }
65 68
66 void MainWindow::showErrorMessage(const QString& errMsg) { 69 void MainWindow::showErrorMessage(const QString& errMsg) {
67 QMessageBox::warning(this, tr("Error!"), errMsg); 70 QMessageBox::warning(this, tr("Error!"), errMsg);
68 statusBar()->showMessage(errMsg); 71 statusBar()->showMessage(errMsg);
142 } 145 }
143 statusBar()->showMessage(tr("Parsed: '%1'").arg(metaData.filePath())); 146 statusBar()->showMessage(tr("Parsed: '%1'").arg(metaData.filePath()));
144 qDebug() << "Parsed: " << metaData.filePath(); 147 qDebug() << "Parsed: " << metaData.filePath();
145 mCurFolder = folder; 148 mCurFolder = folder;
146 mPlayer->setBaseDir(folder); 149 mPlayer->setBaseDir(folder);
150 mDataView->selectNextRow();
147 } 151 }
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)