aboutsummaryrefslogtreecommitdiff
path: root/qtmips_gui/memoryview.h
diff options
context:
space:
mode:
Diffstat (limited to 'qtmips_gui/memoryview.h')
-rw-r--r--qtmips_gui/memoryview.h36
1 files changed, 36 insertions, 0 deletions
diff --git a/qtmips_gui/memoryview.h b/qtmips_gui/memoryview.h
new file mode 100644
index 0000000..e1049e8
--- /dev/null
+++ b/qtmips_gui/memoryview.h
@@ -0,0 +1,36 @@
+#ifndef MEMORYVIEW_H
+#define MEMORYVIEW_H
+
+#include <QWidget>
+#include <QFrame>
+#include <QBoxLayout>
+#include <QLineEdit>
+#include <cstdint>
+
+class MemoryView : public QWidget {
+public:
+ MemoryView(QWidget *parent = nullptr);
+ ~MemoryView();
+
+ void set_center(std::uint32_t address);
+ std::uint32_t center();
+
+protected:
+ //virtual QWidget *row_widget(std::uint32_t address) = 0;
+
+ void resizeEvent(QResizeEvent *event);
+ void wheelEvent(QWheelEvent *event);
+
+ QVBoxLayout *layout;
+
+private slots:
+ void go_edit_finish();
+
+private:
+ std::uint32_t center_addr;
+
+ QFrame *frame;
+ QLineEdit *go_edit;
+};
+
+#endif // MEMORYVIEW_H