Search for usage in LXR

#include <journey.h>


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

Public Member Functions

int arrivalDelay () const
int departureDelay () const
Disruption::Effect disruptionEffect () const
int duration () 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 Journey fromJson (const QJsonObject &obj)
static std::vector< JourneyfromJson (const QJsonArray &array)
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 224 of file journey.h.

Property Documentation

int Journey::arrivalDelay

Difference to schedule in minutes.

Definition at line 241 of file journey.h.

int Journey::departureDelay

Difference to schedule in minutes.

Definition at line 234 of file journey.h.

Disruption::Effect Journey::disruptionEffect

Worst disruption effect of any of the journey sections.

Definition at line 248 of file journey.h.

int Journey::duration

Duration of the entire journey in seconds.

Definition at line 244 of file journey.h.

bool Journey::hasExpectedArrivalTime

true if this has real-time data.

Definition at line 239 of file journey.h.

bool Journey::hasExpectedDepartureTime

true if this has real-time data.

Definition at line 232 of file journey.h.

int Journey::numberOfChanges

Number of changes on this journey.

Definition at line 246 of file journey.h.

QDateTime Journey::scheduledArrivalTime

Arrival time of the journey, according to schedule.

Definition at line 237 of file journey.h.

QDateTime Journey::scheduledDepartureTime

Departure time of the journey, according to schedule.

Definition at line 230 of file journey.h.

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

Journey sections for consumption by QML.

Definition at line 228 of file journey.h.

Member Function Documentation

Journey KPublicTransport::Journey::fromJson ( const QJsonObject obj)

Deserialize an object from JSON.

Definition at line 675 of file journey.cpp.

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

Deserialize a list of journey from JSON.

Definition at line 683 of file journey.cpp.

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 601 of file journey.cpp.

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 633 of file journey.cpp.

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

The journey sections.

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

Sets the journey sections.

Definition at line 532 of file journey.cpp.

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

Moves the journey sections out of this object.

Definition at line 526 of file journey.cpp.

QJsonObject Journey::toJson ( const Journey journey)

Serializes one journey object to JSON.

Definition at line 663 of file journey.cpp.

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

Serializes a vector of journey objects to JSON.

Definition at line 670 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-2021 The KDE developers.
Generated on Mon Sep 27 2021 23:07:33 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.