diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2018-10-19 21:16:50 -0400 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2018-10-23 22:45:30 +0100 |
commit | 17347f51101e41423d7517403efc853264aae7ae (patch) | |
tree | b8a80f3302abcc3da6c13e55ab811029829335dc | |
parent | 40536286d2b6a4533bd4ef863a1146cc321689dc (diff) | |
download | subsurface-17347f51101e41423d7517403efc853264aae7ae.tar.gz |
Mobile/filtering: add fullTextNoNotes role to the dive list model
This way we can filter with and without the notes.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
-rw-r--r-- | qt-models/divelistmodel.cpp | 2 | ||||
-rw-r--r-- | qt-models/divelistmodel.h | 3 |
2 files changed, 4 insertions, 1 deletions
diff --git a/qt-models/divelistmodel.cpp b/qt-models/divelistmodel.cpp index 1c4e20b48..bc7e38a98 100644 --- a/qt-models/divelistmodel.cpp +++ b/qt-models/divelistmodel.cpp @@ -169,6 +169,7 @@ QVariant DiveListModel::data(const QModelIndex &index, int role) const case DiveRole: return QVariant::fromValue<QObject*>(curr_dive); case DiveDateRole: return (qlonglong)curr_dive->timestamp(); case FullTextRole: return curr_dive->fullText(); + case FullTextNoNotesRole: return curr_dive->fullTextNoNotes(); } return QVariant(); @@ -180,6 +181,7 @@ QHash<int, QByteArray> DiveListModel::roleNames() const roles[DiveRole] = "dive"; roles[DiveDateRole] = "date"; roles[FullTextRole] = "fulltext"; + roles[FullTextNoNotesRole] = "fulltextnonotes"; return roles; } diff --git a/qt-models/divelistmodel.h b/qt-models/divelistmodel.h index b633cc3d5..caf2616a7 100644 --- a/qt-models/divelistmodel.h +++ b/qt-models/divelistmodel.h @@ -30,7 +30,8 @@ public: enum DiveListRoles { DiveRole = Qt::UserRole + 1, DiveDateRole, - FullTextRole + FullTextRole, + FullTextNoNotesRole }; static DiveListModel *instance(); |