diff options
author | Karel Kočí <cynerd@email.cz> | 2018-01-08 21:42:10 +0100 |
---|---|---|
committer | Karel Kočí <cynerd@email.cz> | 2018-01-08 21:42:10 +0100 |
commit | bcdd7c87b1eda7dc6b294cfa0796ce7e36f12b23 (patch) | |
tree | f350edf10ff4978eb11c3b4b8baa02f77ec2c023 /qtmips_gui/memoryview.cpp | |
parent | 6e6931657b7147e31f1f8d77035de3e7911f437f (diff) | |
download | qtmips-bcdd7c87b1eda7dc6b294cfa0796ce7e36f12b23.tar.gz qtmips-bcdd7c87b1eda7dc6b294cfa0796ce7e36f12b23.tar.bz2 qtmips-bcdd7c87b1eda7dc6b294cfa0796ce7e36f12b23.zip |
Add skeleton for memory view
Diffstat (limited to 'qtmips_gui/memoryview.cpp')
-rw-r--r-- | qtmips_gui/memoryview.cpp | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/qtmips_gui/memoryview.cpp b/qtmips_gui/memoryview.cpp new file mode 100644 index 0000000..bd5d6d8 --- /dev/null +++ b/qtmips_gui/memoryview.cpp @@ -0,0 +1,47 @@ +#include "memoryview.h" + +MemoryView::MemoryView(QWidget *parent) : QWidget(parent) { + layout = new QVBoxLayout(this); + + frame = new QFrame(this); + frame->setFrameShadow(QFrame::Sunken); + frame->setFrameShape(QFrame::StyledPanel); + frame->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); + // TODO + layout->addWidget(frame); + + go_edit = new QLineEdit(this); + go_edit->setText("0x00000000"); + go_edit->setInputMask("\\0\\xHHHHHHHH"); + layout->addWidget(go_edit); + connect(go_edit, SIGNAL(editingFinished()), this, SLOT(go_edit_finish())); + +} + +MemoryView::~MemoryView() { + delete go_edit; + delete frame; + delete layout; +} + +void MemoryView::set_center(std::uint32_t address) { + center_addr = address; + // TODO update view +} + +std::uint32_t MemoryView::center() { + return center_addr; +} + +void MemoryView::resizeEvent(QResizeEvent *event) { + QWidget::resizeEvent(event); + // TODO +} + +void MemoryView::wheelEvent(QWheelEvent *event) { + // TODO +} + +void MemoryView::go_edit_finish() { + // TODO +} |