mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Gps list: include the time_t timestamp in the model
Just having the string means we lost the unique value that we can use as key to indentify a specific GPS fix. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
b34a507d51
commit
249a2c2c09
3 changed files with 7 additions and 3 deletions
|
@ -46,6 +46,8 @@ QVariant GpsListModel::data(const QModelIndex &index, int role) const
|
|||
|
||||
if (role == GpsDateRole)
|
||||
return get_short_dive_date_string(gt.when);
|
||||
else if (role == GpsWhenRole)
|
||||
return gt.when;
|
||||
else if (role == GpsNameRole)
|
||||
return gt.name;
|
||||
else if (role == GpsLatitudeRole)
|
||||
|
@ -58,7 +60,8 @@ QVariant GpsListModel::data(const QModelIndex &index, int role) const
|
|||
QHash<int, QByteArray> GpsListModel::roleNames() const
|
||||
{
|
||||
QHash<int, QByteArray> roles;
|
||||
roles[GpsDateRole] = "when";
|
||||
roles[GpsDateRole] = "date";
|
||||
roles[GpsWhenRole] = "when";
|
||||
roles[GpsNameRole] = "name";
|
||||
roles[GpsLatitudeRole] = "latitude";
|
||||
roles[GpsLongitudeRole] = "longitude";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue