def addRow(self): noi = len(self._listPerson) self._listPerson.append([QLabel('%d' % (noi+1), self), QDateEdit(self), QComboBox(self), QComboBox(self), QPushButton(self), QComboBox(self), QComboBox(self)]) temp = self._listPerson[-1] temp[S.birth].setDisplayFormat(QApplication.translate("Page01", "dd MMM yyyy", None, QApplication.UnicodeUTF8)) temp[S.birth].setObjectName('Bir%d' % noi) temp[S.birth].setCurrentSection(QDateEdit.YearSection) temp[S.decpos].setObjectName('Dec%d' % noi) temp[S.decpos].addItems(['vous', 'conj', 'pac']) temp[S.decnum].setObjectName('Foy%d' % noi) temp[S.fampos].setObjectName('Fam%d' % noi) temp[S.fampos].addItems(['parent 1', 'parent 2', 'enfant']) temp[S.famnum].setObjectName('Fam%d' % noi) temp[S.decbtn].setObjectName('But%d' % noi) for i in xrange(7): self.gridLayout.addWidget(temp[i], noi +2, i) self.gridLayout.setAlignment(temp[i], Qt.AlignCenter) self.rmv_btn.setEnabled(True) if len(self.scenario.indiv) == 9: self.add_btn.setEnabled(False)
def addPref(self): noi = 0 self._listPerson.append([ QLabel('%d' % (noi + 1), self), QDateEdit(self), QComboBox(self), QComboBox(self), QPushButton(self), QComboBox(self), QComboBox(self) ]) temp = self._listPerson[0] temp[S.birth].setDisplayFormat( QApplication.translate("Page01", "dd MMM yyyy", None, QApplication.UnicodeUTF8)) temp[S.birth].setObjectName('Bir%d' % noi) temp[S.birth].setCurrentSection(QDateEdit.YearSection) temp[S.decpos].setObjectName('Dec%d' % noi) temp[S.decpos].addItems(['vous']) temp[S.decpos].setEnabled(False) temp[S.decnum].setObjectName('Foy%d' % noi) temp[S.decnum].setEnabled(False) temp[S.fampos].addItems(['parent 1']) temp[S.fampos].setObjectName('Fam%d' % noi) temp[S.fampos].setEnabled(False) temp[S.famnum].setObjectName('Fam%d' % noi) temp[S.famnum].setEnabled(False) temp[S.decbtn].setObjectName('But%d' % noi) for i in xrange(7): self.gridLayout.addWidget(temp[i], noi + 2, i) self.gridLayout.setAlignment(temp[i], Qt.AlignCenter) self.emit(SIGNAL('compoChanged()'))
def addRow(self): noi = len(self._listPerson) self._listPerson.append([ QLabel('%d' % (noi + 1), self), QDateEdit(self), QComboBox(self), QComboBox(self), QPushButton(self), QComboBox(self), QComboBox(self) ]) temp = self._listPerson[-1] temp[S.birth].setDisplayFormat( QApplication.translate("Page01", "dd MMM yyyy", None, QApplication.UnicodeUTF8)) temp[S.birth].setObjectName('Bir%d' % noi) temp[S.birth].setCurrentSection(QDateEdit.YearSection) temp[S.decpos].setObjectName('Dec%d' % noi) temp[S.decpos].addItems(['vous', 'conj', 'pac']) temp[S.decnum].setObjectName('Foy%d' % noi) temp[S.fampos].setObjectName('Fam%d' % noi) temp[S.fampos].addItems(['parent 1', 'parent 2', 'enfant']) temp[S.famnum].setObjectName('Fam%d' % noi) temp[S.decbtn].setObjectName('But%d' % noi) for i in xrange(7): self.gridLayout.addWidget(temp[i], noi + 2, i) self.gridLayout.setAlignment(temp[i], Qt.AlignCenter) self.rmv_btn.setEnabled(True) if len(self.scenario.indiv) == 9: self.add_btn.setEnabled(False)
def addPref(self): noi = 0 self._listPerson.append([QLabel('%d' % (noi + 1), self), QDateEdit(self), QComboBox(self), QComboBox(self), QPushButton(self), QComboBox(self), QComboBox(self)]) temp = self._listPerson[0] temp[S.birth].setDisplayFormat(QApplication.translate("Page01", "dd MMM yyyy", None, QApplication.UnicodeUTF8)) temp[S.birth].setObjectName('Bir%d' % noi) temp[S.birth].setCurrentSection(QDateEdit.YearSection) temp[S.decpos].setObjectName('Dec%d' % noi) temp[S.decpos].addItems(['vous']) temp[S.decpos].setEnabled(False) temp[S.decnum].setObjectName('Foy%d' % noi) temp[S.decnum].setEnabled(False) temp[S.fampos].addItems(['parent 1']) temp[S.fampos].setObjectName('Fam%d' % noi) temp[S.fampos].setEnabled(False) temp[S.famnum].setObjectName('Fam%d' % noi) temp[S.famnum].setEnabled(False) temp[S.decbtn].setObjectName('But%d' % noi) for i in xrange(7): self.gridLayout.addWidget(temp[i], noi + 2, i) self.gridLayout.setAlignment(temp[i], Qt.AlignCenter) self.emit(SIGNAL('compoChanged()'))