-
Notifications
You must be signed in to change notification settings - Fork 0
/
Compass.qml
130 lines (119 loc) · 3.3 KB
/
Compass.qml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
import QtQuick 2.0
import QtQuick.Controls 2.5
Page {
// make alias to use in main.qml
background: Rectangle{
color:"transparent"
}
property alias bubbleX: bubble.x
property alias bubbleY: bubble.y
property alias bubbleWidth: bubble.width
property alias areaWidth: area.width
property alias compassIndWidth: compassIndE.width
property alias compassIndHeight: compassIndE.height
property alias compassWordHeight: north.height
property alias compassWordWidth: north.width
property alias compassIndEX: compassIndE.x
property alias compassIndEY: compassIndE.y
property alias compassIndER: compassIndE.rotation
property alias eastX: east.x
property alias eastY: east.y
property alias eastR: east.rotation
property alias compassIndWX: compassIndW.x
property alias compassIndWY: compassIndW.y
property alias compassIndWR: compassIndW.rotation
property alias westX: west.x
property alias westY: west.y
property alias westR: west.rotation
property alias compassIndSX: compassIndS.x
property alias compassIndSY: compassIndS.y
property alias compassIndSR: compassIndS.rotation
property alias southX: south.x
property alias southY: south.y
property alias southR: south.rotation
property alias compassIndNX: compassIndN.x
property alias compassIndNY: compassIndN.y
property alias compassIndNR: compassIndN.rotation
property alias northX: north.x
property alias northY: north.y
property alias northR: north.rotation
Rectangle{
id: area
width: 250
height: 250
color: "#000000"
radius: width/2
border.color: "#ffffff"
anchors.horizontalCenter: parent.horizontalCenter
anchors.verticalCenter: parent.verticalCenter
Rectangle{
id: bubble
x : 0 + parent.width/2 - width/2
y : 0 + parent.width/2 - width/2
width: 40
height: 40
color: "#FFFFFF"
radius: width/2
}
Rectangle {
id: compassIndN
x: parent.width/2
y: 0
rotation: 0
width: 5
height: 35
color: "#f40b0b"
}
Rectangle {
id: compassIndS
x: parent.width/2
y: 0
rotation: 0
width: 5
height: 35
color: "#f40b0b"
}
Rectangle {
id: compassIndW
x: parent.width/2
y: 0
rotation: 0
width: 5
height: 35
color: "#f40b0b"
}
Rectangle {
id: compassIndE
x: parent.width/2
y: 0
rotation: 0
width: 5
height: 35
color: "#f40b0b"
}
Text {
id: north
text: qsTr("N")
color: "#A0A0A0"
}
Text {
id: south
text: qsTr("S")
color: "#A0A0A0"
}
Text {
id: west
text: qsTr("W")
color: "#A0A0A0"
}
Text {
id: east
text: qsTr("E")
color: "#A0A0A0"
}
}
}
/*##^## Designer {
D{i:0;autoSize:true;height:480;width:640}
}
##^##*/