AirframeComponentSummary.qml 1.23 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 9
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
import QGroundControl.ScreenTools   1.0
10

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

Don Gagne's avatar
Don Gagne committed
17
    QGCPalette { id: qgcPal; colorGroupEnabled: enabled }
18
    AirframeComponentController { id: controller; factPanel: panel }
19

Don Gagne's avatar
Don Gagne committed
20 21
    property Fact sysIdFact:        controller.getParameterFact(-1, "MAV_SYS_ID")
    property Fact sysAutoStartFact: controller.getParameterFact(-1, "SYS_AUTOSTART")
22

23
    property bool autoStartSet: sysAutoStartFact.value != 0
24

Don Gagne's avatar
Don Gagne committed
25 26 27 28 29
    Grid {
        id:         grid
        rows:       3
        columns:    2
        spacing:    ScreenTools.defaultFontPixelWidth / 2
30

Don Gagne's avatar
Don Gagne committed
31 32
        QGCLabel { text: "System ID:" }
        FactLabel { fact: sysIdFact }
33

Don Gagne's avatar
Don Gagne committed
34 35
        QGCLabel { text: "Airframe type:" }
        QGCLabel { text: autoStartSet ? controller.currentAirframeType : "Setup required" }
36

Don Gagne's avatar
Don Gagne committed
37 38
        QGCLabel { text: "Vehicle:" }
        QGCLabel { text: autoStartSet ? controller.currentVehicleName : "Setup required" }
39
    }
Don Gagne's avatar
Don Gagne committed
40
}