Search for usage in LXR

#include <stopover.h>


int arrivalDelay
int departureDelay
KPublicTransport::Disruption::Effect disruptionEffect
QDateTime expectedArrivalTime
QDateTime expectedDepartureTime
QString expectedPlatform
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)
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 Stopover fromJson (const QJsonObject &obj)
static std::vector< StopoverfromJson (const QJsonArray &array)
static bool isSame (const Stopover &lhs, const Stopover &rhs)
static Stopover merge (const Stopover &lhs, const Stopover &rhs)
static QJsonObject toJson (const Stopover &stopover)
static QJsonArray toJson (const std::vector< Stopover > &deps)

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

int Stopover::arrivalDelay

Difference to schedule in minutes.

Definition at line 38 of file stopover.h.

int Stopover::departureDelay

Difference to schedule in minutes.

Definition at line 49 of file stopover.h.

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

Disruption effect on this arrival or departure, if any.

Definition at line 67 of file stopover.h.

QDateTime KPublicTransport::Stopover::expectedArrivalTime

Actual arrival time, if available.

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

Definition at line 34 of file stopover.h.

QDateTime KPublicTransport::Stopover::expectedDepartureTime

Actual departure time, if available.

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

Definition at line 45 of file stopover.h.

QString Stopover::expectedPlatform

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

Definition at line 54 of file stopover.h.

bool Stopover::hasExpectedArrivalTime

true if this has real-time data.

Definition at line 36 of file stopover.h.

bool Stopover::hasExpectedDepartureTime

true if this has real-time data.

Definition at line 47 of file stopover.h.

bool Stopover::hasExpectedPlatform

true if real-time platform information are available.

Definition at line 56 of file stopover.h.

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

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

Definition at line 74 of file stopover.h.

QStringList KPublicTransport::Stopover::notes

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

details about a disruption.

Definition at line 69 of file stopover.h.

bool Stopover::platformChanged

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

Definition at line 58 of file stopover.h.

KPublicTransport::Platform KPublicTransport::Stopover::platformLayout

Platform layout information.

Definition at line 79 of file stopover.h.

KPublicTransport::Route KPublicTransport::Stopover::route

The departing route.

Definition at line 61 of file stopover.h.

QDateTime KPublicTransport::Stopover::scheduledArrivalTime

Planned arrival time.

Definition at line 30 of file stopover.h.

QDateTime KPublicTransport::Stopover::scheduledDepartureTime

Planned departure time.

Definition at line 41 of file stopover.h.

QString Stopover::scheduledPlatform

Planned departure platform.

Definition at line 52 of file stopover.h.

KPublicTransport::Location KPublicTransport::Stopover::stopPoint

The stop point of this departure.

Definition at line 64 of file stopover.h.

KPublicTransport::Vehicle KPublicTransport::Stopover::vehicleLayout

Vehicle coach layout information at this stopover.

Definition at line 77 of file stopover.h.

Member Function Documentation

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.

Stopover Stopover::fromJson ( const QJsonObject obj)

Deserialize an object from JSON.

Definition at line 241 of file stopover.cpp.

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

Deserialize a list of departures from JSON.

Definition at line 253 of file stopover.cpp.

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 152 of file stopover.cpp.

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

Expected vehicle load for departing from this stopover.

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 182 of file stopover.cpp.

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.

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

Moves the load information out of this object for modification.

Definition at line 132 of file stopover.cpp.

QJsonObject Stopover::toJson ( const Stopover stopover)

Serializes one object to JSON.

Definition at line 209 of file stopover.cpp.

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

Serializes a vector of departure objects to JSON.

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