aboutsummaryrefslogtreecommitdiff
path: root/qtmips_gui/memorydock.cpp
diff options
context:
space:
mode:
authorPavel Pisa <pisa@cmp.felk.cvut.cz>2019-02-10 20:41:14 +0100
committerPavel Pisa <pisa@cmp.felk.cvut.cz>2019-02-10 20:41:14 +0100
commit53605cd996338dafc507d4126a2a49b865b04db1 (patch)
tree82b03aed3c3c022c34416343e0cbef4287d24c34 /qtmips_gui/memorydock.cpp
parent2fdc9e0e64c234832e13735a9e6972a699ed9bed (diff)
downloadqtmips-53605cd996338dafc507d4126a2a49b865b04db1.tar.gz
qtmips-53605cd996338dafc507d4126a2a49b865b04db1.tar.bz2
qtmips-53605cd996338dafc507d4126a2a49b865b04db1.zip
Memory QTableView working for part of the memory range.
Unfortunately, QModelIndex supports only integers for rows and columns. Even if only size to maxint is used then Qt engine crashes. Workaround for Qt limitations is material for followup patches. Signed-off-by: Pavel Pisa <pisa@cmp.felk.cvut.cz>
Diffstat (limited to 'qtmips_gui/memorydock.cpp')
-rw-r--r--qtmips_gui/memorydock.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/qtmips_gui/memorydock.cpp b/qtmips_gui/memorydock.cpp
index 53cc2e0..856dfa2 100644
--- a/qtmips_gui/memorydock.cpp
+++ b/qtmips_gui/memorydock.cpp
@@ -41,6 +41,7 @@
#include <QLineEdit>
#include <QHeaderView>
#include "memorydock.h"
+#include "memorymodel.h"
#include "memorytableview.h"
@@ -81,6 +82,8 @@ MemoryDock::MemoryDock(QWidget *parent, QSettings *settings) : QDockWidget(paren
connect(this, &MemoryDock::machine_setup, memory_model, &MemoryModel::setup);
connect(cell_size, QOverload<int>::of(&QComboBox::currentIndexChanged),
memory_model, &MemoryModel::set_cell_size);
+ connect(memory_model, SIGNAL(cell_size_changed()),
+ memory_content, SLOT(adap_to_cell_size()));
}
void MemoryDock::setup(machine::QtMipsMachine *machine) {