MissionItemSummary.qml 2.02 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

/// Mission item summary display control
Rectangle {
Don Gagne's avatar
Don Gagne committed
10
    property var    missionItem                         ///< Mission Item object
11 12

    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
    MissionItemIndexLabel {
Don Gagne's avatar
Don Gagne committed
20
        id:                 _indexLabel
21 22
        anchors.top:        parent.top
        anchors.right:      parent.right
Don Gagne's avatar
Don Gagne committed
23 24
        isCurrentItem:      missionItem.isCurrentItem
        label:              missionItem.sequenceNumber
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 70 71
    }

    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
            }
        }
72 73
    }
}