Search for usage in LXR

KPublicTransport::RentalVehicleStation Class Reference

#include <rentalvehicle.h>


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

Definition at line 84 of file rentalvehicle.h.

Property Documentation

◆ availableVehicles

int KPublicTransport::RentalVehicleStation::availableVehicles

Number of available (rentable) vehicles at this station.

Definition at line 88 of file rentalvehicle.h.

◆ availableVehicleTypes

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

Available vehicle types at this station.

Definition at line 103 of file rentalvehicle.h.

◆ capacity

int KPublicTransport::RentalVehicleStation::capacity

Number of dock positions at this station.

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

Definition at line 92 of file rentalvehicle.h.

◆ isValid

bool KPublicTransport::RentalVehicleStation::isValid

Not an empty/default constructed object.

Definition at line 98 of file rentalvehicle.h.

◆ network

KPublicTransport::RentalVehicleNetwork KPublicTransport::RentalVehicleStation::network

Sharing network operator.

Definition at line 95 of file rentalvehicle.h.

◆ supportedVehicleTypes

KPublicTransport::RentalVehicle::VehicleTypes KPublicTransport::RentalVehicleStation::supportedVehicleTypes

Supported vehicle types at this station.

Definition at line 101 of file rentalvehicle.h.

Member Function Documentation

◆ availableVehicles()

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

Available vehicles for a given vehicle type.

Definition at line 127 of file rentalvehicle.cpp.

◆ availableVehicleTypes()

RentalVehicle::VehicleTypes KPublicTransport::RentalVehicleStation::availableVehicleTypes ( ) const

Definition at line 91 of file rentalvehicle.cpp.

◆ capacity()

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

Capacity for a given vehicle type.

Definition at line 103 of file rentalvehicle.cpp.

◆ fromJson()

RentalVehicleStation RentalVehicleStation::fromJson ( const QJsonObject & obj)

Deserialize an object from JSON.

Definition at line 210 of file rentalvehicle.cpp.

◆ isSame()

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

Checks if two instances refer to the same station.

Definition at line 151 of file rentalvehicle.cpp.

◆ isValid()

bool RentalVehicleStation::isValid ( ) const

Definition at line 74 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 138 of file rentalvehicle.cpp.

◆ setCapacity()

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

Set the capacity for a specific vehicle type.

Definition at line 114 of file rentalvehicle.cpp.

◆ supportedVehicleTypes()

RentalVehicle::VehicleTypes RentalVehicleStation::supportedVehicleTypes ( ) const

Definition at line 79 of file rentalvehicle.cpp.

◆ toJson()

QJsonObject RentalVehicleStation::toJson ( const RentalVehicleStation & station)

Serializes one object to JSON.

Definition at line 172 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-2024 The KDE developers.
Generated on Fri Jul 12 2024 11:50:22 by doxygen 1.11.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.