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

import QGroundControl.ScreenTools 1.0
6
import QGroundControl.Palette     1.0
7 8

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

12 13
    signal clicked

14 15
    QGCPalette { id: qgcPal }

16 17 18 19 20
    width:          ScreenTools.defaultFontPixelHeight * 1.5
    height:         width
    radius:         width / 2
    border.width:   2
    border.color:   "white"
21
    color:          isCurrentItem ? "green" : qgcPal.mapButtonHighlight
22

23 24 25 26 27 28
    MouseArea {
        anchors.fill: parent

        onClicked: parent.clicked()
    }

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