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
115 KPUBLICTRANSPORT_PROPERTY(KPublicTransport::Disruption::Effect, disruptionEffect, setDisruptionEffect)
139 Q_PROPERTY(QList<KPublicTransport::LoadInfo> loadInformation READ loadInformationList WRITE setLoadInformationList STORED false)
151 KPUBLICTRANSPORT_PROPERTY(KPublicTransport::Vehicle, departureVehicleLayout, setDepartureVehicleLayout)
153 KPUBLICTRANSPORT_PROPERTY(KPublicTransport::Platform, departurePlatformLayout, setDeparturePlatformLayout)
155 * Note that this does not necessarily need to be the same as departureVehicleLayout, as e.g. trains
158 KPUBLICTRANSPORT_PROPERTY(KPublicTransport::Vehicle, arrivalVehicleLayout, setArrivalVehicleLayout)
160 KPUBLICTRANSPORT_PROPERTY(KPublicTransport::Platform, arrivalPlatformLayout, setArrivalPlatformLayout)
163 KPUBLICTRANSPORT_PROPERTY(KPublicTransport::IndividualTransport, individualTransport, setIndividualTransport)
180 Q_PROPERTY(KPublicTransport::Load::Category maximumOccupancy READ maximumOccupancy STORED false)
200 * This does not include the departure and arrival stops, and might be empty on backends not providing this information.
242 /** Checks if two instances refer to the same journey section (which does not necessarily mean they are exactly equal). */
248 [[nodiscard]] static JourneySection merge(const JourneySection &lhs, const JourneySection &rhs);
272 Q_INVOKABLE [[nodiscard]] static QString modeIconName(KPublicTransport::JourneySection::Mode mode);
322 Q_PROPERTY(QList<KPublicTransport::JourneySection> sections READ sectionsList WRITE setSectionsList)
350 Q_PROPERTY(KPublicTransport::Disruption::Effect disruptionEffect READ disruptionEffect STORED false)
362 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
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:738
qsizetype indexOfStopover(const Stopover &stop) const
Returns the index of stop in this journey section.
Definition journey.cpp:596
KPublicTransport::Load::Category maximumOccupancy
Maximum occpancy over all classes.
Definition journey.h:180
void setDeparture(const Stopover &departure)
Sets all departure properties from a given Stopover.
Definition journey.cpp:282
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:688
void setLoadInformation(std::vector< LoadInfo > &&loadInfo)
Set the vehicle load information for this journey section.
Definition journey.cpp:436
QString expectedArrivalPlatform
Actual arrival platform, in case real-time information are available.
Definition journey.h:108
QList< KPublicTransport::LoadInfo > loadInformation
Vehicle load information for this journey section.
Definition journey.h:139
JourneySection subsection(qsizetype begin, qsizetype end) const
Returns the sub-journey starting from index begin until end (inclusive).
Definition journey.cpp:610
void setIntermediateStops(std::vector< Stopover > &&stops)
Set the intermediate stops.
Definition journey.cpp:252
static Q_INVOKABLE QString modeIconName(KPublicTransport::JourneySection::Mode mode)
Icon representing the journey section mode mode.
Definition journey.cpp:493
KPublicTransport::Platform arrivalPlatformLayout
Platform layout information at arrival.
Definition journey.h:160
KPublicTransport::RentalVehicle rentalVehicle
Information about a rental vehicle, for sections using one.
Definition journey.h:142
bool hasIdentifiers() const
Returns true if there is any identifier set at all.
Definition journey.cpp:560
QString identifier(QAnyStringView identifierType) const
Backend-specific journey section identifiers.
Definition journey.cpp:544
void setArrival(const Stopover &arrival)
Sets all arrival properties from a given Stopover.
Definition journey.cpp:311
static QJsonObject toJson(const JourneySection §ion)
Serializes one journey section to JSON.
Definition journey.cpp:792
bool hasExpectedArrivalPlatform
true if real-time platform information are available.
Definition journey.h:110
@ RentedVehicle
free floating or dock-based rental bike service, electric scooters, car sharing services,...
Definition journey.h:52
KPublicTransport::Disruption::Effect disruptionEffect
Disruption effect on this section, if any.
Definition journey.h:115
KPublicTransport::Stopover departure
All departure information represented as Stopover object.
Definition journey.h:123
KPublicTransport::Vehicle arrivalVehicleLayout
Vehicle coach layout information at arrival.
Definition journey.h:158
KPublicTransport::Platform departurePlatformLayout
Platform layout information at departure.
Definition journey.h:153
void setStopovver(qsizetype idx, const Stopover &stop)
Set the stopover at index idx.
Definition journey.cpp:580
std::vector< Stopover > && takeIntermediateStops()
Moves the intermediate stops out of this object.
Definition journey.cpp:246
bool hasExpectedDeparturePlatform
true if real-time platform information are available.
Definition journey.h:101
QString expectedDeparturePlatform
Actual departure platform, in case real-time information are available.
Definition journey.h:99
static JourneySection fromJson(const QJsonObject &obj)
Deserialize an object from JSON.
Definition journey.cpp:862
std::vector< LoadInfo > && takeLoadInformation()
Moves the load information out of this object for modification.
Definition journey.cpp:430
KPublicTransport::Vehicle departureVehicleLayout
Vehicle coach layout information at departure.
Definition journey.h:151
std::vector< KPublicTransport::Feature > features
Features of the vehicle used on this section.
Definition journey.h:169
KPublicTransport::IndividualTransport individualTransport
Individual transport details for sections using your own vehicle.
Definition journey.h:163
bool departurePlatformChanged
true if we have real-time platform information and the platform changed.
Definition journey.h:103
KPublicTransport::Stopover arrival
All arrival information represented as Stopover object.
Definition journey.h:125
KPublicTransport::Disruption::Effect disruptionEffect
Worst disruption effect of any of the journey sections.
Definition journey.h:350
static Journey fromJson(const QJsonObject &obj)
Deserialize an object from JSON.
Definition journey.cpp:1092
QDateTime scheduledDepartureTime
Departure time of the journey, according to schedule.
Definition journey.h:324
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:1018
void setSections(std::vector< JourneySection > &§ions)
Sets the journey sections.
Definition journey.cpp:901
KPublicTransport::Load::Category maximumOccupancy
Maximum occpancy in all journey sections, over all classes.
Definition journey.h:362
QList< KPublicTransport::JourneySection > sections
Journey sections for consumption by QML.
Definition journey.h:322
static QJsonObject toJson(const Journey &journey)
Serializes one journey object to JSON.
Definition journey.cpp:1080
QDateTime scheduledArrivalTime
Arrival time of the journey, according to schedule.
Definition journey.h:335
std::vector< JourneySection > && takeSections()
Moves the journey sections out of this object.
Definition journey.cpp:895
static Journey merge(const Journey &lhs, const Journey &rhs)
Merge two instances.
Definition journey.cpp:1050
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 Feb 21 2025 11:47:40 by doxygen 1.13.2 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2025 The KDE developers.
Generated on Fri Feb 21 2025 11:47:40 by doxygen 1.13.2 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.