-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathmain.py
More file actions
39 lines (27 loc) · 860 Bytes
/
main.py
File metadata and controls
39 lines (27 loc) · 860 Bytes
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
from cliente import Cliente
from grafico2d import Grafico2d
from mainWidget import *
from kivy.app import App
from kivy.lang.builder import Builder
class MainApp(App):
"""
Aplicativo Basico Kivy
"""
def build(self):
"""
Método que gera o aplicativo com o widget principal
"""
self._widget = MainWidget(server_ip = "127.0.0.1", server_port = 9000)
return self._widget
def on_stop(self):
"""
Método que fecha toda a aplicação
"""
self._widget.stopRefresh()
if __name__ == '__main__':
Builder.load_string(open('mainWidget.kv', encoding='utf8').read(), rulesonly=True)
Builder.load_string(open('popups.kv', encoding='utf8').read(), rulesonly=True)
MainApp().run()
# c = Grafico2d('localhost', 9000)
# c = Cliente('localhost', 9000)
# c.start()