improved desktop UI
[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        anchors.fill: root
17        anchors.margins: 10
18        transformOrigin: Item.Center
19        scale: frame.scale*0.25
20        source: "ati2.png"
21        Image {
22           anchors.centerIn:   rollItem
23           anchors.fill: frame
24           anchors.margins:20
25          /*   transformOrigin: Item.Center
26         scale: frame.scale*0.4
27         rotation: root.roll;*/
28
29             source: "ati3.png"
30         }
31         Image {
32              anchors.centerIn: rollItem
33              anchors.fill: frame
34              anchors.margins:20
35       //  scale: frame.scale*0.4
36       //  transformOrigin: Item.Center
37       //  rotation: root.roll;
38         transform:
39             Translate { y: root.pitch*2 }
40             source: "ati4.png"
41         }
42         Image {
43              anchors.centerIn: rollItem
44              anchors.fill: root
45              anchors.margins:20
46              transformOrigin: rollItem.Center
47             //rotation: root.roll;
48
49             source: "ati2.png"
50         }
51
52     }
53     Image {
54         // Static center plane
55         anchors.horizontalCenter: frame.horizontalCenter
56         y:15
57         scale: frame.scale*0.3
58         source: "ati5.png"
59     }
60
61     Image {
62         id:frame
63         anchors.fill:root
64         source: "ati1.png"
65     }
66    Image {
67         id:bezelImg
68         anchors.fill:parent
69         source: bezel
70     }
71 }