-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathparentex.kv
203 lines (176 loc) · 6.08 KB
/
parentex.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
#:import ln kivy.graphics.vertex_instructions.Line
#:set offset 5
#:set txtFontSize 30
#:set txtFldW 60
#:set txtFldH 50
<PinEntry>:
font_size: txtFontSize
hint_text: "0"
<ScheduleEntry>:
hint_text: "(9,10), (5, 7)"
multiline: False
color: 1, 1, 1, 1
# Login Screen Layout
<LoginScreen>
BoxLayout:
orientation: "vertical"
canvas.before:
Rectangle:
pos: self.pos
size: self.size
source: 'login.jpg'
# PIN entry box
BoxLayout:
id: loginGrid
orientation: "horizontal"
padding: int(self.width * .1)
spacing : int(self.width / (6 + 5))
canvas:
Color:
rgba: 0, 1, 0, 1
Line:
rounded_rectangle: self.pos[0] + offset, self.pos[1] + offset, self.size[0] - (offset*2), self.size[1] - (offset*2), 10
Label:
id: lbl1
text: "PIN: "
font_size: 20
bold: True
size_hint: None, None
size: int(self.parent.width / 12), int(self.parent.height / 7)
#size: txtFldW, txtFldH
PinEntry:
id: PIN1
name: 'PIN1'
size_hint: None, None
size: int(self.parent.width / 12), int(self.parent.height / 7)
#size: txtFldW, txtFldH
focus: True
PinEntry:
id: PIN2
name: 'PIN2'
size_hint: None, None
size: int(self.parent.width / 12), int(self.parent.height / 7)
#size: txtFldW, txtFldH
PinEntry:
id: PIN3
name: 'PIN3'
size_hint: None, None
size: int(self.parent.width / 12), int(self.parent.height / 7)
#size: txtFldW, txtFldH
PinEntry:
id: PIN4
name: 'PIN4'
size_hint: None, None
size: int(self.parent.width / 12), int(self.parent.height / 7)
#size: txtFldW, txtFldH
# message label
BoxLayout:
orientation: "vertical"
padding: int(self.width * .1)
canvas:
Color:
rgba: 0, 1, 0, 1
Line:
rounded_rectangle: self.pos[0] + offset, self.pos[1] + offset, self.size[0] - (offset*2), self.size[1] - (offset*2), 10
Label:
id: loginLbl
font_size: 22
text_size: root.width, None
size: self.texture_size
padding: 10, 10
text: ""
# Screen where the schedule is entered
<MainScreen>
# Schedule entry box and label
BoxLayout:
orientation: "vertical"
canvas.before:
Rectangle:
pos: self.pos
size: self.size
source: 'download.jpg'
GridLayout:
cols: 2
rows: 2
#pos: self.pos
#size: self.size
spacing: 5
padding: int(self.width * .1)
canvas:
Color:
rgba: 0, 1, 0, 1
Line:
rounded_rectangle: self.pos[0] + offset, self.pos[1] + offset, self.size[0] - (offset*2), self.size[1] - (offset*2), 10
Label:
text: ""
size_hint: .2, .2
Label:
text: "(From Hour, To Hour), (From Hour, To Hour)..."
font_size: 18
size_hint: .7, .2
Label:
canvas:
Color:
rgba: 0, 1, 0, 1
Line:
rounded_rectangle: self.pos[0], self.pos[1], self.size[0], self.size[1], 10
size: self.texture_size
valign: "center"
text: "Time range:"
font_size: 20
color: 1, 1, 1, 1
size_hint: .2, .1
ScheduleEntry:
id: schEntry
focus: True
font_size: 20
size_hint: .5, .1
#height: 50 #int(self.parent.height * .15)
on_text_validate:
app.validate_input(self.text, self.parent.parent.parent.ids.msg)
# Box to hold the Save Button
BoxLayout:
orientation: "horizontal"
pos: self.pos
size: self.size
spacing: 10
padding: 10
canvas:
Color:
rgba: 0, 1, 0, 1
Line:
rounded_rectangle: self.pos[0] + offset, self.pos[1] + offset, self.size[0] - (offset*2), self.size[1] - (offset*2), 10
Button:
id: saveBtn
text: "Save"
size_hint: .3, .2
on_press:
app.validate_input(self.parent.parent.parent.ids.schEntry.text, self.parent.parent.parent.ids.msg)
Button:
id: cancelBtn
text: "Cancel"
size_hint: .3, .2
on_press:
app.cancel_pressed()
Button:
id: startBtn
text: "Start Service"
size_hint: .4, .2
BoxLayout:
orientation: "vertical"
pos: self.pos
size: self.size
spacing: 10
padding: 10
canvas:
Color:
rgba: 0, 1, 0, 1
Line:
rounded_rectangle: self.pos[0] + offset, self.pos[1] + offset, self.size[0] - (offset*2), self.size[1] - (offset*2), 10
Label:
id: msg
padding: 10, 5
text_size: root.width, None
size: self.texture_size
font_size: 22
text: "Status Message"