Advertisement
Guest User

Untitled

a guest
Apr 23rd, 2019
436
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.71 KB | None | 0 0
  1. #: import main kivyapp2
  2. #: import ListAdapter kivy.adapters.listadapter.ListAdapter
  3. #: import ListItemButton kivy.uix.listview.ListItemButton
  4. #: import Label kivy.uix.label
  5.  
  6. <ListItemButton>:
  7. selected_color: 0, 255, 200, 0.4
  8. deselected_color: 0, 0, 0, 1
  9.  
  10. <ordersScreen>:
  11.  
  12. id: ordersPage
  13. ready_list: ready_list_view
  14. notready_list: notready_list_view
  15. GridLayout:
  16. background_normal: ''
  17. background_color: 0.5, 1, 0, .85
  18. rows: 2
  19. spacing: 3
  20. GridLayout:
  21. rows: 2
  22. Label:
  23. size_hint_y: 0.13
  24. #height: 40
  25. color: 0,0,0,1
  26. canvas.before:
  27. Color:
  28. rgba: 0, 0.8, 0.8, 1
  29. Rectangle:
  30. pos: self.pos
  31. size: self.size
  32. text: "{:<15}{:<15}{:<15}{:<15}".format("Order ID","Customer ID", "Food ID", "Status")
  33. text_size: None, 20
  34. ListView:
  35. id: ready_list_view
  36. pos_hint: {"center_x": .5, "center_y": .5}
  37. canvas.before:
  38. Color:
  39. rgba: 0, 0.8, 0.8, 1
  40. Rectangle:
  41. pos: self.pos
  42. size: self.size
  43. adapter:
  44. ListAdapter(data=[], cls=main.orderListButton)
  45. GridLayout:
  46. rows: 2
  47. Label:
  48. size_hint_y: 0.13
  49. color: 0,0,0,1
  50. canvas.before:
  51. Color:
  52. rgba: 1, 0.64, 0, 1
  53. Rectangle:
  54. pos: self.pos
  55. size: self.size
  56. text: "{:<15}{:<15}{:<15}{:<15}".format("Order ID","Customer ID", "Food ID", "Status")
  57. text_size: None, 20
  58. ListView:
  59. id: notready_list_view
  60. pos_hint: {"center_x": .5, "center_y": .5}
  61. canvas.before:
  62. Color:
  63. rgba: 1, 0.64, 0, 1
  64. Rectangle:
  65. pos: self.pos
  66. size: self.size
  67. adapter:
  68. ListAdapter(data=[], cls=main.orderListButton)
  69. Button:
  70. background_normal: ''
  71. background_color: 1, 0, .8, 1
  72. text: "Logout"
  73. pos_hint: {"right": 1, "top": 1}
  74. size_hint: .08, .0585
  75. on_press:
  76. ordersPage.logout()
  77. Button:
  78. background_normal: ''
  79. background_color: 1, 0, .8, 1
  80. text: "Status \nScreen"
  81. pos_hint: {"left": 1, "top": 1}
  82. size_hint: .08, .0585
  83. on_press:
  84. ordersPage.statuschange()
  85.  
  86. <loginScreen>:
  87. id: loginPage
  88. user: user
  89. pw: pw
  90. errorLabel: error
  91. FloatLayout:
  92. canvas.before:
  93. Color:
  94. rgba: 1, 0.64, 0, 1
  95. Rectangle:
  96. pos: self.pos
  97. size: self.size
  98. TextInput:
  99. text: "chickenrice"
  100. id: user
  101. size_hint: .5, 0.08
  102. hint_text: "Vendor ID"
  103. multiline: False
  104. write_tab: False
  105. pos_hint: {"center_x": .5, "center_y": .7}
  106.  
  107. TextInput:
  108. text: "qwaszx"
  109. id: pw
  110. size_hint: .5, 0.08
  111. hint_text: "Password"
  112. password: True
  113. multiline: False
  114. write_tab: False
  115. on_text_validate: loginPage.login()
  116. pos_hint: {"center_x": .5, "center_y": .6}
  117.  
  118. Button:
  119. background_normal: ''
  120. background_color: 1, 0, .8, 1
  121. text: "Login"
  122. pos_hint: {"center_x": .5, "center_y": .5}
  123. size_hint: .1, .1
  124. on_press:
  125. loginPage.login()
  126. Label:
  127. background_normal: ''
  128. background_color: 1, 0, .8, 1
  129. id: error
  130. pos_hint: {"center_x": .5, "center_y": .2}
  131. size_hint: .1, .1
  132.  
  133.  
  134. <orderStatusScreen>:
  135. id: statusPage
  136. ready_list: ready_list_view
  137. preparing_list: preparing_list_view
  138. GridLayout:
  139. cols: 3
  140. BoxLayout:
  141. orientation: "vertical"
  142. Label:
  143. text: "Preparing"
  144. color: 0,0,0,1
  145. canvas.before:
  146. Color:
  147. rgba: 1, 0.64, 0, 1
  148. Rectangle:
  149. pos: self.pos
  150. size: self.size
  151. size_hint: 1,0.1
  152. ListView:
  153. id: preparing_list_view
  154. color: 0,0,0,1
  155. canvas.before:
  156. Color:
  157. rgba: 0, 0.8, 0.8, 1
  158. Rectangle:
  159. pos: self.pos
  160. size: self.size
  161. adapter:
  162. ListAdapter(data=[], cls=main.orderListLabel)
  163. BoxLayout:
  164. orientation: "vertical"
  165. Label:
  166. text: "Ready"
  167. color: 0,0,0,1
  168. size_hint: 1,0.1
  169. canvas.before:
  170. Color:
  171. rgba: 0, 0.8, 0.8, 1
  172. Rectangle:
  173. pos: self.pos
  174. size: self.size
  175. ListView:
  176. id: ready_list_view
  177. color: 0,0,0,1
  178. canvas.before:
  179. Color:
  180. rgba: 1, 0.64, 0, 1
  181. Rectangle:
  182. pos: self.pos
  183. size: self.size
  184. adapter:
  185. ListAdapter(data=[], cls=main.orderListLabel)
  186. BoxLayout:
  187. orientation: "vertical"
  188. Label:
  189. text: "Late"
  190. color: 0,0,0,1
  191. size_hint: 1,0.1
  192. canvas.before:
  193. Color:
  194. rgba: 1, 0.64, 0, 1
  195. Rectangle:
  196. pos: self.pos
  197. size: self.size
  198. ListView:
  199. id: thelatelist
  200. color: 0,0,0,1
  201. canvas.before:
  202. Color:
  203. rgba: 0, 0.8, 0.8, 1
  204. Rectangle:
  205. pos: self.pos
  206. size: self.size
  207. adapter:
  208. ListAdapter(data=[], cls=main.orderListLabel)
  209.  
  210. # FloatLayout:
  211. # BoxLayout:
  212. # orientation: "horizontal"
  213. # Label:
  214. # text:"Late:"
  215. # size_hint_y: 0.08
  216. # size_hint_x: 0.08
  217. # pos_hint: {"x": 0.05, "y": 0.01}
  218. # Label:
  219. # id: thelatelist
  220. # text: ""
  221. Button:
  222. background_normal: ''
  223. background_color: 1, 0, .8, 1
  224. text: "Logout"
  225. pos_hint: {"right": 1, "top": 1}
  226. size_hint: .08, .09
  227. text_size_hint: .08,.09
  228. on_press:
  229. statusPage.logout()
  230. Button:
  231. background_normal: ''
  232. background_color: 1, 0, .8, 1
  233. text: "Back"
  234. pos_hint: {"left": 1, "top": 1}
  235. size_hint: .08, .09
  236. on_press:
  237. statusPage.backtoorders()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement