KPublicTransport::Path

Search for usage in LXR

#include <path.h>

Properties

int distance
 
int sectionCount
 
std::vector< KPublicTransport::PathSectionsections
 

Public Member Functions

int distance () const
 
QPointF endPoint () const
 
bool isEmpty () const
 
const std::vector< PathSection > & sections () const
 
void setSections (std::vector< PathSection > &&sections)
 
QPointF startPoint () const
 
std::vector< PathSection > && takeSections ()
 

Static Public Member Functions

static Path fromJson (const QJsonObject &obj)
 
static QJsonObject toJson (const Path &path)
 

Detailed Description

A path followed by any kind of location change.

This can be the way a train or bus takes, routing instructions for taking a rental vehicle, or instructions for transferring at a train station.

A path consists of one or more PathSection.

Definition at line 88 of file path.h.

Property Documentation

int Path::distance
read

The length of this path in meters.

Definition at line 98 of file path.h.

int Path::sectionCount
read

Number of path sections for QML.

Definition at line 95 of file path.h.

const std::vector< PathSection > & Path::sections
read

Access to path sections for QML.

Definition at line 93 of file path.h.

Member Function Documentation

int KPublicTransport::Path::distance ( ) const

Length of this path in meters.

QPointF Path::endPoint ( ) const

Last point on this path.

Definition at line 141 of file path.cpp.

Path Path::fromJson ( const QJsonObject obj)
static

Deserialize an object from JSON.

Definition at line 153 of file path.cpp.

bool Path::isEmpty ( ) const

Returns true if this is an empty/not-set path.

Definition at line 109 of file path.cpp.

const std::vector<PathSection>& KPublicTransport::Path::sections ( ) const

The path sections.

void Path::setSections ( std::vector< PathSection > &&  sections)

Sets the path sections.

Definition at line 125 of file path.cpp.

QPointF Path::startPoint ( ) const

First point on this path.

Definition at line 136 of file path.cpp.

std::vector< PathSection > && Path::takeSections ( )

Moves the path sections out of this object.

Definition at line 119 of file path.cpp.

QJsonObject Path::toJson ( const Path path)
static

Serializes one path object to JSON.

Definition at line 146 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 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.