KPublicTransport::LoadInfo

Search for usage in LXR

KPublicTransport::LoadInfo Class Reference

#include <load.h>

Properties

KPublicTransport::Load::Category load
 
QString seatingClass
 

Static Public Member Functions

static std::vector< LoadInfofromJson (const QJsonArray &array)
 
static LoadInfo fromJson (const QJsonObject &obj)
 
static QJsonObject toJson (const LoadInfo &info)
 
static QJsonArray toJson (const std::vector< LoadInfo > &loadInfos)
 

Detailed Description

Vehicle load information.

This consists of a load category and additional specifiers for which part of the vehicle this applies to, such as the class or vehicle section.

Definition at line 37 of file load.h.

Property Documentation

◆ load

KPublicTransport::Load::Category KPublicTransport::LoadInfo::load
readwrite

Load category.

Definition at line 41 of file load.h.

◆ seatingClass

QString KPublicTransport::LoadInfo::seatingClass
readwrite

Seating class, empty if not applicable.

TODO should this be the same enum as in VehicleSection?

Definition at line 45 of file load.h.

Member Function Documentation

◆ fromJson() [1/2]

std::vector< LoadInfo > LoadInfo::fromJson ( const QJsonArray & array)
static

Deserialize a list of load information from JSON.

Definition at line 41 of file load.cpp.

◆ fromJson() [2/2]

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

Deserialize an object from JSON.

Definition at line 36 of file load.cpp.

◆ toJson() [1/2]

QJsonObject LoadInfo::toJson ( const LoadInfo & info)
static

Serializes one load information object to JSON.

Definition at line 26 of file load.cpp.

◆ toJson() [2/2]

QJsonArray LoadInfo::toJson ( const std::vector< LoadInfo > & loadInfos)
static

Serializes a vector of load information objects to JSON.

Definition at line 31 of file load.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.