aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--qtmips_gui/memoryview.cpp23
-rw-r--r--qtmips_gui/memoryview.h4
-rw-r--r--qtmips_machine/memory.cpp12
-rw-r--r--qtmips_machine/memory.h4
4 files changed, 1 insertions, 42 deletions
diff --git a/qtmips_gui/memoryview.cpp b/qtmips_gui/memoryview.cpp
index d893c06..5377ae1 100644
--- a/qtmips_gui/memoryview.cpp
+++ b/qtmips_gui/memoryview.cpp
@@ -22,20 +22,11 @@ MemoryView::MemoryView(QWidget *parent) : QWidget(parent) {
ctl_widg = new QWidget(this);
layout->addWidget(ctl_widg);
- ctl_layout = new QHBoxLayout(ctl_widg);
go_edit = new QLineEdit(ctl_widg);
go_edit->setText("0x00000000");
go_edit->setInputMask("\\0\\xHHHHHHHH");
- ctl_layout->addWidget(go_edit);
+ layout->addWidget(go_edit);
connect(go_edit, SIGNAL(editingFinished()), this, SLOT(go_edit_finish()));
- up = new QToolButton(ctl_widg);
- up->setArrowType(Qt::UpArrow);
- connect(up, SIGNAL(clicked(bool)), this, SLOT(prev_section()));
- ctl_layout->addWidget(up);
- down = new QToolButton(ctl_widg);
- down->setArrowType(Qt::DownArrow);
- connect(down, SIGNAL(clicked(bool)), this, SLOT(next_section()));
- ctl_layout->addWidget(down);
}
void MemoryView::setup(machine::QtMipsMachine *machine) {
@@ -111,18 +102,6 @@ void MemoryView::go_edit_finish() {
edit_load_focus();
}
-void MemoryView::next_section() {
- if (memory == nullptr)
- return;
- set_focus(memory->next_allocated(focus()));
-}
-
-void MemoryView::prev_section() {
- if (memory == nullptr)
- return;
- set_focus(memory->prev_allocated(focus()));
-}
-
MemoryView::Frame::Frame(MemoryView *parent) : QAbstractScrollArea(parent) {
mv = parent;
content_y = -3*MIN_OFF/2; // When this is initialized the width is 0 so this uses just min to inialize it
diff --git a/qtmips_gui/memoryview.h b/qtmips_gui/memoryview.h
index ec909f0..605adda 100644
--- a/qtmips_gui/memoryview.h
+++ b/qtmips_gui/memoryview.h
@@ -38,8 +38,6 @@ protected:
private slots:
void go_edit_finish();
- void next_section();
- void prev_section();
private:
unsigned count;
@@ -65,9 +63,7 @@ private:
Frame *memf;
QWidget *ctl_widg;
- QHBoxLayout *ctl_layout;
QLineEdit *go_edit;
- QToolButton *up, *down;
};
#endif // MEMORYVIEW_H
diff --git a/qtmips_machine/memory.cpp b/qtmips_machine/memory.cpp
index 9ab7ef6..3b47ca7 100644
--- a/qtmips_machine/memory.cpp
+++ b/qtmips_machine/memory.cpp
@@ -231,18 +231,6 @@ const union machine::MemoryTree *Memory::get_memorytree_root() const {
return this->mt_root;
}
-std::uint32_t Memory::next_allocated(std::uint32_t address) const {
- address = address >> 2;
- // TODO
- return address;
-}
-
-std::uint32_t Memory::prev_allocated(std::uint32_t address) const {
- address = address >> 2;
- // TODO
- return address;
-}
-
union machine::MemoryTree *Memory::allocate_section_tree() {
union MemoryTree *mt = new union MemoryTree[MEMORY_TREE_ROW_SIZE];
memset(mt, 0, sizeof *mt * MEMORY_TREE_ROW_SIZE);
diff --git a/qtmips_machine/memory.h b/qtmips_machine/memory.h
index 231cc34..e4777b3 100644
--- a/qtmips_machine/memory.h
+++ b/qtmips_machine/memory.h
@@ -85,10 +85,6 @@ public:
const union MemoryTree *get_memorytree_root() const;
- // These functions locate next start or end of next allocated tree leaf
- std::uint32_t next_allocated(std::uint32_t) const;
- std::uint32_t prev_allocated(std::uint32_t) const;
-
private:
union MemoryTree *mt_root;
static union MemoryTree *allocate_section_tree();