From 00e401b61fc3b81418e504c76843e5513e90267f Mon Sep 17 00:00:00 2001 From: "Lubomir I. Ivanov" Date: Mon, 7 Aug 2017 03:02:16 +0300 Subject: mapwidget.qml: add menu action for selecting visible locations MapWidgetContextMenu now has a new action (SELECT_VISIBLE_LOCATIONS), that will invoke the MapWidgetHelper method selectVisibleLocations(). Signed-off-by: Lubomir I. Ivanov --- mobile-widgets/qml/MapWidget.qml | 3 +++ mobile-widgets/qml/MapWidgetContextMenu.qml | 6 ++++-- 2 files changed, 7 insertions(+), 2 deletions(-) (limited to 'mobile-widgets/qml') diff --git a/mobile-widgets/qml/MapWidget.qml b/mobile-widgets/qml/MapWidget.qml index 7c0f9a691..5d917e02f 100644 --- a/mobile-widgets/qml/MapWidget.qml +++ b/mobile-widgets/qml/MapWidget.qml @@ -345,6 +345,9 @@ Item { case contextMenu.actions.COPY_LOCATION_SEXAGESIMAL: mapHelper.copyToClipboardCoordinates(map.center, true) break + case contextMenu.actions.SELECT_VISIBLE_LOCATIONS: + mapHelper.selectVisibleLocations() + break } } } diff --git a/mobile-widgets/qml/MapWidgetContextMenu.qml b/mobile-widgets/qml/MapWidgetContextMenu.qml index 50432569c..9d8bd330c 100644 --- a/mobile-widgets/qml/MapWidgetContextMenu.qml +++ b/mobile-widgets/qml/MapWidgetContextMenu.qml @@ -8,12 +8,14 @@ Item { readonly property var actions: { "OPEN_LOCATION_IN_GOOGLE_MAPS": 0, "COPY_LOCATION_DECIMAL": 1, - "COPY_LOCATION_SEXAGESIMAL": 2 + "COPY_LOCATION_SEXAGESIMAL": 2, + "SELECT_VISIBLE_LOCATIONS": 3 } readonly property var menuItemData: [ { idx: actions.OPEN_LOCATION_IN_GOOGLE_MAPS, itemText: qsTr("Open location in Google Maps") }, { idx: actions.COPY_LOCATION_DECIMAL, itemText: qsTr("Copy location to clipboard (decimal)") }, - { idx: actions.COPY_LOCATION_SEXAGESIMAL, itemText: qsTr("Copy location to clipboard (sexagesimal)") } + { idx: actions.COPY_LOCATION_SEXAGESIMAL, itemText: qsTr("Copy location to clipboard (sexagesimal)") }, + { idx: actions.SELECT_VISIBLE_LOCATIONS, itemText: qsTr("Select visible dive locations") } ] readonly property real itemTextPadding: 10.0 readonly property real itemHeight: 34.0 -- cgit v1.2.3-70-g09d2