diff options
author | Karel Kočí <cynerd@email.cz> | 2018-04-10 12:45:45 +0200 |
---|---|---|
committer | Karel Kočí <cynerd@email.cz> | 2018-04-10 12:45:45 +0200 |
commit | 3ad654354bc051796646186d45e027b30feea942 (patch) | |
tree | 315a4e3087a41dfc763128fcbc4755789a285c9b | |
parent | 482767bea82e89f7c984db3e8a0faa572c5ae592 (diff) | |
download | qtmips-3ad654354bc051796646186d45e027b30feea942.tar.gz qtmips-3ad654354bc051796646186d45e027b30feea942.tar.bz2 qtmips-3ad654354bc051796646186d45e027b30feea942.zip |
Drop quick jump buttons from memory view
They are not implemented and even if they would they usage would be
little bit funky as they would jump by internal amount of page memory.
-rw-r--r-- | qtmips_gui/memoryview.cpp | 23 | ||||
-rw-r--r-- | qtmips_gui/memoryview.h | 4 | ||||
-rw-r--r-- | qtmips_machine/memory.cpp | 12 | ||||
-rw-r--r-- | qtmips_machine/memory.h | 4 |
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(); |