From fda5c2613695268e75c9be99617660ecec50baa7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Tue, 17 Apr 2018 10:36:06 +0200 Subject: Store memory and program view address position This reloads memoryview with same base address as it was closed with. It somewhat works but with program view it seems to be buggy and shifts stuff down. But let's say that it's good enough for now. --- qtmips_gui/memoryview.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'qtmips_gui/memoryview.h') diff --git a/qtmips_gui/memoryview.h b/qtmips_gui/memoryview.h index 605adda..1aeaf10 100644 --- a/qtmips_gui/memoryview.h +++ b/qtmips_gui/memoryview.h @@ -17,12 +17,13 @@ class MemoryView : public QWidget { Q_OBJECT public: - MemoryView(QWidget *parent = nullptr); + MemoryView(QWidget *parent = nullptr, std::uint32_t addr0 = 0); virtual void setup(machine::QtMipsMachine*); void set_focus(std::uint32_t address); - std::uint32_t focus(); + std::uint32_t focus() const; + std::uint32_t addr0() const; void edit_load_focus(); // Set current focus to edit field @@ -36,6 +37,8 @@ protected: void reload_content(); // reload displayed data void update_content(int count, int shift); // update content to match given count and shift + virtual void addr0_save_change(std::uint32_t val); + private slots: void go_edit_finish(); -- cgit v1.2.3