コード例 #1
0
 def related(self):
     self.clean_form()
     global event
     event = False
     self.listWidget.clear()
     self.comboBox.clear()
     if self.checkBox_form.checkState() == 0:
         self.checkBox_form.animateClick()        
         
     self.lineEdit_2.setText('Coligado')
     
     if self.checkBox_name.checkState() == 0:
         self.checkBox_name.animateClick()
     if self.checkBox_path.checkState() == 0:
         self.checkBox_path.animateClick()
     if self.checkBox_initials.checkState() == 0:
         self.checkBox_initials.animateClick()
     if self.checkBox_workload.checkState() == 2:
         self.checkBox_workload.animateClick()
     if self.checkBox_description.checkState() == 0:
         self.checkBox_description.animateClick()
     
     self.textEdit.setText('Optional')
     content = urlRequest.list_related()
     for iterate in content:
         self.comboBox.addItem(iterate['name'])
                            
     self.comboBox.activated[str].connect(self.onActivated_coligado)
     for iterate in content:
         self.listWidget.addItem(iterate['name'])
コード例 #2
0
    def related(self):
        self.clean_form()
        global event
        event = False
        self.listWidget.clear()
        self.comboBox.clear()
        if self.checkBox_form.checkState() == 0:
            self.checkBox_form.animateClick()

        self.lineEdit_2.setText('Coligado')

        if self.checkBox_name.checkState() == 0:
            self.checkBox_name.animateClick()
        if self.checkBox_path.checkState() == 0:
            self.checkBox_path.animateClick()
        if self.checkBox_initials.checkState() == 0:
            self.checkBox_initials.animateClick()
        if self.checkBox_workload.checkState() == 2:
            self.checkBox_workload.animateClick()
        if self.checkBox_description.checkState() == 0:
            self.checkBox_description.animateClick()

        self.textEdit.setText('Optional')
        content = urlRequest.list_related()
        for iterate in content:
            self.comboBox.addItem(iterate['name'])

        self.comboBox.activated[str].connect(self.onActivated_coligado)
        for iterate in content:
            self.listWidget.addItem(iterate['name'])
コード例 #3
0
    def update(self):
        global event
        event = True
        form_name = str(self.lineEdit_2.text())
        if form_name == 'Coligado':
            content = urlRequest.list_related()
            for iterate in content:
                if iterate['name'] == current:
                    self.name.setText(iterate['name'])
                    self.path.setText(iterate['path'])
                    self.initials.setText(iterate['initials'])
                    if iterate['description'] and iterate['description'] != []:
                        self.description.setText(iterate['description'])
                    
        elif form_name == 'Curso':
            content = urlRequest.get_courses(current)
            for iterate in content:
                if iterate['name'] == current:
                    self.name.setText(iterate['name'])
                    self.path.setText(iterate['path'])
                    if iterate['workload'] and iterate['workload'] != []:
                        self.workload.setText(str(iterate['workload']))
                    if iterate['description'] and iterate['description'] != []:
                        self.description.setText(iterate['description'])

        elif form_name == 'Disciplina':
            content = urlRequest.get_spaces(course_current)
            for iterate in content:
                if iterate['name'] == current:
                    self.name.setText(iterate['name'])
                    if iterate['description'] and iterate['description'] != []:
                        self.description.setText(iterate['description'])
コード例 #4
0
    def update(self):
        global event
        event = True
        form_name = str(self.lineEdit_2.text())
        if form_name == 'Coligado':
            content = urlRequest.list_related()
            for iterate in content:
                if iterate['name'] == current:
                    self.name.setText(iterate['name'])
                    self.path.setText(iterate['path'])
                    self.initials.setText(iterate['initials'])
                    if iterate['description'] and iterate['description'] != []:
                        self.description.setText(iterate['description'])

        elif form_name == 'Curso':
            content = urlRequest.get_courses(current)
            for iterate in content:
                if iterate['name'] == current:
                    self.name.setText(iterate['name'])
                    self.path.setText(iterate['path'])
                    if iterate['workload'] and iterate['workload'] != []:
                        self.workload.setText(str(iterate['workload']))
                    if iterate['description'] and iterate['description'] != []:
                        self.description.setText(iterate['description'])

        elif form_name == 'Disciplina':
            content = urlRequest.get_spaces(course_current)
            for iterate in content:
                if iterate['name'] == current:
                    self.name.setText(iterate['name'])
                    if iterate['description'] and iterate['description'] != []:
                        self.description.setText(iterate['description'])