summaryrefslogtreecommitdiffstats
path: root/mobile-widgets/qml
diff options
context:
space:
mode:
authorGravatar Lubomir I. Ivanov <neolit123@gmail.com>2017-08-07 03:02:16 +0300
committerGravatar Dirk Hohndel <dirk@hohndel.org>2017-08-07 00:51:21 -0700
commit00e401b61fc3b81418e504c76843e5513e90267f (patch)
tree7e777936dd504860bf0f7e7a570a6516e412d89e /mobile-widgets/qml
parent93896e54dbd9ab5d82c72516ea1acaa8d63710e1 (diff)
downloadsubsurface-00e401b61fc3b81418e504c76843e5513e90267f.tar.gz
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 <neolit123@gmail.com>
Diffstat (limited to 'mobile-widgets/qml')
-rw-r--r--mobile-widgets/qml/MapWidget.qml3
-rw-r--r--mobile-widgets/qml/MapWidgetContextMenu.qml6
2 files changed, 7 insertions, 2 deletions
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