diff options
author | bd <bdunahu@operationnull.com> | 2025-04-27 16:00:06 -0400 |
---|---|---|
committer | bd <bdunahu@operationnull.com> | 2025-04-27 16:00:06 -0400 |
commit | 07c618096daec422c42ee1a379200101d0d349cc (patch) | |
tree | 3b4ee4e3d946620ff1fddb4f218c3ef3f07a2ecd /gui/storageview.cc | |
parent | 64efd868deec8921eac16b181f3a2e6d29f90b99 (diff) |
Add files for new RegisterView class
Diffstat (limited to 'gui/storageview.cc')
-rw-r--r-- | gui/storageview.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/gui/storageview.cc b/gui/storageview.cc index 2f444a9..60391f9 100644 --- a/gui/storageview.cc +++ b/gui/storageview.cc @@ -21,10 +21,11 @@ #include <QAbstractTableModel> #include <QVector> -StorageView::StorageView(int rows, QObject *parent) +StorageView::StorageView(int rows, int columns, QObject *parent) : QAbstractTableModel(parent) { this->r = rows; + this->c = columns; this->d.resize(rows); for (auto &row : this->d) row.resize(LINE_SIZE, 0); @@ -32,7 +33,7 @@ StorageView::StorageView(int rows, QObject *parent) int StorageView::rowCount(const QModelIndex &) const { return this->r; } -int StorageView::columnCount(const QModelIndex &) const { return LINE_SIZE; } +int StorageView::columnCount(const QModelIndex &) const { return this->c; } QVariant StorageView::data(const QModelIndex &i, int role) const { |