Search for usage in LXR

#include <stopover.h>


int arrivalDelay
int departureDelay
bool hasExpectedArrivalTime
bool hasExpectedDepartureTime
bool hasExpectedPlatform
QVariantList loadInformation
bool platformChanged

Public Member Functions

void addNote (const QString &note)
void addNotes (const QStringList &notes)
void applyMetaData (bool download)
int arrivalDelay () const
int departureDelay () const
bool hasExpectedArrivalTime () const
bool hasExpectedDepartureTime () const
bool hasExpectedPlatform () const
const std::vector< LoadInfo > & loadInformation () const
bool platformChanged () const
void setLoadInformation (std::vector< LoadInfo > &&loadInfo)
std::vector< LoadInfo > && takeLoadInformation ()

Static Public Member Functions

static std::vector< StopoverfromJson (const QJsonArray &array)
static Stopover fromJson (const QJsonObject &obj)
static bool isSame (const Stopover &lhs, const Stopover &rhs)
static Stopover merge (const Stopover &lhs, const Stopover &rhs)
static QJsonArray toJson (const std::vector< Stopover > &deps)
static QJsonObject toJson (const Stopover &stopover)

Detailed Description

Information about an arrival and/or departure of a vehicle at a stop area.

Definition at line 25 of file stopover.h.

Property Documentation

◆ arrivalDelay

int Stopover::arrivalDelay

Difference to schedule in minutes.

Definition at line 38 of file stopover.h.

◆ departureDelay

int Stopover::departureDelay

Difference to schedule in minutes.

Definition at line 49 of file stopover.h.

◆ hasExpectedArrivalTime

bool Stopover::hasExpectedArrivalTime

Planned arrival time.

Actual arrival time, if available. Set to invalid to indicate real-time data is not available. true if this has real-time data.

Definition at line 36 of file stopover.h.

◆ hasExpectedDepartureTime

bool Stopover::hasExpectedDepartureTime

Planned departure time.

Actual departure time, if available. Set to invalid to indicate real-time data is not available. true if this has real-time data.

Definition at line 47 of file stopover.h.

◆ hasExpectedPlatform

bool Stopover::hasExpectedPlatform

Planned departure platform.

Actual departure platform, in case real-time information are available. true if real-time platform information are available.

Definition at line 56 of file stopover.h.

◆ loadInformation

const std::vector< LoadInfo > & Stopover::loadInformation

The departing route.

The stop point of this departure. Disruption effect on this arrival or departure, if any. General human-readable notes on this service, e.g. details about a disruption. Vehicle load information for departure from this stopover Contains LoadInfo objects for consumption by QML.

Definition at line 74 of file stopover.h.

◆ platformChanged

bool Stopover::platformChanged

true if we have real-time platform information and the platform changed.

Definition at line 58 of file stopover.h.

Member Function Documentation

◆ addNote()

void Stopover::addNote ( const QString note)

Adds a note.

This will check for duplicates and normalize the notes.

Definition at line 110 of file stopover.cpp.

◆ applyMetaData()

void Stopover::applyMetaData ( bool  download)

Augment line meta data.

downloadwhen set to true trigger download of missing assets.

Definition at line 152 of file stopover.cpp.

◆ fromJson() [1/2]

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

Deserialize a list of departures from JSON.

Definition at line 260 of file stopover.cpp.

◆ fromJson() [2/2]

Stopover Stopover::fromJson ( const QJsonObject obj)

Deserialize an object from JSON.

Definition at line 248 of file stopover.cpp.

◆ hasExpectedArrivalTime()

bool KPublicTransport::Stopover::hasExpectedArrivalTime ( ) const

Vehicle coach layout information at this stopover.

Platform layout information.

◆ isSame()

bool Stopover::isSame ( const Stopover lhs,
const Stopover rhs 

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

Definition at line 159 of file stopover.cpp.

◆ loadInformation()

const std::vector<LoadInfo>& KPublicTransport::Stopover::loadInformation ( ) const

Expected vehicle load for departing from this stopover.

◆ merge()

Stopover Stopover::merge ( const Stopover lhs,
const Stopover rhs 

Merge two departure instances.

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

Definition at line 189 of file stopover.cpp.

◆ setLoadInformation()

void Stopover::setLoadInformation ( std::vector< LoadInfo > &&  loadInfo)

Set the expected vehicle load information for departing from this stopover.

Definition at line 138 of file stopover.cpp.

◆ takeLoadInformation()

std::vector< LoadInfo > && Stopover::takeLoadInformation ( )

Moves the load information out of this object for modification.

Definition at line 132 of file stopover.cpp.

◆ toJson() [1/2]

QJsonArray Stopover::toJson ( const std::vector< Stopover > &  deps)

Serializes a vector of departure objects to JSON.

Definition at line 243 of file stopover.cpp.

◆ toJson() [2/2]

QJsonObject Stopover::toJson ( const Stopover stopover)

Serializes one object to JSON.

Definition at line 216 of file stopover.cpp.

The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2022 The KDE developers.
Generated on Wed Aug 17 2022 04:18:37 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.