def closeWarning(self): quit_msg = "New color scheme applied. \nPlease start the application again." self.myOtherWindow = diag.changedDiag("Rebooting...", quit_msg) self.myOtherWindow.setStyleSheet(sharedFun.getColor()) self.myOtherWindow.setWindowModality(Qt.ApplicationModal) self.myOtherWindow.show() threading.Timer(3.0,QtGui.qApp.quit).start()
def Search_Temp(self): Scontent = self.lineEdit_2.displayText() self.Sresult = Scontent if len(Scontent) < 3: self.myOtherWindow = diag.changedDiag("Length Error", "The searched word be longer than 3 (three) characters.") self.myOtherWindow.setStyleSheet(sharedFun.getColor()) self.myOtherWindow.setWindowModality(Qt.ApplicationModal) self.myOtherWindow.show() else: self.myOtherWindow = sres.SreS(self.Sresult, self.lng, self.lines) self.myOtherWindow.setStyleSheet(sharedFun.getColor()) self.myOtherWindow.show()
def okButton(self, closeFunc): if self.selectedValue == 1: replaced = "light" replacer = "dark" elif self.selectedValue == 0: replaced = "dark" replacer = "light" if self.configData[6].__contains__(replacer): print self.configData[6] self.myOtherWindow = diag.changedDiag("Reboot not necessary", "No changes made, theme already active.") self.myOtherWindow.setStyleSheet(sharedFun.getColor()) self.myOtherWindow.setWindowModality(Qt.ApplicationModal) self.myOtherWindow.show() else: config = open("Config.txt", "w") self.configData[6] = self.configData[6].replace(replaced,replacer) config.writelines(self.configData) config.close() closeFunc()
def helpFunc(self): self.myOtherWindow = diag.changedDiag("Help","Full Guide Coming soon!\n" "Meanwhile for issues contact me at:\n\[email protected]") self.myOtherWindow.setStyleSheet(sharedFun.getColor()) self.myOtherWindow.show()
def nameDiagConf(self): self.myOtherWindow = diag.changedDiag("Name Changed","Your name has been changed successfully.") self.myOtherWindow.setStyleSheet(sharedFun.getColor()) self.myOtherWindow.show()