コード例 #1
0
ファイル: _tutorialswidget.py プロジェクト: Arkonen8/client
    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]) 
コード例 #2
0
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_()
コード例 #3
0
    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])
コード例 #4
0
ファイル: __init__.py プロジェクト: MathieuB8/test2
 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)
コード例 #5
0
def illegalDialog():
    '''
    The dialog explains the user that his version is incompatible.
    '''
    ui = util.loadUi("fa/updater/illegal.ui")
    return ui.exec_()
コード例 #6
0
 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)