-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmain.kv
440 lines (374 loc) · 8.01 KB
/
main.kv
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
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
#:kivy 2.1.0
#:import MapView kivy.garden.mapview.MapView
#:import MapMarkerPopup kivy.garden.mapview.MapMarkerPopup
<MainWindow>:
BoxLayout:
orientation: "vertical"
# header layout
BoxLayout:
id: header_layout
orientation: "horizontal"
padding: 20
size_hint_y: 0.1
Image:
id: logo
source:'asset/logo_labtek.png'
size_hint_x: 0.2
allow_stretch: True
BoxLayout:
orientation: "vertical"
padding: 0, 15
Label:
id: subtitle
text: "GROUND PENETRATING RADAR (GPR)"
bold: True
font_size: 80
size_hint_y: 2
color: 0, 0, 0
# comm header layout
BoxLayout:
id: comm_header_layout
orientation: "vertical"
size_hint_y: 0.1
padding:20
spacing:20
Label:
id : label_page
text: "GRAPH SCREEN"
bold: True
font_size: 64
color: 0, 0, 0
Label:
id : label_notif
size_hint_y: 0.4
text: "notification"
bold: True
font_size: 32
color: 1, 0, 0
# graph layout
BoxLayout:
id: layout_graph_setting
orientation: "horizontal"
size_hint_y: 0.2
padding:20
spacing:20
BoxLayout:
orientation: "vertical"
canvas.before:
Color:
rgba: 0.5, 0, 0, 1
Line:
width: 2
rectangle: self.x, self.y, self.width, self.height
Label:
text: "MEASUREMENT METHOD"
bold: True
font_size: 36
color: 0, 0, 0
size_hint_y: 0.5
GridLayout:
cols:2
row_force_default: True
row_default_height: 50
CheckBox:
group: "method"
color: 0.5, 0, 0
size_hint_x: None
width: 100
on_active: root.checkbox_method_click(self, self.active, "CONTINUOUS ")
Label:
text: "CONTINUOUS"
text_size: self.size
halign: "left"
valign: "middle"
font_size:36
color: 0, 0, 0
CheckBox:
group: "method"
color: 0.5, 0, 0
size_hint_x: None
width: 100
on_active: root.checkbox_method_click(self, self.active, "MANUAL")
Label:
text: "MANUAL"
text_size: self.size
halign: "left"
valign: "middle"
font_size:36
color: 0, 0, 0
BoxLayout:
orientation: "vertical"
padding:20
spacing:10
canvas.before:
Color:
rgba: 0, 0, 0.5, 1
Line:
width: 2
rectangle: self.x, self.y, self.width, self.height
Label:
id: label_gain
text: "GRAPH GAIN"
font_size:36
bold: True
color: 0, 0, 0
BoxLayout:
orientation: "horizontal"
Label:
text: "TOP"
font_size:36
color: 0, 0, 0
Slider:
id: slider_top_gain
min: 0.0
max: 500.0
value: 1.0
step: 0.1
orientation: 'horizontal'
Label:
text: f"{slider_top_gain.value:2.2f}"
font_size:36
color: 0, 0, 0
BoxLayout:
orientation: "horizontal"
Label:
text: "BOTTOM"
font_size:36
color: 0, 0, 0
Slider:
id: slider_bottom_gain
min: 0.0
max: 500.0
value: 2.0
step: 0.1
orientation: 'horizontal'
Label:
text: f"{slider_bottom_gain.value:2.2f}"
font_size:36
color: 0, 0, 0
Button:
text:"RESET"
font_size: 36
on_press: root.reset_gain()
# BoxLayout:
# orientation: "vertical"
# padding:20
# spacing:10
# canvas.before:
# Color:
# rgba: 0, 0.5, 0, 1
# Line:
# width: 2
# rectangle: self.x, self.y, self.width, self.height
# Label:
# id: label_min-max
# text: "COLOR SCALE MIN-MAX"
# font_size:36
# bold: True
# color: 0, 0, 0
# BoxLayout:
# orientation: "horizontal"
# Label:
# text: "MIN"
# font_size:36
# color: 0, 0, 0
# Slider:
# id: slider_min_graph
# min: -5
# max: 5
# value: 0
# step: 1
# orientation: 'horizontal'
# Label:
# text: f"{slider_min_graph.value:2.1f}"
# font_size:36
# color: 0, 0, 0
# BoxLayout:
# orientation: "horizontal"
# Label:
# text: "MAX"
# font_size:36
# color: 0, 0, 0
# Slider:
# id: slider_max_graph
# min: -5
# max: 5
# value: 1
# step: 1
# orientation: 'horizontal'
# Label:
# text: f"{slider_max_graph.value:2.1f}"
# font_size:36
# color: 0, 0, 0
# Button:
# text:"RESET"
# font_size: 36
# on_press: root.reset_graph()
BoxLayout:
id: layout_graph
orientation: "vertical"
size_hint_y: 0.75
padding:20
spacing:20
BoxLayout:
id: layout_graph_signal
orientation: "vertical"
BoxLayout:
size_hint_y: 0.1
padding:30
spacing:30
Slider:
id: slider_distance
min: 0
max: 99
step: 0.001
orientation: 'horizontal'
size_hint_x: 0.82
padding:150
Label:
id: txt_slider_distance
text: "DISTANCE " + str(slider_distance.value) + " m"
font_size:36
color: 0, 0, 0
bold: True
size_hint_x: 0.18
# map layout
BoxLayout:
id: layout_map
orientation: "vertical"
size_hint_y: 0.6
padding:20
spacing:20
BoxLayout:
orientation: "horizontal"
size_hint_y: 0.08
spacing:20
Label:
text: "LONGITUDE"
font_size: 44
color: 0, 0, 0
TextInput:
id: txt_lon
text: str(root.lon)
multiline: False
font_size: 44
halign: "center"
Label:
text: "LATITUDE"
font_size: 44
color: 0, 0, 0
TextInput:
id: txt_lat
text: str(root.lat)
multiline: False
font_size: 44
halign: "center"
Label:
text: "ZOOM:"
font_size: 44
color: 0, 0, 0
Label:
id: txt_zoom
text: str(slider_zoom.value)
font_size: 44
color: 0, 0, 0
Slider:
id: slider_zoom
min: 1
max: 19
step: 1
value: root.zoom
Button:
text: "MARK"
font_size: 44
on_press: root.map_mark()
Label:
text: "Available in Paid Version"
font_size: 44
color: 1, 0, 0
size_hint_y: 0.1
MapView:
id: map_view
lon: root.lon
lat: root.lat
zoom: root.zoom
MapMarkerPopup:
id: map_marker
source: "asset/marker.png"
lon: root.lon
lat: root.lat
# button interfacing layout
BoxLayout:
orientation: "horizontal"
size_hint_y: 0.08
padding:20
spacing:50
# Button:
# id: bt_send_signal
# text: "GENERATE SIGNAL"
# font_size: 44
# disabled: True
# on_press: root.send_signal()
Button:
id: bt_update_graph
text: "UPDATE GRAPH"
font_size: 44
on_press: root.request_graph()
Button:
id: bt_save_data
text: "SAVE DATA"
font_size: 44
disabled: True
on_press: root.save_data()
Button:
id: bt_save_graph
text: "SAVE GRAPH"
font_size: 44
disabled: True
on_press: root.save_graph()
Button:
id: bt_update_map
text: "UPDATE MAP"
font_size: 44
disabled: True
background_color: 0.9, 0.9, 0
#on_press: root.request_map()
# button navigation layout
BoxLayout:
orientation: "horizontal"
size_hint_y: 0.08
padding:20
spacing:50
# Button:
# id: bt_screen_setting
# text: "SETTING"
# font_size: 44
# on_press: root.setting_screen()
Button:
id: bt_screen_graph
text: "GRAPH"
font_size: 44
on_press: root.graph_screen()
Button:
id: bt_screen_map
text: "MAP"
font_size: 44
on_press: root.map_screen()
Button:
id: bt_quit
text: "EXIT"
font_size: 44
on_press: root.exec_exit()
Button:
id: bt_shutdown
text: "SHUTDOWN"
font_size: 44
on_press: root.exec_shutdown()
#support
Label:
text: "Supported by: PT. UNGGUL NUSA TEKNIKA"
font_size: 30
size_hint_y: 0.02
halign: 'right'
valign: 'center'
color: 0, 0, 0