dive models: add helper role to find trip above or below dive

This is only used in the mobile UI where the sort direction is fixed and we
refer to dives based on the tree model. So the terms used and the concepts
that these rely on should be guaranteed to be valid.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2020-02-20 13:22:57 -08:00
parent 0cd275af67
commit ccf5bf6445
4 changed files with 36 additions and 3 deletions

View file

@ -47,6 +47,8 @@ QHash<int, QByteArray> MobileListModelBase::roleNames() const
roles[FirstGasRole] = "firstGas";
roles[SelectedRole] = "selected";
roles[DiveInTripRole] = "diveInTrip";
roles[TripAbove] = "tripAbove";
roles[TripBelow] = "tripBelow";
return roles;
}