def processTutorialInfo(self, message): ''' Two type here : section or tutorials. Sections are defining the differents type of tutorials ''' logger.debug("Processing TutorialInfo") if "section" in message : section = message["section"] desc = message["description"] area = util.loadUi("tutorials/tutorialarea.ui") tabIndex = self.addTab(area, section) self.setTabToolTip(tabIndex, desc) # Set up the List that contains the tutorial items area.listWidget.setItemDelegate(TutorialItemDelegate(self)) area.listWidget.itemDoubleClicked.connect(self.tutorialClicked) self.sections[section] = area.listWidget elif "tutorial" in message : tutorial = message["tutorial"] section = message["tutorial_section"] if section in self.sections : self.tutorials[tutorial] = TutorialItem(tutorial) self.tutorials[tutorial].update(message, self.client) self.sections[section].addItem(self.tutorials[tutorial])
def failureDialog(): ''' The dialog that shows the user the log if something went wrong. ''' ui = util.loadUi("fa/updater/failure.ui") ui.logBox.appendPlainText(dumpPlainText()) return ui.exec_()
def processTutorialInfo(self, message): ''' Two type here : section or tutorials. Sections are defining the differents type of tutorials ''' logger.debug("Processing TutorialInfo") if "section" in message: section = message["section"] desc = message["description"] area = util.loadUi("tutorials/tutorialarea.ui") tabIndex = self.addTab(area, section) self.setTabToolTip(tabIndex, desc) # Set up the List that contains the tutorial items area.listWidget.setItemDelegate(TutorialItemDelegate(self)) area.listWidget.itemDoubleClicked.connect(self.tutorialClicked) self.sections[section] = area.listWidget elif "tutorial" in message: tutorial = message["tutorial"] section = message["tutorial_section"] if section in self.sections: self.tutorials[tutorial] = TutorialItem(tutorial) self.tutorials[tutorial].update(message, self.client) self.sections[section].addItem(self.tutorials[tutorial])
def __init__(self, connectivity): QObject.__init__(self) self.connectivity = connectivity self.dialog = util.loadUi('connectivity/connectivity.ui') self.dialog.runTestButton.clicked.connect(self.run_relay_test)
def illegalDialog(): ''' The dialog explains the user that his version is incompatible. ''' ui = util.loadUi("fa/updater/illegal.ui") return ui.exec_()