Beispiel #1
0
 def editBook(self):
     row = self.Navigation.mapSelectionToSource(self.Navigation.Tree.currentIndex()).row()
     record = self.SqlModel.record(row)
     EditDialog = AddEditDialog(self, record)
     if EditDialog.exec_():
         self.Navigation.Tree.setCurrentIndex(QtCore.QModelIndex())
         self.SqlModel.setRecord(row, EditDialog.Record)
         self.SqlModel.submitAll()
Beispiel #2
0
 def addBook(self):
     record = self.SqlModel.record()
     AddDialog = AddEditDialog(self, record)
     if AddDialog.exec_():
         self.SqlModel.insertRecord(-1, AddDialog.Record)