Sync repository
[mardrone] / mardrone / gauges / GenericGauge.qml
1
2 import QtQuick 1.0
3
4 Item {
5     id: root
6     property real value : 0
7     property real startAngle:0
8     property real endAngle:300
9     property maxValue:100
10     property url gaugeBackground:"joybox.png"
11     property url gaugeForeground:"joybox.png"
12     property url gaugeNeedle:"needle1.png"
13     property url bezel:""
14
15     Image {
16         anchors.fill:parent
17         source: gaugeBackground
18     }
19
20     Image {
21         id: needle
22         x: (root.width/2)-(width/2); y:(root.width/2)
23         transformOrigin: Item.Top
24         scale: root.width / 300
25         rotation: startAngle+root.value*0.36
26         smooth: true
27         source: gaugeNeedle
28
29     Image {
30         anchors.fill:parent
31         source: gaugeForeground
32     }
33
34 }