APMAirframeComponentSummary.qml 1.28 KB
Newer Older
1 2
import QtQuick 2.3
import QtQuick.Controls 1.2
3

4 5 6 7 8
import QGroundControl.FactSystem 1.0
import QGroundControl.FactControls 1.0
import QGroundControl.Controls 1.0
import QGroundControl.Controllers 1.0
import QGroundControl.Palette 1.0
9

10 11 12 13
Item {
    anchors.fill:       parent

    APMAirframeComponentController {id: controller; }
14

15
    property Fact _frameClass:          controller.getParameterFact(-1, "FRAME_CLASS")
16
    property Fact _frameType:           controller.getParameterFact(-1, "FRAME_TYPE", false)
17
    property bool _frameTypeAvailable:  controller.parameterExists(-1, "FRAME_TYPE")
18

19
    Column {
20
        anchors.fill:       parent
21 22

        VehicleSummaryRow {
23
            labelText:  qsTr("Frame Class")
24
            valueText:  _frameClass.enumStringValue
25 26 27

        }

28
        VehicleSummaryRow {
29
            labelText:  qsTr("Frame Type")
30
            valueText:  visible ? _frameType.enumStringValue : ""
31
            visible:    _frameTypeAvailable
32
        }
33 34

        VehicleSummaryRow {
35
            labelText: qsTr("Firmware Version")
36 37
            valueText: activeVehicle.firmwareMajorVersion == -1 ? qsTr("Unknown") : activeVehicle.firmwareMajorVersion + "." + activeVehicle.firmwareMinorVersion + "." + activeVehicle.firmwarePatchVersion + activeVehicle.firmwareVersionTypeString
        }
38 39
    }
}