-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapp_design_FINAL.kv
180 lines (164 loc) · 4.92 KB
/
app_design_FINAL.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
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
# data that will be loaded in popup(data container)
<FileChoosePopup>:
title: "Choose needed .csv file"
size_hint: .8, .8
# if user miss popup window it will not be closed
auto_dismiss: False
BoxLayout:
orientation: "vertical"
FileChooser:
id: filechooser
FileChooserIconLayout
BoxLayout:
size_hint: (1, 0.1)
pos_hint: {'center_x': .5, 'center_y': .5}
spacing: 20
# load btn:
Button:
text: "Load"
on_release: root.load(filechooser.selection)
id: load_btn
###
# check when ever file was selected or
# not, if not -> button will be disabled,
# and user will not be able to press btn
# else -> user will be able to press the button
###
disable: True if filechooser.selection==[] else False
# cancel btn:
Button:
text: "Cancel"
# close popup after {Cancel} button pressed:
on_release: root.dismiss()
###
# at this moment I have pattern to work in the future with
# tabs, means that users will have structured process
# to provide filtered data
###
<Tab>:
# in tabs part will be only this tab with created data
do_default_tab: False
# set attributes on the left to the id's on the right
email: email
password: password
keyword: keyword
get_file: get_file
TabbedPanelItem:
text: 'Data providing'
background_color: (1, .5, 0, 1)
background_normal: ''
GridLayout:
cols: 5
size: root.width * 0.8, root.height * 0.8
row_default_height: 30
row_force_default: True
center: root.width / 2, root.height / 2
# left empty space:
AnchorLayout:
anchor_x: "left"
Label:
size_hint_x: None
Button:
text: 'Choose File'
on_press: root.open_popup()
TextInput:
id: get_file
readonly: True
multiline: False
hint_text: "File path"
# right empty space:
AnchorLayout:
anchor_x: "right"
Label:
size_hint_x: None
AnchorLayout:
anchor_x: "right"
Label:
size_hint_x: None
###
# left empty space:
AnchorLayout:
anchor_x: "left"
Label:
size_hint_x: None
AnchorLayout:
anchor_x: "left"
Label:
size_hint_x: None
###
TextInput:
id: email
hint_text: "Email"
###
# right empty space:
AnchorLayout:
anchor_x: "right"
Label:
size_hint_x: None
AnchorLayout:
anchor_x: "right"
Label:
size_hint_x: None
###
###
# left empty space:
AnchorLayout:
anchor_x: "left"
Label:
size_hint_x: None
AnchorLayout:
anchor_x: "left"
Label:
size_hint_x: None
###
TextInput:
id: password
hint_text: "Password"
# right empty space:
AnchorLayout:
anchor_x: "right"
Label:
size_hint_x: None
AnchorLayout:
anchor_x: "right"
Label:
size_hint_x: None
###
# left empty space:
AnchorLayout:
anchor_x: "left"
Label:
size_hint_x: None
AnchorLayout:
anchor_x: "left"
Label:
size_hint_x: None
###
TextInput:
id: keyword
hint_text: "Keyword"
###
# right empty space:
AnchorLayout:
anchor_x: "right"
Label:
size_hint_x: None
AnchorLayout:
anchor_x: "right"
Label:
size_hint_x: None
###
###
# left empty space:
AnchorLayout:
anchor_x: "left"
Label:
size_hint_x: None
AnchorLayout:
anchor_x: "left"
Label:
size_hint_x: None
###
Button:
text: "Search"
on_press: root.get_data()