MissionItemIndexLabel.qml 824 Bytes
Newer Older
1 2 3 4 5 6 7
import QtQuick                  2.2
import QtQuick.Controls         1.2
import QtQuick.Controls.Styles  1.2

import QGroundControl.ScreenTools 1.0

Rectangle {
Don Gagne's avatar
Don Gagne committed
8 9
    property alias  label:          _label.text
    property bool   isCurrentItem:  false
10

11 12
    signal clicked

13 14 15 16 17
    width:          ScreenTools.defaultFontPixelHeight * 1.5
    height:         width
    radius:         width / 2
    border.width:   2
    border.color:   "white"
Don Gagne's avatar
Don Gagne committed
18
    color:          isCurrentItem ? "green" : "orange"
19

20 21 22 23 24 25
    MouseArea {
        anchors.fill: parent

        onClicked: parent.clicked()
    }

26
    QGCLabel {
Don Gagne's avatar
Don Gagne committed
27
        id:                     _label
28 29 30 31 32 33
        anchors.fill:           parent
        horizontalAlignment:    Text.AlignHCenter
        verticalAlignment:      Text.AlignVCenter
        color:                  "white"
    }
}