forked from wangtseng/hra
-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.py
40 lines (26 loc) · 906 Bytes
/
main.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
__author__ = 'Cheng'
import sys
import os
from PyQt4.QtGui import *
from IHM.AnalyserMainWindow import AnalyserMainWindow
from Context.Context import Context
from Controller import Controller
def main():
app = QApplication(sys.argv)
# create system default folder
username = os.environ['USERNAME']
workspace_path = 'C:\Users\\' + username + '\Documents\HeartRateAnalyser\\'
people_files_path = workspace_path + 'peoples\\'
if not os.path.exists(workspace_path):
os.mkdir(workspace_path)
os.mkdir(people_files_path)
# context at the background to save detector's data set
context = Context()
# schedule the interaction between IHM & context
controller = Controller(context)
# Interface Human-Machine
analyser_window = AnalyserMainWindow(controller)
analyser_window.show()
app.exec_()
if __name__ == '__main__':
main()