summaryrefslogtreecommitdiff
path: root/gui/storageview.cc
diff options
context:
space:
mode:
Diffstat (limited to 'gui/storageview.cc')
-rw-r--r--gui/storageview.cc5
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
{