Advertisement
RoseStorm

sample.kv

Jul 12th, 2018
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.69 KB | None | 0 0
  1. #: import main kivytut
  2.  
  3. #: import ListAdapter kivy.adapters.listadapter.ListAdapter
  4. #: import ListItemButton kivy.uix.listview.ListItemButton
  5.  
  6.  
  7.  
  8. <CustomPopup>:
  9. size_hint: .5, .5
  10.  
  11. bluelist: blue_list #Talves tenha dado certo :/
  12. title: "Dispositivos Disponiveis"
  13. ListView:
  14. id: blue_list
  15. adapter: ListAdapter(data= root.search(), cls = main.BlueApp)
  16.  
  17. <Minibutton@Button>:
  18. size_hint_x: .2
  19.  
  20.  
  21. SampBoxLayout:
  22. <SampBoxLayout>:
  23. #bluelist: blue_list
  24. rows: 5
  25. padding: 10
  26. spacing: 10
  27.  
  28.  
  29. BoxLayout:
  30. size_hint_y: .2
  31.  
  32. Minibutton:
  33. text: "Farol\nFrontal"
  34. #on_press: root.Light_on() if root.on is 'False' else root.Light_off()
  35.  
  36. Minibutton:
  37. text: "Farol\nTraseiro"
  38.  
  39.  
  40. Minibutton:
  41. text: "Buzina"
  42. on_press: root.Buzzer()
  43. on_release: root.No_Buzzer()
  44. Minibutton:
  45. text: "Bluetooth"
  46. on_press: root.open_popup()
  47. Minibutton:
  48. text: "Servidor"
  49.  
  50.  
  51. BoxLayout:
  52. orientation: "vertical"
  53. Label:
  54. text: "VELOCIDADE"
  55. color: 0, 0, 0, 1
  56. Label:
  57. text: str(slider_id.value)
  58. color:0, 0, 0, 1
  59. Slider:
  60. id: slider_id
  61. min: 0
  62. max: 100
  63. value: 0
  64. step: 10
  65. on_value: root.Speed(slider_id.value)
  66. BoxLayout:
  67. orientation: "horizontal"
  68. BoxLayout:
  69. size_hint_x: .25
  70. orientation: "vertical"
  71. Button:
  72. text: "CIMA"
  73. on_press:root.Forward()
  74. Button:
  75. text: "BAIXO"
  76. on_press: root.Back()
  77.  
  78. BoxLayout:
  79. size_hint_x: .25
  80. Image:
  81. source: "truelove.png" # Imagem provisoria qq
  82. BoxLayout:
  83. size_hint_x:.30
  84. orientation: "horizontal"
  85. Button:
  86. text: "ESQUERDA"
  87. on_press: root.Left()
  88. Button:
  89. text: "DIREITA"
  90. on_press: root.Right()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement