QGroundControl
Ground Control Station for MAVLink Drones
Loading...
Searching...
No Matches
APMAirframeComponentSummary.qml
Go to the documentation of this file.
1import QtQuick
2import QtQuick.Controls
3import QtQuick.Layouts
4
5import QGroundControl
6import QGroundControl.FactControls
7import QGroundControl.Controls
8
9Item {
10 implicitWidth: mainLayout.implicitWidth
11 implicitHeight: mainLayout.implicitHeight
12 width: parent.width // grows when Loader is wider than implicitWidth
13
14 APMAirframeComponentController {id: controller; }
15
16 property Fact _frameClass: controller.getParameterFact(-1, "FRAME_CLASS")
17 property Fact _frameType: controller.getParameterFact(-1, "FRAME_TYPE", false)
18 property bool _frameTypeAvailable: controller.parameterExists(-1, "FRAME_TYPE")
19
20 ColumnLayout {
21 id: mainLayout
22 width: parent.width
23 spacing: 0
24
25 VehicleSummaryRow {
26 labelText: qsTr("Frame Class")
27 valueText: _frameClass.enumStringValue
28
29 }
30
31 VehicleSummaryRow {
32 labelText: qsTr("Frame Type")
33 valueText: visible ? _frameType.enumStringValue : ""
34 visible: _frameTypeAvailable
35 }
36
37 VehicleSummaryRow {
38 labelText: qsTr("Firmware Version")
39 valueText: globals.activeVehicle.firmwareMajorVersion == -1 ? qsTr("Unknown") : globals.activeVehicle.firmwareMajorVersion + "." + globals.activeVehicle.firmwareMinorVersion + "." + globals.activeVehicle.firmwarePatchVersion + globals.activeVehicle.firmwareVersionTypeString
40 }
41 }
42}