KPublicTransport::RentalVehicle

Search for usage in LXR

KPublicTransport::RentalVehicle Class Reference

#include <rentalvehicle.h>

Public Types

enum  VehicleType {
  Unknown = 0 , Bicycle = 1 , Pedelec = 2 , ElectricKickScooter = 4 ,
  ElectricMoped = 8 , Car = 16
}
 
typedef QFlags< VehicleTypeVehicleTypes
 

Properties

KPublicTransport::RentalVehicleNetwork network
 
int remainingRange
 
VehicleType type
 

Static Public Member Functions

static RentalVehicle fromJson (const QJsonObject &obj)
 
static QJsonObject toJson (const RentalVehicle &vehicle)
 

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

Member Enumeration Documentation

◆ VehicleType

Type of vehicle.

Enumerator
Bicycle 

human-powered bicylce

Pedelec 

bicycle with electric assistance

ElectricKickScooter 

"e scooter", electrically assisted kick scooters, not to be confused with motorcycle-like scooters

ElectricMoped 

motorcycle-like electric scooters

Car 

electrical- or combustion-powered car

Definition at line 32 of file rentalvehicle.h.

Property Documentation

◆ network

KPublicTransport::RentalVehicleNetwork KPublicTransport::RentalVehicle::network
readwrite

Sharing network operator.

Definition at line 48 of file rentalvehicle.h.

◆ remainingRange

int KPublicTransport::RentalVehicle::remainingRange
readwrite

Remaining range of the vehicle in meters.

Negative if unknown.

Definition at line 53 of file rentalvehicle.h.

◆ type

VehicleType KPublicTransport::RentalVehicle::type
readwrite

Vehicle type.

Definition at line 45 of file rentalvehicle.h.

Member Function Documentation

◆ fromJson()

RentalVehicle RentalVehicle::fromJson ( const QJsonObject & obj)
static

Deserialize an object from JSON.

Definition at line 234 of file rentalvehicle.cpp.

◆ toJson()

QJsonObject RentalVehicle::toJson ( const RentalVehicle & vehicle)
static

Serializes one object to JSON.

Definition at line 222 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 Tue Mar 26 2024 11:13:06 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.