#include "apitracemodel.h"
#include "apitracefilter.h"
#include "imageviewer.h"
+#include "jumpwidget.h"
#include "retracer.h"
#include "settingsdialog.h"
#include "shaderssourcewidget.h"
#include <QLineEdit>
#include <QMessageBox>
#include <QProgressBar>
+#include <QShortcut>
#include <QToolBar>
#include <QUrl>
#include <QVBoxLayout>
m_ui.detailsWebView->page()->setLinkDelegationPolicy(
QWebPage::DelegateExternalLinks);
+
+ m_jumpWidget = new JumpWidget(this);
+ m_ui.centralLayout->addWidget(m_jumpWidget);
+ m_jumpWidget->hide();
+
+
+ new QShortcut(QKeySequence(Qt::CTRL + Qt::Key_G),
+ this, SLOT(slotGoTo()));
}
void MainWindow::initConnections()
connect(m_ui.detailsWebView, SIGNAL(linkClicked(const QUrl&)),
this, SLOT(openHelp(const QUrl&)));
+
+ connect(m_jumpWidget, SIGNAL(jumpTo(int)),
+ SLOT(slotJumpTo(int)));
}
void MainWindow::replayStateFound(const ApiTraceState &state)
}
}
+void MainWindow::slotGoTo()
+{
+ m_jumpWidget->show();
+}
+
+void MainWindow::slotJumpTo(int callNum)
+{
+ QModelIndex index = m_proxyModel->callIndex(callNum);
+ if (index.isValid()) {
+ m_ui.callView->setCurrentIndex(index);
+ }
+}
+
#include "mainwindow.moc"