diff options
author | Karel Kočí <cynerd@email.cz> | 2018-04-17 10:36:06 +0200 |
---|---|---|
committer | Karel Kočí <cynerd@email.cz> | 2018-04-17 10:36:06 +0200 |
commit | fda5c2613695268e75c9be99617660ecec50baa7 (patch) | |
tree | 2890ff4aeb016adbdd02b6f89a130d75630d2fdf /qtmips_gui/memoryview.h | |
parent | 731701ee554833c5e69c1eb77764cda425ca9308 (diff) | |
download | qtmips-fda5c2613695268e75c9be99617660ecec50baa7.tar.gz qtmips-fda5c2613695268e75c9be99617660ecec50baa7.tar.bz2 qtmips-fda5c2613695268e75c9be99617660ecec50baa7.zip |
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.
Diffstat (limited to 'qtmips_gui/memoryview.h')
-rw-r--r-- | qtmips_gui/memoryview.h | 7 |
1 files changed, 5 insertions, 2 deletions
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(); |