-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmain.py
More file actions
28 lines (21 loc) · 780 Bytes
/
main.py
File metadata and controls
28 lines (21 loc) · 780 Bytes
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
import sys
from presentation.QForm import QForm
from PySide.QtGui import QApplication
from presentation.interceptor.Interceptor import Interceptor as Interceptor
class Main:
def __init__(self):
app = QApplication(sys.argv)
print 'Main----'
form = QForm('Sentilyse')
self.interceptor = Interceptor()
self.interceptor.set_form(form)
form.add_text_field('Query', self.interceptor)
form.add_labels_panel(['sentence', 'language', 'result', 'time'])
form.add_buttons_panel(['Quit', 'Analyse'], self.interceptor)
form.build()
form.show()
sys.exit(app.exec_())
def __exit__(self, exc_type, exc_val, exc_tb):
self.interceptor.stop()
if __name__ == '__main__':
main = Main()