-
Notifications
You must be signed in to change notification settings - Fork 0
/
ControlPageForm.ui.qml
277 lines (239 loc) · 5.49 KB
/
ControlPageForm.ui.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
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
/*
* Xpider Demo, running on PC with QT5
* Copyright (C) 2015-2017 Roboeve, MakerCollider
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
import QtQuick 2.4
import QtQuick.Layouts 1.3
import QtQuick.Controls 2.0
Item {
id: item1
property alias forward: forward
property alias turn_left: turn_left
property alias turn_right: turn_right
property alias backward: backward
property alias led_slider: led_slider
property alias obstacle_value: obstacle_value
property alias name_value: name_value
property alias voltage_value: voltage_value
property alias sound_level: sound_level
property alias controller_value: controller_value
property alias firmware_value: firmware_value
property alias version_value: version_value
property alias uuid_value: uuid_value
property alias eye_slider: eye_slider
Button {
id: forward
x: 270
y: 23
text: qsTr("Forward")
anchors.horizontalCenter: parent.horizontalCenter
}
Button {
id: turn_left
x: 160
y: 72
text: qsTr("Left")
anchors.horizontalCenterOffset: -100
anchors.horizontalCenter: parent.horizontalCenter
}
Button {
id: turn_right
x: 380
y: 72
text: qsTr("Right")
anchors.horizontalCenterOffset: 100
anchors.horizontalCenter: parent.horizontalCenter
}
Button {
id: backward
x: 271
y: 127
text: qsTr("Backward")
anchors.horizontalCenter: parent.horizontalCenter
}
Slider {
id: led_slider
x: 168
y: 223
width: 304
height: 14
anchors.horizontalCenterOffset: 0
anchors.horizontalCenter: parent.horizontalCenter
value: 0.5
}
Text {
id: text1
x: 199
y: 188
text: qsTr("Press and hold the button to control xpider")
anchors.horizontalCenterOffset: 0
anchors.horizontalCenter: parent.horizontalCenter
font.pixelSize: 12
}
Slider {
id: eye_slider
x: 168
y: 255
width: 304
height: 29
anchors.horizontalCenterOffset: 0
anchors.horizontalCenter: parent.horizontalCenter
value: 0.5
}
Grid {
id: grid
x: 170
y: 304
width: 253
height: 123
anchors.horizontalCenterOffset: -10
anchors.horizontalCenter: parent.horizontalCenter
spacing: 11
layoutDirection: Qt.LeftToRight
flow: Grid.TopToBottom
rows: 4
columns: 4
Text {
id: name_text
text: qsTr("Name:")
font.bold: true
verticalAlignment: Text.AlignTop
horizontalAlignment: Text.AlignLeft
font.pixelSize: 16
}
Text {
id: obstacle_text
text: qsTr("Obstacle:")
font.bold: true
font.pixelSize: 16
}
Text {
id: voltage_text
text: qsTr("Voltage:")
font.bold: true
font.pixelSize: 16
}
Text {
id: sound_text
text: qsTr("Sound:")
font.bold: true
font.pixelSize: 16
}
Text {
id: name_value
text: qsTr("NULL")
font.pixelSize: 16
}
Text {
id: obstacle_value
text: qsTr("NULL")
font.pixelSize: 16
}
Text {
id: voltage_value
text: qsTr("NULL")
font.pixelSize: 16
}
Text {
id: sound_level
text: qsTr("NULL")
font.pixelSize: 16
}
Text {
id: uuid_text
text: qsTr("UUID:")
font.bold: true
font.pixelSize: 16
}
Text {
id: version_text
text: qsTr("Version")
font.bold: true
font.pixelSize: 16
}
Text {
id: firmware_text
text: qsTr("Firmware:")
font.bold: true
font.pixelSize: 16
}
Text {
id: controller_text
text: qsTr("Controller")
font.bold: true
font.pixelSize: 16
}
Text {
id: uuid_value
text: qsTr("NULL")
font.pixelSize: 16
}
Text {
id: version_value
text: qsTr("NULL")
font.pixelSize: 16
}
Text {
id: firmware_value
text: qsTr("NULL")
font.pixelSize: 16
}
Text {
id: controller_value
text: qsTr("NULL")
font.pixelSize: 16
}
}
Text {
id: text2
x: 115
y: 223
text: qsTr("LED")
anchors.verticalCenter: led_slider.verticalCenter
anchors.right: led_slider.left
anchors.rightMargin: 10
font.pixelSize: 12
}
Text {
id: text3
x: 115
y: 262
text: qsTr("Eye")
anchors.verticalCenter: eye_slider.verticalCenter
anchors.right: eye_slider.left
anchors.rightMargin: 10
font.pixelSize: 12
}
Text {
id: text4
y: 268
text: qsTr("Eye")
anchors.verticalCenter: eye_slider.verticalCenter
anchors.left: eye_slider.right
anchors.leftMargin: 10
font.pixelSize: 12
}
Text {
id: text5
y: 223
text: qsTr("LED")
anchors.verticalCenter: led_slider.verticalCenter
anchors.left: eye_slider.right
anchors.leftMargin: 10
font.pixelSize: 12
}
}