emit dataChanged(createIndex(index, 0), createIndex(index, 0));
}
+void JourneyModel::deleteJourney(quint32 index) {
+ beginRemoveRows(QModelIndex(), index, index);
+ journeys.removeAt(index);
+ endRemoveRows();
+}
+
int JourneyModel::rowCount(const QModelIndex & parent) const {
Q_UNUSED(parent)
return journeys.count();
QDate JourneyModel::epochToDate(quint64 epoch) {
QDateTime date;
- qDebug() << "Epoch: " << epoch;
date.setMSecsSinceEpoch(epoch);
- qDebug() << "Date: " << date.date();
return date.date();
}