aboutsummaryrefslogtreecommitdiff
path: root/qtmips_gui/memorymodel.h
diff options
context:
space:
mode:
authorFanda Vacek <fanda.vacek@gmail.com>2019-02-09 20:06:55 +0100
committerPavel Pisa <pisa@cmp.felk.cvut.cz>2019-02-09 21:55:54 +0100
commitfa867875a15faf61ceef4bbc7b6e4f281fa91954 (patch)
tree4a24652616541618a3513faaa23f9d9f5f940ca3 /qtmips_gui/memorymodel.h
parent3e505068b88edb726dcc16969fdd86c479f49022 (diff)
downloadqtmips-fa867875a15faf61ceef4bbc7b6e4f281fa91954.tar.gz
qtmips-fa867875a15faf61ceef4bbc7b6e4f281fa91954.tar.bz2
qtmips-fa867875a15faf61ceef4bbc7b6e4f281fa91954.zip
Correct MemoryDock header fields values.
Diffstat (limited to 'qtmips_gui/memorymodel.h')
-rw-r--r--qtmips_gui/memorymodel.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/qtmips_gui/memorymodel.h b/qtmips_gui/memorymodel.h
index badb224..8a01531 100644
--- a/qtmips_gui/memorymodel.h
+++ b/qtmips_gui/memorymodel.h
@@ -41,6 +41,8 @@
class MemoryModel : public QAbstractTableModel
{
Q_OBJECT
+
+ using Super = QAbstractTableModel;
public:
enum MemoryCellSize {
CELLSIZE_BYTE,
@@ -51,10 +53,10 @@ public:
MemoryModel(QObject *parent);
int rowCount(const QModelIndex &parent = QModelIndex()) const override ;
int columnCount(const QModelIndex &parent = QModelIndex()) const override;
+ QVariant headerData(int section, Qt::Orientation orientation, int role) const override;
QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override;
private:
- void updateHeaderLabels();
- inline unsigned int cellSizeBytes() {
+ inline unsigned int cellSizeBytes() const {
switch (cell_size) {
case CELLSIZE_BYTE:
return 1;