Commit ebeaf975 authored by Volker Krause's avatar Volker Krause

Update the UI on live data changes

parent 784c411c
......@@ -157,6 +157,8 @@ int main(int argc, char **argv)
QObject::connect(&settings, &Settings::homeCountryIsoCodeChanged, &timelineModel, &TimelineModel::setHomeCountryIsoCode);
QObject::connect(&liveDataMgr, &LiveDataManager::arrivalUpdated, &timelineModel, &TimelineModel::dataChangedForReservation);
QObject::connect(&liveDataMgr, &LiveDataManager::departureUpdated, &timelineModel, &TimelineModel::dataChangedForReservation);
WeatherForecastManager weatherForecastMgr;
......@@ -709,3 +709,8 @@ void TimelineModel::tripGroupRemoved(const QString& groupId)
void TimelineModel::dataChangedForReservation(const QString &resId)
reservationUpdated(resId); // ### this could be done a bit more efficient, as we know this isn't called for time changes
......@@ -91,6 +91,11 @@ public:
int todayRow() const;
/** Emit dataChanged() for the row containing @p resId.
* This is used to trigger UI updates e.g. from the LiveDataManager.
void dataChangedForReservation(const QString &resId);
// for unit testing
void setCurrentDateTime(const QDateTime &dt);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment