summaryrefslogtreecommitdiffstats
path: root/qt-ui/downloadfromdivecomputer.cpp
diff options
context:
space:
mode:
authorGravatar Tomaz Canabrava <tomaz.canabrava@intel.com>2015-01-08 11:00:42 -0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2015-01-08 07:43:38 -0800
commitf8af0239ce4d5549305f72b3668d94834f0074ca (patch)
treea04ab30158a97d218f2facdda6c96d4041d6a10b /qt-ui/downloadfromdivecomputer.cpp
parent797bf49129769842b5ca872e5efe40b4a575d1d5 (diff)
downloadsubsurface-f8af0239ce4d5549305f72b3668d94834f0074ca.tar.gz
Dive d/l selection UI: Set the item flags
Now the user can click on the dives that they want to keep. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/downloadfromdivecomputer.cpp')
-rw-r--r--qt-ui/downloadfromdivecomputer.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/qt-ui/downloadfromdivecomputer.cpp b/qt-ui/downloadfromdivecomputer.cpp
index a7363c4ed..ff42d41be 100644
--- a/qt-ui/downloadfromdivecomputer.cpp
+++ b/qt-ui/downloadfromdivecomputer.cpp
@@ -554,6 +554,12 @@ bool DiveImportedModel::setData(const QModelIndex &index, const QVariant &value,
dataChanged(index, index, QVector<int>() << Qt::CheckStateRole);
}
+Qt::ItemFlags DiveImportedModel::flags(const QModelIndex &index) const {
+ if (index.column() != 0)
+ return QAbstractTableModel::flags(index);
+ return QAbstractTableModel::flags(index) | Qt::ItemIsUserCheckable;
+}
+
void DiveImportedModel::setImportedDivesIndexes(int first, int last)
{
beginRemoveRows(QModelIndex(), 0, lastIndex - firstIndex);