#include <RoutingInstruction.h>

Public Types

enum  TurnType {
  Unknown = 0, Continue = 13, Merge = 14, Straight = 1,
  SlightRight = 2, Right = 3, SharpRight = 4, TurnAround = 5,
  SharpLeft = 6, Left = 7, SlightLeft = 8, RoundaboutFirstExit = 9,
  RoundaboutSecondExit = 10, RoundaboutThirdExit = 11, RoundaboutExit = 12, ExitLeft = 15,
  ExitRight = 16

Public Member Functions

 RoutingInstruction (const RoutingWaypoint &item=RoutingWaypoint())
qreal angleToPredecssor () const
bool append (const RoutingWaypoint &item, int angle)
qreal distance () const
qreal distanceFromStart () const
qreal distanceToEnd () const
QString instructionText () const
QVector< RoutingPointintersectionPoints () const
QString nextDistanceInstruction () const
QString nextRoadInstruction () const
QVector< RoutingWaypointpoints () const
RoutingInstructionpredecessor ()
const RoutingInstructionpredecessor () const
QString roadName () const
QString roadType () const
int secondsLeft () const
void setPredecessor (RoutingInstruction *predecessor)
void setSuccessor (RoutingInstruction *successor)
RoutingInstructionsuccessor ()
const RoutingInstructionsuccessor () const
QString totalDurationRemaining () const
TurnType turnType () const

Static Public Member Functions

static QString generateRoadInstruction (TurnType turnType, const QString &roadName)

Protected Member Functions

int roundaboutExitNumber () const

Detailed Description

Stores data related to one instruction: Road name, angle to predecessor, associated waypoints etc.

Can be streamed directly to a QTextStream.

Definition at line 30 of file RoutingInstruction.h.

Constructor & Destructor Documentation

Marble::RoutingInstruction::RoutingInstruction ( const RoutingWaypoint item = RoutingWaypoint())


Definition at line 22 of file RoutingInstruction.cpp.

Member Function Documentation

qreal Marble::RoutingInstruction::angleToPredecssor ( ) const

The angle between the two turn roads, in radians.

Definition at line 182 of file RoutingInstruction.cpp.

bool Marble::RoutingInstruction::append ( const RoutingWaypoint item,
int  angle 

Append data of the given item, returns true if item's street name matches instructions street name.

Definition at line 31 of file RoutingInstruction.cpp.

qreal Marble::RoutingInstruction::distance ( ) const

The accumulated distance of all waypoints belonging to this instruction.

Definition at line 219 of file RoutingInstruction.cpp.

qreal Marble::RoutingInstruction::distanceFromStart ( ) const

The distance from the route start.

Definition at line 229 of file RoutingInstruction.cpp.

qreal Marble::RoutingInstruction::distanceToEnd ( ) const

The distance to the route end.

Includes the own distance

Definition at line 240 of file RoutingInstruction.cpp.

QString Marble::RoutingInstruction::instructionText ( ) const

Formats the instruction for a human reader.

Definition at line 351 of file RoutingInstruction.cpp.

QVector< RoutingPoint > Marble::RoutingInstruction::intersectionPoints ( ) const

Contains the intersection point and points near it on the previous and current road.

Near is taken as that waypoint with the largest different to the intersection point that does not exceed 50 meter.

Definition at line 177 of file RoutingInstruction.cpp.

QString Marble::RoutingInstruction::nextDistanceInstruction ( ) const

Formats the instruction (distance to next instruction) for a human reader.

Definition at line 292 of file RoutingInstruction.cpp.

QString Marble::RoutingInstruction::nextRoadInstruction ( ) const

Formats the instruction (road name) for a human reader.

Definition at line 251 of file RoutingInstruction.cpp.

QVector< RoutingWaypoint > Marble::RoutingInstruction::points ( ) const

Waypoints from the last instruction to this instruction.

Definition at line 172 of file RoutingInstruction.cpp.

RoutingInstruction * Marble::RoutingInstruction::predecessor ( )

Previous turn road.

Will be 0 for the first one (route start)

Definition at line 187 of file RoutingInstruction.cpp.

const RoutingInstruction * Marble::RoutingInstruction::predecessor ( ) const

Const overload for predecessor.

Definition at line 192 of file RoutingInstruction.cpp.

QString Marble::RoutingInstruction::roadName ( ) const

Name of the road to turn into.

Definition at line 68 of file RoutingInstruction.cpp.

QString Marble::RoutingInstruction::roadType ( ) const

OSM type of the road to turn into.

Definition at line 73 of file RoutingInstruction.cpp.

int Marble::RoutingInstruction::secondsLeft ( ) const

Estimated number of seconds to the route destination.

Definition at line 78 of file RoutingInstruction.cpp.

void Marble::RoutingInstruction::setPredecessor ( RoutingInstruction predecessor)

Change the predecessor.

Definition at line 197 of file RoutingInstruction.cpp.

void Marble::RoutingInstruction::setSuccessor ( RoutingInstruction successor)

Change the successor.

Definition at line 214 of file RoutingInstruction.cpp.

RoutingInstruction * Marble::RoutingInstruction::successor ( )

Next turn road.

Will be 0 for the last one (destination)

Definition at line 204 of file RoutingInstruction.cpp.

const RoutingInstruction * Marble::RoutingInstruction::successor ( ) const

Const overload for successor.

Definition at line 209 of file RoutingInstruction.cpp.

QString Marble::RoutingInstruction::totalDurationRemaining ( ) const

Formats the instruction (duration to destination) for a human reader.

Definition at line 331 of file RoutingInstruction.cpp.

The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Sep 21 2020 23:20:59 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.