mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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>
This commit is contained in:
parent
40536286d2
commit
17347f5110
2 changed files with 4 additions and 1 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -30,7 +30,8 @@ public:
|
|||
enum DiveListRoles {
|
||||
DiveRole = Qt::UserRole + 1,
|
||||
DiveDateRole,
|
||||
FullTextRole
|
||||
FullTextRole,
|
||||
FullTextNoNotesRole
|
||||
};
|
||||
|
||||
static DiveListModel *instance();
|
||||
|
|
Loading…
Add table
Reference in a new issue