KPublicTransport::RentalVehicle
#include <rentalvehicle.h>
Public Types | |
enum | VehicleType { Unknown = 0 , Bicycle = 1 , Pedelec = 2 , ElectricKickScooter = 4 , ElectricMoped = 8 , Car = 16 } |
typedef QFlags< VehicleType > | VehicleTypes |
Properties | |
QUrl | appBookingUrl |
KPublicTransport::RentalVehicleNetwork | network |
int | remainingRange |
VehicleType | type |
QString | vehicleTypeIconName |
QUrl | webBookingUrl |
Public Member Functions | |
QString | vehicleTypeIconName () const |
Static Public Member Functions | |
static RentalVehicle | fromJson (const QJsonObject &obj) |
static QJsonObject | toJson (const RentalVehicle &vehicle) |
static Q_INVOKABLE QString | vehicleTypeIconName (KPublicTransport::RentalVehicle::VehicleType type) |
Detailed Description
An individual rental vehicle used on a JourneySection, ie.
a vehicle you don't own yourself but have to drive yourself. This can be:
- free floating or dock-based rental bikes, with or without electric assistance
- car sharing (but not ride sharing)
- electric (kick) scooters
- electric motorcycles (scooters)
- See also
- GBFS: https://github.com/NABSA/gbfs/blob/v2.1-RC/gbfs.md#vehicle_typesjson-added-in-v21-rc
- MDS: https://github.com/openmobilityfoundation/mobility-data-specification/blob/master/provider/README.md#vehicle-types
Definition at line 27 of file rentalvehicle.h.
Member Typedef Documentation
◆ VehicleTypes
Definition at line 41 of file rentalvehicle.h.
Member Enumeration Documentation
◆ VehicleType
Type of vehicle.
Definition at line 32 of file rentalvehicle.h.
Property Documentation
◆ appBookingUrl
|
readwrite |
Deep booking link via an app.
Definition at line 63 of file rentalvehicle.h.
◆ network
|
readwrite |
Sharing network operator.
Definition at line 48 of file rentalvehicle.h.
◆ remainingRange
|
readwrite |
Remaining range of the vehicle in meters.
Negative if unknown.
Definition at line 53 of file rentalvehicle.h.
◆ type
|
readwrite |
Vehicle type.
Definition at line 45 of file rentalvehicle.h.
◆ vehicleTypeIconName
|
read |
Icon representing the vehicle type.
Can be a qrc: URL or an XDG icon name.
Definition at line 58 of file rentalvehicle.h.
◆ webBookingUrl
|
readwrite |
Deep booking link via a web UI.
Definition at line 61 of file rentalvehicle.h.
Member Function Documentation
◆ fromJson()
|
staticnodiscard |
Deserialize an object from JSON.
Definition at line 274 of file rentalvehicle.cpp.
◆ toJson()
|
staticnodiscard |
Serializes one object to JSON.
Definition at line 262 of file rentalvehicle.cpp.
◆ vehicleTypeIconName() [1/2]
|
nodiscard |
Definition at line 257 of file rentalvehicle.cpp.
◆ vehicleTypeIconName() [2/2]
|
staticnodiscard |
Icon representing the vehicle type.
Can be a qrc: URL or an XDG icon name.
Definition at line 239 of file rentalvehicle.cpp.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Nov 29 2024 11:57:19 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.