From 063da67766585bd1db5e8afd83e2f9eda88119c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Thu, 25 Jan 2018 17:37:34 +0100 Subject: Jump to pc address when program counter is double clicked --- qtmips_gui/programdock.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'qtmips_gui/programdock.cpp') diff --git a/qtmips_gui/programdock.cpp b/qtmips_gui/programdock.cpp index 3d881df..70d6a83 100644 --- a/qtmips_gui/programdock.cpp +++ b/qtmips_gui/programdock.cpp @@ -45,6 +45,10 @@ void ProgramView::setup(machine::QtMipsMachine *machine) { cb_single->setCurrentIndex(cb_pipelined->currentIndex() == 0 ? 0 : 1); } +void ProgramView::jump_to_pc(std::uint32_t addr) { + set_focus(addr); +} + QList ProgramView::row_widget(std::uint32_t address, QWidget *parent) { QList widgs; QLabel *l; @@ -86,3 +90,7 @@ ProgramDock::ProgramDock(QWidget *parent) : QDockWidget(parent) { void ProgramDock::setup(machine::QtMipsMachine *machine) { view->setup(machine); } + +void ProgramDock::jump_to_pc(std::uint32_t addr) { + view->jump_to_pc(addr); +} -- cgit v1.2.3