Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
PIM
Itinerary
Commits
f76f13a4
Commit
f76f13a4
authored
Dec 27, 2018
by
Volker Krause
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add property to check for platform changes
parent
e0036809
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
0 deletions
+8
-0
src/publictransport/datatypes/departure.cpp
src/publictransport/datatypes/departure.cpp
+5
-0
src/publictransport/datatypes/departure.h
src/publictransport/datatypes/departure.h
+3
-0
No files found.
src/publictransport/datatypes/departure.cpp
View file @
f76f13a4
...
...
@@ -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
;
...
...
src/publictransport/datatypes/departure.h
View file @
f76f13a4
...
...
@@ -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
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment