-
Notifications
You must be signed in to change notification settings - Fork 0
/
Pomodoro.kv
264 lines (244 loc) · 7.87 KB
/
Pomodoro.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
#:kivy 2.0.0
<TitleLayout>
canvas.before:
BorderImage:
# BorderImage behaves like the CSS BorderImage
border: 0,0,0,0
texture: self.background_image.texture
pos: self.pos
size: self.size
<PomodoroTitle>
id:titlemain
on_leave: titlemain.update_val()
TitleLayout:
id: title
pos_hint: {'center_x': .5, 'center_y': .5}
cols: 1
rows:5
Label:
id: lab1
text: "The Pomodoro Technique"
bold: False
underline: False
font_size: 50
color:(1,1,1,1)
size_hint: (1,0.35)
BoxLayout:
id: box1
orientation: 'vertical'
pos_hint: {'center_x': .5, 'center_y': .5}
Label:
id:bl1
text: "Pomodoro time blocks: "
background_active: ""
font_size: 20
size_hint: (1,0.05)
bold:False
color:(1,1,1,1)
TextInput:
id: bl2
foreground_color: (1,1,1,1)
multiline: False
background_active: ""
background_color: (0,0,0,.4)
size_hint: (0.75,0.03)
pos_hint: {'center_x': .5, 'center_y': .5}
Label:
id: lab2
text: "List of tasks to be completed: "
size_hint: (1, 0.05)
pos_hint: {'center_x': .5, 'center_y': .5}
font_size: 20
bold: False
color:(1,1,1,1)
TextInput:
id: text1
multiline: True
background_active: ""
background_color: (0,0,0,.4)
foreground_color: (1,1,1,1)
size_hint: (0.75, 0.2)
border: (30,30,30,30)
pos_hint: {'center_x': .5, 'center_y': .5}
Button:
id: enter
text:"Enter"
bold: True
background_color: (1,1,1,.5)
size_hint: (0.75,0.03)
pos_hint: {'center_x': .5, 'center_y': .5}
on_press: root.manager.current='taskmain'
###############################################################
<TaskLayout>
canvas.before:
BorderImage:
# BorderImage behaves like the CSS BorderImage
border: 0,0,0,0
texture: self.background_image.texture
pos: self.pos
size: self.size
<PomodoroTask>
id:taskmain
on_enter: taskmain.task()
TaskLayout:
id: task
pos_hint: {'center_x': .5, 'center_y': .5}
cols: 1
rows:1
FloatLayout:
Label:
id: time_lab
text: root.init
bold: False
pos_hint: {'center_x': .5, 'center_y': .2}
underline: False
font_size: 40
color:(1,1,1,1)
############################################################
<TaskStartLayout>
canvas.before:
BorderImage:
# BorderImage behaves like the CSS BorderImage
border: 0,0,0,0
texture: self.background_image.texture
pos: self.pos
size: self.size
<PomodoroTaskStart>
id:taskstart
on_enter: taskstart.next_label()
on_leave: taskstart.clear_widgets()
TaskStartLayout:
id: taskstartlay
pos_hint: {'center_x': .5, 'center_y': .5}
cols: 1
rows:1
BoxLayout:
orientation:'vertical'
AnchorLayout:
anchor_x: 'center'
anchor_y: 'top'
Label:
id: timer_label
text: "Good job!\nPress the corresponding checkbox if you completed a task: "
multiline:True
bold: True
underline: False
spacing:10
halign: 'center'
font_size: 25
pos_hint: {'right': 0.8, 'center_y': .3}
color: (1,1,1,1)
AnchorLayout:
anchor_x: 'center'
anchor_y:'center'
Button:
text:'Enter'
id: completion
multiline: False
size_hint: (0.4,0.05)
pos_hint: {'right': .95, 'center_y': .39}
background_color: (1, 1, 1,0.2)
foreground_color:(1,1,1,1)
on_press: taskstart.break_type()
##########################################################################
<TaskEndLayout>
canvas.before:
BorderImage:
# BorderImage behaves like the CSS BorderImage
border: 0,0,0,0
texture: self.background_image.texture
pos: self.pos
size: self.size
<PomodoroTaskEnd>
id:taskend
on_enter: taskend.break_time()
TaskEndLayout:
id: taskendlay
pos_hint: {'center_x': .5, 'center_y': .5}
cols: 1
rows:1
BoxLayout:
Label:
id: break_timer_label
text: root.init_break_time
pos_hint: {'center_x': .5, 'center_y': .25}
bold: True
font_size: 35
underline: False
color: (1,1,1, 1)
#################################################################################
<FourTasksEndLayout>
canvas.before:
BorderImage:
# BorderImage behaves like the CSS BorderImage
border: 0,0,0,0
texture: self.background_image.texture
pos: self.pos
size: self.size
<Pomodoro4TasksEnd>
id:fourtasksend
on_enter: fourtasksend.break_time()
TaskEndLayout:
id: taskendlay
pos_hint: {'center_x': .5, 'center_y': .5}
cols: 1
rows:1
BoxLayout:
Label:
id: big_break_timer_label
text: root.init_break_time
pos_hint: {'center_x': .5, 'center_y': .25}
bold: True
font_size: 35
underline: False
color: (1,1,1,1)
###############################################################
<AppEndLayout>
canvas.before:
BorderImage:
# BorderImage behaves like the CSS BorderImage
border: 0,0,0,0
texture: self.background_image.texture
pos: self.pos
size: self.size
<PomodoroAppEnd>
id:append
AppEndLayout:
id: appendlayout
pos_hint: {'center_x': .5, 'center_y': .5}
orientation: 'vertical'
cols: 1
rows:3
Label:
id: append1
text: "Congratulations! you have completed the number blocks you set out to attempt!"
multiline:True
bold: True
underline: False
font_size: 20
color:(1,1,1,1)
size_hint: (1, .2)
pos_hint: {'center_x':.5,'center_y':.3}
BoxLayout:
id: append2
orientation: 'horizontal'
size_hint: .2, .2
pos_hint: {'center_x': .5, 'center_y': .3}
Button:
text:"Restart"
id: append3
multiline: False
background_active: ""
background_color: (0,0,0,.4)
size_hint: (0.7,.1)
pos_hint: {'center_x': .5, 'center_y': .7}
on_press:root.manager.current='titlemain'
Button:
text:"Quit"
id: text1
multiline: True
background_active: ""
background_color: (0,0,0,.4)
size_hint: (.7,.1)
pos_hint: {'center_x': .5, 'center_y': .7}
on_press:app.stop()