1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-11-28 18:58:48 -05:00

Add gesture support to maps

This commit is contained in:
Jon Beniston 2022-12-20 11:14:32 +00:00
parent 1a7c995e43
commit e023611bf2
3 changed files with 6 additions and 0 deletions

View File

@ -52,6 +52,8 @@ Item {
anchors.fill: parent anchors.fill: parent
center: QtPositioning.coordinate(51.5, 0.125) // London center: QtPositioning.coordinate(51.5, 0.125) // London
zoomLevel: 10 zoomLevel: 10
gesture.enabled: true
gesture.acceptedGestures: MapGestureArea.PinchGesture | MapGestureArea.PanGesture
// Needs to come first, otherwise MouseAreas in the MapItemViews don't get clicked event first // Needs to come first, otherwise MouseAreas in the MapItemViews don't get clicked event first
// Setting z doesn't seem to work // Setting z doesn't seem to work

View File

@ -64,6 +64,8 @@ Item {
anchors.fill: parent anchors.fill: parent
center: QtPositioning.coordinate(51.5, 0.125) // London center: QtPositioning.coordinate(51.5, 0.125) // London
zoomLevel: 10 zoomLevel: 10
gesture.enabled: true
gesture.acceptedGestures: MapGestureArea.PinchGesture | MapGestureArea.PanGesture
// Tracks first, so drawn under other items // Tracks first, so drawn under other items
MapItemView { MapItemView {

View File

@ -49,6 +49,8 @@ Item {
plugin: mapPlugin plugin: mapPlugin
center: QtPositioning.coordinate(51.5, 0.125) // London center: QtPositioning.coordinate(51.5, 0.125) // London
zoomLevel: 10 zoomLevel: 10
gesture.enabled: true
gesture.acceptedGestures: MapGestureArea.PinchGesture | MapGestureArea.PanGesture
MapItemView { MapItemView {
model: vorModel model: vorModel