sync repo
authorKate Alhola <kate.alhola@gmail.com>
Wed, 11 Apr 2012 12:06:33 +0000 (15:06 +0300)
committerKate Alhola <kate.alhola@gmail.com>
Wed, 11 Apr 2012 12:06:33 +0000 (15:06 +0300)
mardrone/gauges/EfisPFD.qml
mardrone/gauges/GenericGauge.qml

index b45e916..ead9d38 100644 (file)
@@ -10,6 +10,7 @@ Item {
     property real ias
     property real tapeMargin:60
     property color indicatorColor:"white"
+    property bool showHSI:false
     property alias groundColor:horizon.horizonGroundColor
     property alias skyColor:horizon.horizonSkyColor
     property url bezel:""
@@ -19,6 +20,7 @@ Item {
         anchors.fill:parent
         value:roll
         value2:pitch
+        yPosition:showHSI?120:height/2
         color:indicatorColor
         horizonSkyColor:"blue"
         horizonGroundColor:"#ff702010"
@@ -34,8 +36,8 @@ Item {
       color:indicatorColor
       backColor:"#40000000"
       value:ias
-      x:20;y:tapeMargin
-      height:(pfd.height-tapeMargin*2)/pfd.displayScale;width:60
+      x:20;y:tapeMargin*pfd.displayScale
+      height:((showHSI?0.5:0.7)*pfd.height)/pfd.displayScale;width:60
     }
     GaugeLabel {
       id: iasValue
@@ -63,10 +65,11 @@ Item {
       color:indicatorColor
       backColor:"#40000000"
       value:alt
-      x:pfd.width-80;y:tapeMargin
-      height:(pfd.height-tapeMargin*2)/pfd.displayScale;width:60
+      x:pfd.width-80;y:tapeMargin*pfd.displayScale
+      height:((showHSI?0.5:0.7)*pfd.height)/pfd.displayScale;width:60
 
     }
+
     GaugeLabel {
       id: altValue
       displayScale:pfd.displayScale
@@ -82,6 +85,37 @@ Item {
       backColor:"#c0000000"
       name: "alt"
       }
+    GaugeTape {
+      id:compassTape
+      displayScale:pfd.displayScale
+      visible:!showHSI
+      font.pixelSize:20
+      tickIncrement:10
+      tickSpacing:50
+      tickMinor:5
+      gaugeStyle:5
+      color:indicatorColor
+      backColor:"#40000000"
+      value:alt
+      x:90;y:tapeMargin/2-10
+      width:(pfd.width-tapeMargin*2-50)*pfd.displayScale;height:60
+    }
+    GaugeHSI {
+        id:hsi
+        displayScale:pfd.displayScale
+        visible:showHSI
+        font.pixelSize:20
+        tickIncrement:30
+        tickMinor:5
+        color:indicatorColor
+        backColor:"#40000000"
+        value:alt
+        anchors.horizontalCenter: parent.horizontalCenter
+        anchors.bottom:parent.bottom
+        anchors.bottomMargin: 20
+        width:(pfd.width/2.8);height:(pfd.width/2.8)
+    }
+
     BorderImage {
         id:bezelImg
         anchors.fill:parent
index 8a8c74e..1e27981 100644 (file)
@@ -6,14 +6,15 @@ Item {
     property real value : 0
     property real startAngle:0
     property real endAngle:300
-    property maxValue:100
-    property url gaugeBackground:"joybox.png"
-    property url gaugeForeground:"joybox.png"
+    property real maxValue:100
+    property url gaugeBackground:""
+    property url gaugeForeground:""
     property url gaugeNeedle:"needle1.png"
     property url bezel:""
 
     Image {
         anchors.fill:parent
+        anchors.margins: 8
         source: gaugeBackground
     }
 
@@ -25,10 +26,14 @@ Item {
         rotation: startAngle+root.value*0.36
         smooth: true
         source: gaugeNeedle
-
+    }
     Image {
         anchors.fill:parent
         source: gaugeForeground
     }
-
+    Image {
+        id:bezelImg
+        anchors.fill:parent
+        source: bezel
+    }
 }