components for android added
[mardrone] / mardrone / gauges / AttitudeGauge.qml
index a7a73b3..887313f 100644 (file)
@@ -5,6 +5,7 @@ Item {
     id: root
     property real roll : 0
     property real pitch : 0
+    property url bezel:""
 
 //    width: 200; height: 200
 
@@ -12,11 +13,15 @@ Item {
        id:rollItem
        rotation: root.roll;
        anchors.centerIn:   frame
+       anchors.fill: root
+       anchors.margins: 10
        transformOrigin: Item.Center
-       scale: frame.scale*0.4
+       scale: frame.scale*0.25
        source: "ati2.png"
        Image {
           anchors.centerIn:   rollItem
+          anchors.fill: frame
+          anchors.margins:20
          /*   transformOrigin: Item.Center
         scale: frame.scale*0.4
         rotation: root.roll;*/
@@ -25,35 +30,42 @@ Item {
         }
         Image {
              anchors.centerIn: rollItem
+             anchors.fill: frame
+             anchors.margins:20
       //  scale: frame.scale*0.4
       //  transformOrigin: Item.Center
       //  rotation: root.roll;
         transform:
-            Translate { y: root.pitch }
-
-
+            Translate { y: root.pitch*2 }
             source: "ati4.png"
         }
         Image {
-             anchors.centerIn: frame
-      //  scale: frame.scale*0.4
-     //   transformOrigin: rollItem.Center
-      //  rotation: root.roll;
+             anchors.centerIn: rollItem
+             anchors.fill: root
+             anchors.margins:20
+             transformOrigin: rollItem.Center
+            //rotation: root.roll;
 
             source: "ati2.png"
         }
 
     }
     Image {
-        anchors.bottom:parent.bottom
-        anchors.horizontalCenter: parent.horizontalCenter
-        scale: frame.scale*0.22
+        // Static center plane
+        anchors.horizontalCenter: frame.horizontalCenter
+        y:15
+        scale: frame.scale*0.3
         source: "ati5.png"
     }
 
     Image {
         id:frame
-        anchors.fill:parent
+        anchors.fill:root
         source: "ati1.png"
     }
+   Image {
+        id:bezelImg
+        anchors.fill:parent
+        source: bezel
+    }
 }