def editEntry(self, modelIndex):
     entry = self.entryTableModel.getEntryByModelIndex(modelIndex)
     dlg = EntryEditDialog(entry, self.ktable, self)
     if dlg.exec_():
         self.entryTableModel.updateRow(dlg.entry, modelIndex)
         self.entrySelected(dlg.entry)
         self.resizeColumns()
 def addEntry(self):
     entry = self.entryTableModel.createEntry()
     dlg = EntryEditDialog(entry, self.ktable, self)
     if dlg.exec_():
         modelIndex = self.entryTableModel.addRow(entry)
         
         self.entryTableView.setFocus()
         self.entryTableView.setCurrentIndex(modelIndex)
         self.resizeColumns()