KPublicTransport::RentalVehicle

Search for usage in LXR

#include <rentalvehicle.h>

Public Types

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

Properties

QUrl appBookingUrl
 
KPublicTransport::RentalVehicleNetwork network
 
int remainingRange
 
VehicleType type
 
QString vehicleTypeIconName
 
QUrl webBookingUrl
 

Public Member Functions

QString vehicleTypeIconName () const
 

Static Public Member Functions

static RentalVehicle fromJson (const QJsonObject &obj)
 
static QJsonObject toJson (const RentalVehicle &vehicle)
 
static Q_INVOKABLE QString vehicleTypeIconName (KPublicTransport::RentalVehicle::VehicleType type)
 

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

◆ appBookingUrl

QUrl KPublicTransport::RentalVehicle::appBookingUrl
readwrite

Deep booking link via an app.

Definition at line 63 of file rentalvehicle.h.

◆ 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.

◆ vehicleTypeIconName

QString KPublicTransport::RentalVehicle::vehicleTypeIconName
read

Icon representing the vehicle type.

Can be a qrc: URL or an XDG icon name.

Definition at line 58 of file rentalvehicle.h.

◆ webBookingUrl

QUrl KPublicTransport::RentalVehicle::webBookingUrl
readwrite

Deep booking link via a web UI.

Definition at line 61 of file rentalvehicle.h.

Member Function Documentation

◆ fromJson()

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

Deserialize an object from JSON.

Definition at line 274 of file rentalvehicle.cpp.

◆ toJson()

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

Serializes one object to JSON.

Definition at line 262 of file rentalvehicle.cpp.

◆ vehicleTypeIconName() [1/2]

QString RentalVehicle::vehicleTypeIconName ( ) const
nodiscard

Definition at line 257 of file rentalvehicle.cpp.

◆ vehicleTypeIconName() [2/2]

QString RentalVehicle::vehicleTypeIconName ( KPublicTransport::RentalVehicle::VehicleType type)
staticnodiscard

Icon representing the vehicle type.

Can be a qrc: URL or an XDG icon name.

Definition at line 239 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 Nov 29 2024 11:57:19 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.