-
Notifications
You must be signed in to change notification settings - Fork 0
/
kivy.kv
117 lines (89 loc) · 2.48 KB
/
kivy.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
#:kivy 1.9.1
<WorldManip>:
lower_color: lower_controller
upper_color: upper_controller
btn_qlearning: btn_qlearning
btn_qlearning_load: btn_qlearning_load
btn_manual: btn_manual
btn_debug: btn_debug
BoxLayout:
size: 500, 600
orientation: 'vertical'
center_x: root.width / 2
Label:
size_hint_y: 0.1
text: 'Choose a Mode:'
GridLayout:
cols: 4
size_hint_y: 0.1
Button:
id: btn_qlearning
text: 'Q-Learning (New)'
Button:
id: btn_qlearning_load
text: 'Q-Learning (Load)'
Button:
id: btn_manual
text: 'Manual'
Button:
id: btn_debug
text: 'OpenCV Debug'
GridLayout:
cols: 2
size_hint_y: 0.7
Label:
size_hint_y: 0.1
text: 'Lower Color'
Label:
size_hint_y: 0.1
text: 'Higher Color'
ColorController:
disabled: 'true'
id: lower_controller
ColorController:
disabled: 'true'
id: upper_controller
<ColorController>:
hue: hue_kv
sat: sat_kv
value: val_kv
BoxLayout:
padding: 8
size: root.size #important
pos: root.pos #important
orientation: 'vertical'
BoxLayout:
Label:
text: 'Hue'
size: self.texture_size
Label:
text: 'Saturation'
size: self.texture_size
Label:
text: 'Value'
size: self.texture_size
BoxLayout:
size_hint_y: '45dp'
padding: [0, 16, 0, 16]
Slider:
id: hue_kv
orientation: 'vertical'
step: 1
range: (0, 360)
Slider:
id: sat_kv
orientation: 'vertical'
step: 1
range: (0, 100)
Slider:
id: val_kv
orientation: 'vertical'
step: 1
range: (0, 100)
BoxLayout:
Label:
text: '{}'.format(hue_kv.value)
Label:
text: '{}'.format(sat_kv.value)
Label:
text: '{}'.format(val_kv.value)