QGroundControl
Ground Control Station for MAVLink Drones
Loading...
Searching...
No Matches
FlyViewAdditionalActionsPanel.qml
Go to the documentation of this file.
1import QtQuick
2import QtQuick.Layouts
3
4import QGroundControl
5import QGroundControl.Controls
6
7ColumnLayout {
8 property var additionalActions
9 property var mavlinkActions
10 property var customActions
11
12 property var _activeVehicle: QGroundControl.multiVehicleManager.activeVehicle
13 property var _guidedController: globals.guidedControllerFlyView
14
15 // Pre-defined Additional Guided Actions
16 Repeater {
17 model: additionalActions.model
18
19 QGCButton {
20 Layout.fillWidth: true
21 text: modelData.title
22 visible: modelData.visible
23 enabled: modelData.enabled ?? true
24
25 onClicked: {
26 dropPanel.hide()
27 _guidedController.confirmAction(modelData.action)
28 }
29 }
30 }
31
32 // Custom Build Actions
33 Repeater {
34 model: customActions.model
35
36 QGCButton {
37 Layout.fillWidth: true
38 text: modelData.title
39 visible: modelData.visible
40
41 onClicked: {
42 dropPanel.hide()
43 _guidedController.confirmAction(modelData.action)
44 }
45 }
46 }
47
48 // User-defined Mavlink Actions
49 Repeater {
50 model: _activeVehicle ? mavlinkActions : undefined // The action list is a QmlObjectListModel
51
52 QGCButton {
53 Layout.fillWidth: true
54 text: object.label
55
56 onClicked: {
57 dropPanel.hide()
58 object.sendTo(_activeVehicle)
59 }
60 }
61 }
62}