Search for usage in LXR

#include <platform.h>


bool hasAbsoluteLength
int length
QString name
QVariantList sections

Public Member Functions

bool hasAbsoluteLength () const
bool isEmpty () const
const std::vector< PlatformSection > & sections () const
void setSections (std::vector< PlatformSection > &&sections)
std::vector< PlatformSection > && takeSections ()

Static Public Member Functions

static Platform fromJson (const QJsonObject &obj)
static std::vector< PlatformfromJson (const QJsonArray &array)
static Platform merge (const Platform &lhs, const Platform &rhs)
static QJsonObject toJson (const Platform &platform)
static QJsonArray toJson (const std::vector< Platform > &platforms)

Detailed Description

Information about the layout of a station platform.

Definition at line 44 of file platform.h.

Property Documentation

bool Platform::hasAbsoluteLength

true if the absolute length of the platform in meter is known.

A platform can have a positive length if proportional section sizes are known, but the absolute length is unknown.

Definition at line 68 of file platform.h.

int KPublicTransport::Platform::length

Length of the platform, in meter.

Value is negative if the information is not available. Useful for display scaling from relative platform coordinates.

See also

Definition at line 59 of file platform.h.

QString KPublicTransport::Platform::name

Human readable identifier of this platform.

Typically a number.

Definition at line 52 of file platform.h.

const std::vector< PlatformSection > & Platform::sections

Platform sections for consumption by QML.

Definition at line 62 of file platform.h.

Member Function Documentation

Platform Platform::fromJson ( const QJsonObject obj)

Deserialize an object from JSON.

Definition at line 113 of file platform.cpp.

std::vector< Platform > Platform::fromJson ( const QJsonArray array)

Deserialize an array from JSON.

Definition at line 120 of file platform.cpp.

bool Platform::isEmpty ( ) const

Returns true if this object contains no information beyond default values.

Definition at line 66 of file platform.cpp.

Platform Platform::merge ( const Platform lhs,
const Platform rhs 

Merge two platform instances.

Definition at line 93 of file platform.cpp.

const std::vector<PlatformSection>& KPublicTransport::Platform::sections ( ) const

The platform sections.

void Platform::setSections ( std::vector< PlatformSection > &&  sections)

Sets the platform sections.

Definition at line 82 of file platform.cpp.

std::vector< PlatformSection > && Platform::takeSections ( )

Moves the platform sections out of this object.

Definition at line 76 of file platform.cpp.

QJsonObject Platform::toJson ( const Platform platform)

Serializes one platform object to JSON.

Definition at line 99 of file platform.cpp.

QJsonArray Platform::toJson ( const std::vector< Platform > &  platforms)

Serializes a vector of platform objects to JSON.

Definition at line 108 of file platform.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.