KPublicTransport::StopoverRequest
#include <stopoverrequest.h>
Public Types | |
enum | Mode { QueryArrival , QueryDeparture } |
Properties | |
QStringList | backends |
QDateTime | dateTime |
bool | downloadAssets |
QVariantList | lineModes |
int | maximumResults |
Mode | mode |
KPublicTransport::Location | stop |
Public Member Functions | |
StopoverRequest (const Location &stop) | |
QStringList | backendIds () const |
QString | cacheKey () const |
bool | isValid () const |
const std::vector< Line::Mode > & | lineModes () const |
void | setBackendIds (const QStringList &backendIds) |
void | setLineModes (std::vector< Line::Mode > &&modes) |
Detailed Description
Describes an arrival or departure search.
By default this search departures starting now, from the given Location.
Definition at line 32 of file stopoverrequest.h.
Member Enumeration Documentation
◆ Mode
Query departures or arrivals?
Enumerator | |
---|---|
QueryArrival | Search for arrivals. |
QueryDeparture | Search for departures. |
Definition at line 48 of file stopoverrequest.h.
Property Documentation
◆ backends
|
readwrite |
Definition at line 59 of file stopoverrequest.h.
◆ dateTime
|
readwrite |
Date/time at which the search should start.
Default: now
Definition at line 41 of file stopoverrequest.h.
◆ downloadAssets
|
readwrite |
Enable downloading of graphic assets such as line logos for the data requested here.
Default: false
Definition at line 64 of file stopoverrequest.h.
◆ lineModes
|
readwrite |
Line modes.
Definition at line 44 of file stopoverrequest.h.
◆ maximumResults
|
readwrite |
The maximum amount of expected results.
- Note
- This is only an optimization hint for backends, not a guarantee that all results comply with this constraint.
Definition at line 70 of file stopoverrequest.h.
◆ mode
|
readwrite |
Controls whether to search for arrivals or departures.
Default is QueryDeparture.
Definition at line 57 of file stopoverrequest.h.
◆ stop
|
readwrite |
The location at which to search for departures/arrivals.
Definition at line 37 of file stopoverrequest.h.
Constructor & Destructor Documentation
◆ StopoverRequest()
|
explicit |
Search for arrival/departures to/from stop
.
Definition at line 44 of file stopoverrequest.cpp.
Member Function Documentation
◆ backendIds()
QStringList StopoverRequest::backendIds | ( | ) | const |
Identifiers of the backends that should be queried.
- See also
- setBackendIds()
Definition at line 141 of file stopoverrequest.cpp.
◆ cacheKey()
QString StopoverRequest::cacheKey | ( | ) | const |
Unique string representation used for caching results.
Definition at line 152 of file stopoverrequest.cpp.
◆ isValid()
bool StopoverRequest::isValid | ( | ) | const |
Returns true
if this is a valid request, ie.
this is complete enough to perform a query.
Definition at line 50 of file stopoverrequest.cpp.
◆ lineModes()
const std::vector< Line::Mode > & StopoverRequest::lineModes | ( | ) | const |
Requested line modes.
That is, the possible types of public transport lines to consider. Default: all
Definition at line 69 of file stopoverrequest.cpp.
◆ setBackendIds()
void StopoverRequest::setBackendIds | ( | const QStringList & | backendIds | ) |
Set identifiers of backends that should be queried.
Settings this is only needed when you want explicit control over this, leaving this empty picks suitable backends automatically.
Definition at line 146 of file stopoverrequest.cpp.
◆ setLineModes()
void StopoverRequest::setLineModes | ( | std::vector< Line::Mode > && | modes | ) |
Sets the requested line modes.
An empty list is considered as all modes being allowed.
- Note
- This relies on backends actually supporting this and is thus does not provide any guarantee that the results wont contain other modes as well.
Definition at line 74 of file stopoverrequest.cpp.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 16:59:57 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.