diff options
Diffstat (limited to 'qtmips_gui')
-rw-r--r-- | qtmips_gui/memoryview.cpp | 23 | ||||
-rw-r--r-- | qtmips_gui/memoryview.h | 4 |
2 files changed, 1 insertions, 26 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 |