KPublicTransport::Stopover

Search for usage in LXR

#include <stopover.h>

Properties

int arrivalDelay
 
int departureDelay
 
KPublicTransport::Disruption::Effect disruptionEffect
 
QDateTime expectedArrivalTime
 
QDateTime expectedDepartureTime
 
QString expectedPlatform
 
std::vector< KPublicTransport::Featurefeatures
 
bool hasExpectedArrivalTime
 
bool hasExpectedDepartureTime
 
bool hasExpectedPlatform
 
QVariantList loadInformation
 
QStringList notes
 
bool platformChanged
 
KPublicTransport::Platform platformLayout
 
KPublicTransport::Route route
 
QDateTime scheduledArrivalTime
 
QDateTime scheduledDepartureTime
 
QString scheduledPlatform
 
KPublicTransport::Location stopPoint
 
KPublicTransport::Vehicle vehicleLayout
 

Public Member Functions

void addNote (const QString &note)
 
void addNotes (const QStringList &notes)
 
void applyMetaData (bool download)
 
int arrivalDelay () const
 
int departureDelay () const
 
const std::vector< KPublicTransport::Feature > & features () const
 
bool hasExpectedArrivalTime () const
 
bool hasExpectedDepartureTime () const
 
bool hasExpectedPlatform () const
 
const std::vector< LoadInfo > & loadInformation () const
 
bool platformChanged () const
 
void setFeatures (std::vector< KPublicTransport::Feature > &&features)
 
void setLoadInformation (std::vector< LoadInfo > &&loadInfo)
 
std::vector< KPublicTransport::Feature > && takeFeatures ()
 
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 KPublicTransport::Stopover::arrivalDelay
read

Difference to schedule in minutes.

Definition at line 38 of file stopover.h.

◆ departureDelay

int KPublicTransport::Stopover::departureDelay
read

Difference to schedule in minutes.

Definition at line 49 of file stopover.h.

◆ disruptionEffect

KPublicTransport::Disruption::Effect KPublicTransport::Stopover::disruptionEffect
readwrite

Disruption effect on this arrival or departure, if any.

Definition at line 67 of file stopover.h.

◆ expectedArrivalTime

QDateTime KPublicTransport::Stopover::expectedArrivalTime
readwrite

Actual arrival time, if available.

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

Definition at line 34 of file stopover.h.

◆ expectedDepartureTime

QDateTime KPublicTransport::Stopover::expectedDepartureTime
readwrite

Actual departure time, if available.

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

Definition at line 45 of file stopover.h.

◆ expectedPlatform

QString Stopover::expectedPlatform
readwrite

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

Definition at line 54 of file stopover.h.

◆ features

std::vector<KPublicTransport::Feature> KPublicTransport::Stopover::features
read

Features of the vehicle used on this section.

This is identical to departureVehicleLayout.features and provided for convenience for cases where no more detailed vehicle information are available.

Definition at line 85 of file stopover.h.

◆ hasExpectedArrivalTime

bool KPublicTransport::Stopover::hasExpectedArrivalTime
read

true if this has real-time data.

Definition at line 36 of file stopover.h.

◆ hasExpectedDepartureTime

bool KPublicTransport::Stopover::hasExpectedDepartureTime
read

true if this has real-time data.

Definition at line 47 of file stopover.h.

◆ hasExpectedPlatform

bool KPublicTransport::Stopover::hasExpectedPlatform
read

true if real-time platform information are available.

Definition at line 56 of file stopover.h.

◆ loadInformation

QVariantList KPublicTransport::Stopover::loadInformation
read

Vehicle load information for departure from this stopover Contains LoadInfo objects for consumption by QML.

Definition at line 74 of file stopover.h.

◆ notes

QStringList KPublicTransport::Stopover::notes
readwrite

General human-readable notes on this service, e.g.

details about a disruption.

Definition at line 69 of file stopover.h.

◆ platformChanged

bool KPublicTransport::Stopover::platformChanged
read

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

Definition at line 58 of file stopover.h.

◆ platformLayout

KPublicTransport::Platform KPublicTransport::Stopover::platformLayout
readwrite

Platform layout information.

Definition at line 79 of file stopover.h.

◆ route

KPublicTransport::Route KPublicTransport::Stopover::route
readwrite

The departing route.

Definition at line 61 of file stopover.h.

◆ scheduledArrivalTime

QDateTime KPublicTransport::Stopover::scheduledArrivalTime
readwrite

Planned arrival time.

Definition at line 30 of file stopover.h.

◆ scheduledDepartureTime

QDateTime KPublicTransport::Stopover::scheduledDepartureTime
readwrite

Planned departure time.

Definition at line 41 of file stopover.h.

◆ scheduledPlatform

QString Stopover::scheduledPlatform
readwrite

Planned departure platform.

Definition at line 52 of file stopover.h.

◆ stopPoint

KPublicTransport::Location KPublicTransport::Stopover::stopPoint
readwrite

The stop point of this departure.

Definition at line 64 of file stopover.h.

◆ vehicleLayout

KPublicTransport::Vehicle KPublicTransport::Stopover::vehicleLayout
readwrite

Vehicle coach layout information at this stopover.

Definition at line 77 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.

◆ addNotes()

void Stopover::addNotes ( const QStringList & notes)

Definition at line 120 of file stopover.cpp.

◆ applyMetaData()

void Stopover::applyMetaData ( bool download)

Augment line meta data.

Parameters
downloadwhen set to true trigger download of missing assets.

Definition at line 168 of file stopover.cpp.

◆ arrivalDelay()

int Stopover::arrivalDelay ( ) const

Definition at line 57 of file stopover.cpp.

◆ departureDelay()

int Stopover::departureDelay ( ) const

Definition at line 70 of file stopover.cpp.

◆ features()

const std::vector< KPublicTransport::Feature > & Stopover::features ( ) const
nodiscard

Vehicle features.

This is identical to departureVehicleLayout.features and provided for convenience for cases where no more detailed vehicle information are available.

Definition at line 152 of file stopover.cpp.

◆ fromJson() [1/2]

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

Deserialize a list of departures from JSON.

Definition at line 276 of file stopover.cpp.

◆ fromJson() [2/2]

Stopover Stopover::fromJson ( const QJsonObject & obj)
static

Deserialize an object from JSON.

Definition at line 264 of file stopover.cpp.

◆ hasExpectedArrivalTime()

bool Stopover::hasExpectedArrivalTime ( ) const

Definition at line 52 of file stopover.cpp.

◆ hasExpectedDepartureTime()

bool Stopover::hasExpectedDepartureTime ( ) const

Definition at line 65 of file stopover.cpp.

◆ hasExpectedPlatform()

bool Stopover::hasExpectedPlatform ( ) const

Definition at line 100 of file stopover.cpp.

◆ isSame()

bool Stopover::isSame ( const Stopover & lhs,
const Stopover & rhs )
static

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

Definition at line 175 of file stopover.cpp.

◆ loadInformation()

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

Expected vehicle load for departing from this stopover.

Definition at line 127 of file stopover.cpp.

◆ merge()

Stopover Stopover::merge ( const Stopover & lhs,
const Stopover & rhs )
static

Merge two departure instances.

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

Definition at line 205 of file stopover.cpp.

◆ platformChanged()

bool Stopover::platformChanged ( ) const

Definition at line 105 of file stopover.cpp.

◆ setFeatures()

void Stopover::setFeatures ( std::vector< KPublicTransport::Feature > && features)

Definition at line 162 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.

◆ takeFeatures()

std::vector< KPublicTransport::Feature > && Stopover::takeFeatures ( )
nodiscard

Definition at line 157 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)
static

Serializes a vector of departure objects to JSON.

Definition at line 259 of file stopover.cpp.

◆ toJson() [2/2]

QJsonObject Stopover::toJson ( const Stopover & stopover)
static

Serializes one object to JSON.

Definition at line 232 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-2024 The KDE developers.
Generated on Fri Jul 26 2024 11:59:22 by doxygen 1.11.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.