def __init__(self, parent, app, parentRecord, *args): QWidget.__init__(self, parent) self.grid = QGridLayout(self) self.grid.setSpacing(6) self.grid.setMargin(11) self.dlsProjects=guiDetailList(self, app, parentRecord, "lng_proj_text") self.frmTextProject=formTextProjects(self) self.grid.addWidget(self.dlsProjects, 0, 0) self.grid.addWidget(self.frmTextProject, 1, 0) self.connect(self.dlsProjects, PYSIGNAL("sigRecordSelected"), self.frmTextProject.changeItem) self.connect(self.dlsProjects, PYSIGNAL("sigItemDeleted"), self.frmTextProject.clear) self.connect(self.dlsProjects, PYSIGNAL("sigCreateNewItem"), self.frmTextProject.newItem) self.connect(self.frmTextProject, PYSIGNAL("sigRecordUpdated"), self.dlsProjects.slotUpdateItem) self.connect(self.frmTextProject, PYSIGNAL("sigRecordInserted"), self.dlsProjects.slotAddItem) self.frmTextProject.clear()
def __init__(self, parent, app, parentRecord, tagTableName, *args): QWidget.__init__(self, parent, *args) self.grid = QGridLayout(self) self.grid.setSpacing(6) self.grid.setMargin(11) self.buttongrid = QVBoxLayout() self.dlsTags = guiDetailList(self, app, parentRecord, tagTableName) self.bnAdd = QPushButton("&Add", self) self.bnDelete = QPushButton("&Delete", self) self.formTags = FormTags(self, parentRecord.table, tagTableName) self.grid.addWidget(self.dlsTags, 0, 0) self.buttongrid.addWidget(self.bnAdd) self.buttongrid.addWidget(self.bnDelete) self.grid.addLayout(self.buttongrid, 0, 1) self.grid.addMultiCellWidget(self.formTags, 1, 1, 0, 1) self.connect(self.bnAdd, SIGNAL("clicked()"), self.dlsTags.slotNewItem) self.connect(self.bnDelete, SIGNAL("clicked()"), self.dlsTags.slotDeleteItem) self.connect(self.dlsTags, PYSIGNAL("sigRecordSelected"), self.formTags.changeItem) self.connect(self.dlsTags, PYSIGNAL("sigItemDeleted"), self.formTags.clear) self.connect(self.dlsTags, PYSIGNAL("sigCreateNewItem"), self.formTags.newItem) self.connect(self.formTags, PYSIGNAL("sigRecordUpdated"), self.dlsTags.slotUpdateItem) self.connect(self.formTags, PYSIGNAL("sigRecordInserted"), self.dlsTags.slotAddItem) self.formTags.clear()