KPublicTransport::IndividualTransport
#include <individualtransport.h>
Public Types | |
enum | Mode { Walk , Bike , Car } |
enum | Qualifier { None , Park , Rent , Dropoff , Pickup } |
Properties | |
Mode | mode |
QString | modeIconName |
Qualifier | qualifier |
Public Member Functions | |
IndividualTransport (Mode mode, Qualifier qualifier=None) | |
QString | modeIconName () const |
bool | operator!= (const IndividualTransport &other) const |
bool | operator== (const IndividualTransport &other) const |
Static Public Member Functions | |
static std::vector< IndividualTransport > | fromJson (const QJsonArray &array) |
static IndividualTransport | fromJson (const QJsonObject &obj) |
static std::vector< IndividualTransport > | fromVariant (const QVariantList &v) |
static Q_INVOKABLE QString | modeIconName (KPublicTransport::IndividualTransport::Mode mode) |
static QJsonObject | toJson (const IndividualTransport &it) |
static QJsonArray | toJson (const std::vector< IndividualTransport > &its) |
Detailed Description
Individual transport mode details for a journey section, and for specifying journey requests.
Definition at line 18 of file individualtransport.h.
Member Enumeration Documentation
◆ Mode
Mode of (individual) transportation.
Definition at line 23 of file individualtransport.h.
◆ Qualifier
Qualifier on how the mode of transport is used.
Definition at line 39 of file individualtransport.h.
Property Documentation
◆ mode
|
readwrite |
Definition at line 29 of file individualtransport.h.
◆ modeIconName
|
read |
Name of an icon to represent this transport mode.
This does not consider the Qualifier value. Can be an qrc: URL or a icon name compatbile with QIcon::fromTheme.
Definition at line 35 of file individualtransport.h.
◆ qualifier
|
readwrite |
Definition at line 47 of file individualtransport.h.
Constructor & Destructor Documentation
◆ IndividualTransport()
IndividualTransport::IndividualTransport | ( | IndividualTransport::Mode | mode, |
IndividualTransport::Qualifier | qualifier = None ) |
Definition at line 31 of file individualtransport.cpp.
Member Function Documentation
◆ fromJson() [1/2]
|
staticnodiscard |
Deserialize a list of journey from JSON.
Definition at line 82 of file individualtransport.cpp.
◆ fromJson() [2/2]
|
staticnodiscard |
Deserialize an object from JSON.
Definition at line 77 of file individualtransport.cpp.
◆ fromVariant()
|
staticnodiscard |
for QML bindings only
Definition at line 87 of file individualtransport.cpp.
◆ modeIconName() [1/2]
|
nodiscard |
Definition at line 62 of file individualtransport.cpp.
◆ modeIconName() [2/2]
|
staticnodiscard |
Name of an icon to represent mode
.
Can be an qrc: URL or a icon name compatbile with QIcon::fromTheme.
Definition at line 48 of file individualtransport.cpp.
◆ operator!=()
|
nodiscard |
Definition at line 43 of file individualtransport.cpp.
◆ operator==()
|
nodiscard |
Definition at line 38 of file individualtransport.cpp.
◆ toJson() [1/2]
|
staticnodiscard |
Serializes one object to JSON.
Definition at line 67 of file individualtransport.cpp.
◆ toJson() [2/2]
|
staticnodiscard |
Serializes a vector of objects to JSON.
Definition at line 72 of file individualtransport.cpp.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Oct 11 2024 12:12:54 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.