-
Notifications
You must be signed in to change notification settings - Fork 8
/
aimodel_setting_screen.kv
338 lines (335 loc) · 10.1 KB
/
aimodel_setting_screen.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
<AimodelSettingScreen>
md_bg_color: .2, .2, .2, 1
on_pre_enter: self.on_pre_enter()
MDBoxLayout:
orientation: 'vertical'
MDTopAppBar:
title: app.textini[app.lang]["label_adfi"]
md_bg_color: app.theme_cls.primary_dark
MDLabel:
id: message
halign: "center"
size_hint: 1, .1
color: 1, 1, 1, 1
text: app.textini[app.lang]["aimodel_settings"] + " " + app.textini[app.lang]["as_top_message"]
padding: "4dp", "4dp"
MDLabel:
id :space
MDRectangleFlatButton:
size_hint: .3, .1
pos_hint: {'center_x': .5}
text_color: "white"
font_size: "18sp"
text: app.textini[app.lang]["finish"]
on_release:
app.sm.transition.direction = "left"
app.sm.current = "main"
padding: "4dp", "4dp"
MDLabel:
id: bottom_space
halign: "center"
size_hint: 1, .15
color: 0, 0, 0, 0
MDBottomAppBar:
md_bg_color: app.theme_cls.primary_dark
MDTopAppBar:
title: app.textini[app.lang]["label_copyright"]
icon: "close"
type: "bottom"
mode: "end"
on_action_button: app.popup_open()
MDFloatLayout:
MDGridLayout:
id: inspection_list_layout
adaptive_height: True
adaptive_width: True
size_hint: 1, .5
pos: 0, 300
rows: 11
cols: 7
MDLabel:
text: ""
size_hint_x: None
width: 50
MDLabel:
text: app.textini[app.lang]["preprocessing_name"]
size_hint_x: None
width: 250
MDLabel:
text: app.textini[app.lang]["camera_num"]
size_hint_x: None
width: 100
MDLabel:
text: app.textini[app.lang]["as_plan"]
size_hint_x: None
width: 100
MDLabel:
text: app.textini[app.lang]["as_api_key_or_path"]
size_hint_x: None
width: 300
MDLabel:
text: app.textini[app.lang]["model_id"]
size_hint_x: None
width: 300
MDLabel:
text: app.textini[app.lang]["model_type"]
size_hint_x: None
width: 80
CheckBox:
id: checkbox_0
halign: "center"
group: "settings"
disabled: True
MDLabel:
id: name_0
MDLabel:
id: camera_num_0
MDLabel:
id: plan_0
MDLabel:
id: api_key_0
MDLabel:
id: model_id_0
MDLabel:
id: model_type_0
CheckBox:
id: checkbox_1
halign: "center"
group: "settings"
disabled: True
MDLabel:
id: name_1
MDLabel:
id: camera_num_1
MDLabel:
id: plan_1
MDLabel:
id: api_key_1
MDLabel:
id: model_id_1
MDLabel:
id: model_type_1
CheckBox:
id: checkbox_2
halign: "center"
group: "settings"
disabled: True
MDLabel:
id: name_2
MDLabel:
id: camera_num_2
MDLabel:
id: plan_2
MDLabel:
id: api_key_2
MDLabel:
id: model_id_2
MDLabel:
id: model_type_2
CheckBox:
id: checkbox_3
halign: "center"
group: "settings"
disabled: True
MDLabel:
id: name_3
MDLabel:
id: camera_num_3
MDLabel:
id: plan_3
MDLabel:
id: api_key_3
MDLabel:
id: model_id_3
MDLabel:
id: model_type_3
CheckBox:
id: checkbox_4
halign: "center"
group: "settings"
disabled: True
MDLabel:
id: name_4
MDLabel:
id: camera_num_4
MDLabel:
id: plan_4
MDLabel:
id: api_key_4
MDLabel:
id: model_id_4
MDLabel:
id: model_type_4
CheckBox:
id: checkbox_5
halign: "center"
group: "settings"
disabled: True
MDLabel:
id: name_5
MDLabel:
id: camera_num_5
MDLabel:
id: plan_5
MDLabel:
id: api_key_5
MDLabel:
id: model_id_5
MDLabel:
id: model_type_5
CheckBox:
id: checkbox_6
halign: "center"
group: "settings"
disabled: True
MDLabel:
id: name_6
MDLabel:
id: camera_num_6
MDLabel:
id: plan_6
MDLabel:
id: api_key_6
MDLabel:
id: model_id_6
MDLabel:
id: model_type_6
CheckBox:
id: checkbox_7
halign: "center"
group: "settings"
disabled: True
MDLabel:
id: name_7
MDLabel:
id: camera_num_7
MDLabel:
id: plan_7
MDLabel:
id: api_key_7
MDLabel:
id: model_id_7
MDLabel:
id: model_type_7
CheckBox:
id: checkbox_8
halign: "center"
group: "settings"
disabled: True
MDLabel:
id: name_8
MDLabel:
id: camera_num_8
MDLabel:
id: plan_8
MDLabel:
id: api_key_8
MDLabel:
id: model_id_8
MDLabel:
id: model_type_8
CheckBox:
id: checkbox_9
halign: "center"
group: "settings"
disabled: True
MDLabel:
id: name_9
MDLabel:
id: camera_num_9
MDLabel:
id: plan_9
MDLabel:
id: api_key_9
MDLabel:
id: model_id_9
MDLabel:
id: model_type_9
MDGridLayout:
size_hint: .8, .1
pos: 200, 200
rows: 1
cols: 5
MDBoxLayout:
MDRaisedButton:
id: settings_button
text: app.textini[app.lang]["as_online_settings"]
on_release: root.show_save_aimodel_popup()
MDLabel:
text: ""
MDRaisedButton:
id: local_settings_button
text: app.textini[app.lang]["as_local_settings"]
on_release: root.show_save_local_aimodel_popup()
MDLabel:
text: ""
MDLabel:
text: ""
<SaveAimodelContent>
id: save_aimodel_content
orientation: "vertical"
MDLabel:
size_hint: 1, .2
halign: "center"
adaptive_height: True
text: app.textini[app.lang]["as_popup_save_aimodel_message"]
MDTextField:
id: api_key
size_hint: 1, .2
required: True
hint_text: app.textini[app.lang]["as_popup_save_model_key"]
max_text_length: 40
input_type: "text"
color_mode: "custom"
text_color_focus: 1, 1, 1, 1
MDTextField:
id: model_id
size_hint: 1, .2
required: True
hint_text: app.textini[app.lang]["as_popup_save_model_id"]
max_text_length: 40
input_type: "text"
color_mode: "custom"
text_color_focus: 1, 1, 1, 1
MDTextField:
id: model_type
size_hint: 1, .2
required: True
hint_text: app.textini[app.lang]["as_popup_save_model_type"]
max_text_length: 3
input_type: "text"
color_mode: "custom"
text_color_focus: 1, 1, 1, 1
MDBoxLayout:
size_hint: 1, .2
MDFlatButton:
text: app.textini[app.lang]["cansel"]
on_release: root.popup_close()
MDFlatButton:
text: app.textini[app.lang]["ok"]
on_release: root.save_aimodel(api_key.text, model_id.text, model_type.text)
<SaveLocalAimodelContent>
id: save_local_aimodel_content
orientation: "vertical"
MDLabel:
size_hint: 1, .3
halign: "center"
adaptive_height: True
text: app.textini[app.lang]["as_popup_save_local_aimodel_message"]
MDTextField:
id: model_path
size_hint: 1, .4
required: True
hint_text: app.textini[app.lang]["as_popup_save_model_path"]
max_text_length: 150
input_type: "text"
color_mode: "custom"
text_color_focus: 1, 1, 1, 1
MDBoxLayout:
size_hint: 1, .3
MDFlatButton:
text: app.textini[app.lang]["cansel"]
on_release: root.popup_close()
MDFlatButton:
text: app.textini[app.lang]["ok"]
on_release: root.save_aimodel(model_path.text)