diff options
Diffstat (limited to 'qt-models/diveimportedmodel.cpp')
-rw-r--r-- | qt-models/diveimportedmodel.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/qt-models/diveimportedmodel.cpp b/qt-models/diveimportedmodel.cpp index be25d6a2a..eeb564fc8 100644 --- a/qt-models/diveimportedmodel.cpp +++ b/qt-models/diveimportedmodel.cpp @@ -101,6 +101,12 @@ void DiveImportedModel::selectAll() dataChanged(index(0, 0), index(lastIndex - firstIndex, 0), QVector<int>() << Qt::CheckStateRole); } +void DiveImportedModel::selectRow(int row) +{ + checkStates[row] = !checkStates[row]; + dataChanged(index(row, 0), index(row, 0)); +} + void DiveImportedModel::selectNone() { memset(checkStates, false, lastIndex - firstIndex + 1); @@ -169,6 +175,7 @@ QHash<int, QByteArray> DiveImportedModel::roleNames() const { static QHash<int, QByteArray> roles = { { DateTime, "datetime"}, { Depth, "depth"}, - { Duration, "duration"}}; + { Duration, "duration"}, + }; return roles; } |