-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathdesktop.qml
139 lines (121 loc) · 6.07 KB
/
desktop.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
131
132
133
134
135
136
137
138
139
import QtQuick 2.2
import QtQuick.Window 2.1
import Qt3D 2.0
import Qt3D.Shapes 2.0
import "Components"
Window {
visible: true
width: 1200
height: 451
Rectangle {
id: root
width: parent.width
height: parent.height
property real buttonWith: parent.width/9
property real buttonHeight: 30
DashbdView {id: dashView
dash.rotateSpeedAngle: speedSlider.value
dash.rotateTachoAngle: tachoSlider.value
}
Car3DView {id: carView}
Row {
id: checkButtonRow
anchors.bottom: parent.Bottom
anchors.right: parent.Right
anchors.margins: 1
spacing: 1
Button {
id: normal
height: root.buttonHeight
textItem.text: "Reset"
textItem.font.pixelSize: 12
textItem.font.bold: true
textItem.anchors.verticalCenter: normal.verticalCenter
textItem.anchors.left: normal.left
onClicked: { carView.camera.eye = carView.camera.cameraVectorTop; carView.car.stopAnimation(); dashView.dash.swingDisplay(0)}
}
Button {
id: frontLeftWheelBtn
height: root.buttonHeight; width: root.buttonWith;
textItem.text: "Wheel front left"
textItem.font.pixelSize: 10
textItem.anchors.verticalCenter: frontLeftWheelBtn.verticalCenter
textItem.anchors.right: frontLeftWheelBtn.right
onClicked: { carView.camera.eye = carView.camera.cameraVectorLeftFront; carView.car.blinkWheel(0);
carView.light.position = carView.light.lightVectorLeftFront; dashView.dash.swingDisplay(1)}
}
Button {
id: frontRightWheelBtn
height: root.buttonHeight; width: root.buttonWith;
textItem.text: "Wheel front right"
textItem.font.pixelSize: 10
textItem.anchors.verticalCenter: frontRightWheelBtn.verticalCenter
textItem.anchors.right: frontRightWheelBtn.right
onClicked: { carView.camera.eye = carView.camera.cameraVectorRightFront; carView.car.blinkWheel(1);
carView.light.position = carView.light.lightVectorRightFront; dashView.dash.swingDisplay(1)}
}
Button {
id: rearLeftWheelBtn
height: root.buttonHeight; width: root.buttonWith;
textItem.text: "Wheel rear left"
textItem.font.pixelSize: 10
textItem.anchors.verticalCenter: rearLeftWheelBtn.verticalCenter
textItem.anchors.right: rearLeftWheelBtn.right
onClicked: { carView.camera.eye = carView.camera.cameraVectorLeftRear; carView.car.blinkWheel(2);
carView.light.position = carView.light.lightVectorLeftRear; dashView.dash.swingDisplay(1)}
}
Button {
id: rearRightWheelBtn
height: root.buttonHeight; width: root.buttonWith;
textItem.text: "Wheel rear right"
textItem.font.pixelSize: 10
textItem.anchors.verticalCenter: rearRightWheelBtn.verticalCenter
textItem.anchors.right: rearRightWheelBtn.right
onClicked: { carView.camera.eye = carView.camera.cameraVectorRightRear; carView.car.blinkWheel(3);
carView.light.position = carView.light.lightVectorRightRear; dashView.dash.swingDisplay(1)}
}
Button {
id: frontLeftDoorBtn
height: root.buttonHeight; width: root.buttonWith;
textItem.text: "Door front left"
textItem.font.pixelSize: 10
textItem.anchors.verticalCenter: frontLeftDoorBtn.verticalCenter
textItem.anchors.right: frontLeftDoorBtn.right
onClicked: { carView.camera.eye = carView.camera.cameraVectorLeftFront; carView.car.swingDoor(0);
carView.light.position = carView.light.lightVectorLeftFront; dashView.dash.swingDisplay(1)}
}
Button {
id: frontRightDoorBtn
height: root.buttonHeight; width: root.buttonWith;
textItem.text: "Door front right"
textItem.font.pixelSize: 10
textItem.anchors.verticalCenter: frontRightDoorBtn.verticalCenter
textItem.anchors.right: frontRightDoorBtn.right
onClicked: { carView.camera.eye = carView.camera.cameraVectorRightFront; carView.car.swingDoor(1);
carView.light.position = carView.light.lightVectorRightFront; dashView.dash.swingDisplay(1)}
}
Button {
id: rearLeftDoorBtn
height: root.buttonHeight; width: root.buttonWith;
textItem.text: "Door rear left"
textItem.font.pixelSize: 10
textItem.anchors.verticalCenter: rearLeftDoorBtn.verticalCenter
textItem.anchors.right: rearLeftDoorBtn.right
onClicked: { carView.camera.eye = carView.camera.cameraVectorLeftRear; carView.car.swingDoor(2);
carView.light.position = carView.light.lightVectorLeftRear; dashView.dash.swingDisplay(1)}
}
Button {
id: rearRightDoorBtn
height: root.buttonHeight; width: root.buttonWith;
textItem.text: "Door rear right"
textItem.font.pixelSize: 10
textItem.anchors.verticalCenter: rearRightDoorBtn.verticalCenter
textItem.anchors.right: rearRightDoorBtn.right
onClicked: { carView.camera.eye = carView.camera.cameraVectorRightRear; carView.car.swingDoor(3);
carView.light.position = carView.light.lightVectorRightRear; dashView.dash.swingDisplay(1);}
}
}
SimpleSlider { id: speedSlider ;x: 0;y: 20}
SimpleSlider { id: tachoSlider ;x: 1180;y: 20}
}
}