KPublicTransport::JourneyRequest

Search for usage in LXR

KPublicTransport::JourneyRequest Class Reference

#include <journeyrequest.h>

Public Types

enum  DateTimeMode { Arrival, Departure }
 

Properties

QVariantList accessModes
 
QStringList backends
 
QDateTime dateTime
 
DateTimeMode dateTimeMode
 
bool downloadAssets
 
QVariantList egressModes
 
KPublicTransport::Location from
 
bool includeIntermediateStops
 
bool includePaths
 
int maximumResults
 
KPublicTransport::JourneySection::Modes modes
 
KPublicTransport::Location to
 

Public Member Functions

 JourneyRequest (const Location &from, const Location &to)
 
const std::vector< IndividualTransport > & accessModes () const
 
QStringList backendIds () const
 
QString cacheKey () const
 
const std::vector< IndividualTransport > & egressModes () const
 
bool isValid () const
 
void setAccessModes (std::vector< IndividualTransport > &&accessModes)
 
void setArrivalTime (const QDateTime &dt)
 
void setBackendIds (const QStringList &backendIds)
 
void setDepartureTime (const QDateTime &dt)
 
void setEgressModes (std::vector< IndividualTransport > &&egressModes)
 

Detailed Description

Describes a journey search.

By default journeys departing now are searched.

Definition at line 36 of file journeyrequest.h.

Member Enumeration Documentation

Enumerator
Arrival 

dateTime() represents the desired arriva time.

Departure 

dateTime() represents the desired departure time.

Definition at line 74 of file journeyrequest.h.

Property Documentation

const std::vector< IndividualTransport > & JourneyRequest::accessModes
readwrite

Access modes.

Definition at line 69 of file journeyrequest.h.

QDateTime JourneyRequest::dateTime
readwrite

Date/time at which the journey should start/end.

Definition at line 45 of file journeyrequest.h.

DateTimeMode KPublicTransport::JourneyRequest::dateTimeMode
readwrite

Controls whether to search for journeys starting or ending at the given time.

Definition at line 80 of file journeyrequest.h.

bool KPublicTransport::JourneyRequest::downloadAssets
readwrite

Download graphic assets such as line logos for the data requested here.

Default: false

Definition at line 87 of file journeyrequest.h.

const std::vector< IndividualTransport > & JourneyRequest::egressModes
readwrite

Egress modes.

Definition at line 71 of file journeyrequest.h.

KPublicTransport::Location KPublicTransport::JourneyRequest::from
readwrite

The starting point of the journey search.

Definition at line 41 of file journeyrequest.h.

bool KPublicTransport::JourneyRequest::includeIntermediateStops
readwrite

Retrieve intermediate stops for the queried journeys as well.

Note
This is only an optimization hint for backends, not a guarantee that all results will contain this information.

Definition at line 61 of file journeyrequest.h.

bool KPublicTransport::JourneyRequest::includePaths
readwrite

Retrieve path details for the journeys.

Note
This is only an optimization hint for backends, not a guarantee that all results will contain this information.

Definition at line 66 of file journeyrequest.h.

int KPublicTransport::JourneyRequest::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 56 of file journeyrequest.h.

KPublicTransport::JourneySection::Modes KPublicTransport::JourneyRequest::modes
readwrite

Modes of transportation that should be considered for this query.

Only transit modes matter (public transport, rented vehicles, etc), values for tranfers/waits/etc are ignored.

Definition at line 51 of file journeyrequest.h.

KPublicTransport::Location KPublicTransport::JourneyRequest::to
readwrite

The journey destination.

Definition at line 43 of file journeyrequest.h.

Constructor & Destructor Documentation

JourneyRequest::JourneyRequest ( const Location from,
const Location to 
)

Search a journey from from to to.

Definition at line 57 of file journeyrequest.cpp.

Member Function Documentation

const std::vector<IndividualTransport>& KPublicTransport::JourneyRequest::accessModes ( ) const

Requested access modes.

That is individual transport modes on the first (access) leg of the journey. Default: walking

QStringList JourneyRequest::backendIds ( ) const

Identifiers of the backends that should be queried.

See also
setBackendIds()

Definition at line 140 of file journeyrequest.cpp.

QString JourneyRequest::cacheKey ( ) const

Unique string representation used for caching results.

Definition at line 204 of file journeyrequest.cpp.

const std::vector<IndividualTransport>& KPublicTransport::JourneyRequest::egressModes ( ) const

Requested egress modes.

That is, individual transport modes for the last (egress) leg of the journey. Default: walking

bool JourneyRequest::isValid ( ) const

Returns true if this is a valid request, that is, it has enough parameters set to perform a query.

Definition at line 64 of file journeyrequest.cpp.

void JourneyRequest::setAccessModes ( std::vector< IndividualTransport > &&  accessModes)

Sets the requested access modes.

Definition at line 170 of file journeyrequest.cpp.

void JourneyRequest::setArrivalTime ( const QDateTime dt)

Sets the desired arrival time.

This is mutually exclusive to setting a desired departure time.

Definition at line 90 of file journeyrequest.cpp.

void JourneyRequest::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 145 of file journeyrequest.cpp.

void JourneyRequest::setDepartureTime ( const QDateTime dt)

Set the desired departure time.

This is mutually exclusive to setting a desired arrival time.

Definition at line 83 of file journeyrequest.cpp.

void JourneyRequest::setEgressModes ( std::vector< IndividualTransport > &&  egressModes)

Sets the requested egress modes.

Definition at line 192 of file journeyrequest.cpp.


The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Sun Oct 17 2021 23:07:25 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.