feat: added demo timer_constructor; docs: added db in the .gitignore

This commit is contained in:
Arduinum628
2025-06-19 10:28:26 +03:00
parent 50e76d4726
commit f4da6d9f12
9 changed files with 242 additions and 6 deletions

View File

@@ -0,0 +1,133 @@
#:kivy 2.3.1
<TimerConstructorScreen>:
FloatLayout:
# поле вовода "название"
TextInput:
id: title
size_hint: None, None
size: 220, 30
pos_hint: {"center_x": 0.5, "center_y": 0.9}
hint_text: "название"
# числовой счётчик "время помидора"
Label:
text: "помидор"
size_hint: None, None
pos_hint: {"center_x": 0.3, "center_y": 0.7}
Button:
text: "-"
size_hint: None, None
size: 40, 40
pos_hint: {"center_x": 0.5, "center_y": 0.7}
on_press: time_tomato_input.decrement()
TimeTomatoInput:
id: time_tomato_input
size_hint: None, None
size: 40, 30
pos_hint: {"center_x": 0.6, "center_y": 0.7}
Button:
text: "+"
size_hint: None, None
size: 40, 40
pos_hint: {"center_x": 0.7, "center_y": 0.7}
on_press: time_tomato_input.increment()
# числовой счётчик "время прерыва"
Label:
text: "перерыв"
size_hint: None, None
pos_hint: {"center_x": 0.3, "center_y": 0.6}
Button:
text: "-"
size_hint: None, None
size: 40, 40
pos_hint: {"center_x": 0.5, "center_y": 0.6}
on_press: time_break_input.decrement()
TimeBreakInput:
id: time_break_input
size_hint: None, None
size: 40, 30
pos_hint: {"center_x": 0.6, "center_y": 0.6}
Button:
text: "+"
size_hint: None, None
size: 40, 40
pos_hint: {"center_x": 0.7, "center_y": 0.6}
on_press: time_break_input.increment()
# числовой счётчик "время длительного перерыва"
Label:
text: "перерывище"
size_hint: None, None
pos_hint: {"center_x": 0.3, "center_y": 0.5}
Button:
text: "-"
size_hint: None, None
size: 40, 40
pos_hint: {"center_x": 0.5, "center_y": 0.5}
on_press: time_long_break_input.decrement()
TimeLoongBreakInput:
id: time_long_break_input
size_hint: None, None
size: 40, 30
pos_hint: {"center_x": 0.6, "center_y": 0.5}
Button:
text: "+"
size_hint: None, None
size: 40, 40
pos_hint: {"center_x": 0.7, "center_y": 0.5}
on_press: time_long_break_input.increment()
# числовой счётчик "колличество помидоров"
Label:
text: "помидоров"
size_hint: None, None
pos_hint: {"center_x": 0.3, "center_y": 0.4}
Button:
text: "-"
size_hint: None, None
size: 40, 40
pos_hint: {"center_x": 0.5, "center_y": 0.4}
on_press: count_tomatos_input.decrement()
CountTomatosInput:
id: count_tomatos_input
size_hint: None, None
size: 40, 30
pos_hint: {"center_x": 0.6, "center_y": 0.4}
Button:
text: "+"
size_hint: None, None
size: 40, 40
pos_hint: {"center_x": 0.7, "center_y": 0.4}
on_press: count_tomatos_input.increment()
# Кнопка "Создать"
Button:
text: 'Создать'
size_hint: None, None
height: 40
width: 100
pos_hint: {'center_x': 0.7, 'center_y': 0.1}
on_press: root.create_timer(self)
# Кнопка "Назад"
Button:
text: 'Назад'
size_hint: None, None
height: 40
width: 100
pos_hint: {'center_x': 0.3, 'center_y': 0.1}
on_press: root.back(self)

View File

@@ -32,6 +32,6 @@
# Label для отображения времени
Label:
id: time_label
text: '00:00:12'
# text: root.get_init_time(self)
size_hint: None, None
pos_hint: {'center_x': 0.5, 'center_y': 0.6}