sync repository
[mardrone] / mardrone / gauges / AttitudeGauge.qml
1 import QtQuick 1.0
2
3
4 Item {
5     id: root
6     property real roll : 0
7     property real pitch : 0
8     property url bezel:""
9
10 //    width: 200; height: 200
11
12     Image {
13        id:rollItem
14        rotation: root.roll;
15        anchors.centerIn:   frame
16        transformOrigin: Item.Center
17        scale: frame.scale*0.3
18        source: "ati2.png"
19        Image {
20           anchors.centerIn:   rollItem
21          /*   transformOrigin: Item.Center
22         scale: frame.scale*0.4
23         rotation: root.roll;*/
24
25             source: "ati3.png"
26         }
27         Image {
28              anchors.centerIn: rollItem
29       //  scale: frame.scale*0.4
30       //  transformOrigin: Item.Center
31       //  rotation: root.roll;
32         transform:
33             Translate { y: root.pitch*2 }
34             source: "ati4.png"
35         }
36         Image {
37              anchors.centerIn: rollItem
38              transformOrigin: rollItem.Center
39             //rotation: root.roll;
40
41             source: "ati2.png"
42         }
43
44     }
45     Image {
46         // Static center plane
47         anchors.horizontalCenter: frame.horizontalCenter
48         y:15
49         scale: frame.scale*0.3
50         source: "ati5.png"
51     }
52
53     Image {
54         id:frame
55         anchors.fill:parent
56         source: "ati1.png"
57     }
58     Image {
59         id:bezelImg
60         anchors.fill:parent
61         source: bezel
62     }
63 }