-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathreco_UI_run.py
44 lines (35 loc) · 1.08 KB
/
reco_UI_run.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
#!/usr/bin/env python
from recoUI import Ui_MainWindow
import sys
from PyQt4 import QtGui,QtCore
import os
class FrontPage(QtGui.QMainWindow):
def __init__(self, parent=None):
QtGui.QWidget.__init__(self,parent)
self.ui = Ui_MainWindow()
self.ui.setupUi(self)
self.initUI()
self.ui.loginButton.clicked.connect(self.loginFunc)
self.ui.signupButton.clicked.connect(self.signUpFunc)
def initUI(self):
self.setWindowTitle('Recommender System')
self.center()
self.show()
def center(self):
frameGm = self.frameGeometry()
centerPoint = QtGui.QDesktopWidget().availableGeometry().center()
frameGm.moveCenter(centerPoint)
self.move(frameGm.topLeft())
def loginFunc(self):
self.hide()
os.system('python login_UI_run.py')
def signUpFunc(self):
self.hide()
os.system('python signup_UI_run.py')
def main():
app=QtGui.QApplication(sys.argv)
ui = FrontPage()
#ui.show()
sys.exit(app.exec_())
if __name__ == "__main__":
main()