def undo(self): self.model.beginInsertRows(QtCore.QModelIndex(), self.row, self.row) StandardEventTimes.append(self.item) self.model.endInsertRows()
def _loadInTimesTable(self): _c = self._connection.cursor() StandardEventTimes[:] = [] for row in _c.execute('SELECT * FROM StandardEventTimes'): t = (datetime(*time.strptime(row[1], "%H:%M")[0:6])).time() StandardEventTimes.append((row[0], t))