QML UI: show dive site on map with left action on dive details page

The icon isn't great, though.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2016-04-19 05:09:17 -07:00
parent c6dbbe1aac
commit a807a5e8cd

View file

@ -42,6 +42,7 @@ Kirigami.Page {
target: diveDetailsPage;
actions {
right: deleteAction
left: diveDetailsListView.currentItem.modelData.dive.gps !== "" ? mapAction : null
}
}
PropertyChanges { target: detailsEditScroll; opened: false }
@ -73,6 +74,14 @@ Kirigami.Page {
}
}
property QtObject mapAction: Action {
text: "Show on map"
iconName: "gps"
onTriggered: {
showMap(diveDetailsListView.currentItem.modelData.dive.gps)
}
}
actions.main: Action {
iconName: state !== "view" ? "document-save" : "document-edit"
onTriggered: {