Skip to content

Commit

Permalink
FlyviewVideo.qml: add OnScreenGimbalController for gimbal mouse actio…
Browse files Browse the repository at this point in the history
…ns control
  • Loading branch information
Davidsastresas authored and julianoes committed Apr 11, 2024
1 parent 91b050d commit 96292f0
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/FlightDisplay/FlyViewVideo.qml
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,13 @@ Item {
}
}

OnScreenGimbalController {
id: onScreenGimbalController
anchors.fill: parent
screenX: flyViewVideoMouseArea.mouseX
screenY: flyViewVideoMouseArea.mouseY
}

MouseArea {
id: flyViewVideoMouseArea
anchors.fill: parent
Expand All @@ -104,9 +111,13 @@ Item {
property var trackingROI: null
property var trackingStatus: trackingStatusComponent.createObject(flyViewVideoMouseArea, {})

onClicked: onScreenGimbalController.clickControl()
onDoubleClicked: QGroundControl.videoManager.fullScreen = !QGroundControl.videoManager.fullScreen


onPressed: {
onScreenGimbalController.pressControl()

_track_rec_x = mouse.x
_track_rec_y = mouse.y

Expand Down Expand Up @@ -138,6 +149,8 @@ Item {
}
}
onReleased: {
onScreenGimbalController.releaseControl()

//if there is already a selection, delete it
if (trackingROI !== null) {
trackingROI.destroy();
Expand Down

0 comments on commit 96292f0

Please sign in to comment.