Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #:import ListItemButton kivy.uix.listview.ListItemButton
- #:import ListView kivy.uix.listview.ListView
- #:import ListAdapter kivy.adapters.listadapter.ListAdapter
- #:import Factory kivy.factory.Factory
- <ListItemButtonTitle@ListItemButton>:
- font_size: 30
- size_hint_y: None
- height: 60
- line_height: 1
- <Mp3PiAppLayout>:
- name: 'main'
- fullscreen: True
- # Declaration of widgets for python code
- imageid: imageid
- timer: timer
- wlanstatus: wlanstatus
- search_results_list: search_results_list
- search_results_slider: search_results_slider
- infotext: infotext
- volume_slider: volume_slider
- canvas:
- Color:
- rgba: 1, 1, 1, .15
- Rectangle:
- pos: self.pos
- size: self.size
- BoxLayout:
- orientation: 'vertical'
- BoxLayout:
- BoxLayout:
- orientation: 'vertical'
- size_hint_x: .4
- # canvas:
- # Color:
- # rgba: 1, 0, 0, .5
- # Rectangle:
- # pos: self.pos
- # size: self.size
- AsyncImage:
- id: imageid
- #size_hint: (None, None)
- size_hint: (1.0, 1.0)
- anchor_y: 'top'
- allow_stretch: True
- source: 'RaspPi.png'
- # canvas:
- # Color:
- # rgba: 0, 1, 0, .5
- # Rectangle:
- # pos: self.pos
- # size: self.size
- # WlanSymbol:
- Label:
- id: wlanstatus
- text: ''
- text_size: self.size
- halign: 'left'
- canvas:
- Color:
- rgba: 1, 1, 1, .5
- Line:
- width: 2
- circle: (self.x + 30, self.y + 60, 30, 50, -50)
- Color:
- rgba: 1, 1, 1, .5
- Line:
- width: 2
- circle: (self.x + 30, self.y + 60, 20, 50, -50)
- Color:
- rgba: 1, 1, 1, 1
- Line:
- width: 2
- circle: (self.x + 30, self.y + 60, 10, 50, -50)
- Color:
- rgba: 1, 1, 1, 1
- Line:
- width: 2
- circle: (self.x + 30, self.y + 60, 1)
- #Wecker/Timer
- Button:
- text: ''
- #text_size: self.size
- id: timer
- orientation: 'horizontal'
- height: 90
- width: 100
- size_hint_x: None
- size_hint_y: None
- bold: True
- on_release: self.parent.popup.open()
- MyListView:
- id: search_results_list
- #height: 50
- # size_hint_y: None
- # size_hint: (0.9, 0.9)
- adapter:
- ListAdapter(data=[],
- selection_mode='single',
- cls=Factory.ListItemButtonTitle,
- args_converter=root.args_converter
- )
- Slider:
- id: search_results_slider
- min: 0
- max: 1
- step: 0.01
- value: 1
- orientation: 'vertical'
- size_hint: (0.1, 0.95)
- BoxLayout:
- orientation: 'horizontal'
- height: 160
- size_hint_y: None
- BoxLayout:
- orientation: 'vertical'
- BoxLayout:
- Label:
- id: infotext
- text: ""
- text_size: self.size
- halign: 'left'
- BoxLayout:
- popup: popup.__self__
- id: bl
- Popup:
- id: popup
- title: 'Shutdown/Reboot'
- size_hint: .6, .5
- on_parent:
- if self.parent == bl: self.parent.remove_widget(self)
- BoxLayout:
- Button:
- size_hint_y: None
- width: 100
- text: "Poweroff"
- on_release: root.poweroff()
- on_release: popup.dismiss()
- Button:
- size_hint_y: None
- width: 100
- text: "Reboot"
- on_release: root.reboot()
- on_release: popup.dismiss()
- Button:
- size_hint_y: None
- width: 100
- text: "Quit"
- on_release: root.quit()
- on_release: popup.dismiss()
- Button:
- size_hint_x: None
- width: 100
- on_release: self.parent.popup.open()
- canvas:
- Color:
- rgba: 1, 1, 1, 1
- Line:
- width: 3
- circle: (self.x + 50, self.y + 40, 20, 30, 330)
- Line:
- width: 3
- points: self.x + 50, self.y + 45, self.x + 50, self.y + 65
- Button:
- text: ""
- bold: True
- width: 100
- size_hint_x: None
- canvas:
- Color:
- rgba: 1, 1, 1, 1
- Line:
- width: 3
- circle: (self.x + 50, self.y + 40, 20, 0, 360)
- Line:
- width: 6
- points: self.x + 50, self.y + 65, self.x + 50, self.y + 65
- Line:
- width: 6
- points: self.x + 50, self.y + 15, self.x + 50, self.y + 15
- Line:
- width: 6
- points: self.x + 30, self.y + 25, self.x + 30, self.y + 25
- Line:
- width: 6
- points: self.x + 70, self.y + 25, self.x + 70, self.y + 25
- Line:
- width: 6
- points: self.x + 30, self.y + 55, self.x + 30, self.y + 55
- Line:
- width: 6
- points: self.x + 70, self.y + 55, self.x + 70, self.y + 55
- on_release:
- app.open_settings()
- # root.manager.transition.direction = 'right'
- # root.manager.current = 'settings'
- Button:
- # Symbol noch bauen
- text: ''
- bold: True
- width: 100
- size_hint_x: None
- canvas:
- Color:
- rgba: 0.51, 0.73, 0, 1
- Line:
- width: 30
- circle: (self.x +50, self.y +40, 1)
- Color:
- rgba: 0, 0, 0, 1
- Line:
- width: 3.5
- circle: (self.x +50, self.y +15, 40, 30, -30)
- Color:
- rgba: 0, 0, 0, 1
- Line:
- width: 2.5
- circle: (self.x +50, self.y +3, 40, 30, -30)
- Color:
- rgba: 0, 0, 0, 1
- Line:
- width: 1.5
- circle: (self.x +50, self.y -9, 40, 28, -28)
- Button:
- text: '<<'
- bold: True
- on_release: root.prev()
- Button:
- text: 'Play/Pause'
- bold: True
- on_release: root.pause()
- Button:
- text: '>>'
- bold: True
- on_release: root.next()
- BoxLayout:
- size_hint_x: .08
- Slider:
- id: volume_slider
- size_hint_x: .1
- pos_hint: {'x':.90, 'y': 0}
- #width: '48dp'
- orientation: 'vertical'
- cursor_image: 'atlas://data/images/defaulttheme/audio-volume-medium'
- on_value: root.change_volume(self.value)
- <ImageViewer>:
- name: 'imageviewer'
- fullscreen: True
- Image:
- source: root.source
- size_hint: 1, 1
- size: self.parent.size
- #<SaverScreen>:
- # name: 'screensaver'
- #<SettingsScreen>:
- # name: 'settings'
- #
- # BoxLayout:
- # Button:
- # text: "S"
- # bold: True
- # width: 100
- # on_release:
- # root.manager.transition.direction = 'left'
- # root.manager.current = 'main'
- # BoxLayout:
- # size_hint_x: .5
- # orientation: "vertical"
- # Label:
- # text_size: self.size
- # halign: "left"
- # size_hint_y: None
- # height: 50
- # text: "List of Networks:"
- # Spinner:
- # id: wlan_list
- # size_hint_y: None
- # height: 50
- # text: "WLANs"
- # values: ("no", "values", "yet")
- # Label:
- # text_size: self.size
- # size_hint_y: None
- # height: 50
- # halign: "left"
- # text: "List of Audio Cards:"
- # Spinner:
- # id: audio_list
- # size_hint_y: None
- # height: 50
- # text: "AudioCards"
- # values: ("no", "values", "yet")
- # Label:
- # text_size: self.size
- # size_hint_y: None
- # height: 50
- # halign: "left"
- # text: "List of Bluetooth Devices:"
- # Spinner:
- # id: bluetooth_list
- # size_hint_y: None
- # height: 50
- # text: "Bluetooth Cards"
- # values: ("no", "values", "yet")
- #
- # BoxLayout:
- #
- # cols: 3
- # spacing: '8dp'
- # size_hint: .5, None
- #
- # Label:
- # text: 'Checkbox'
- #
- # CheckBox:
- # size_hint_y: None
- # height: '48dp'
- #
- # CheckBox:
- # size_hint_y: None
- # height: '48dp'
- #
- # Label:
- # text: 'CheckBox with group'
- #
- # CheckBox:
- # size_hint_y: None
- # height: '48dp'
- # group: 'g2'
- #
- # CheckBox:
- # size_hint_y: None
- # height: '48dp'
- # group: 'g2'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement