Advertisement
Guest User

Untitled

a guest
Jan 20th, 2018
169
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 9.24 KB | None | 0 0
  1. #:import ListItemButton kivy.uix.listview.ListItemButton
  2. #:import ListView kivy.uix.listview.ListView
  3. #:import ListAdapter kivy.adapters.listadapter.ListAdapter
  4. #:import Factory kivy.factory.Factory
  5.  
  6. <ListItemButtonTitle@ListItemButton>:
  7. font_size: 30
  8. size_hint_y: None
  9. height: 60
  10. line_height: 1
  11.  
  12. <Mp3PiAppLayout>:
  13. name: 'main'
  14. fullscreen: True
  15.  
  16. # Declaration of widgets for python code
  17. imageid: imageid
  18. timer: timer
  19. wlanstatus: wlanstatus
  20. search_results_list: search_results_list
  21. search_results_slider: search_results_slider
  22. infotext: infotext
  23. volume_slider: volume_slider
  24.  
  25. canvas:
  26. Color:
  27. rgba: 1, 1, 1, .15
  28. Rectangle:
  29. pos: self.pos
  30. size: self.size
  31.  
  32. BoxLayout:
  33. orientation: 'vertical'
  34. BoxLayout:
  35. BoxLayout:
  36. orientation: 'vertical'
  37. size_hint_x: .4
  38. # canvas:
  39. # Color:
  40. # rgba: 1, 0, 0, .5
  41. # Rectangle:
  42. # pos: self.pos
  43. # size: self.size
  44. AsyncImage:
  45. id: imageid
  46. #size_hint: (None, None)
  47. size_hint: (1.0, 1.0)
  48. anchor_y: 'top'
  49. allow_stretch: True
  50. source: 'RaspPi.png'
  51. # canvas:
  52. # Color:
  53. # rgba: 0, 1, 0, .5
  54. # Rectangle:
  55. # pos: self.pos
  56. # size: self.size
  57.  
  58. # WlanSymbol:
  59. Label:
  60. id: wlanstatus
  61. text: ''
  62. text_size: self.size
  63. halign: 'left'
  64. canvas:
  65. Color:
  66. rgba: 1, 1, 1, .5
  67. Line:
  68. width: 2
  69. circle: (self.x + 30, self.y + 60, 30, 50, -50)
  70. Color:
  71. rgba: 1, 1, 1, .5
  72. Line:
  73. width: 2
  74. circle: (self.x + 30, self.y + 60, 20, 50, -50)
  75. Color:
  76. rgba: 1, 1, 1, 1
  77. Line:
  78. width: 2
  79. circle: (self.x + 30, self.y + 60, 10, 50, -50)
  80. Color:
  81. rgba: 1, 1, 1, 1
  82. Line:
  83. width: 2
  84. circle: (self.x + 30, self.y + 60, 1)
  85.  
  86. #Wecker/Timer
  87. Button:
  88. text: ''
  89. #text_size: self.size
  90. id: timer
  91. orientation: 'horizontal'
  92. height: 90
  93. width: 100
  94. size_hint_x: None
  95. size_hint_y: None
  96. bold: True
  97. on_release: self.parent.popup.open()
  98.  
  99.  
  100. MyListView:
  101. id: search_results_list
  102. #height: 50
  103. # size_hint_y: None
  104. # size_hint: (0.9, 0.9)
  105. adapter:
  106. ListAdapter(data=[],
  107. selection_mode='single',
  108. cls=Factory.ListItemButtonTitle,
  109. args_converter=root.args_converter
  110. )
  111.  
  112. Slider:
  113. id: search_results_slider
  114. min: 0
  115. max: 1
  116. step: 0.01
  117. value: 1
  118. orientation: 'vertical'
  119. size_hint: (0.1, 0.95)
  120.  
  121. BoxLayout:
  122. orientation: 'horizontal'
  123. height: 160
  124. size_hint_y: None
  125. BoxLayout:
  126. orientation: 'vertical'
  127. BoxLayout:
  128. Label:
  129. id: infotext
  130. text: ""
  131. text_size: self.size
  132. halign: 'left'
  133. BoxLayout:
  134. popup: popup.__self__
  135. id: bl
  136. Popup:
  137. id: popup
  138. title: 'Shutdown/Reboot'
  139. size_hint: .6, .5
  140. on_parent:
  141. if self.parent == bl: self.parent.remove_widget(self)
  142. BoxLayout:
  143. Button:
  144. size_hint_y: None
  145. width: 100
  146. text: "Poweroff"
  147. on_release: root.poweroff()
  148. on_release: popup.dismiss()
  149. Button:
  150. size_hint_y: None
  151. width: 100
  152. text: "Reboot"
  153. on_release: root.reboot()
  154. on_release: popup.dismiss()
  155. Button:
  156. size_hint_y: None
  157. width: 100
  158. text: "Quit"
  159. on_release: root.quit()
  160. on_release: popup.dismiss()
  161.  
  162. Button:
  163. size_hint_x: None
  164. width: 100
  165. on_release: self.parent.popup.open()
  166. canvas:
  167. Color:
  168. rgba: 1, 1, 1, 1
  169. Line:
  170. width: 3
  171. circle: (self.x + 50, self.y + 40, 20, 30, 330)
  172. Line:
  173. width: 3
  174. points: self.x + 50, self.y + 45, self.x + 50, self.y + 65
  175. Button:
  176. text: ""
  177. bold: True
  178. width: 100
  179. size_hint_x: None
  180.  
  181. canvas:
  182. Color:
  183. rgba: 1, 1, 1, 1
  184. Line:
  185. width: 3
  186. circle: (self.x + 50, self.y + 40, 20, 0, 360)
  187. Line:
  188. width: 6
  189. points: self.x + 50, self.y + 65, self.x + 50, self.y + 65
  190. Line:
  191. width: 6
  192. points: self.x + 50, self.y + 15, self.x + 50, self.y + 15
  193. Line:
  194. width: 6
  195. points: self.x + 30, self.y + 25, self.x + 30, self.y + 25
  196. Line:
  197. width: 6
  198. points: self.x + 70, self.y + 25, self.x + 70, self.y + 25
  199. Line:
  200. width: 6
  201. points: self.x + 30, self.y + 55, self.x + 30, self.y + 55
  202. Line:
  203. width: 6
  204. points: self.x + 70, self.y + 55, self.x + 70, self.y + 55
  205.  
  206.  
  207. on_release:
  208. app.open_settings()
  209. # root.manager.transition.direction = 'right'
  210. # root.manager.current = 'settings'
  211. Button:
  212. # Symbol noch bauen
  213. text: ''
  214. bold: True
  215. width: 100
  216. size_hint_x: None
  217. canvas:
  218. Color:
  219. rgba: 0.51, 0.73, 0, 1
  220. Line:
  221. width: 30
  222. circle: (self.x +50, self.y +40, 1)
  223. Color:
  224. rgba: 0, 0, 0, 1
  225. Line:
  226. width: 3.5
  227. circle: (self.x +50, self.y +15, 40, 30, -30)
  228. Color:
  229. rgba: 0, 0, 0, 1
  230. Line:
  231. width: 2.5
  232. circle: (self.x +50, self.y +3, 40, 30, -30)
  233. Color:
  234. rgba: 0, 0, 0, 1
  235. Line:
  236. width: 1.5
  237. circle: (self.x +50, self.y -9, 40, 28, -28)
  238. Button:
  239. text: '<<'
  240. bold: True
  241. on_release: root.prev()
  242. Button:
  243. text: 'Play/Pause'
  244. bold: True
  245. on_release: root.pause()
  246. Button:
  247. text: '>>'
  248. bold: True
  249. on_release: root.next()
  250.  
  251.  
  252. BoxLayout:
  253. size_hint_x: .08
  254. Slider:
  255. id: volume_slider
  256. size_hint_x: .1
  257. pos_hint: {'x':.90, 'y': 0}
  258. #width: '48dp'
  259. orientation: 'vertical'
  260. cursor_image: 'atlas://data/images/defaulttheme/audio-volume-medium'
  261. on_value: root.change_volume(self.value)
  262.  
  263. <ImageViewer>:
  264. name: 'imageviewer'
  265. fullscreen: True
  266. Image:
  267. source: root.source
  268. size_hint: 1, 1
  269. size: self.parent.size
  270.  
  271. #<SaverScreen>:
  272. # name: 'screensaver'
  273.  
  274. #<SettingsScreen>:
  275. # name: 'settings'
  276. #
  277. # BoxLayout:
  278. # Button:
  279. # text: "S"
  280. # bold: True
  281. # width: 100
  282. # on_release:
  283. # root.manager.transition.direction = 'left'
  284. # root.manager.current = 'main'
  285. # BoxLayout:
  286. # size_hint_x: .5
  287. # orientation: "vertical"
  288. # Label:
  289. # text_size: self.size
  290. # halign: "left"
  291. # size_hint_y: None
  292. # height: 50
  293. # text: "List of Networks:"
  294. # Spinner:
  295. # id: wlan_list
  296. # size_hint_y: None
  297. # height: 50
  298. # text: "WLANs"
  299. # values: ("no", "values", "yet")
  300. # Label:
  301. # text_size: self.size
  302. # size_hint_y: None
  303. # height: 50
  304. # halign: "left"
  305. # text: "List of Audio Cards:"
  306. # Spinner:
  307. # id: audio_list
  308. # size_hint_y: None
  309. # height: 50
  310. # text: "AudioCards"
  311. # values: ("no", "values", "yet")
  312. # Label:
  313. # text_size: self.size
  314. # size_hint_y: None
  315. # height: 50
  316. # halign: "left"
  317. # text: "List of Bluetooth Devices:"
  318. # Spinner:
  319. # id: bluetooth_list
  320. # size_hint_y: None
  321. # height: 50
  322. # text: "Bluetooth Cards"
  323. # values: ("no", "values", "yet")
  324. #
  325. # BoxLayout:
  326. #
  327. # cols: 3
  328. # spacing: '8dp'
  329. # size_hint: .5, None
  330. #
  331. # Label:
  332. # text: 'Checkbox'
  333. #
  334. # CheckBox:
  335. # size_hint_y: None
  336. # height: '48dp'
  337. #
  338. # CheckBox:
  339. # size_hint_y: None
  340. # height: '48dp'
  341. #
  342. # Label:
  343. # text: 'CheckBox with group'
  344. #
  345. # CheckBox:
  346. # size_hint_y: None
  347. # height: '48dp'
  348. # group: 'g2'
  349. #
  350. # CheckBox:
  351. # size_hint_y: None
  352. # height: '48dp'
  353. # group: 'g2'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement