aboutsummaryrefslogtreecommitdiff
path: root/qtmips_gui/memoryview.h
diff options
context:
space:
mode:
authorKarel Kočí <cynerd@email.cz>2018-01-08 21:42:10 +0100
committerKarel Kočí <cynerd@email.cz>2018-01-08 21:42:10 +0100
commitbcdd7c87b1eda7dc6b294cfa0796ce7e36f12b23 (patch)
treef350edf10ff4978eb11c3b4b8baa02f77ec2c023 /qtmips_gui/memoryview.h
parent6e6931657b7147e31f1f8d77035de3e7911f437f (diff)
downloadqtmips-bcdd7c87b1eda7dc6b294cfa0796ce7e36f12b23.tar.gz
qtmips-bcdd7c87b1eda7dc6b294cfa0796ce7e36f12b23.tar.bz2
qtmips-bcdd7c87b1eda7dc6b294cfa0796ce7e36f12b23.zip
Add skeleton for memory view
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