Sync repository
[mardrone] / mardrone / gauges / HeadingGauge.qml
diff --git a/mardrone/gauges/HeadingGauge.qml b/mardrone/gauges/HeadingGauge.qml
new file mode 100644 (file)
index 0000000..c37f7a0
--- /dev/null
@@ -0,0 +1,31 @@
+
+import QtQuick 1.0
+
+Item {
+    id: root
+    property real value : 0
+    property url gaugeForeground:"hdg2.png"
+    property url gaugeNeedle:"hdg1.png"
+    property url bezel:""
+
+
+    Image {
+        id: needle
+        x: (root.width/2)-(width/2); y:(root.width/2)
+        transformOrigin: Item.Center
+        anchors.fill:parent
+        rotation: root.value
+        smooth: true
+        source: gaugeNeedle
+    }
+    Image {
+        anchors.fill:parent
+        source: gaugeForeground
+    }
+    Image {
+        id:bezelImg
+        anchors.fill:parent
+        source: bezel
+    }
+
+}