KPublicTransport::RentalVehicleStation

Search for usage in LXR

KPublicTransport::RentalVehicleStation Class Reference

#include <rentalvehicle.h>

Properties

int availableVehicles
 
KPublicTransport::RentalVehicle::VehicleTypes availableVehicleTypes
 
int capacity
 
bool isValid
 
KPublicTransport::RentalVehicleNetwork network
 
KPublicTransport::RentalVehicle::VehicleTypes supportedVehicleTypes
 

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
 
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 72 of file rentalvehicle.h.

Property Documentation

int KPublicTransport::RentalVehicleStation::availableVehicles
readwrite

Number of available (rentable) vehicles at this station.

Definition at line 76 of file rentalvehicle.h.

RentalVehicle::VehicleTypes KPublicTransport::RentalVehicleStation::availableVehicleTypes
read

Available vehicle types at this station.

Definition at line 91 of file rentalvehicle.h.

int KPublicTransport::RentalVehicleStation::capacity
readwrite

Number of dock positions at this station.

If capacity == availableVehicles no vehicles can be returned at this station.

Definition at line 80 of file rentalvehicle.h.

bool RentalVehicleStation::isValid
read

Not an empty/default constructed object.

Definition at line 86 of file rentalvehicle.h.

KPublicTransport::RentalVehicleNetwork KPublicTransport::RentalVehicleStation::network
readwrite

Sharing network operator.

Definition at line 83 of file rentalvehicle.h.

RentalVehicle::VehicleTypes RentalVehicleStation::supportedVehicleTypes
read

Supported vehicle types at this station.

Definition at line 89 of file rentalvehicle.h.

Member Function Documentation

int RentalVehicleStation::availableVehicles ( KPublicTransport::RentalVehicle::VehicleType  type) const

Available vehicles for a given vehicle type.

Definition at line 125 of file rentalvehicle.cpp.

int RentalVehicleStation::capacity ( KPublicTransport::RentalVehicle::VehicleType  type) const

Capacity for a given vehicle type.

Definition at line 101 of file rentalvehicle.cpp.

RentalVehicleStation RentalVehicleStation::fromJson ( const QJsonObject obj)
static

Deserialize an object from JSON.

Definition at line 208 of file rentalvehicle.cpp.

bool RentalVehicleStation::isSame ( const RentalVehicleStation lhs,
const RentalVehicleStation rhs 
)
static

Checks if two instances refer to the same station.

Definition at line 149 of file rentalvehicle.cpp.

void RentalVehicleStation::setAvailableVehicles ( RentalVehicle::VehicleType  type,
int  count 
)

Sets the number of available vehicles for a given vehicle type.

Definition at line 136 of file rentalvehicle.cpp.

void RentalVehicleStation::setCapacity ( RentalVehicle::VehicleType  type,
int  capacity 
)

Set the capacity for a specific vehicle type.

Definition at line 112 of file rentalvehicle.cpp.

QJsonObject RentalVehicleStation::toJson ( const RentalVehicleStation station)
static

Serializes one object to JSON.

Definition at line 170 of file rentalvehicle.cpp.


The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Sat Oct 16 2021 23:07:08 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.