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>
This commit is contained in:
Tomaz Canabrava 2015-01-08 10:13:36 -02:00 committed by Dirk Hohndel
parent db367ae0a2
commit 9ee615bca3

View file

@ -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