-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathPrindle.qml
67 lines (60 loc) · 1.26 KB
/
Prindle.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
import QtQuick 2.11
Rectangle {
id: gears
width: 80
height: 30
color: "transparent"
Row {
spacing: 10
Image {
id: img_p
source: "images/P.png"
}
Image {
id: img_r
source: "images/R.png"
}
Image {
id: img_n
source: "images/N.png"
}
Image {
id: img_d
source: "images/D.png"
}
}
states: [
State {
name: "parking"
when: control_unit.gear === 1
PropertyChanges {
target: img_p
scale: 1.5
}
},
State {
name: "reverse"
when: control_unit.gear === 2
PropertyChanges {
target: img_r
scale: 1.5
}
},
State {
name: "neutral"
when: control_unit.gear === 3
PropertyChanges {
target: img_n
scale: 1.5
}
},
State {
name: "drive"
when: control_unit.gear === 4
PropertyChanges {
target: img_d
scale: 1.5
}
}
]
}