Search for usage in LXR

#include <path.h>

Public Types

enum  Maneuver { Move, Stairs, Elevator, Escalator }


QString description
int direction
int distance
int floorLevelChange
Maneuver maneuver
QPolygonF path

Public Member Functions

int direction () const
int distance () const
QPointF endPoint () const
QPointF startPoint () const

Static Public Member Functions

static PathSection fromJson (const QJsonObject &obj)
static std::vector< PathSectionfromJson (const QJsonArray &array)
static QJsonObject toJson (const PathSection &section)
static QJsonArray toJson (const std::vector< PathSection > &sections)

Detailed Description

A section of a Path.

A path section consists of a poly-line of geo-coordinates to follow, an initial maneuver instructions as well as additional properties for this part of the path, such as the floor level.

Definition at line 24 of file path.h.

Member Enumeration Documentation

Maneuver associated with a path section.


Move/drive with the default mode of transport for this path.


Walk up or down stairs.


Take an elevator.


Take an escalator.

Definition at line 46 of file path.h.

Property Documentation

QString KPublicTransport::PathSection::description

Human-readable description of this path segment.

Definition at line 30 of file path.h.

int PathSection::direction

The overall direction of this section in degree.

Definition at line 37 of file path.h.

int PathSection::distance

The length of this path section in meters.

Definition at line 35 of file path.h.

int KPublicTransport::PathSection::floorLevelChange

Floor level change during this path section.

Negative values indicate going down, positive values indicate going up

Definition at line 42 of file path.h.

Maneuver KPublicTransport::PathSection::maneuver

Movement maneuver for this path section.

Definition at line 54 of file path.h.

QPolygonF KPublicTransport::PathSection::path

The geo coordinate poly-line followed by this path section.

Definition at line 28 of file path.h.

Member Function Documentation

int KPublicTransport::PathSection::direction ( ) const

The overall direction of this section in degree.

0-359 for valid results, -1 for sections with no direction (e.g. points).
int KPublicTransport::PathSection::distance ( ) const

Length of this path section in meters.

QPointF PathSection::endPoint ( ) const

Last point on the path of this section.

Definition at line 62 of file path.cpp.

PathSection PathSection::fromJson ( const QJsonObject obj)

Deserialize an object from JSON.

Definition at line 87 of file path.cpp.

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

Deserialize a vector of path sections from JSON.

Definition at line 94 of file path.cpp.

QPointF PathSection::startPoint ( ) const

First point on the path of this section.

Definition at line 57 of file path.cpp.

QJsonObject PathSection::toJson ( const PathSection section)

Serializes one path section section to JSON.

Definition at line 67 of file path.cpp.

QJsonArray PathSection::toJson ( const std::vector< PathSection > &  sections)

Serializes a vector of path sections to JSON.

Definition at line 82 of file path.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 Sun Oct 17 2021 23:07:25 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.