QGroundControl
Ground Control Station for MAVLink Drones
Loading...
Searching...
No Matches
FlyViewGripperDropPanel.qml
Go to the documentation of this file.
1import QtQuick
2import QtQuick.Layouts
3
4import QGroundControl
5import QGroundControl.Controls
6
7ColumnLayout {
8 spacing: ScreenTools.defaultFontHeight / 2
9
10 property var _activeVehicle: QGroundControl.multiVehicleManager.activeVehicle
11 property var _buttonTitles: [qsTr("Release"), qsTr("Grab"), qsTr("Hold")]
12 property var _buttonActions: [QGCMAVLink.GripperActionRelease, QGCMAVLink.GripperActionGrab, QGCMAVLink.GripperActionHold]
13
14 Repeater {
15 model: _buttonTitles
16
17 QGCDelayButton {
18 Layout.fillWidth: true
19 text: _buttonTitles[index]
20
21 onActivated: {
22 _activeVehicle.sendGripperAction(_buttonActions[index])
23 dropPanel.hide()
24 }
25 }
26 }
27}