summaryrefslogtreecommitdiffstats
path: root/qt-ui
diff options
context:
space:
mode:
authorGravatar Tomaz Canabrava <tomaz.canabrava@intel.com>2015-01-08 10:13:36 -0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2015-01-08 07:40:51 -0800
commit9ee615bca3ee27f8e96c0a4e95737a76af0e8b7a (patch)
treea189a278ae8f9df970a93b7f8b339f18fe15c24b /qt-ui
parentdb367ae0a28088be9438e1479c97da14e4b5737c (diff)
downloadsubsurface-9ee615bca3ee27f8e96c0a4e95737a76af0e8b7a.tar.gz
Dive d/l selection UI:: Constructor, rowCount and ColumnCount
Add importedDivesIndexes and Data. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui')
-rw-r--r--qt-ui/downloadfromdivecomputer.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/qt-ui/downloadfromdivecomputer.cpp b/qt-ui/downloadfromdivecomputer.cpp
index b359aa5dc..cc695a7de 100644
--- a/qt-ui/downloadfromdivecomputer.cpp
+++ b/qt-ui/downloadfromdivecomputer.cpp
@@ -498,19 +498,20 @@ void DownloadThread::run()
error = str_error(errorText, data->devname, data->vendor, data->product);
}
-DiveImportedModel::DiveImportedModel(QObject *o)
+DiveImportedModel::DiveImportedModel(QObject *o) : QAbstractTableModel(o),
+ lastIndex(0),
+ firstIndex(0)
{
-
}
int DiveImportedModel::columnCount(const QModelIndex& model ) const
{
-
+ return 5;
}
int DiveImportedModel::rowCount(const QModelIndex& model) const
{
-
+ return lastIndex - firstIndex;
}
QVariant DiveImportedModel::data(const QModelIndex& model, int role) const