From a807a5e8cd5473c8bacf5b6299755899f613a1dd Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Tue, 19 Apr 2016 05:09:17 -0700 Subject: 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 --- mobile-widgets/qml/DiveDetails.qml | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'mobile-widgets/qml') diff --git a/mobile-widgets/qml/DiveDetails.qml b/mobile-widgets/qml/DiveDetails.qml index 2de542b6e..5a320f055 100644 --- a/mobile-widgets/qml/DiveDetails.qml +++ b/mobile-widgets/qml/DiveDetails.qml @@ -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: { -- cgit v1.2.3-70-g09d2