Search for usage in LXR

#include <path.h>


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 100 of file path.h.

Property Documentation

◆ distance

int KPublicTransport::Path::distance

The length of this path in meters.

Definition at line 110 of file path.h.

◆ sectionCount

int KPublicTransport::Path::sectionCount

Number of path sections for QML.

Definition at line 107 of file path.h.

◆ sections

std::vector<KPublicTransport::PathSection> KPublicTransport::Path::sections

Access to path sections for QML.

Definition at line 105 of file path.h.

Member Function Documentation

◆ distance()

int Path::distance ( ) const

Length of this path in meters.

Definition at line 153 of file path.cpp.

◆ endPoint()

QPointF Path::endPoint ( ) const

Last point on this path.

Definition at line 163 of file path.cpp.

◆ fromJson()

Path Path::fromJson ( const QJsonObject & obj)

Deserialize an object from JSON.

Definition at line 175 of file path.cpp.

◆ isEmpty()

bool Path::isEmpty ( ) const

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

Definition at line 131 of file path.cpp.

◆ sections()

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

The path sections.

Definition at line 136 of file path.cpp.

◆ setSections()

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

Sets the path sections.

Definition at line 147 of file path.cpp.

◆ startPoint()

QPointF Path::startPoint ( ) const

First point on this path.

Definition at line 158 of file path.cpp.

◆ takeSections()

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

Moves the path sections out of this object.

Definition at line 141 of file path.cpp.

◆ toJson()

QJsonObject Path::toJson ( const Path & path)

Serializes one path object to JSON.

Definition at line 168 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-2024 The KDE developers.
Generated on Fri Jul 12 2024 11:50:22 by doxygen 1.11.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.