QGroundControl
Ground Control Station for MAVLink Drones
Loading...
Searching...
No Matches
ModeIndicator.qml
Go to the documentation of this file.
1import QtQuick
2import QtQuick.Controls
3
4import QGroundControl
5import QGroundControl.Controls
6
7//-------------------------------------------------------------------------
8//-- Mode Indicator
9QGCComboBox {
10 anchors.verticalCenter: parent.verticalCenter
11 alternateText: _activeVehicle ? _activeVehicle.flightMode : ""
12 model: _flightModes
13 font.pointSize: ScreenTools.mediumFontPointSize
14 currentIndex: -1
15 sizeToContents: true
16
17 property bool showIndicator: true
18
19 property var _activeVehicle: QGroundControl.multiVehicleManager.activeVehicle
20 property var _flightModes: _activeVehicle ? _activeVehicle.flightModes : [ ]
21
22 onActivated: (index) => {
23 _activeVehicle.flightMode = _flightModes[index]
24 currentIndex = -1
25 }
26}