diff options
-rw-r--r-- | gui/mainwindow.cpp | 15 | ||||
-rw-r--r-- | gui/mainwindow.h | 1 | ||||
-rw-r--r-- | gui/ui/mainwindow.ui | 12 |
3 files changed, 25 insertions, 3 deletions
diff --git a/gui/mainwindow.cpp b/gui/mainwindow.cpp index 5a90241f..02363519 100644 --- a/gui/mainwindow.cpp +++ b/gui/mainwindow.cpp @@ -182,6 +182,7 @@ void MainWindow::replayStop() m_ui.actionStop->setEnabled(false); m_ui.actionReplay->setEnabled(true); m_ui.actionLookupState->setEnabled(true); + m_ui.actionShowThumbnails->setEnabled(true); } void MainWindow::newTraceFile(const QString &fileName) @@ -194,11 +195,13 @@ void MainWindow::newTraceFile(const QString &fileName) if (fileName.isEmpty()) { m_ui.actionReplay->setEnabled(false); m_ui.actionLookupState->setEnabled(false); + m_ui.actionShowThumbnails->setEnabled(false); setWindowTitle(tr("QApiTrace")); } else { QFileInfo info(fileName); m_ui.actionReplay->setEnabled(true); m_ui.actionLookupState->setEnabled(true); + m_ui.actionShowThumbnails->setEnabled(true); setWindowTitle( tr("QApiTrace - %1").arg(info.fileName())); } @@ -209,6 +212,7 @@ void MainWindow::replayFinished(const QString &output) m_ui.actionStop->setEnabled(false); m_ui.actionReplay->setEnabled(true); m_ui.actionLookupState->setEnabled(true); + m_ui.actionShowThumbnails->setEnabled(true); m_progressBar->hide(); if (output.length() < 80) { @@ -230,6 +234,7 @@ void MainWindow::replayError(const QString &message) m_ui.actionStop->setEnabled(false); m_ui.actionReplay->setEnabled(true); m_ui.actionLookupState->setEnabled(true); + m_ui.actionShowThumbnails->setEnabled(true); m_stateEvent = 0; m_nonDefaultsLookupEvent = 0; @@ -262,9 +267,6 @@ void MainWindow::finishedLoadingTrace() m_trace->findCallIndex(m_initalCallNum); m_initalCallNum = -1; } - - // force initial capture of thumbnails - replayTrace(false, true); } void MainWindow::replayTrace(bool dumpState, bool dumpThumbnails) @@ -337,6 +339,11 @@ void MainWindow::lookupState() replayTrace(true, false); } +void MainWindow::showThumbnails() +{ + replayTrace(false, true); +} + MainWindow::~MainWindow() { delete m_trace; @@ -788,6 +795,8 @@ void MainWindow::initConnections() this, SLOT(replayStop())); connect(m_ui.actionLookupState, SIGNAL(triggered()), this, SLOT(lookupState())); + connect(m_ui.actionShowThumbnails, SIGNAL(triggered()), + this, SLOT(showThumbnails())); connect(m_ui.actionOptions, SIGNAL(triggered()), this, SLOT(showSettings())); diff --git a/gui/mainwindow.h b/gui/mainwindow.h index d898f3ca..76ae5948 100644 --- a/gui/mainwindow.h +++ b/gui/mainwindow.h @@ -55,6 +55,7 @@ private slots: void loadProgess(int percent); void finishedLoadingTrace(); void lookupState(); + void showThumbnails(); void showSettings(); void openHelp(const QUrl &url); void showSurfacesMenu(const QPoint &pos); diff --git a/gui/ui/mainwindow.ui b/gui/ui/mainwindow.ui index 5b48dc28..52cf49ed 100644 --- a/gui/ui/mainwindow.ui +++ b/gui/ui/mainwindow.ui @@ -75,6 +75,7 @@ <addaction name="actionReplay"/> <addaction name="actionStop"/> <addaction name="actionLookupState"/> + <addaction name="actionShowThumbnails"/> <addaction name="separator"/> <addaction name="actionOptions"/> </widget> @@ -525,6 +526,17 @@ <string>Ctrl+L</string> </property> </action> + <action name="actionShowThumbnails"> + <property name="enabled"> + <bool>false</bool> + </property> + <property name="text"> + <string>Show &Thumbnails</string> + </property> + <property name="shortcut"> + <string>Ctrl+T</string> + </property> + </action> <action name="actionOptions"> <property name="text"> <string>Options</string> |