KPublicTransport::Feature
#include <feature.h>
Properties | |
Availability | availability |
QString | description |
QString | displayName |
KPublicTransport::Disruption::Effect | disruptionEffect |
QString | name |
int | quantity |
Type | type |
QString | typeIconName |
Public Member Functions | |
Feature (Type type, Availability availability=Available) | |
QString | displayName () const |
QString | typeIconName () const |
Static Public Member Functions | |
static std::vector< Feature > | fromJson (const QJsonArray &array) |
static Feature | fromJson (const QJsonObject &obj) |
static bool | isSame (const Feature &lhs, const Feature &rhs) |
static Feature | merge (const Feature &lhs, const Feature &rhs) |
static QJsonObject | toJson (const Feature &feature) |
static QJsonArray | toJson (const std::vector< Feature > &features) |
static QString | typeDisplayName (KPublicTransport::Feature::Type type) |
static QString | typeIconName (KPublicTransport::Feature::Type type) |
Detailed Description
An amenity, facility or other relevant property of a vehicle (train, bus, etc), vehicle part (e.g.
train coach) or location.
Property Documentation
◆ availability
|
readwrite |
◆ description
|
readwrite |
◆ displayName
|
read |
◆ disruptionEffect
|
readwrite |
◆ name
|
readwrite |
◆ quantity
|
readwrite |
◆ type
◆ typeIconName
|
read |
Icon representing the given feature type type
.
Can be an qrc: URL or a icon name compatbile with QIcon::fromTheme.
Constructor & Destructor Documentation
◆ Feature()
|
explicit |
Convenience constructor for a Feature of type type
and availability availability
.
Definition at line 36 of file feature.cpp.
Member Function Documentation
◆ displayName()
|
nodiscard |
Definition at line 43 of file feature.cpp.
◆ fromJson() [1/2]
|
staticnodiscard |
Deserialize a vector of features from JSON.
Definition at line 148 of file feature.cpp.
◆ fromJson() [2/2]
|
staticnodiscard |
Deserialize an object from JSON.
Definition at line 143 of file feature.cpp.
◆ isSame()
Returns true
if both features refer to the same thing.
This doesn't mean they are identical, nor does this consider the context a feature belongs to.
Definition at line 153 of file feature.cpp.
◆ merge()
Merge two features referring to the same thing.
Definition at line 178 of file feature.cpp.
◆ toJson() [1/2]
|
staticnodiscard |
Serializes one object to JSON.
Definition at line 129 of file feature.cpp.
◆ toJson() [2/2]
|
staticnodiscard |
Serializes a vector of features to JSON.
Definition at line 138 of file feature.cpp.
◆ typeDisplayName()
|
staticnodiscard |
Generic display name for feature of type
.
Definition at line 48 of file feature.cpp.
◆ typeIconName() [1/2]
|
nodiscard |
Definition at line 86 of file feature.cpp.
◆ typeIconName() [2/2]
|
staticnodiscard |
Icon representing the given feature type type
.
Can be an qrc: URL or a icon name compatbile with QIcon::fromTheme.
Definition at line 91 of file feature.cpp.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:07:52 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.