+
+ connect(m_trimProcess, SIGNAL(trimmedFile(const QString&)),
+ SLOT(createdTrim(const QString&)));
+ connect(m_trimProcess, SIGNAL(error(const QString&)),
+ SLOT(trimError(const QString&)));
+
+ connect(m_ui.errorsDock, SIGNAL(visibilityChanged(bool)),
+ m_ui.actionShowErrorsDock, SLOT(setChecked(bool)));
+ connect(m_ui.actionShowErrorsDock, SIGNAL(triggered(bool)),
+ m_ui.errorsDock, SLOT(setVisible(bool)));
+ connect(m_ui.errorsTreeWidget,
+ SIGNAL(itemActivated(QTreeWidgetItem*, int)),
+ this, SLOT(slotErrorSelected(QTreeWidgetItem*)));
+
+ connect(m_ui.actionShowProfileDialog, SIGNAL(triggered(bool)),
+ m_profileDialog, SLOT(show()));
+ connect(m_profileDialog, SIGNAL(jumpToCall(int)),
+ this, SLOT(slotJumpTo(int)));
+}
+
+void MainWindow::updateActionsState(bool traceLoaded, bool stopped)
+{
+ if (traceLoaded) {
+ /* Edit */
+ m_ui.actionFind ->setEnabled(true);
+ m_ui.actionGo ->setEnabled(true);
+ m_ui.actionGoFrameStart ->setEnabled(true);
+ m_ui.actionGoFrameEnd ->setEnabled(true);
+
+ /* Trace */
+ if (stopped) {
+ m_ui.actionStop->setEnabled(false);
+ m_ui.actionReplay->setEnabled(true);
+ }
+ else {
+ m_ui.actionStop->setEnabled(true);
+ m_ui.actionReplay->setEnabled(false);
+ }
+
+ m_ui.actionProfile ->setEnabled(true);
+ m_ui.actionLookupState ->setEnabled(true);
+ m_ui.actionShowThumbnails->setEnabled(true);
+ m_ui.actionTrim ->setEnabled(true);
+ }
+ else {
+ /* Edit */
+ m_ui.actionFind ->setEnabled(false);
+ m_ui.actionGo ->setEnabled(false);
+ m_ui.actionGoFrameStart ->setEnabled(false);
+ m_ui.actionGoFrameEnd ->setEnabled(false);
+
+ /* Trace */
+ m_ui.actionReplay ->setEnabled(false);
+ m_ui.actionProfile ->setEnabled(false);
+ m_ui.actionStop ->setEnabled(false);
+ m_ui.actionLookupState ->setEnabled(false);
+ m_ui.actionShowThumbnails->setEnabled(false);
+ m_ui.actionTrim ->setEnabled(false);
+ }
+}
+
+void MainWindow::closeEvent(QCloseEvent * event)
+{
+ m_profileDialog->close();
+ QMainWindow::closeEvent(event);