• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdeedu API Reference
  • KDE Home
  • Contact Us
 

marble

  • Marble
  • RoutingInstruction
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
Marble::RoutingInstruction Class Reference

#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< RoutingPoint > intersectionPoints () const
 
QString nextDistanceInstruction () const
 
QString nextRoadInstruction () const
 
QVector< RoutingWaypoint > points () const
 
RoutingInstruction * predecessor ()
 
const RoutingInstruction * predecessor () const
 
QString roadName () const
 
QString roadType () const
 
int secondsLeft () const
 
void setPredecessor (RoutingInstruction *predecessor)
 
void setSuccessor (RoutingInstruction *successor)
 
RoutingInstruction * successor ()
 
const RoutingInstruction * successor () 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 29 of file RoutingInstruction.h.

Member Enumeration Documentation

enum Marble::RoutingInstruction::TurnType
Enumerator
Unknown 
Continue 
Merge 
Straight 
SlightRight 
Right 
SharpRight 
TurnAround 
SharpLeft 
Left 
SlightLeft 
RoundaboutFirstExit 
RoundaboutSecondExit 
RoundaboutThirdExit 
RoundaboutExit 
ExitLeft 
ExitRight 

Definition at line 32 of file RoutingInstruction.h.

Constructor & Destructor Documentation

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

Constructor.

Definition at line 21 of file RoutingInstruction.cpp.

Member Function Documentation

qreal Marble::RoutingInstruction::angleToPredecssor ( ) const

The angle between the two turn roads, in radians.

Definition at line 177 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 30 of file RoutingInstruction.cpp.

qreal Marble::RoutingInstruction::distance ( ) const

The accumulated distance of all waypoints belonging to this instruction.

Definition at line 214 of file RoutingInstruction.cpp.

qreal Marble::RoutingInstruction::distanceFromStart ( ) const

The distance from the route start.

Definition at line 224 of file RoutingInstruction.cpp.

qreal Marble::RoutingInstruction::distanceToEnd ( ) const

The distance to the route end.

Includes the own distance

Definition at line 235 of file RoutingInstruction.cpp.

QString Marble::RoutingInstruction::generateRoadInstruction ( RoutingInstruction::TurnType  turnType,
const QString &  roadName 
)
static

Definition at line 351 of file RoutingInstruction.cpp.

QString Marble::RoutingInstruction::instructionText ( ) const

Formats the instruction for a human reader.

Definition at line 341 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 172 of file RoutingInstruction.cpp.

QString Marble::RoutingInstruction::nextDistanceInstruction ( ) const

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

Definition at line 287 of file RoutingInstruction.cpp.

QString Marble::RoutingInstruction::nextRoadInstruction ( ) const

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

Definition at line 246 of file RoutingInstruction.cpp.

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

Waypoints from the last instruction to this instruction.

Definition at line 167 of file RoutingInstruction.cpp.

RoutingInstruction * Marble::RoutingInstruction::predecessor ( )

Previous turn road.

Will be 0 for the first one (route start)

Definition at line 182 of file RoutingInstruction.cpp.

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

Const overload for predecessor.

Definition at line 187 of file RoutingInstruction.cpp.

QString Marble::RoutingInstruction::roadName ( ) const

Name of the road to turn into.

Definition at line 63 of file RoutingInstruction.cpp.

QString Marble::RoutingInstruction::roadType ( ) const

OSM type of the road to turn into.

Definition at line 68 of file RoutingInstruction.cpp.

int Marble::RoutingInstruction::roundaboutExitNumber ( ) const
protected

Definition at line 510 of file RoutingInstruction.cpp.

int Marble::RoutingInstruction::secondsLeft ( ) const

Estimated number of seconds to the route destination.

Definition at line 73 of file RoutingInstruction.cpp.

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

Change the predecessor.

Definition at line 192 of file RoutingInstruction.cpp.

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

Change the successor.

Definition at line 209 of file RoutingInstruction.cpp.

RoutingInstruction * Marble::RoutingInstruction::successor ( )

Next turn road.

Will be 0 for the last one (destination)

Definition at line 199 of file RoutingInstruction.cpp.

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

Const overload for successor.

Definition at line 204 of file RoutingInstruction.cpp.

QString Marble::RoutingInstruction::totalDurationRemaining ( ) const

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

Definition at line 321 of file RoutingInstruction.cpp.

RoutingInstruction::TurnType Marble::RoutingInstruction::turnType ( ) const

Definition at line 515 of file RoutingInstruction.cpp.


The documentation for this class was generated from the following files:
  • RoutingInstruction.h
  • RoutingInstruction.cpp
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:38:57 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

marble

Skip menu "marble"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdeedu API Reference

Skip menu "kdeedu API Reference"
  • Analitza
  •     lib
  • kalgebra
  • kalzium
  •   libscience
  • kanagram
  • kig
  •   lib
  • klettres
  • kstars
  • libkdeedu
  •   keduvocdocument
  • marble
  • parley
  • rocs
  •   App
  •   RocsCore
  •   VisualEditor
  •   stepcore

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal