summaryrefslogtreecommitdiffstats
path: root/QtDemo/qml/QtDemo/demos/radio/VolumePoint.qml
blob: da09be9c7787771e90c63100f5b86b7176a0885b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
import QtQuick 2.0

Rectangle {
    id: root
    objectName: "volumePoint"
    width: size
    height: size
    radius: size/2
    color: volume >= level ? "#0e82b8": "#095477"
    border {width:1; color: "#888888"}
    property int size: 10
    property real level: 0
    property real volume: parent.volume

    Behavior on color{ColorAnimation { duration: 500 }}

    Item {
        id: pointClickArea
        objectName: "pointClickArea"
        property alias value: root.level
        anchors.fill: parent
        anchors.margins: -root.size*2
    }
}