projects
/
harbour-pedalo.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Ensure all app icons sizes are defined
[harbour-pedalo.git]
/
src
/
journeymodel.cpp
diff --git
a/src/journeymodel.cpp
b/src/journeymodel.cpp
index
80a5eb5
..
5b7b5da
100644
(file)
--- a/
src/journeymodel.cpp
+++ b/
src/journeymodel.cpp
@@
-30,6
+30,12
@@
void JourneyModel::editJourney(quint32 index, QDateTime start, quint32 duration,
emit dataChanged(createIndex(index, 0), createIndex(index, 0));
}
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();
int JourneyModel::rowCount(const QModelIndex & parent) const {
Q_UNUSED(parent)
return journeys.count();
@@
-99,9
+105,7
@@
void JourneyModel::importFromFile(QFile & file) {
QDate JourneyModel::epochToDate(quint64 epoch) {
QDateTime date;
QDate JourneyModel::epochToDate(quint64 epoch) {
QDateTime date;
- qDebug() << "Epoch: " << epoch;
date.setMSecsSinceEpoch(epoch);
date.setMSecsSinceEpoch(epoch);
- qDebug() << "Date: " << date.date();
return date.date();
}
return date.date();
}