Search for usage in LXR

#include <journey.h>


int arrivalDelay
int departureDelay
KPublicTransport::Disruption::Effect disruptionEffect
int duration
QDateTime expectedArrivalTime
QDateTime expectedDepartureTime
bool hasExpectedArrivalTime
bool hasExpectedDepartureTime
int numberOfChanges
QDateTime scheduledArrivalTime
QDateTime scheduledDepartureTime
QVariantList sections

Public Member Functions

void applyMetaData (bool download)
int arrivalDelay () const
int departureDelay () const
Disruption::Effect disruptionEffect () const
int duration () const
QDateTime expectedArrivalTime () const
QDateTime expectedDepartureTime () const
bool hasExpectedArrivalTime () const
bool hasExpectedDepartureTime () const
int numberOfChanges () const
QDateTime scheduledArrivalTime () const
QDateTime scheduledDepartureTime () const
const std::vector< JourneySection > & sections () const
void setSections (std::vector< JourneySection > &&sections)
std::vector< JourneySection > && takeSections ()

Static Public Member Functions

static std::vector< JourneyfromJson (const QJsonArray &array)
static Journey fromJson (const QJsonObject &obj)
static bool isSame (const Journey &lhs, const Journey &rhs)
static Journey merge (const Journey &lhs, const Journey &rhs)
static QJsonObject toJson (const Journey &journey)
static QJsonArray toJson (const std::vector< Journey > &journeys)

Detailed Description

A journey plan.

Definition at line 266 of file journey.h.

Property Documentation

◆ arrivalDelay

int KPublicTransport::Journey::arrivalDelay

Difference to schedule in minutes.

Definition at line 291 of file journey.h.

◆ departureDelay

int KPublicTransport::Journey::departureDelay

Difference to schedule in minutes.

Definition at line 280 of file journey.h.

◆ disruptionEffect

KPublicTransport::Disruption::Effect KPublicTransport::Journey::disruptionEffect

Worst disruption effect of any of the journey sections.

Definition at line 298 of file journey.h.

◆ duration

int KPublicTransport::Journey::duration

Duration of the entire journey in seconds.

Definition at line 294 of file journey.h.

◆ expectedArrivalTime

QDateTime KPublicTransport::Journey::expectedArrivalTime

Actual arrival time, if available.

Set to invalid to indicate real-time data is not available.

Definition at line 289 of file journey.h.

◆ expectedDepartureTime

QDateTime KPublicTransport::Journey::expectedDepartureTime

Actual departure time, if available.

Set to invalid to indicate real-time data is not available.

Definition at line 278 of file journey.h.

◆ hasExpectedArrivalTime

bool KPublicTransport::Journey::hasExpectedArrivalTime

true if this has real-time data.

Definition at line 285 of file journey.h.

◆ hasExpectedDepartureTime

bool KPublicTransport::Journey::hasExpectedDepartureTime

true if this has real-time data.

Definition at line 274 of file journey.h.

◆ numberOfChanges

int KPublicTransport::Journey::numberOfChanges

Number of changes on this journey.

Definition at line 296 of file journey.h.

◆ scheduledArrivalTime

QDateTime KPublicTransport::Journey::scheduledArrivalTime

Arrival time of the journey, according to schedule.

Definition at line 283 of file journey.h.

◆ scheduledDepartureTime

QDateTime KPublicTransport::Journey::scheduledDepartureTime

Departure time of the journey, according to schedule.

Definition at line 272 of file journey.h.

◆ sections

QVariantList KPublicTransport::Journey::sections

Journey sections for consumption by QML.

Definition at line 270 of file journey.h.

Member Function Documentation

◆ applyMetaData()

void Journey::applyMetaData ( bool download)

Augment line meta data.

downloadif set to true, trigger the download of locally missing assets.

Definition at line 699 of file journey.cpp.

◆ arrivalDelay()

int Journey::arrivalDelay ( ) const

Definition at line 675 of file journey.cpp.

◆ departureDelay()

int Journey::departureDelay ( ) const

Definition at line 652 of file journey.cpp.

◆ disruptionEffect()

Disruption::Effect Journey::disruptionEffect ( ) const

Definition at line 690 of file journey.cpp.

◆ duration()

int Journey::duration ( ) const

Definition at line 680 of file journey.cpp.

◆ expectedArrivalTime()

QDateTime Journey::expectedArrivalTime ( ) const

Definition at line 670 of file journey.cpp.

◆ expectedDepartureTime()

QDateTime Journey::expectedDepartureTime ( ) const

Definition at line 647 of file journey.cpp.

◆ fromJson() [1/2]

std::vector< Journey > Journey::fromJson ( const QJsonArray & array)

Deserialize a list of journey from JSON.

Definition at line 794 of file journey.cpp.

◆ fromJson() [2/2]

Journey Journey::fromJson ( const QJsonObject & obj)

Deserialize an object from JSON.

Definition at line 787 of file journey.cpp.

◆ hasExpectedArrivalTime()

bool Journey::hasExpectedArrivalTime ( ) const

Definition at line 665 of file journey.cpp.

◆ hasExpectedDepartureTime()

bool Journey::hasExpectedDepartureTime ( ) const

Definition at line 642 of file journey.cpp.

◆ isSame()

bool Journey::isSame ( const Journey & lhs,
const Journey & rhs )

Checks if two instances refer to the same journey (which does not necessarily mean they are exactly equal).

Definition at line 713 of file journey.cpp.

◆ merge()

Journey Journey::merge ( const Journey & lhs,
const Journey & rhs )

Merge two instances.

This assumes isSame(lhs, rhs) and tries to preserve the most detailed information.

Definition at line 745 of file journey.cpp.

◆ numberOfChanges()

int Journey::numberOfChanges ( ) const

Definition at line 685 of file journey.cpp.

◆ scheduledArrivalTime()

QDateTime Journey::scheduledArrivalTime ( ) const

Definition at line 657 of file journey.cpp.

◆ scheduledDepartureTime()

QDateTime Journey::scheduledDepartureTime ( ) const

Definition at line 634 of file journey.cpp.

◆ sections()

const std::vector< JourneySection > & Journey::sections ( ) const

The journey sections.

Definition at line 609 of file journey.cpp.

◆ setSections()

void Journey::setSections ( std::vector< JourneySection > && sections)

Sets the journey sections.

Definition at line 620 of file journey.cpp.

◆ takeSections()

std::vector< JourneySection > && Journey::takeSections ( )

Moves the journey sections out of this object.

Definition at line 614 of file journey.cpp.

◆ toJson() [1/2]

QJsonObject Journey::toJson ( const Journey & journey)

Serializes one journey object to JSON.

Definition at line 775 of file journey.cpp.

◆ toJson() [2/2]

QJsonArray Journey::toJson ( const std::vector< Journey > & journeys)

Serializes a vector of journey objects to JSON.

Definition at line 782 of file journey.cpp.

The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Jun 14 2024 11:52:53 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.