-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdata_handler.py
64 lines (46 loc) · 1.49 KB
/
data_handler.py
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
from update_image_info import add_info
image_path = ""
project_path = ""
image_selected = False
project_selected = False
def reset_data(self):
global image_path, project_path, image_selected, project_selected
image_path = ""
project_path = ""
image_selected = False
project_selected = False
self.btn_apply_changes.setDisabled(True)
self.line_edit_image_path.clear()
self.line_edit_project_path.clear()
self.label_image_display.clear()
self.label_img_info.clear()
self.label_status.setText("Waiting for app image...")
self.label_status.setStyleSheet("color: black")
def get_image_path():
return image_path
def get_image_status():
return image_selected
def get_project_path():
return project_path
def get_project_status():
return project_selected
def set_image_path(self, new_image_path):
global image_path, image_selected
image_path = new_image_path
if image_path == "":
image_selected = False
self.line_edit_image_path.clear()
self.label_img_info.clear()
self.label_image_display.clear()
else:
image_selected = True
add_info(self, image_path)
def set_project_path(self, new_project_path):
global project_path, project_selected
project_path = new_project_path
if project_path == "":
project_selected = False
self.line_edit_project_path.clear()
else:
project_selected = True
self.line_edit_project_path.setText(new_project_path)