KPublicTransport
vehicle.h
34 * 0 representing the begin of the platform in platform coordinate (@see Platform), 1 being the opposite end.
38 * 0 representing the begin of the platform in platform coordinate (@see Platform), 1 being the opposite end.
46 PowerCar, ///< power car of a train, similar to Engine, distinction exists just for better visualization
47 ControlCar, ///< usually at the head of the train, but accessible for passengers and the same way as a PassengerCar
73 Q_PROPERTY(std::vector<KPublicTransport::Feature> sectionFeatures READ sectionFeatures STORED false)
82 Q_INVOKABLE [[nodiscard]] KPublicTransport::Feature feature(KPublicTransport::Feature::Type type) const;
107 KPUBLICTRANSPORT_PROPERTY(KPublicTransport::Disruption::Effect, disruptionEffect, setDisruptionEffect)
124 Q_INVOKABLE [[nodiscard]] static QString vehicleTypeIconName(KPublicTransport::VehicleSection::Type type);
134 [[nodiscard]] static VehicleSection merge(const VehicleSection &lhs, const VehicleSection &rhs);
178 * 0 representing the begin of the platform in platform coordinate (@see Platform), 1 being the opposite end.
182 * 0 representing the begin of the platform in platform coordinate (@see Platform), 1 being the opposite end.
An amenity, facility or other relevant property of a vehicle (train, bus, etc), vehicle part (e....
Definition feature.h:20
QString name
Human readable identifier of this section, typically the coach number.
Definition vehicle.h:31
std::vector< KPublicTransport::Feature > sectionFeatures
Features of this section, for consumption by QML.
Definition vehicle.h:73
QString platformSectionName
Name of the platform section(s) this coach is position in.
Definition vehicle.h:115
KPublicTransport::Disruption::Effect disruptionEffect
Distruption affecting this coach.
Definition vehicle.h:107
float platformPositionBegin
Relative position [0-1] of the begin of this vehicle section on the platform.
Definition vehicle.h:36
Sides connectedSides
Sides on which this vehicle section is connected to neighboring sections in a way that passengers can...
Definition vehicle.h:102
float platformPositionEnd
Relative position [0-1] of the end of this vehicle section on the platform.
Definition vehicle.h:40
static QJsonObject toJson(const Vehicle &vehicle)
Serializes one vehicle object to JSON.
Definition vehicle.cpp:264
void setSections(std::vector< VehicleSection > &§ions)
Sets the vehicle sections.
Definition vehicle.cpp:192
float platformPositionBegin
Relative position [0-1] of the begin of this vehicle on the platform.
Definition vehicle.h:180
bool hasPlatformPositions() const
Checks whether all vehicle sections have platform positions set.
Definition vehicle.cpp:294
static Vehicle fromJson(const QJsonObject &obj)
Deserialize an object from JSON.
Definition vehicle.cpp:281
float platformPositionEnd
Relative position [0-1] of the end of this vehicle on the platform.
Definition vehicle.h:184
bool hasPlatformSectionNames() const
Check whether all vehicle sections have platform section names set.
Definition vehicle.cpp:299
std::vector< KPublicTransport::Feature > combinedFeatures
Features of the entire vehicle including a union of all features of the individual sections.
Definition vehicle.h:190
bool isEmpty() const
Returns true if this object contains no information beyond the default values.
Definition vehicle.cpp:176
std::vector< KPublicTransport::Feature > features
Features of this vehicle as a whole, not including the features of individual sections.
Definition vehicle.h:187
std::vector< VehicleSection > && takeSections()
Moves the vehicle sections out of this object.
Definition vehicle.cpp:186
Q_INVOKABLE float platformPositionForSection(const QString §ionName) const
Returns the center position of the vehicle section named sectionName in relative platform coordinates...
Definition vehicle.cpp:230
static Vehicle merge(const Vehicle &lhs, const Vehicle &rhs)
Merge two Vehicle instances.
Definition vehicle.cpp:240
QString name
Human readable identifier of this vehicle, typically a train number.
Definition vehicle.h:162
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 Jan 31 2025 11:52:18 by doxygen 1.13.2 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2025 The KDE developers.
Generated on Fri Jan 31 2025 11:52:18 by doxygen 1.13.2 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.