def __init__(self, parent=None): super.__init__(self) self.ui = Ui_MainWindow() self.ui.setupUi(self) # 初始化登录窗口 self.LoginUI = Login_Start.MainWindow() self.LoginUI.show() self.LoginUI.on_login_success.connect(self.onLogin) #self.connect(self.LoginUI, QtCore.SIGNAL("transfer_login"), self.setLoginStatus) # 设置界面样式 self.setWindowFlags(Qt.FramelessWindowHint) # self.showMaximized() # 设置窗口拉动按钮 sizeGrip = QSizeGrip(self) sizeGrip.setStyleSheet("image: url(:/Imag/Imag/sizegrip.png);") self.ui.sizeGrip_layout.addWidget(sizeGrip) self.ui.sizeGrip_layout.setAlignment(sizeGrip, Qt.AlignRight) # 允许关闭tab self.ui.tabWidget.setTabsClosable(True) # 显示关闭按钮 #self.connect(self.ui.tabWidget, SIGNAL("tabCloseRequested(int)"), self.closeTab) # self.ui.tabWidget.connectNotify(self.closeTab) # 设置次级菜单 self.Menu_Setting() # 设置主菜单与副菜单映射关系 self.Menu_Link() self.UpdateMenu(self.ui.QToolButton_mRankList.text()) # 设置按钮点击后保持按下状态 self.KeepButtonStatus() # 初始化表格 self.initToolBox() self.tmp_dataList = [] # 按下按钮 self.ui.QToolButton_mRankList.click() # tem数据定义 self.tmp_daylines = "" # 启动数据引擎 # 绑定主菜单证券功能按钮 self.ui.QToolButton_mRankList.clicked.connect( partial(self.UpdateMenu_clicked, "龙虎榜")) self.ui.QToolButton_mLimit.clicked.connect( partial(self.UpdateMenu_clicked, "涨停预测")) self.ui.QToolButton_mFuctuation.clicked.connect( partial(self.UpdateMenu_clicked, "涨跌幅追踪")) self.ui.QToolButton_mNews.clicked.connect( partial(self.UpdateMenu_clicked, "资讯")) self.ui.QToolButton_mSecType.clicked.connect( partial(self.UpdateMenu_clicked, "板块追踪")) # 绑定主菜单系统功能按钮 self.ui.QToolButton_Login.clicked.connect( partial(self.QToolButton_Login_clicked)) self.ui.QToolButton_Setting.clicked.connect( partial(self.QToolButton_Setting_clicked))
def __init__(self,parent=None): QtGui.QMainWindow.__init__(self) self.ui=Ui_MainWindow() self.ui.setupUi(self) # 初始化考勤爬虫 self.get_abnormal=GetAbnormal() # 初始化登录窗口 self.LoginUI=Login_Start.MainWindow(self.get_abnormal) self.LoginUI.show() self.connect(self.LoginUI,QtCore.SIGNAL("transfer_login"),self.setLoginStatus) # 设置界面样式 self.setWindowFlags(Qt.FramelessWindowHint) # 设置窗口拉动按钮 sizeGrip=QSizeGrip(self) sizeGrip.setStyleSheet("image: url(:/Imag/Imag/sizegrip.png);") self.ui.sizeGrip_layout.addWidget(sizeGrip) self.ui.sizeGrip_layout.setAlignment(sizeGrip,Qt.AlignRight) # 初始化表格 self.initToolBox() self.tmp_dataList=[] self.LoginStatus=False
def __init__(self): super(MainWindow, self).__init__() self.ui = Ui_MainWindow() self.Login_window = LoginWindow() self.RE_window = REWindow() self.ui.setupUi(self) self.setWindowIcon(QIcon('D://DiscordSearcher//ico.ico')) self.ui.pushButton_4.setEnabled(False) self.thread = TutorialThread() self.file = '' self.fastmode = 0 self.readFile() self.ui.checkBox.stateChanged.connect(self.checkBox) self.ui.pushButton.clicked.connect( self.pushButton_Click_URL) #Discord群組網址 self.ui.pushButton_2.clicked.connect( self.pushButton_Click_Search) #開始搜尋 self.ui.pushButton_3.clicked.connect(self.Login_window.show) #登入設定 self.ui.pushButton_4.clicked.connect( self.pushButton_Click_Stop) #強制停止(搜尋) self.ui.pushButton_5.clicked.connect(self.RE_window.show) #資料庫設定