-
Notifications
You must be signed in to change notification settings - Fork 0
/
myvisu.kv
193 lines (187 loc) · 5.14 KB
/
myvisu.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
#: include CoronaWidget/coronawidget.kv
#: include TwoPlotsWidget/twoplotssharedxwidget.kv
#: include WeatherWidget/weatherwidget.kv
#: include TwoScalesWidget/twoscaleswidget.kv
#: include PollenWidget/pollenwidget.kv
<MyScreens>:
Scrn1:
Scrn2:
id: scrn2
Scrn3:
id: scrn3
Scrn5:
id: scrn5
Scrn6:
id: scrn6
#Home Screen. Navigate to all other screens from here
<Scrn1>:
name: 'scrn1'
GridLayout:
cols: 3
size_hint: 1, .8
pos_hint: {'top':.9, 'left':1}
Button:
id: bnt1
text: 'Wohnzimmer'
font_size: 35
on_press:
root.manager.transition.direction = 'left'
root.manager.goto_scrn2()
Button:
id: btn2
text: 'Vorhersage'
font_size: 35
on_press:
root.manager.transition.direction = 'left'
root.manager.goto_scrn3()
Button:
id: btn6
text: 'Pollen'
font_size: 35
on_press:
root.manager.transition.direction = 'left'
root.manager.goto_scrn6()
Button:
id: btn4
text: 'Corona'
font_size: 35
on_press:
root.manager.transition.direction = 'left'
root.manager.goto_scrn5()
Button:
id: btn3
text: 'Einstellungen'
font_size: 35
on_press: app.open_settings()
Button:
id: btn5
text: 'Beenden'
on_press: app.get_running_app().stop()
size_hint: .1, .1
pos_hint: {'top':1, 'left':1}
Label:
id: lbl1
text: 'Hauptmenu'
size_hint: .8, .1
pos_hint: {'top':1, 'center_x':.5}
Label:
id: lbl2
text: 'lbl2'
size_hint: 1, .1
pos_hint: {'bottom':1, 'center_x':.5}
#Screen 2 displays the temperature and humidity
<Scrn2>:
name: 'scrn2'
Button:
id: back
text: 'Hauptmenu'
on_press:
root.manager.transition.direction = 'right'
root.manager.goto_scrn1()
size_hint: .1, .1
pos_hint: {'top':1, 'left':1}
Label:
id: lbl1
text: 'Wohnzimmer'
size_hint: .8, .1
pos_hint: {'top':1, 'center_x':.5}
Label:
id: lbl2
text: 'Zeitstempel: ' + root.ids.widget1.val3
size_hint: 1, .1
pos_hint: {'bottom':1, 'center_x':.5}
ScrollView:
id: scroll1
size_hint: 1, .85
pos_hint: {'top': .85, 'left':1}
GridLayout:
id: grid1
size_hint: 1, None
height: self.minimum_height
cols: 1
row_force_default: True
row_default_height: root.height * 0.85
TwoScalesWidget:
id: widget1
size_hint: 1, .8
pos_hint: {'top':.9, 'left': 1}
TwoPlotsSharedXWidget:
id: widget2
units : ['°C','%rH']
titles : ['Temperatur','Luftfeuchtigkeit']
ax_colors : ['r','b']
sourceX: root.timestamp
sourceY: [root.temperature, root.humidity]
formatter: '%d-%B'
size_hint: 1, .8
pos_hint: {'top':.9, 'left': 1}
#Screen 3 displays the weather forecast
<Scrn3>:
name: 'scrn3'
Button:
id: back
text: 'Hauptmenu'
on_press:
root.manager.transition.direction = 'right'
root.manager.goto_scrn1()
size_hint: .1, .1
pos_hint: {'top':1, 'left':1}
Label:
id: lbl1
text: 'Vorhersage'
size_hint: .8, .1
pos_hint: {'top':1, 'center_x':.5}
Label:
id: lbl2
text: root.ids.widget1.notification
size_hint: 1, .1
pos_hint: {'bottom':1, 'center_x':.5}
WeatherWidget:
id: widget1
size_hint: 1, .8
pos_hint: {'top':.9, 'left': 1}
#Screen 5 displays the corona app
<Scrn5>:
name: 'scrn5'
Button:
id: btn1
text: 'Hauptmenu'
on_press:
root.manager.transition.direction = 'right'
root.manager.goto_scrn1()
size_hint: .1, .1
pos_hint: {'top':1, 'left':1}
Label:
id: lbl2
text: root.ids.wdgt1.notification
size_hint: 1, .1
pos_hint: {'bottom':1, 'center_x':.5}
CoronaWidget:
id: wdgt1
size_hint: 1, .8
pos_hint: {'top':.9, 'left': 1}
#Screen 6 displays the pollen app
<Scrn6>:
name: 'scrn6'
Button:
id: btn1
text: 'Hauptmenu'
on_press:
root.manager.transition.direction = 'right'
root.manager.goto_scrn1()
size_hint: .1, .1
pos_hint: {'top':1, 'left':1}
Label:
id: lbl1
text: 'Pollen'
size_hint: .8, .1
pos_hint: {'top':1, 'center_x':.5}
Label:
id: lbl2
text: root.ids.wdgt1.notification
size_hint: 1, .1
pos_hint: {'bottom':1, 'center_x':.5}
PollenWidget:
id: wdgt1
size_hint: 1, .8
pos_hint: {'top':.9, 'left': 1}