From 3ad654354bc051796646186d45e027b30feea942 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Tue, 10 Apr 2018 12:45:45 +0200 Subject: 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. --- qtmips_gui/memoryview.cpp | 23 +---------------------- qtmips_gui/memoryview.h | 4 ---- 2 files changed, 1 insertion(+), 26 deletions(-) (limited to 'qtmips_gui') 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 -- cgit v1.2.3