-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.py
33 lines (24 loc) · 919 Bytes
/
main.py
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
# Sets the window size
from kivy.config import Config
Config.set('graphics', 'resizable', True)
Config.set('graphics', 'width', '1280')
Config.set('graphics', 'height', '720')
from kivymd.app import MDApp
from kivy.lang.builder import Builder
from kivy.properties import NumericProperty
from libs.baseclass import navigation_layout, homescreen, about, help
# this class serves as the main class that runs the system
class MyApp(MDApp):
title="Plant Monitoring System"
current_index = NumericProperty()
def show_screen(self, name):
self.root.current = 'nav_screen'
self.root.get_screen('nav_screen').ids.manage.current = name
return True
def build(self):
self.icon = 'plant_monitoring_system.ico'
self.theme_cls.primary_palette = "LightGreen"
screen = Builder.load_file("main.kv")
return screen
if __name__ == '__main__':
MyApp().run()