Browse Source

FlyviewVideo.qml: add OnScreenGimbalController for gimbal mouse actions control

QGC4.4
davidsastresas 11 months ago committed by Julian Oes
parent
commit
96292f0d3e
No known key found for this signature in database
GPG Key ID: F0ED380FEA56DE41
  1. 13
      src/FlightDisplay/FlyViewVideo.qml

13
src/FlightDisplay/FlyViewVideo.qml

@ -88,6 +88,13 @@ Item {
} }
} }
OnScreenGimbalController {
id: onScreenGimbalController
anchors.fill: parent
screenX: flyViewVideoMouseArea.mouseX
screenY: flyViewVideoMouseArea.mouseY
}
MouseArea { MouseArea {
id: flyViewVideoMouseArea id: flyViewVideoMouseArea
anchors.fill: parent anchors.fill: parent
@ -104,9 +111,13 @@ Item {
property var trackingROI: null property var trackingROI: null
property var trackingStatus: trackingStatusComponent.createObject(flyViewVideoMouseArea, {}) property var trackingStatus: trackingStatusComponent.createObject(flyViewVideoMouseArea, {})
onClicked: onScreenGimbalController.clickControl()
onDoubleClicked: QGroundControl.videoManager.fullScreen = !QGroundControl.videoManager.fullScreen onDoubleClicked: QGroundControl.videoManager.fullScreen = !QGroundControl.videoManager.fullScreen
onPressed: { onPressed: {
onScreenGimbalController.pressControl()
_track_rec_x = mouse.x _track_rec_x = mouse.x
_track_rec_y = mouse.y _track_rec_y = mouse.y
@ -138,6 +149,8 @@ Item {
} }
} }
onReleased: { onReleased: {
onScreenGimbalController.releaseControl()
//if there is already a selection, delete it //if there is already a selection, delete it
if (trackingROI !== null) { if (trackingROI !== null) {
trackingROI.destroy(); trackingROI.destroy();

Loading…
Cancel
Save