from kivy.app import App
from kivy.lang import Builder
from kivy.uix.screenmanager import ScreenManager, Screen
from kivy.core.window import Window
Window.size = (360, 480)
Window.clearcolor = (0, .17, .55, 1)
Builder.load_string("""
<PushScreen>:
BoxLayout:
#:import ZBarCam kivy_garden.zbarcam.ZBarCam
ZBarCam:
id: qrcodecam
Label:
size_hint: None, None
size: self.texture_size[0], 50
text: ' , '.join([str(symbol.data) for symbol in qrcodecam.symbols])
on_press: root.manager.current = 'total'
<MenuScreen>:
BoxLayout:
orientation: 'vertical'
padding: 5, 10
spacing: 10
Button:
text: 'УВЕДОМЛЕНИЯ'
background_color: 0, .12, .52, 1
Button:
text: 'ЗАКАЗЫ В РАБОТЕ'
background_color: 0, .12, .52, 1
Button:
text: 'АРХИВ ЗАКАЗОВ'
background_color: 0, .12, .52, 1
Button:
text: 'СКАНИРОВАНИЕ QR'
background_color: 0, .12, .52, 1
on_press: root.manager.current = 'settings'
<ScanScreen>:
BoxLayout:
orientation: 'vertical'
padding: 5, 10
spacing: 10
Button:
text: 'РАБОТА НАЧАТА'
background_color: 0, .12, .52, 1
Button:
text: 'РАБОТА ПРИОСТАНОВЛЕНА'
background_color: 0, .12, .52, 1
Button:
text: 'РАБОТА ЗАКОНЧЕНА'
background_color: 0, .12, .52, 1
on_press: root.manager.current = 'menu'
""")
class MenuScreen(Screen):
pass
class ScanScreen(Screen):
pass
class PushScreen(Screen):
pass
class MainApp(App):
def build(self):
sm = ScreenManager()
sm.add_widget(MenuScreen(name='menu')) # 1 tablo
sm.add_widget(PushScreen(name='settings')) # 2 tablo
sm.add_widget(ScanScreen(neme='total')) # 3 tablo
return sm
if __name__=='__main__':
MainApp().run()
sm.add_widget(ScanScreen(name='total')) # 3 tablo
from kivy.app import App
from kivy.lang import Builder
from kivy.uix.screenmanager import ScreenManager, Screen
from kivy.core.window import Window
Window.size = (360, 480)
Window.clearcolor = (0, .17, .55, 1)
Builder.load_string("""
<PushScreen>:
#:import ZBarCam kivy_garden.zbarcam.ZBarCam
BoxLayout:
ZBarCam:
id: qrcodecam
Label:
size_hint: None, None
size: self.texture_size[0], 50
text: ' , '.join([str(symbol.data) for symbol in qrcodecam.symbols])
<MenuScreen>:
BoxLayout:
orientation: 'vertical'
padding: 5, 10
spacing: 10
Button:
text: 'УВЕДОМЛЕНИЯ'
background_color: 0, .12, .52, 1
Button:
text: 'ЗАКАЗЫ В РАБОТЕ'
background_color: 0, .12, .52, 1
Button:
text: 'АРХИВ ЗАКАЗОВ'
background_color: 0, .12, .52, 1
Button:
text: 'СКАНИРОВАНИЕ QR'
background_color: 0, .12, .52, 1
on_press: root.manager.current = 'settings'
<ScanScreen>:
BoxLayout:
orientation: 'vertical'
padding: 5, 10
spacing: 10
Button:
text: 'РАБОТА НАЧАТА'
background_color: 0, .12, .52, 1
Button:
text: 'РАБОТА ПРИОСТАНОВЛЕНА'
background_color: 0, .12, .52, 1
Button:
text: 'РАБОТА ЗАКОНЧЕНА'
background_color: 0, .12, .52, 1
on_press: root.manager.current = 'menu'
""")
class MenuScreen(Screen):
pass
class ScanScreen(Screen):
pass
class PushScreen(Screen):
pass
sm = ScreenManager()
sm.add_widget(MenuScreen(name='menu')) # 1 tablo
sm.add_widget(PushScreen(name='settings')) # 2 tablo
sm.add_widget(ScanScreen(name='total')) # 3 tablo
class MainApp(App):
def __init__(self):
super(MainApp, self).__init__()
def build(self):
return sm
if __name__ == '__main__':
MainApp().run()