This repository has been archived by the owner on Apr 24, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Main.py
54 lines (45 loc) · 1.6 KB
/
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
import sys
from PyQt5 import QtWidgets
from Ui_Window import Ui_MainWindow
from LoginDialog import LoginDialog
from SignUpDialog import SignUpDialog
from HelpDialog import HelpDialog
from AboutDialog import AboutDialog
from UpdateDialog import UpdateDialog
from SpiderSettingDialog import SpiderSettingDialog
class Main(QtWidgets.QMainWindow, Ui_MainWindow):
def __init__(self):
super(Main, self).__init__()
self.setupUi(self)
self.label_2.setText("请登录。。。")
self.tabWidget.setEnabled(False)
self.action_login.triggered.connect(self.loginSlot)
self.action_signin.triggered.connect(self.signUpSlot)
self.action_help.triggered.connect(self.helpSlot)
self.action_about.triggered.connect(self.aboutSlot)
self.action_update.triggered.connect(self.updateSlot)
self.action_8.triggered.connect(self.spiderSettingSlot)
self.pushButton_8.clicked.connect(self.test)
self.show()
def test(self):
uid=self.lineEdit.text()
testName=self.lineEdit_4.text()
pass
def spiderSettingSlot(self):
SpiderSettingDialog().exec()
def updateSlot(self):
UpdateDialog().exec()
def aboutSlot(self):
AboutDialog().exec()
def helpSlot(self):
HelpDialog().exec()
def loginSlot(self):
res=LoginDialog().work()
if res :
self.tabWidget.setEnabled(True)
self.label_2.setText("欢迎登陆,"+res)
def signUpSlot(self):
res=SignUpDialog().work()
app = QtWidgets.QApplication(sys.argv)
main = Main()
sys.exit(app.exec_())