MissionItemSummary.qml 1.86 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11
import QtQuick                  2.2
import QtQuick.Controls         1.2
import QtQuick.Controls.Styles  1.2

import QGroundControl.ScreenTools 1.0

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

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

18 19 20
    MissionItemIndexLabel {
        anchors.top:        parent.top
        anchors.right:      parent.right
21 22 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
        missionItemIndex:   missionItem.id + 1
    }

    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
            }
        }
69 70
    }
}