7import QGroundControl.Controls
11 title: qsTr("Select Mission Command")
12 buttons: Dialog.Cancel
15 property var missionItem
17 property bool flyThroughCommandsAllowed
21 spacing: ScreenTools.defaultFontPixelWidth
24 text: qsTr("Category:")
29 Layout.preferredWidth: 30 * ScreenTools.defaultFontPixelWidth
30 model: QGroundControl.missionCommandTree.categoriesForVehicle(vehicle)
32 function categorySelected(category) {
33 commandList.model = QGroundControl.missionCommandTree.getCommandsForCategory(vehicle, category, flyThroughCommandsAllowed)
36 Component.onCompleted: {
37 var category = missionItem.category
38 currentIndex = find(category)
39 categorySelected(category)
42 onActivated: (index) => { categorySelected(textAt(index)) }
48 Layout.fillWidth: true
52 height: commandColumn.height + ScreenTools.defaultFontPixelHeight
53 color: QGroundControl.globalPalette.button
55 property var mavCmdInfo: modelData
56 property color textColor: QGroundControl.globalPalette.buttonText
60 anchors.margins: ScreenTools.defaultFontPixelWidth
61 anchors.left: parent.left
62 anchors.right: parent.right
63 anchors.top: parent.top
66 text: mavCmdInfo.friendlyName
72 anchors.margins: ScreenTools.defaultFontPixelWidth
73 anchors.left: parent.left
74 anchors.right: parent.right
75 text: mavCmdInfo.description
76 wrapMode: Text.WordWrap
84 missionItem.setMapCenterHintForCommandChange(map.center)
85 missionItem.command = mavCmdInfo.command