}
}
+void MainWindow::callItemActivated(const QModelIndex &index) {
+ lookupState();
+}
+
void MainWindow::replayStart()
{
if (m_trace->isSaving()) {
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)
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()));
}
-
- // force initial capture of thumbnails
- replayTrace(false, true);
}
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) {
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;
replayTrace(true, false);
}
+void MainWindow::showThumbnails()
+{
+ replayTrace(false, true);
+}
+
MainWindow::~MainWindow()
{
delete m_trace;
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()));
connect(m_ui.callView->selectionModel(), SIGNAL(currentChanged(const QModelIndex &, const QModelIndex &)),
this, SLOT(callItemSelected(const QModelIndex &)));
+ connect(m_ui.callView, SIGNAL(doubleClicked(const QModelIndex &)),
+ this, SLOT(callItemActivated(const QModelIndex &)));
connect(m_ui.callView, SIGNAL(customContextMenuRequested(QPoint)),
this, SLOT(customContextMenuRequested(QPoint)));
void MainWindow::replayThumbnailsFound(const QList<QImage> &thumbnails)
{
- m_thumbnails = thumbnails;
-
m_trace->bindThumbnailsToFrames(thumbnails);
}