6import QGroundControl.Controls
7import QGroundControl.FactControls
13 property bool showIndicator: true
15 property real fontPointSize: ScreenTools.largeFontPointSize
16 property var activeVehicle: QGroundControl.multiVehicleManager.activeVehicle
18 property var _editFieldWidth: ScreenTools.defaultFontPixelWidth * 13
19 property Fact _mpcLandSpeedFact: controller.getParameterFact(-1, "MPC_LAND_SPEED", false)
20 property Fact _precisionLandingFact: controller.getParameterFact(-1, "RTL_PLD_MD", false)
22 FactPanelController { id: controller }
31 width: ScreenTools.defaultFontPixelWidth * 2
32 height: ScreenTools.defaultFontPixelHeight * 0.75
33 fillMode: Image.PreserveAspectFit
36 source: "/qmlimages/FlightModesComponentIcon.png"
37 Layout.alignment: Qt.AlignVCenter
41 Layout.preferredWidth: ScreenTools.defaultFontPixelWidth / 2
46 text: activeVehicle ? activeVehicle.flightMode : qsTr("N/A", "No data to display")
47 font.pointSize: fontPointSize
48 Layout.alignment: Qt.AlignCenter
52 onClicked: indicatorDrawer.open()
59 y: ScreenTools.toolbarHeight
60 width: mainLayout.width + (ScreenTools.defaultFontPixelWidth * 2)
61 height: mainWindow.height - y
66 closePolicy: Popup.CloseOnEscape | Popup.CloseOnPressOutside
68 background: Rectangle {
69 color: QGroundControl.globalPalette.window
75 anchors.margins: ScreenTools.defaultFontPixelWidth
76 anchors.top: parent.top
77 anchors.left: parent.left
78 anchors.bottom: parent.bottom
79 spacing: ScreenTools.defaultFontPixelWidth * 2
83 anchors.top: parent.top
84 anchors.bottom: parent.bottom
85 width: modeColumn.width
86 contentHeight: modeColumn.height
90 spacing: ScreenTools.defaultFontPixelWidth / 2
93 model: activeVehicle ? activeVehicle.flightModes : []
97 Layout.fillWidth: true
100 activeVehicle.flightMode = text
101 indicatorDrawer.close()
110 width: ScreenTools.defaultFontPixelWidth * 50
111 spacing: ScreenTools.defaultFontPixelWidth / 2
114 Layout.fillWidth: true
116 QGCLabel { Layout.fillWidth: true; text: qsTr("RTL Altitude") }
118 fact: controller.getParameterFact(-1, "RTL_RETURN_ALT")
119 Layout.minimumWidth: _editFieldWidth
124 Layout.fillWidth: true
125 visible: _mpcLandSpeedFact && controller.vehicle && !controller.vehicle.fixedWing
127 QGCLabel { Layout.fillWidth: true; text: qsTr("Land Descent Rate:") }
129 fact: _mpcLandSpeedFact
130 Layout.minimumWidth: _editFieldWidth
135 Layout.fillWidth: true
136 visible: _precisionLandingFact
138 QGCLabel { Layout.fillWidth: true; text: qsTr("Precision Landing") }
140 fact: _precisionLandingFact