-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathinit_instances.py
152 lines (118 loc) · 3.45 KB
/
init_instances.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
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
# Lazy initialization using properties
class inst:
_main = None # main.py
_online = None # network_functions.py
_download = None # network_functions.py
_ui = None # ui_main.py
_secondary_thread = None # ui_main.py
_header = None # header.py
_wel = None # welcome.py
_sel = None # selection_page.py
_act = None # act_page.py
_install = None # install_page.py
_bar = None # progress_bar.py
_finish = None # finish_page.py
_settings = None # settings_page.py
_config = None # configure.py
_updater = None # updater.py
@property
def main(self):
if self._main is None:
from main import Main
self._main = Main()
return self._main
@property
def online(self):
if self._online is None:
from network.network_functions import (
Online,
)
self._online = Online()
return self._online
@property
def download(self):
from network.network_functions import DownloadWorker
return DownloadWorker()
@property
def ui(self):
if self._ui is None:
from ui.ui_main import MainWindow
self._ui = MainWindow()
return self._ui
@property
def secondary_thread(self):
if self._secondary_thread is None:
from ui.ui_main import Worker
self._secondary_thread = Worker()
return self._secondary_thread
@property
def header(self):
if self._header is None:
from ui.header import Header
self._header = Header()
return self._header
@property
def wel(self):
if self._wel is None:
from ui.welcome_page import (
WelcomePage,
)
self._wel = WelcomePage()
return self._wel
@property
def sel(self):
if self._sel is None:
from ui.selection_page import (
SelectionPage,
)
self._sel = SelectionPage()
return self._sel
@property
def act(self):
if self._act is None:
from ui.act_page import ActPage
self._act = ActPage()
return self._act
@property
def install(self):
if self._install is None:
from ui.install_page import (
InstallPage,
)
self._install = InstallPage()
return self._install
@property
def bar(self):
if self._bar is None:
from ui.progress_bar import (
ProgressBarPage,
)
self._bar = ProgressBarPage()
return self._bar
@property
def finish(self):
if self._finish is None:
from ui.finish_page import FinishPage
self._finish = FinishPage()
return self._finish
@property
def settings(self):
if self._settings is None:
from ui.settings_page import (
SettingsPage,
)
self._settings = SettingsPage()
return self._settings
@property
def config(self):
if self._config is None:
from configure import Configure
self._config = Configure()
return self._config
@property
def updater(self):
if self._updater is None:
from network.updater import Updater
self._updater = Updater()
return self._updater
inst = inst()