KPublicTransport
rentalvehicle.h
17/** An individual rental vehicle used on a JourneySection, ie. a vehicle you don't own yourself but have to drive yourself.
24 * @see GBFS: https://github.com/NABSA/gbfs/blob/v2.1-RC/gbfs.md#vehicle_typesjson-added-in-v21-rc
25 * @see MDS: https://github.com/openmobilityfoundation/mobility-data-specification/blob/master/provider/README.md#vehicle-types
36 ElectricKickScooter = 4, ///< "e scooter", electrically assisted kick scooters, not to be confused with motorcycle-like scooters
75 Q_INVOKABLE [[nodiscard]] static QString vehicleTypeIconName(KPublicTransport::RentalVehicle::VehicleType type);
110 Q_PROPERTY(KPublicTransport::RentalVehicle::VehicleTypes supportedVehicleTypes READ supportedVehicleTypes STORED false)
112 Q_PROPERTY(KPublicTransport::RentalVehicle::VehicleTypes availableVehicleTypes READ availableVehicleTypes STORED false)
125 [[nodiscard]] Q_INVOKABLE int capacity(KPublicTransport::RentalVehicle::VehicleType type) const;
130 [[nodiscard]] Q_INVOKABLE int availableVehicles(KPublicTransport::RentalVehicle::VehicleType type) const;
137 [[nodiscard]] static bool isSame(const RentalVehicleStation &lhs, const RentalVehicleStation &rhs);
158 KPUBLICTRANSPORT_PROPERTY(KPublicTransport::RentalVehicle::VehicleTypes, vehicleTypes, setVehicleTypes)
167 [[nodiscard]] static bool isSame(const RentalVehicleNetwork &lhs, const RentalVehicleNetwork &rhs);
A vehicle sharing system/network.
Definition rentalvehicle.h:153
static RentalVehicleNetwork fromJson(const QJsonObject &obj)
Deserialize an object from JSON.
Definition rentalvehicle.cpp:68
static QJsonObject toJson(const RentalVehicleNetwork &network)
Serializes one object to JSON.
Definition rentalvehicle.cpp:63
static bool isSame(const RentalVehicleNetwork &lhs, const RentalVehicleNetwork &rhs)
Checks if two instances refer to the same network.
Definition rentalvehicle.cpp:58
KPublicTransport::RentalVehicle::VehicleTypes vehicleTypes
Supported vehicle types by this network.
Definition rentalvehicle.h:158
Additional information for a vehicle renting station, attached to Location objects.
Definition rentalvehicle.h:94
static RentalVehicleStation fromJson(const QJsonObject &obj)
Deserialize an object from JSON.
Definition rentalvehicle.cpp:225
KPublicTransport::RentalVehicleNetwork network
Sharing network operator.
Definition rentalvehicle.h:104
KPublicTransport::RentalVehicle::VehicleTypes supportedVehicleTypes
Supported vehicle types at this station.
Definition rentalvehicle.h:110
int availableVehicles
Number of available (rentable) vehicles at this station.
Definition rentalvehicle.h:97
static bool isSame(const RentalVehicleStation &lhs, const RentalVehicleStation &rhs)
Checks if two instances refer to the same station.
Definition rentalvehicle.cpp:166
void setAvailableVehicles(RentalVehicle::VehicleType type, int count)
Sets the number of available vehicles for a given vehicle type.
Definition rentalvehicle.cpp:142
void setCapacity(RentalVehicle::VehicleType type, int capacity)
Set the capacity for a specific vehicle type.
Definition rentalvehicle.cpp:118
static QJsonObject toJson(const RentalVehicleStation &station)
Serializes one object to JSON.
Definition rentalvehicle.cpp:187
KPublicTransport::RentalVehicle::VehicleTypes availableVehicleTypes
Available vehicle types at this station.
Definition rentalvehicle.h:112
An individual rental vehicle used on a JourneySection, ie.
Definition rentalvehicle.h:28
@ ElectricKickScooter
"e scooter", electrically assisted kick scooters, not to be confused with motorcycle-like scooters
Definition rentalvehicle.h:36
static RentalVehicle fromJson(const QJsonObject &obj)
Deserialize an object from JSON.
Definition rentalvehicle.cpp:295
static QJsonObject toJson(const RentalVehicle &vehicle)
Serializes one object to JSON.
Definition rentalvehicle.cpp:283
KPublicTransport::RentalVehicleNetwork network
Sharing network operator.
Definition rentalvehicle.h:48
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 7 2025 11:46:15 by doxygen 1.13.2 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2025 The KDE developers.
Generated on Fri Feb 7 2025 11:46:15 by doxygen 1.13.2 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.