APMFlightModesComponentSummary.qml 1.93 KB
Newer Older
1 2
import QtQuick          2.3
import QtQuick.Controls 1.2
Don Gagne's avatar
Don Gagne committed
3 4 5 6 7 8 9

import QGroundControl.FactSystem    1.0
import QGroundControl.FactControls  1.0
import QGroundControl.Controls      1.0
import QGroundControl.Palette       1.0

FactPanel {
10 11 12
    id:             panel
    anchors.fill:   parent
    color:          qgcPal.windowShadeDark
Don Gagne's avatar
Don Gagne committed
13 14 15 16

    QGCPalette { id: qgcPal; colorGroupEnabled: enabled }
    FactPanelController { id: controller; factPanel: panel }

Don Gagne's avatar
Don Gagne committed
17 18 19 20 21 22 23 24
    property var _vehicle: controller.vehicle

    property Fact flightMode1: controller.getParameterFact(-1, _vehicle.rover ? "MODE1" : "FLTMODE1")
    property Fact flightMode2: controller.getParameterFact(-1, _vehicle.rover ? "MODE2" : "FLTMODE2")
    property Fact flightMode3: controller.getParameterFact(-1, _vehicle.rover ? "MODE3" : "FLTMODE3")
    property Fact flightMode4: controller.getParameterFact(-1, _vehicle.rover ? "MODE4" : "FLTMODE4")
    property Fact flightMode5: controller.getParameterFact(-1, _vehicle.rover ? "MODE5" : "FLTMODE5")
    property Fact flightMode6: controller.getParameterFact(-1, _vehicle.rover ? "MODE6" : "FLTMODE6")
Don Gagne's avatar
Don Gagne committed
25

26 27 28 29
    Column {
        anchors.fill:       parent

        VehicleSummaryRow {
30
            labelText: qsTr("Flight Mode 1:")
31 32 33 34
            valueText: flightMode1.enumStringValue
        }

        VehicleSummaryRow {
35
            labelText: qsTr("Flight Mode 2:")
36 37 38 39
            valueText: flightMode2.enumStringValue
        }

        VehicleSummaryRow {
40
            labelText: qsTr("Flight Mode 3:")
41 42 43 44
            valueText: flightMode3.enumStringValue
        }

        VehicleSummaryRow {
45
            labelText: qsTr("Flight Mode 4:")
46 47 48 49
            valueText: flightMode4.enumStringValue
        }

        VehicleSummaryRow {
50
            labelText: qsTr("Flight Mode 5:")
51 52 53 54
            valueText: flightMode5.enumStringValue
        }

        VehicleSummaryRow {
55
            labelText: qsTr("Flight Mode 6:")
56 57
            valueText: flightMode6.enumStringValue
        }
Don Gagne's avatar
Don Gagne committed
58 59
    }
}