Commit f76f13a4 authored by Volker Krause's avatar Volker Krause

Add property to check for platform changes

parent e0036809
......@@ -136,6 +136,11 @@ bool Departure::hasExpectedPlatform() const
return !d->expectedPlatform.isEmpty();
bool Departure::platformChanged() const
return hasExpectedPlatform() && d->expectedPlatform != d->scheduledPlatform;
Route Departure::route() const
return d->route;
......@@ -61,6 +61,8 @@ class Departure
Q_PROPERTY(QString expectedPlatform READ expectedPlatform WRITE setExpectedPlatform)
/** @c true if real-time platform information are available. */
Q_PROPERTY(bool hasExpectedPlatform READ hasExpectedPlatform STORED false)
/** @c true if we have real-time platform information and the platform changed. */
Q_PROPERTY(bool platformChanged READ platformChanged STORED false)
/** The departing route. */
Q_PROPERTY(KPublicTransport::Route route READ route WRITE setRoute)
......@@ -88,6 +90,7 @@ public:
QString expectedPlatform() const;
void setExpectedPlatform(const QString &platform);
bool hasExpectedPlatform() const;
bool platformChanged() const;
Route route() const;
void setRoute(const Route &route);
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