mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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>
This commit is contained in:
parent
93896e54db
commit
00e401b61f
2 changed files with 7 additions and 2 deletions
|
@ -345,6 +345,9 @@ Item {
|
||||||
case contextMenu.actions.COPY_LOCATION_SEXAGESIMAL:
|
case contextMenu.actions.COPY_LOCATION_SEXAGESIMAL:
|
||||||
mapHelper.copyToClipboardCoordinates(map.center, true)
|
mapHelper.copyToClipboardCoordinates(map.center, true)
|
||||||
break
|
break
|
||||||
|
case contextMenu.actions.SELECT_VISIBLE_LOCATIONS:
|
||||||
|
mapHelper.selectVisibleLocations()
|
||||||
|
break
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,12 +8,14 @@ Item {
|
||||||
readonly property var actions: {
|
readonly property var actions: {
|
||||||
"OPEN_LOCATION_IN_GOOGLE_MAPS": 0,
|
"OPEN_LOCATION_IN_GOOGLE_MAPS": 0,
|
||||||
"COPY_LOCATION_DECIMAL": 1,
|
"COPY_LOCATION_DECIMAL": 1,
|
||||||
"COPY_LOCATION_SEXAGESIMAL": 2
|
"COPY_LOCATION_SEXAGESIMAL": 2,
|
||||||
|
"SELECT_VISIBLE_LOCATIONS": 3
|
||||||
}
|
}
|
||||||
readonly property var menuItemData: [
|
readonly property var menuItemData: [
|
||||||
{ idx: actions.OPEN_LOCATION_IN_GOOGLE_MAPS, itemText: qsTr("Open location in Google Maps") },
|
{ 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_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 itemTextPadding: 10.0
|
||||||
readonly property real itemHeight: 34.0
|
readonly property real itemHeight: 34.0
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue