-
Notifications
You must be signed in to change notification settings - Fork 1
/
tests.kv
107 lines (93 loc) · 2.59 KB
/
tests.kv
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
#: import sm kivy.uix.screenmanager
ScreenManagement:
transition: sm.NoTransition()
UserScreen:
TestScreen:
ProgressBarScreen:
CreateNewUserScreen
<TestScreen>:
name: 'tests'
Button:
id: btn
text: 'Select Test'
on_release: dropdown.open(self)
size_hint: .4, .05
pos_hint: {'x':.3, 'y':.5}
Widget
DropDown:
id: dropdown
on_select: btn.text = '{}'.format(args[1])
Button:
text: 'Test A'
size_hint_y: None
height: '30dp'
on_press: dropdown.select('Test A')
Button:
text: 'Test B'
size_hint_y: None
height: '30dp'
on_press: dropdown.select('Test B')
Button:
text: 'Test C'
size_hint_y: None
height: '30dp'
on_press: dropdown.select('Test C')
AnchorLayout:
anchor_x: 'center'
anchor_y: 'bottom'
BoxLayout:
orientation: 'horizontal'
size_hint: 1, .1
Button:
text: 'Exit'
on_press: app.stop()
Button:
text: 'Back to Login'
on_press: app.root.current = 'demo'
Button:
text: 'Start Test'
on_press: root.recordTest(btn.text)
on_release: app.root.current = 'progressbar'
<ProgressBarScreen>:
name: 'progressbar'
BoxLayout:
orientation: 'horizontal'
size_hint: .5, .1
Button:
text: 'Back to Login'
on_press: app.root.current = 'demo'
<CreateNewUserScreen>:
name: 'newuser'
TextInput:
id: newusertext
text: ''
size_hint: .4, .05
pos_hint: {'x':.3, 'y':.5}
Button:
id: submit
text: 'Submit'
size_hint: .3, .05
pos_hint: {'x':.35, 'y':.44}
on_press: root.createNewUser(newusertext.text)
on_release: app.root.current = 'demo'
<UserScreen>
name: 'demo'
on_pre_enter: root.refresh()
Button:
text: "Create New User"
on_press: app.root.current = 'newuser'
pos_hint: {'x':.5, 'y':.45}
size_hint: .2, .04
AnchorLayout:
anchor_x: 'center'
anchor_y: 'bottom'
BoxLayout:
orientation: 'horizontal'
size_hint: 1, .1
Button:
text: 'Exit'
on_press: app.stop()
Button:
text: 'Choose Test'
on_press: app.root.current = 'tests'
on_release: root.recordUser()