def editEvent(self):
     dialog = eventEditDialog.EventEditDlg(eData=self.evData, sDate=self.selected_date)
     dialog.dateEditStart.setDate(self.selected_date)
     if dialog.exec_():
         newData = eventEditDialog.EventEditDlg.eventData
         sqliteUtils.updateEvent(newData["EventNumber"], newData)
     self.update()
 def on_tableViewEvents_dblClicked(self):
     a = self.tableViewEvents.currentIndex().row()
     i = self.eventsViewModel.listdata[a]
     ev = sqliteUtils.fetchEvent(int(i[7]))
     self.evData["Title"] = ev[5]
     self.evData["Notes"] = ev[6]
     self.evData["Category"] = ev[7]
     self.evData["ReminderDays"] = ev[11]
     self.evData["StartDate"] = ev[1]
     self.evData["Period"] = ev[9]
     self.evData["PeriodValue"] = ev[12]
     self.evData["NoOfTimes"] = ev[10]
     self.evData["DOB"] = ev[3]
     self.evData["EventNumber"] = ev[0]
     evNo = ev[0]
     # print(self.evData)
     dialog = eventEditDialog.EventEditDlg(eData=self.evData, sDate=self.selected_date)
     dialog.dateEditStart.setDate(self.selected_date)
     if dialog.exec_():
         newData = eventEditDialog.EventEditDlg.eventData
         sqliteUtils.updateEvent(evNo, newData)
     self.update()