Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #: import main kivyapp2
- #: import ListAdapter kivy.adapters.listadapter.ListAdapter
- #: import ListItemButton kivy.uix.listview.ListItemButton
- #: import Label kivy.uix.label
- <ListItemButton>:
- selected_color: 0, 255, 200, 0.4
- deselected_color: 0, 0, 0, 1
- <ordersScreen>:
- id: ordersPage
- ready_list: ready_list_view
- notready_list: notready_list_view
- GridLayout:
- background_normal: ''
- background_color: 0.5, 1, 0, .85
- rows: 2
- spacing: 3
- GridLayout:
- rows: 2
- Label:
- size_hint_y: 0.13
- #height: 40
- color: 0,0,0,1
- canvas.before:
- Color:
- rgba: 0, 0.8, 0.8, 1
- Rectangle:
- pos: self.pos
- size: self.size
- text: "{:<15}{:<15}{:<15}{:<15}".format("Order ID","Customer ID", "Food ID", "Status")
- text_size: None, 20
- ListView:
- id: ready_list_view
- pos_hint: {"center_x": .5, "center_y": .5}
- canvas.before:
- Color:
- rgba: 0, 0.8, 0.8, 1
- Rectangle:
- pos: self.pos
- size: self.size
- adapter:
- ListAdapter(data=[], cls=main.orderListButton)
- GridLayout:
- rows: 2
- Label:
- size_hint_y: 0.13
- color: 0,0,0,1
- canvas.before:
- Color:
- rgba: 1, 0.64, 0, 1
- Rectangle:
- pos: self.pos
- size: self.size
- text: "{:<15}{:<15}{:<15}{:<15}".format("Order ID","Customer ID", "Food ID", "Status")
- text_size: None, 20
- ListView:
- id: notready_list_view
- pos_hint: {"center_x": .5, "center_y": .5}
- canvas.before:
- Color:
- rgba: 1, 0.64, 0, 1
- Rectangle:
- pos: self.pos
- size: self.size
- adapter:
- ListAdapter(data=[], cls=main.orderListButton)
- Button:
- background_normal: ''
- background_color: 1, 0, .8, 1
- text: "Logout"
- pos_hint: {"right": 1, "top": 1}
- size_hint: .08, .0585
- on_press:
- ordersPage.logout()
- Button:
- background_normal: ''
- background_color: 1, 0, .8, 1
- text: "Status \nScreen"
- pos_hint: {"left": 1, "top": 1}
- size_hint: .08, .0585
- on_press:
- ordersPage.statuschange()
- <loginScreen>:
- id: loginPage
- user: user
- pw: pw
- errorLabel: error
- FloatLayout:
- canvas.before:
- Color:
- rgba: 1, 0.64, 0, 1
- Rectangle:
- pos: self.pos
- size: self.size
- TextInput:
- text: "chickenrice"
- id: user
- size_hint: .5, 0.08
- hint_text: "Vendor ID"
- multiline: False
- write_tab: False
- pos_hint: {"center_x": .5, "center_y": .7}
- TextInput:
- text: "qwaszx"
- id: pw
- size_hint: .5, 0.08
- hint_text: "Password"
- password: True
- multiline: False
- write_tab: False
- on_text_validate: loginPage.login()
- pos_hint: {"center_x": .5, "center_y": .6}
- Button:
- background_normal: ''
- background_color: 1, 0, .8, 1
- text: "Login"
- pos_hint: {"center_x": .5, "center_y": .5}
- size_hint: .1, .1
- on_press:
- loginPage.login()
- Label:
- background_normal: ''
- background_color: 1, 0, .8, 1
- id: error
- pos_hint: {"center_x": .5, "center_y": .2}
- size_hint: .1, .1
- <orderStatusScreen>:
- id: statusPage
- ready_list: ready_list_view
- preparing_list: preparing_list_view
- GridLayout:
- cols: 3
- BoxLayout:
- orientation: "vertical"
- Label:
- text: "Preparing"
- color: 0,0,0,1
- canvas.before:
- Color:
- rgba: 1, 0.64, 0, 1
- Rectangle:
- pos: self.pos
- size: self.size
- size_hint: 1,0.1
- ListView:
- id: preparing_list_view
- color: 0,0,0,1
- canvas.before:
- Color:
- rgba: 0, 0.8, 0.8, 1
- Rectangle:
- pos: self.pos
- size: self.size
- adapter:
- ListAdapter(data=[], cls=main.orderListLabel)
- BoxLayout:
- orientation: "vertical"
- Label:
- text: "Ready"
- color: 0,0,0,1
- size_hint: 1,0.1
- canvas.before:
- Color:
- rgba: 0, 0.8, 0.8, 1
- Rectangle:
- pos: self.pos
- size: self.size
- ListView:
- id: ready_list_view
- color: 0,0,0,1
- canvas.before:
- Color:
- rgba: 1, 0.64, 0, 1
- Rectangle:
- pos: self.pos
- size: self.size
- adapter:
- ListAdapter(data=[], cls=main.orderListLabel)
- BoxLayout:
- orientation: "vertical"
- Label:
- text: "Late"
- color: 0,0,0,1
- size_hint: 1,0.1
- canvas.before:
- Color:
- rgba: 1, 0.64, 0, 1
- Rectangle:
- pos: self.pos
- size: self.size
- ListView:
- id: thelatelist
- color: 0,0,0,1
- canvas.before:
- Color:
- rgba: 0, 0.8, 0.8, 1
- Rectangle:
- pos: self.pos
- size: self.size
- adapter:
- ListAdapter(data=[], cls=main.orderListLabel)
- # FloatLayout:
- # BoxLayout:
- # orientation: "horizontal"
- # Label:
- # text:"Late:"
- # size_hint_y: 0.08
- # size_hint_x: 0.08
- # pos_hint: {"x": 0.05, "y": 0.01}
- # Label:
- # id: thelatelist
- # text: ""
- Button:
- background_normal: ''
- background_color: 1, 0, .8, 1
- text: "Logout"
- pos_hint: {"right": 1, "top": 1}
- size_hint: .08, .09
- text_size_hint: .08,.09
- on_press:
- statusPage.logout()
- Button:
- background_normal: ''
- background_color: 1, 0, .8, 1
- text: "Back"
- pos_hint: {"left": 1, "top": 1}
- size_hint: .08, .09
- on_press:
- statusPage.backtoorders()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement