mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-30 22:20:21 +00:00
mobile models: add trip location and notes
First step towards making those accessible and then editable. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
9e13777cc1
commit
028807ebc5
3 changed files with 6 additions and 0 deletions
|
@ -103,6 +103,8 @@ QVariant DiveTripModelBase::tripData(const dive_trip *trip, int column, int role
|
||||||
case MobileListModel::TripNrDivesRole: return trip->dives.nr;
|
case MobileListModel::TripNrDivesRole: return trip->dives.nr;
|
||||||
case MobileListModel::TripShortDateRole: return tripShortDate(trip);
|
case MobileListModel::TripShortDateRole: return tripShortDate(trip);
|
||||||
case MobileListModel::TripTitleRole: return tripTitle(trip);
|
case MobileListModel::TripTitleRole: return tripTitle(trip);
|
||||||
|
case MobileListModel::TripLocationRole: return QString(trip->location);
|
||||||
|
case MobileListModel::TripNotesRole: return QString(trip->notes);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -49,6 +49,8 @@ QHash<int, QByteArray> MobileListModelBase::roleNames() const
|
||||||
roles[DiveInTripRole] = "diveInTrip";
|
roles[DiveInTripRole] = "diveInTrip";
|
||||||
roles[TripAbove] = "tripAbove";
|
roles[TripAbove] = "tripAbove";
|
||||||
roles[TripBelow] = "tripBelow";
|
roles[TripBelow] = "tripBelow";
|
||||||
|
roles[TripLocationRole] = "tripLocation";
|
||||||
|
roles[TripNotesRole] = "tripNotes";
|
||||||
return roles;
|
return roles;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -57,6 +57,8 @@ public:
|
||||||
DiveInTripRole,
|
DiveInTripRole,
|
||||||
TripAbove,
|
TripAbove,
|
||||||
TripBelow,
|
TripBelow,
|
||||||
|
TripLocationRole,
|
||||||
|
TripNotesRole,
|
||||||
};
|
};
|
||||||
QHash<int, QByteArray> roleNames() const override;
|
QHash<int, QByteArray> roleNames() const override;
|
||||||
protected:
|
protected:
|
||||||
|
|
Loading…
Reference in a new issue