FlightModesComponentSummary.qml 1.48 KB
Newer Older
Don Gagne's avatar
Don Gagne committed
1
import QtQuick          2.5
2
import QtQuick.Controls 1.2
3

Don Gagne's avatar
Don Gagne committed
4 5 6 7 8
import QGroundControl.FactSystem    1.0
import QGroundControl.FactControls  1.0
import QGroundControl.Controls      1.0
import QGroundControl.Palette       1.0
import QGroundControl.ScreenTools   1.0
9

10
FactPanel {
Don Gagne's avatar
Don Gagne committed
11 12 13 14
    id:     panel
    width:  grid.width
    height: grid.height
    color:  qgcPal.windowShade
15

Don Gagne's avatar
Don Gagne committed
16 17 18 19 20 21 22
    QGCPalette { id: qgcPal; colorGroupEnabled: enabled }
    FactPanelController { id: controller; factPanel: panel }

    property Fact modeSwFact:   controller.getParameterFact(-1, "RC_MAP_MODE_SW")
    property Fact posCtlSwFact: controller.getParameterFact(-1, "RC_MAP_POSCTL_SW")
    property Fact loiterSwFact: controller.getParameterFact(-1, "RC_MAP_LOITER_SW")
    property Fact returnSwFact: controller.getParameterFact(-1, "RC_MAP_RETURN_SW")
23

Don Gagne's avatar
Don Gagne committed
24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
    Grid {
        id:         grid
        rows:       4
        columns:    2
        spacing:    ScreenTools.defaultFontPixelWidth / 2

        QGCLabel { text: "Mode switch:" }
        QGCLabel { text: modeSwFact.value == 0 ? "Setup required" : modeSwFact.valueString }

        QGCLabel { text: "Position Ctl switch:" }
        QGCLabel { text: posCtlSwFact.value == 0 ? "Disabled" : posCtlSwFact.valueString }

        QGCLabel { text: "Loiter switch:" }
        QGCLabel { text: loiterSwFact.value == 0 ? "Disabled" : loiterSwFact.valueString }

        QGCLabel { text: "Return switch:" }
        QGCLabel { text: returnSwFact.value == 0 ? "Disabled" : returnSwFact.valueString }
41 42
    }
}