Advertisement
Guest User

Untitled

a guest
Jul 23rd, 2018
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.17 KB | None | 0 0
  1. #:kivy 1.1.0
  2.  
  3. MyScreenManager:
  4.  
  5. BRANCH:
  6. name: 'branch'
  7. MONOPHASIC:
  8. name: 'monophasic'
  9. BIPHASIC:
  10. name: 'biphasic'
  11. MONOPAD:
  12. name: 'monopad'
  13. BIPAD:
  14. name: 'bipad'
  15.  
  16. <confirmPopup@Popup>
  17. title: 'Press Start When Ready'
  18. title_align: 'center'
  19. title_size: 20
  20. size_hint: (.6,.6)
  21. auto_dismiss: False
  22. seperator_height: 0
  23. border:(14,14,14,14)
  24.  
  25. GridLayout:
  26. cols:2
  27. spacing:5
  28. size_hint: (.45,.35)
  29. Button:
  30. text: 'Cancel'
  31. font_size: 15
  32. on_release:
  33. root.dismiss()
  34. Button:
  35. text: 'Start'
  36. font_size: 15
  37.  
  38. <BRANCH>
  39. canvas:
  40. Rectangle:
  41. pos: self.pos
  42. size: self.size
  43. source: 'background.png'
  44. GridLayout:
  45. cols:3
  46. rows:1
  47. spacing:10
  48. size_hint_x:.93
  49. size_hint_y:.15
  50. pos_hint:{'x':.04,'y':.05}
  51. Button:
  52. background_normal: 'button1.png'
  53. text: 'About'
  54. color: 0,0,0,1
  55. font_size: 15
  56.  
  57. Button:
  58. background_normal: 'button1.png'
  59. text: 'Auto Test'
  60. color: 0,0,0,1
  61. font_size: 15
  62. Button:
  63. background_normal: 'button1.png'
  64. text: 'Shutdown'
  65. color: 0,0,0,1
  66. font_size: 15
  67. on_release:
  68. app.stop()
  69. GridLayout:
  70. cols: 1
  71. rows: 2
  72. spacing: 10
  73. size_hint_x: .47
  74. size_hint_y: .65
  75. pos_hint: {'x':.5,'y':.275}
  76. Button:
  77. background_normal: 'button1.png'
  78. text: "Monophasic"
  79. color: 0,0,0,1
  80. font_size: 20
  81. pos_hint: {"x": 0, 'y': .2}
  82. size_hint: (.5,.8)
  83. on_release:
  84. root.manager.transition.direction = 'left'
  85. root.manager.current = 'monophasic'
  86. Button:
  87. background_normal: 'button1.png'
  88. text: "Biphasic"
  89. color: 0,0,0,1
  90. font_size: 20
  91. pos_hint: {"x": .5, 'y': .2}
  92. size_hint: (.5,.8)
  93. on_release:
  94. root.manager.transition.direction = 'left'
  95. root.manager.current = 'biphasic'
  96. <MONOPHASIC>
  97.  
  98. canvas:
  99. Rectangle:
  100. pos: self.pos
  101. size: self.size
  102. source: 'source3.png'
  103.  
  104.  
  105. GridLayout:
  106. cols:1
  107. spacing: 10
  108. size_hint_x: .3
  109. size_hint_y: .425
  110. pos_hint: {'x':.040,'y':.46}
  111. Button:
  112. text: 'Home'
  113. font_size: 20
  114. color: 0,0,0,1
  115. background_normal: 'button1.png'
  116. on_release:
  117. root.manager.transition.direction = 'right'
  118. root.manager.current = 'branch'
  119. Button:
  120. id: confirm
  121. text: 'Confirm'
  122. font_size: 20
  123. color: 0,0,0,1
  124. background_normal: 'button1.png'
  125. on_release:
  126. root.confirm()
  127.  
  128. GridLayout:
  129. cols: 3
  130. rows: 1
  131. spacing: 10
  132. size_hint_x:.93
  133. size_hint_y:.15
  134. pos_hint:{'x':.04,'y':.225}
  135. Button:
  136. text: 'Voltage'
  137. font_size: 15
  138. color: 0,0,0,1
  139. background_normal: 'button1.png'
  140. Button:
  141. text: 'Rep'
  142. font_size: 15
  143. color: 0,0,0,1
  144. background_normal: 'button1.png'
  145. on_release:
  146. root.rep_on_release()
  147. root.manager.transition.direction = 'left'
  148. root.manager.current = 'monopad'
  149. Button:
  150. text: 't1'
  151. font_size: 15
  152. color: 0,0,0,1
  153. background_normal: 'button1.png'
  154. on_release:
  155. root.t1_on_release()
  156. root.manager.transition.direction = 'left'
  157. root.manager.current = 'monopad'
  158. GridLayout:
  159. cols:2
  160. rows:1
  161. spacing:10
  162. size_hint_x:.635
  163. size_hint_y:.15
  164. pos_hint:{'x':.185,'y':.05}
  165. Button:
  166. id: monoPolButton
  167. background_normal: 'button1.png'
  168. text: 'Polarity +'
  169. color: 0,0,0,1
  170. font_size: 15
  171. on_release:
  172. root.polarity()
  173.  
  174. Button:
  175. background_normal: 'button1.png'
  176. text: 'Period'
  177. halign: 'left'
  178. color: 0,0,0,1
  179. font_size: 15
  180. on_release:
  181. root.per_on_release()
  182. root.manager.transition.direction = 'left'
  183. root.manager.current = 'monopad'
  184. <CustButton@Button>:
  185. background_normal: 'button1.png'
  186. color: 0,0,0,1
  187. size_hint_x: .2875
  188. size_hint_y: .1625
  189.  
  190. <MONOPAD>
  191. txt: monoTextInput
  192. canvas:
  193. Rectangle:
  194. pos: self.pos
  195. size: self.size
  196. source:'background.jpg'
  197. FloatLayout:
  198. FloatLayout:
  199. TextInput:
  200. id: monoTextInput
  201. font_size: 20
  202. size_hint_x: .55
  203. size_hint_y: .15
  204. pos_hint: {'x': .07,'y': .825}
  205. CustButton:
  206. text: 'Backspace'
  207. pos_hint: {'x': .6625, 'y':.82}
  208. on_release:
  209.  
  210. root.test()
  211. GridLayout:
  212. cols: 3
  213. rows: 4
  214. spacing: 10
  215. pos_hint: {'x': .05,'y': .05}
  216. size_hint: (.9,.75)
  217.  
  218. CustButton:
  219. text: '1'
  220. on_release: monoTextInput.text += self.text
  221. CustButton:
  222. text: '2'
  223. on_release: monoTextInput.text += self.text
  224. CustButton:
  225. text: '3'
  226. on_release: monoTextInput.text += self.text
  227. CustButton:
  228. text: '4'
  229. on_release: monoTextInput.text += self.text
  230. CustButton:
  231. text: '5'
  232. on_release: monoTextInput.text += self.text
  233. CustButton:
  234. text: '6'
  235. on_release: monoTextInput.text += self.text
  236. CustButton:
  237. text: '7'
  238. on_release: monoTextInput.text += self.text
  239. CustButton:
  240. text: '8'
  241. on_release: monoTextInput.text += self.text
  242. CustButton:
  243. text: '9'
  244. on_release: monoTextInput.text += self.text
  245. CustButton:
  246. text: 'Back'
  247. on_release:
  248. root.manager.transition.direction = 'right'
  249. root.manager.current = root.currentPage()
  250. CustButton:
  251. text: '0'
  252. on_release: monoTextInput.text+= self.text
  253. CustButton:
  254. text: 'Enter'
  255. on_release:
  256. root.manager.transition.direction = 'right'
  257. root.inputText()
  258. root.manager.current = root.currentPage()
  259.  
  260. <BIPHASIC>
  261. canvas:
  262. Rectangle:
  263. pos: self.pos
  264. size: self.size
  265. source:'source4.png'
  266.  
  267. GridLayout:
  268. cols:1
  269. spacing: 10
  270. size_hint_x: .3
  271. size_hint_y: .425
  272. pos_hint: {'x':.040,'y':.46}
  273. Button:
  274. text: 'Home'
  275. font_size: 20
  276. color: 0,0,0,1
  277. background_normal: 'button1.png'
  278. on_release:
  279. root.manager.transition.direction = 'right'
  280. root.manager.current = 'branch'
  281. Button:
  282. id: confirm
  283. text: 'Confirm'
  284. font_size: 20
  285. color: 0,0,0,1
  286. background_normal: 'button1.png'
  287. on_release:
  288. root.backspace()
  289.  
  290.  
  291. GridLayout:
  292. cols: 3
  293. rows: 1
  294. spacing: 10
  295. size_hint_x:.93
  296. size_hint_y:.15
  297. pos_hint:{'x':.04,'y':.225}
  298. Button:
  299. text: 'Voltage'
  300. font_size: 15
  301. color: 0,0,0,1
  302. background_normal: 'button1.png'
  303. Button:
  304. text: 'Rep'
  305. font_size: 15
  306. color: 0,0,0,1
  307. background_normal: 'button1.png'
  308. on_release:
  309. root.rep_on_release()
  310. root.manager.transition.direction = 'left'
  311. root.manager.current = 'bipad'
  312. Button:
  313. text: 't1'
  314. font_size: 15
  315. color: 0,0,0,1
  316. background_normal: 'button1.png'
  317. on_release:
  318. root.t1_on_release()
  319. root.manager.transition.direction = 'left'
  320. root.manager.current = 'bipad'
  321. GridLayout:
  322. cols:3
  323. rows:1
  324. spacing:10
  325. size_hint_x:.93
  326. size_hint_y:.15
  327. pos_hint:{'x':.04,'y':.05}
  328. Button:
  329. id: biPolButton
  330. background_normal: 'button1.png'
  331. text: 'Polarity +'
  332. color: 0,0,0,1
  333. font_size: 15
  334. on_release:
  335. root.polarity()
  336.  
  337. Button:
  338. background_normal: 'button1.png'
  339. text: 'Period'
  340. color: 0,0,0,1
  341. font_size: 15
  342. on_release:
  343. root.per_on_release()
  344. root.manager.transition.direction = 'left'
  345. root.manager.current = 'bipad'
  346. Button:
  347. background_normal: 'button1.png'
  348. text: 't2'
  349. color: 0,0,0,1
  350. font_size: 15
  351. <BIPAD>
  352. canvas:
  353. Rectangle:
  354. pos: self.pos
  355. size: self.size
  356. source:'background.jpg'
  357.  
  358.  
  359. FloatLayout:
  360. TextInput:
  361. id: biTextInput
  362. font_size: 20
  363. size_hint_x: .55
  364. size_hint_y: .15
  365. pos_hint: {'x': .07,'y': .825}
  366. CustButton:
  367. text: 'Backspace'
  368. pos_hint: {'x': .6625, 'y':.82}
  369. on_release:
  370.  
  371. GridLayout:
  372. cols: 3
  373. rows: 4
  374. spacing: 10
  375. pos_hint: {'x': .05,'y': .05}
  376. size_hint: (.9,.75)
  377.  
  378. CustButton:
  379. text: '1'
  380. CustButton:
  381. text: '2'
  382. CustButton:
  383. text: '3'
  384. CustButton:
  385. text: '4'
  386. CustButton:
  387. text: '5'
  388. CustButton:
  389. text: '6'
  390. CustButton:
  391. text: '7'
  392. CustButton:
  393. text: '8'
  394. CustButton:
  395. text: '9'
  396. CustButton:
  397. text: 'Back'
  398. on_release:
  399. root.backspace()
  400. CustButton:
  401. text: '0'
  402. CustButton:
  403. text: 'Enter'
  404. on_release:
  405. root.manager.transition.direction = 'right'
  406. root.inputText()
  407. root.manager.current = root.currentPage()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement