diff options
Diffstat (limited to 'gui/storageview.h')
-rw-r--r-- | gui/storageview.h | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/gui/storageview.h b/gui/storageview.h index 0518d8f..e8f3473 100644 --- a/gui/storageview.h +++ b/gui/storageview.h @@ -31,7 +31,7 @@ class StorageView : public QAbstractTableModel * `rows' rows. * @param the number of rows */ - StorageView(int rows, QObject *parent = nullptr); + StorageView(int rows, int columns, QObject *parent = nullptr); /** * Returns the number of rows in this table. @@ -51,13 +51,13 @@ class StorageView : public QAbstractTableModel * Returns a properly formatted cell, including alignment.This function is * specific to the implementation details of QAbstractTableModel. */ - QVariant + virtual QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override; /** * Adds custom formatting options for row and column headers. */ - QVariant headerData( + virtual QVariant headerData( int section, Qt::Orientation o, int role = Qt::DisplayRole) const override; @@ -75,12 +75,16 @@ class StorageView : public QAbstractTableModel public slots: void set_hex_display(bool hex); - private: + protected: /** * The number of rows in this table. */ int r; /** + * The number of columns in this table. + */ + int c; + /** * Whether or not the headers should be displayed in hex. */ bool is_hex = true; |