Skip to content
MissionItemIndexLabel.qml 824 B
Newer Older
Don Gagne's avatar
Don Gagne committed
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
    property alias  label:          _label.text
    property bool   isCurrentItem:  false
    signal clicked

Don Gagne's avatar
Don Gagne committed
    width:          ScreenTools.defaultFontPixelHeight * 1.5
    height:         width
    radius:         width / 2
    border.width:   2
    border.color:   "white"
Don Gagne's avatar
Don Gagne committed
    color:          isCurrentItem ? "green" : "orange"
    MouseArea {
        anchors.fill: parent

        onClicked: parent.clicked()
    }

Don Gagne's avatar
Don Gagne committed
    QGCLabel {
Don Gagne's avatar
Don Gagne committed
        id:                     _label
Don Gagne's avatar
Don Gagne committed
        anchors.fill:           parent
        horizontalAlignment:    Text.AlignHCenter
        verticalAlignment:      Text.AlignVCenter
        color:                  "white"
    }
}