MissionItemSummary.qml 1.9 KB
Newer Older
1 2 3 4
import QtQuick                  2.2
import QtQuick.Controls         1.2
import QtQuick.Controls.Styles  1.2

5 6
import QGroundControl.ScreenTools   1.0
import QGroundControl.Vehicle       1.0
7 8 9 10 11 12

/// Mission item summary display control
Rectangle {
    property var missionItem        ///< Mission Item object

    width:          ScreenTools.defaultFontPixelWidth * 15
13
    height:         valueColumn.height + radius
14 15 16 17
    border.width:   2
    border.color:   "white"
    color:          "white"
    radius:         ScreenTools.defaultFontPixelWidth
18

19 20 21
    MissionItemIndexLabel {
        anchors.top:        parent.top
        anchors.right:      parent.right
22
        missionItemIndex:   missionItem.id
23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69
    }

    Column {
        anchors.margins:    parent.radius / 2
        anchors.left:       parent.left
        anchors.right:      parent.right
        anchors.top:        parent.top

        QGCLabel {
            color:                  "black"
            horizontalAlignment:    Text.AlignTop
            font.weight:            Font.Bold
            text:                   missionItem.commandName
        }

        Repeater {
            model: missionItem.valueLabels

            QGCLabel {
                color:  "black"
                text:   modelData
            }
        }
    }

    Column {
        id:                 valueColumn
        anchors.margins:    parent.radius / 2
        anchors.left:       parent.left
        anchors.right:      parent.right
        anchors.top:        parent.top

        QGCLabel {
            font.weight:    Font.Bold
            text:           " "
        }

        Repeater {
            model: missionItem.valueStrings

            QGCLabel {
                width:                  valueColumn.width
                color:                  "black"
                text:                   modelData
                horizontalAlignment:    Text.AlignRight
            }
        }
70 71
    }
}