RadioComponentSummary.qml 2.14 KB
Newer Older
1 2 3
import QtQuick 2.2
import QtQuick.Controls 1.2
import QtQuick.Controls.Styles 1.2
4

5
import QGroundControl.FactSystem 1.0
6
import QGroundControl.Controls 1.0
7 8 9 10 11

Column {
    anchors.fill: parent
    anchors.margins: 8

12 13 14 15 16 17 18 19 20 21 22 23 24
    Component {
        id: component

        Row {
            width: parent.width

            QGCLabel { id: label; text: labelText }
            QGCLabel {
                Fact { id: fact; name: factName }
                horizontalAlignment: Text.AlignRight
                width: parent.width - label.contentWidth
                text: fact.value == 0 ? zeroText : fact.value
            }
25 26 27
        }
    }

28 29 30 31
    Loader {
        property string labelText: "Roll:"
        property string zeroText: "Setup required"
        property string factName: "RC_MAP_ROLL"
32
        width: parent.width
33
        sourceComponent: component
34 35
    }

36 37 38 39
    Loader {
        property string labelText: "Pitch:"
        property string zeroText: "Setup required"
        property string factName: "RC_MAP_PITCH"
40
        width: parent.width
41
        sourceComponent: component
42 43
    }

44 45 46 47
    Loader {
        property string labelText: "Yaw:"
        property string zeroText: "Setup required"
        property string factName: "RC_MAP_YAW"
48
        width: parent.width
49
        sourceComponent: component
50 51
    }

52 53 54 55
    Loader {
        property string labelText: "Throttle:"
        property string zeroText: "Setup required"
        property string factName: "RC_MAP_THROTTLE"
56
        width: parent.width
57
        sourceComponent: component
Don Gagne's avatar
Don Gagne committed
58 59
    }

60 61 62 63
    Loader {
        property string labelText: "Flaps:"
        property string zeroText: "Disabled"
        property string factName: "RC_MAP_FLAPS"
Don Gagne's avatar
Don Gagne committed
64
        width: parent.width
65
        sourceComponent: component
Don Gagne's avatar
Don Gagne committed
66 67
    }

68 69 70 71
    Loader {
        property string labelText: "Aux1:"
        property string zeroText: "Disabled"
        property string factName: "RC_MAP_AUX1"
Don Gagne's avatar
Don Gagne committed
72
        width: parent.width
73 74
        sourceComponent: component
    }
Don Gagne's avatar
Don Gagne committed
75

76 77 78 79 80 81
    Loader {
        property string labelText: "Aux2:"
        property string zeroText: "Disabled"
        property string factName: "RC_MAP_AUX2"
        width: parent.width
        sourceComponent: component
82 83
    }
}