KPublicTransport::RentalVehicleStation
#include <rentalvehicle.h>
Public Member Functions | |
Q_INVOKABLE int | availableVehicles (KPublicTransport::RentalVehicle::VehicleType type) const |
RentalVehicle::VehicleTypes | availableVehicleTypes () const |
Q_INVOKABLE int | capacity (KPublicTransport::RentalVehicle::VehicleType type) const |
QString | iconName () const |
bool | isValid () const |
void | setAvailableVehicles (RentalVehicle::VehicleType type, int count) |
void | setCapacity (RentalVehicle::VehicleType type, int capacity) |
RentalVehicle::VehicleTypes | supportedVehicleTypes () const |
Static Public Member Functions | |
static RentalVehicleStation | fromJson (const QJsonObject &obj) |
static bool | isSame (const RentalVehicleStation &lhs, const RentalVehicleStation &rhs) |
static QJsonObject | toJson (const RentalVehicleStation &station) |
Detailed Description
Additional information for a vehicle renting station, attached to Location objects.
This is typically needed for dock-based bike sharing systems.
- See also
- https://github.com/NABSA/gbfs/blob/master/gbfs.md#station_informationjson
- https://github.com/NABSA/gbfs/blob/master/gbfs.md#station_statusjson
Definition at line 89 of file rentalvehicle.h.
Property Documentation
◆ availableVehicles
|
readwrite |
Number of available (rentable) vehicles at this station.
Definition at line 93 of file rentalvehicle.h.
◆ availableVehicleTypes
|
read |
Available vehicle types at this station.
Definition at line 108 of file rentalvehicle.h.
◆ capacity
|
readwrite |
Number of dock positions at this station.
If capacity == availableVehicles no vehicles can be returned at this station.
Definition at line 97 of file rentalvehicle.h.
◆ iconName
|
read |
Icon representing this rental vehicle station.
Can be a qrc: URL or an XDG icon name.
Definition at line 113 of file rentalvehicle.h.
◆ isValid
|
read |
Not an empty/default constructed object.
Definition at line 103 of file rentalvehicle.h.
◆ network
|
readwrite |
Sharing network operator.
Definition at line 100 of file rentalvehicle.h.
◆ supportedVehicleTypes
|
read |
Supported vehicle types at this station.
Definition at line 106 of file rentalvehicle.h.
Member Function Documentation
◆ availableVehicles()
|
nodiscard |
Available vehicles for a given vehicle type.
Definition at line 129 of file rentalvehicle.cpp.
◆ availableVehicleTypes()
|
nodiscard |
Definition at line 93 of file rentalvehicle.cpp.
◆ capacity()
|
nodiscard |
Capacity for a given vehicle type.
Definition at line 105 of file rentalvehicle.cpp.
◆ fromJson()
|
staticnodiscard |
Deserialize an object from JSON.
Definition at line 223 of file rentalvehicle.cpp.
◆ iconName()
|
nodiscard |
Definition at line 153 of file rentalvehicle.cpp.
◆ isSame()
|
staticnodiscard |
Checks if two instances refer to the same station.
Definition at line 164 of file rentalvehicle.cpp.
◆ isValid()
|
nodiscard |
Definition at line 76 of file rentalvehicle.cpp.
◆ setAvailableVehicles()
void RentalVehicleStation::setAvailableVehicles | ( | RentalVehicle::VehicleType | type, |
int | count ) |
Sets the number of available vehicles for a given vehicle type.
Definition at line 140 of file rentalvehicle.cpp.
◆ setCapacity()
void RentalVehicleStation::setCapacity | ( | RentalVehicle::VehicleType | type, |
int | capacity ) |
Set the capacity for a specific vehicle type.
Definition at line 116 of file rentalvehicle.cpp.
◆ supportedVehicleTypes()
|
nodiscard |
Definition at line 81 of file rentalvehicle.cpp.
◆ toJson()
|
staticnodiscard |
Serializes one object to JSON.
Definition at line 185 of file rentalvehicle.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.