mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
mobile/models: make dive invalid flag available to mobile UI
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
bd746b1d1b
commit
5747573019
3 changed files with 3 additions and 0 deletions
|
@ -244,6 +244,7 @@ QVariant DiveTripModelBase::diveData(const struct dive *d, int column, int role)
|
||||||
case MobileListModel::FirstGasRole: return getFirstGas(d);
|
case MobileListModel::FirstGasRole: return getFirstGas(d);
|
||||||
case MobileListModel::SelectedRole: return d->selected;
|
case MobileListModel::SelectedRole: return d->selected;
|
||||||
case MobileListModel::DiveInTripRole: return d->divetrip != NULL;
|
case MobileListModel::DiveInTripRole: return d->divetrip != NULL;
|
||||||
|
case MobileListModel::IsInvalidRole: return d->invalid;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
switch (role) {
|
switch (role) {
|
||||||
|
|
|
@ -51,6 +51,7 @@ QHash<int, QByteArray> MobileListModelBase::roleNames() const
|
||||||
roles[TripBelow] = "tripBelow";
|
roles[TripBelow] = "tripBelow";
|
||||||
roles[TripLocationRole] = "tripLocation";
|
roles[TripLocationRole] = "tripLocation";
|
||||||
roles[TripNotesRole] = "tripNotes";
|
roles[TripNotesRole] = "tripNotes";
|
||||||
|
roles[IsInvalidRole] = "isInvalid";
|
||||||
return roles;
|
return roles;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -59,6 +59,7 @@ public:
|
||||||
TripBelow,
|
TripBelow,
|
||||||
TripLocationRole,
|
TripLocationRole,
|
||||||
TripNotesRole,
|
TripNotesRole,
|
||||||
|
IsInvalidRole
|
||||||
};
|
};
|
||||||
QHash<int, QByteArray> roleNames() const override;
|
QHash<int, QByteArray> roleNames() const override;
|
||||||
protected:
|
protected:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue