KPublicTransport
journey.h
34 * This consists of a departure and an arrival stopover as well as zero or more intermediate stopovers.
35 * For extracting sub-journeys those can be addresses by a numeric index. Index 0 refers to the departure,
36 * 1 to N refer to the n-th intermediate stopover and N + 1 refers to the arrival, for N intermediate stops.
44 * These categories are fairly coarse, for a more detailed break-down of PublicTransport see Line::Mode.
52 RentedVehicle = 16, ///< free floating or dock-based rental bike service, electric scooters, car sharing services, ie. any vehicle you drive yourself but that isn't your own
63 Q_PROPERTY(QDateTime scheduledDepartureTime READ scheduledDepartureTime WRITE setScheduledDepartureTime STORED false)
67 Q_PROPERTY(QDateTime expectedDepartureTime READ expectedDepartureTime WRITE setExpectedDepartureTime STORED false)
74 Q_PROPERTY(QDateTime scheduledArrivalTime READ scheduledArrivalTime WRITE setScheduledArrivalTime STORED false)
78 Q_PROPERTY(QDateTime expectedArrivalTime READ expectedArrivalTime WRITE setExpectedArrivalTime STORED false)
97 Q_PROPERTY(QString scheduledDeparturePlatform READ scheduledDeparturePlatform WRITE setScheduledDeparturePlatform STORED false)
99 Q_PROPERTY(QString expectedDeparturePlatform READ expectedDeparturePlatform WRITE setExpectedDeparturePlatform STORED false)
106 Q_PROPERTY(QString scheduledArrivalPlatform READ scheduledArrivalPlatform WRITE setScheduledArrivalPlatform STORED false)
108 Q_PROPERTY(QString expectedArrivalPlatform READ expectedArrivalPlatform WRITE setExpectedArrivalPlatform STORED false)
115 KPUBLICTRANSPORT_PROPERTY(KPublicTransport::Disruption::Effect, disruptionEffect, setDisruptionEffect)
145 Q_PROPERTY(QList<KPublicTransport::LoadInfo> loadInformation READ loadInformationList WRITE setLoadInformationList STORED false)
157 KPUBLICTRANSPORT_PROPERTY(KPublicTransport::Vehicle, departureVehicleLayout, setDepartureVehicleLayout)
159 KPUBLICTRANSPORT_PROPERTY(KPublicTransport::Platform, departurePlatformLayout, setDeparturePlatformLayout)
161 * Note that this does not necessarily need to be the same as departureVehicleLayout, as e.g. trains
164 KPUBLICTRANSPORT_PROPERTY(KPublicTransport::Vehicle, arrivalVehicleLayout, setArrivalVehicleLayout)
166 KPUBLICTRANSPORT_PROPERTY(KPublicTransport::Platform, arrivalPlatformLayout, setArrivalPlatformLayout)
169 KPUBLICTRANSPORT_PROPERTY(KPublicTransport::IndividualTransport, individualTransport, setIndividualTransport)
186 Q_PROPERTY(KPublicTransport::Load::Category maximumOccupancy READ maximumOccupancy STORED false)
222 * This does not include the departure and arrival stops, and might be empty on backends not providing this information.
240 /** Checks if two instances refer to the same journey section (which does not necessarily mean they are exactly equal). */
246 [[nodiscard]] static JourneySection merge(const JourneySection &lhs, const JourneySection &rhs);
270 Q_INVOKABLE [[nodiscard]] static QString modeIconName(KPublicTransport::JourneySection::Mode mode);
320 Q_PROPERTY(QList<KPublicTransport::JourneySection> sections READ sectionsList WRITE setSectionsList)
348 Q_PROPERTY(KPublicTransport::Disruption::Effect disruptionEffect READ disruptionEffect STORED false)
360 Q_PROPERTY(KPublicTransport::Load::Category maximumOccupancy READ maximumOccupancy STORED false)
An amenity, facility or other relevant property of a vehicle (train, bus, etc), vehicle part (e....
Definition feature.h:20
KPublicTransport::Vehicle departureVehicleLayout
Vehicle coach layout information at departure.
Definition journey.h:157
bool arrivalPlatformChanged
true if we have real-time platform information and the platform changed.
Definition journey.h:112
static JourneySection merge(const JourneySection &lhs, const JourneySection &rhs)
Merge two instances.
Definition journey.cpp:800
qsizetype indexOfStopover(const Stopover &stop) const
Returns the index of stop in this journey section.
Definition journey.cpp:655
KPublicTransport::Load::Category maximumOccupancy
Maximum occpancy over all classes.
Definition journey.h:186
static bool isSame(const JourneySection &lhs, const JourneySection &rhs)
Checks if two instances refer to the same journey section (which does not necessarily mean they are e...
Definition journey.cpp:750
void setLoadInformation(std::vector< LoadInfo > &&loadInfo)
Set the vehicle load information for this journey section.
Definition journey.cpp:445
QList< KPublicTransport::LoadInfo > loadInformation
Vehicle load information for this journey section.
Definition journey.h:145
JourneySection subsection(qsizetype begin, qsizetype end) const
Returns the sub-journey starting from index begin until end (inclusive).
Definition journey.cpp:669
void setIntermediateStops(std::vector< Stopover > &&stops)
Set the intermediate stops.
Definition journey.cpp:308
KPublicTransport::Platform arrivalPlatformLayout
Platform layout information at arrival.
Definition journey.h:166
static Q_INVOKABLE QString modeIconName(KPublicTransport::JourneySection::Mode mode)
Icon representing the journey section mode mode.
Definition journey.cpp:552
KPublicTransport::RentalVehicle rentalVehicle
Information about a rental vehicle, for sections using one.
Definition journey.h:148
bool hasIdentifiers() const
Returns true if there is any identifier set at all.
Definition journey.cpp:619
QString identifier(QAnyStringView identifierType) const
Backend-specific journey section identifiers.
Definition journey.cpp:603
static QJsonObject toJson(const JourneySection §ion)
Serializes one journey section to JSON.
Definition journey.cpp:834
KPublicTransport::Stopover departure
The departure stopover of this journey section.
Definition journey.h:126
bool hasExpectedArrivalPlatform
true if real-time platform information are available.
Definition journey.h:110
KPublicTransport::Vehicle arrivalVehicleLayout
Vehicle coach layout information at arrival.
Definition journey.h:164
@ RentedVehicle
free floating or dock-based rental bike service, electric scooters, car sharing services,...
Definition journey.h:52
QString expectedDeparturePlatform
Actual departure platform, in case real-time information are available.
Definition journey.h:99
QString expectedArrivalPlatform
Actual arrival platform, in case real-time information are available.
Definition journey.h:108
void setStopovver(qsizetype idx, const Stopover &stop)
Set the stopover at index idx.
Definition journey.cpp:639
std::vector< Stopover > && takeIntermediateStops()
Moves the intermediate stops out of this object.
Definition journey.cpp:302
bool hasExpectedDeparturePlatform
true if real-time platform information are available.
Definition journey.h:101
KPublicTransport::Platform departurePlatformLayout
Platform layout information at departure.
Definition journey.h:159
static JourneySection fromJson(const QJsonObject &obj)
Deserialize an object from JSON.
Definition journey.cpp:883
std::vector< KPublicTransport::Feature > features
Features of the vehicle used on this section.
Definition journey.h:175
KPublicTransport::IndividualTransport individualTransport
Individual transport details for sections using your own vehicle.
Definition journey.h:169
bool departurePlatformChanged
true if we have real-time platform information and the platform changed.
Definition journey.h:103
KPublicTransport::Stopover arrival
The arrival stopover of this jouney section.
Definition journey.h:131
KPublicTransport::Disruption::Effect disruptionEffect
Disruption effect on this section, if any.
Definition journey.h:115
KPublicTransport::Disruption::Effect disruptionEffect
Worst disruption effect of any of the journey sections.
Definition journey.h:348
static Journey fromJson(const QJsonObject &obj)
Deserialize an object from JSON.
Definition journey.cpp:1137
QDateTime scheduledDepartureTime
Departure time of the journey, according to schedule.
Definition journey.h:322
static bool isSame(const Journey &lhs, const Journey &rhs)
Checks if two instances refer to the same journey (which does not necessarily mean they are exactly e...
Definition journey.cpp:1063
void setSections(std::vector< JourneySection > &§ions)
Sets the journey sections.
Definition journey.cpp:945
KPublicTransport::Load::Category maximumOccupancy
Maximum occpancy in all journey sections, over all classes.
Definition journey.h:360
QList< KPublicTransport::JourneySection > sections
Journey sections for consumption by QML.
Definition journey.h:320
static QJsonObject toJson(const Journey &journey)
Serializes one journey object to JSON.
Definition journey.cpp:1125
QDateTime scheduledArrivalTime
Arrival time of the journey, according to schedule.
Definition journey.h:333
std::vector< JourneySection > && takeSections()
Moves the journey sections out of this object.
Definition journey.cpp:939
static Journey merge(const Journey &lhs, const Journey &rhs)
Merge two instances.
Definition journey.cpp:1095
Information about the layout of a station platform.
Definition platform.h:45
An individual rental vehicle used on a JourneySection, ie.
Definition rentalvehicle.h:28
Information about an arrival and/or departure of a vehicle at a stop area.
Definition stopover.h:26
void stop(Ekos::AlignState mode)
Disruption information for a Departure or a JourneySection.
Definition disruption.h:21
Query operations and data types for accessing realtime public transport information from online servi...
Definition attribution.cpp:16
This file is part of the KDE documentation.
Documentation copyright © 1996-2025 The KDE developers.
Generated on Fri Mar 28 2025 11:50:13 by doxygen 1.13.2 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2025 The KDE developers.
Generated on Fri Mar 28 2025 11:50:13 by doxygen 1.13.2 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.