def load_table_combobox(self, i): #сортаменты self.combobox_sort.append(QtGui.QComboBox()) lst_sort=self.basa.output_list_sortament(self.type_section.currentText()) self.load_combobox(self.combobox_sort[i], lst_sort) self.input_table.setCellWidget(1,i,self.combobox_sort[i]) self.combobox_sort[i].currentIndexChanged.connect(self.changed_input_data) # сечения self.combobox_num_sect.append(QtGui.QComboBox()) load=self.load_section_number(i, self) load.start() self.input_table.setCellWidget(2,i,self.combobox_num_sect[i]) self.combobox_sort[i].currentIndexChanged.connect(self.load_section_number(i, self)) self.combobox_num_sect[i].currentIndexChanged.connect(self.changed_input_data) # сталь self.combobox_steel.append(QtGui.QComboBox()) code=self.type_code.currentText() steel=list_steel(code=code,typ_steel='prokat') lst_steel=steel.get_list() self.load_combobox(self.combobox_steel[i], lst_steel) self.input_table.setCellWidget(3,i,self.combobox_steel[i]) self.combobox_steel[i].currentIndexChanged.connect(self.changed_input_data) #Только для балок if self.type_element.currentText()==u'Балка': self.combobox_buckl_typ.append(QtGui.QComboBox()) self.combobox_buckl_fix.append(QtGui.QComboBox()) self.combobox_buckl_load.append(QtGui.QComboBox()) self.combobox_buckl_place.append(QtGui.QComboBox()) lst1=self.data_lst[4][1] lst2=self.data_lst[5][1] lst3=self.data_lst[6][1] lst4=self.data_lst[7][1] self.load_combobox(self.combobox_buckl_typ[i], lst1) self.input_table.setCellWidget(8,i,self.combobox_buckl_typ[i]) self.combobox_buckl_typ[i].currentIndexChanged.connect(self.changed_input_data) self.load_combobox(self.combobox_buckl_fix[i], lst2) self.input_table.setCellWidget(9,i,self.combobox_buckl_fix[i]) self.combobox_buckl_fix[i].currentIndexChanged.connect(self.changed_input_data) self.load_combobox(self.combobox_buckl_load[i], lst3) self.input_table.setCellWidget(10,i,self.combobox_buckl_load[i]) self.combobox_buckl_load[i].currentIndexChanged.connect(self.changed_input_data) self.load_combobox(self.combobox_buckl_place[i], lst4) self.input_table.setCellWidget(11,i,self.combobox_buckl_place[i]) self.combobox_buckl_place[i].currentIndexChanged.connect(self.changed_input_data)
def loadSteel(self): '''загружаем и ставим список стали''' code=self.boxCode.currentText() lstSteel=list_steel(code=code,typ_steel='prokat').get_list() # print lstSteel self.loadComboBox(self.boxSteel, lstSteel)