diff options
author | Pavel Pisa <pisa@cmp.felk.cvut.cz> | 2019-02-10 20:41:14 +0100 |
---|---|---|
committer | Pavel Pisa <pisa@cmp.felk.cvut.cz> | 2019-02-10 20:41:14 +0100 |
commit | 53605cd996338dafc507d4126a2a49b865b04db1 (patch) | |
tree | 82b03aed3c3c022c34416343e0cbef4287d24c34 /qtmips_gui/memorydock.cpp | |
parent | 2fdc9e0e64c234832e13735a9e6972a699ed9bed (diff) | |
download | qtmips-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.cpp | 3 |
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) { |