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
24 onClicked: {
25 dropPanel.hide()
26 _guidedController.confirmAction(modelData.action)
27 }
28 }
29 }
30
31 // Custom Build Actions
32 Repeater {
33 model: customActions.model
34
35 QGCButton {
36 Layout.fillWidth: true
37 text: modelData.title
38 visible: modelData.visible
39
40 onClicked: {
41 dropPanel.hide()
42 _guidedController.confirmAction(modelData.action)
43 }
44 }
45 }
46
47 // User-defined Mavlink Actions
48 Repeater {
49 model: _activeVehicle ? mavlinkActions : undefined // The action list is a QmlObjectListModel
50
51 QGCButton {
52 Layout.fillWidth: true
53 text: object.label
54
55 onClicked: {
56 dropPanel.hide()
57 object.sendTo(_activeVehicle)
58 }
59 }
60 }
61}