This repository was archived by the owner on Jun 12, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathqueue.kv
More file actions
124 lines (104 loc) · 2.9 KB
/
queue.kv
File metadata and controls
124 lines (104 loc) · 2.9 KB
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
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
#: import ToggleButton kivy.uix.togglebutton.ToggleButton
<QueueElementWidget>:
val: val
address: address
orientation: 'vertical'
canvas.before:
Color:
rgb: 0.3, 0.4, 0.6
Rectangle:
size: self.width*8/10, self.height*.1
pos: self.x+self.width/10, self.y + self.height*.5
BoxLayout:
size_hint_y: .4
BoxLayout:
size_hint_y: .2
orientation: 'vertical'
Label:
id: val
Label:
id: address
color: 0,0,0,1
BoxLayout:
size_hint_y: .4
<QueueCreationWidget>:
queue_size: queue_size
BoxLayout:
size_hint_x: .5
Label:
canvas.before:
Color:
rgb: 0.4, 0.5, .3
Rectangle:
pos: self.pos
size: self.size
text: 'data type'
TextInput:
id: data_type
font_size: self.height/2
BoxLayout:
size_hint_x: .5
Label:
canvas.before:
Color:
rgb: 0.4, 0.5, .3
Rectangle:
pos: self.pos
size: self.size
text: 'size'
TextInput:
id: queue_size
font_size: self.height/2
Button:
text: 'enter'
on_press:
self.parent.parent.create_queue(queue_size.text, data_type.text)
<QueueInsertionWidget>:
BoxLayout:
size_hint_x: .3
BoxLayout:
size_hint_x: .4
Label:
canvas.before:
Color:
rgb: 0.4, 0.5, .3
Rectangle:
pos: self.pos
size: self.size
text: 'data'
TextInput:
id: qinsert_data
font_size: self.height/2
multiline: False
write_tab: False
on_text_validate: self.parent.parent.insert_data(qinsert_data.text)
Button:
text: 'enter'
on_press: self.parent.parent.insert_data(qinsert_data.text)
BoxLayout:
size_hint_x: .3
<QueueDeletionWidget>:
BoxLayout:
size_hint_x: .3
ToggleButton:
text: 'data'
group: 'oprtn_type'
state: 'down'
ToggleButton:
text: 'addr'
group: 'oprtn_type'
BoxLayout:
size_hint_x: .7
Label:
canvas.before:
Color:
rgb: 0.4, 0.5, .3
Rectangle:
pos: self.pos
size: self.size
text: 'data / addr'
TextInput:
font_size: self.height/2
Button:
text: 'enter'
on_press: self.parent.parent.delete_data()