Search for usage in LXR

KPublicTransport::Route Class Reference

#include <line.h>


KPublicTransport::Location destination
QString direction
KPublicTransport::Line line

Static Public Member Functions

static Route fromJson (const QJsonObject &obj)
static bool isSame (const Route &lhs, const Route &rhs)
static Route merge (const Route &lhs, const Route &rhs)
static QJsonObject toJson (const Route &r)

Detailed Description

A route of a public transport line.

Definition at line 120 of file line.h.

Property Documentation

KPublicTransport::Location KPublicTransport::Route::destination

Destination of the route.

If this is set it should match the direction of the line. Circular lines for example do not have a destination location though.

Definition at line 135 of file line.h.

QString Route::direction

Direction of the route.

The direction of the the route is what is displayed on front of a train for example. For directional lines it matches the destination. For circular lines there is no destination however, the direction is then clockwise" for example.

Definition at line 130 of file line.h.

KPublicTransport::Line KPublicTransport::Route::line

Line this route belongs to.

Definition at line 124 of file line.h.

Member Function Documentation

Route Route::fromJson ( const QJsonObject obj)

Deserialize an object from JSON.

Definition at line 207 of file line.cpp.

bool Route::isSame ( const Route lhs,
const Route rhs 

Checks if to instances refer to the same route (which does not necessarily mean they are exactly equal).

Definition at line 177 of file line.cpp.

Route Route::merge ( const Route lhs,
const Route rhs 

Merge two Route instances.

This assumes isSame(lhs, rhs) and tries to preserve the most detailed information.

Definition at line 185 of file line.cpp.

QJsonObject Route::toJson ( const Route r)

Serializes one object to JSON.

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