Marble::RoutingInstruction
#include <RoutingInstruction.h>
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 |
QList< RoutingPoint > | intersectionPoints () const |
QString | nextDistanceInstruction () const |
QString | nextRoadInstruction () const |
QList< 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 25 of file RoutingInstruction.h.
Member Enumeration Documentation
◆ TurnType
enum Marble::RoutingInstruction::TurnType |
Definition at line 28 of file RoutingInstruction.h.
Constructor & Destructor Documentation
◆ RoutingInstruction()
|
explicit |
Constructor.
Definition at line 18 of file RoutingInstruction.cpp.
Member Function Documentation
◆ angleToPredecssor()
qreal Marble::RoutingInstruction::angleToPredecssor | ( | ) | const |
The angle between the two turn roads, in radians.
Definition at line 177 of file RoutingInstruction.cpp.
◆ append()
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.
◆ distance()
qreal Marble::RoutingInstruction::distance | ( | ) | const |
The accumulated distance of all waypoints belonging to this instruction.
Definition at line 214 of file RoutingInstruction.cpp.
◆ distanceFromStart()
qreal Marble::RoutingInstruction::distanceFromStart | ( | ) | const |
The distance from the route start.
Definition at line 224 of file RoutingInstruction.cpp.
◆ distanceToEnd()
qreal Marble::RoutingInstruction::distanceToEnd | ( | ) | const |
The distance to the route end.
Includes the own distance
Definition at line 235 of file RoutingInstruction.cpp.
◆ generateRoadInstruction()
|
static |
Definition at line 356 of file RoutingInstruction.cpp.
◆ instructionText()
QString Marble::RoutingInstruction::instructionText | ( | ) | const |
Formats the instruction for a human reader.
Definition at line 346 of file RoutingInstruction.cpp.
◆ intersectionPoints()
QList< 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.
◆ nextDistanceInstruction()
QString Marble::RoutingInstruction::nextDistanceInstruction | ( | ) | const |
Formats the instruction (distance to next instruction) for a human reader.
Definition at line 287 of file RoutingInstruction.cpp.
◆ nextRoadInstruction()
QString Marble::RoutingInstruction::nextRoadInstruction | ( | ) | const |
Formats the instruction (road name) for a human reader.
Definition at line 246 of file RoutingInstruction.cpp.
◆ points()
QList< RoutingWaypoint > Marble::RoutingInstruction::points | ( | ) | const |
Waypoints from the last instruction to this instruction.
Definition at line 167 of file RoutingInstruction.cpp.
◆ predecessor() [1/2]
RoutingInstruction * Marble::RoutingInstruction::predecessor | ( | ) |
Previous turn road.
Will be 0 for the first one (route start)
Definition at line 182 of file RoutingInstruction.cpp.
◆ predecessor() [2/2]
const RoutingInstruction * Marble::RoutingInstruction::predecessor | ( | ) | const |
Const overload for predecessor.
Definition at line 187 of file RoutingInstruction.cpp.
◆ roadName()
QString Marble::RoutingInstruction::roadName | ( | ) | const |
Name of the road to turn into.
Definition at line 63 of file RoutingInstruction.cpp.
◆ roadType()
QString Marble::RoutingInstruction::roadType | ( | ) | const |
OSM type of the road to turn into.
Definition at line 68 of file RoutingInstruction.cpp.
◆ roundaboutExitNumber()
|
protected |
Definition at line 515 of file RoutingInstruction.cpp.
◆ secondsLeft()
int Marble::RoutingInstruction::secondsLeft | ( | ) | const |
Estimated number of seconds to the route destination.
Definition at line 73 of file RoutingInstruction.cpp.
◆ setPredecessor()
void Marble::RoutingInstruction::setPredecessor | ( | RoutingInstruction * | predecessor | ) |
Change the predecessor.
Definition at line 192 of file RoutingInstruction.cpp.
◆ setSuccessor()
void Marble::RoutingInstruction::setSuccessor | ( | RoutingInstruction * | successor | ) |
Change the successor.
Definition at line 209 of file RoutingInstruction.cpp.
◆ successor() [1/2]
RoutingInstruction * Marble::RoutingInstruction::successor | ( | ) |
Next turn road.
Will be 0 for the last one (destination)
Definition at line 199 of file RoutingInstruction.cpp.
◆ successor() [2/2]
const RoutingInstruction * Marble::RoutingInstruction::successor | ( | ) | const |
Const overload for successor.
Definition at line 204 of file RoutingInstruction.cpp.
◆ totalDurationRemaining()
QString Marble::RoutingInstruction::totalDurationRemaining | ( | ) | const |
Formats the instruction (duration to destination) for a human reader.
Definition at line 326 of file RoutingInstruction.cpp.
◆ turnType()
RoutingInstruction::TurnType Marble::RoutingInstruction::turnType | ( | ) | const |
Definition at line 520 of file RoutingInstruction.cpp.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:15:46 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.