marble
RoutingInstruction.cpp
Go to the documentation of this file.
33 if ( m_points.size() && m_points.last().roadType() != "roundabout" && item.roadType() == "roundabout" ) {
34 // Entering a roundabout. Merge with previous segment to avoid 'Enter the roundabout' instructions
39 if ( m_points.size() && m_points.last().roadType() == "roundabout" && item.roadType() != "roundabout" ) {
357 QString RoutingInstruction::generateRoadInstruction( RoutingInstruction::TurnType turnType, const QString &roadName )
376 return QObject::tr( "Take the %1. exit in the roundabout." ).arg( roundaboutExit ); // One sentence
507 if ( QCoreApplication::instance()->arguments().contains( "--csv" ) && QCoreApplication::instance()->arguments().contains( "--intersection-points" ) ) {
Stores data related to one instruction: Road name, angle to predecessor, associated waypoints etc...
Definition: RoutingInstruction.h:29
qreal distanceFromStart() const
The distance from the route start.
Definition: RoutingInstruction.cpp:225
RoutingInstruction(const RoutingWaypoint &item=RoutingWaypoint())
Constructor.
Definition: RoutingInstruction.cpp:22
bool append(const RoutingWaypoint &item, int angle)
Append data of the given item, returns true if item's street name matches instructions street name...
Definition: RoutingInstruction.cpp:31
void setRealNumberPrecision(int precision)
bool contains(const QString &str, Qt::CaseSensitivity cs) const
MeasurementSystem measurementSystem() const
QString tr(const char *sourceText, const char *disambiguation, int n)
void setPredecessor(RoutingInstruction *predecessor)
Change the predecessor.
Definition: RoutingInstruction.cpp:193
TurnType turnType() const
Definition: RoutingInstruction.cpp:521
qreal angleToPredecssor() const
The angle between the two turn roads, in radians.
Definition: RoutingInstruction.cpp:178
QLocale system()
static QString generateRoadInstruction(TurnType turnType, const QString &roadName)
Definition: RoutingInstruction.cpp:357
bool isEmpty() const
void setSuccessor(RoutingInstruction *successor)
Change the successor.
Definition: RoutingInstruction.cpp:210
QString totalDurationRemaining() const
Formats the instruction (duration to destination) for a human reader.
Definition: RoutingInstruction.cpp:327
QCoreApplication * instance()
int roundaboutExitNumber() const
Definition: RoutingInstruction.cpp:516
QVector< RoutingPoint > intersectionPoints() const
Contains the intersection point and points near it on the previous and current road.
Definition: RoutingInstruction.cpp:173
QVector< RoutingWaypoint > points() const
Waypoints from the last instruction to this instruction.
Definition: RoutingInstruction.cpp:168
QString nextDistanceInstruction() const
Formats the instruction (distance to next instruction) for a human reader.
Definition: RoutingInstruction.cpp:288
QString nextRoadInstruction() const
Formats the instruction (road name) for a human reader.
Definition: RoutingInstruction.cpp:247
int secondsLeft() const
Estimated number of seconds to the route destination.
Definition: RoutingInstruction.cpp:74
QString instructionText() const
Formats the instruction for a human reader.
Definition: RoutingInstruction.cpp:347
qreal distance() const
The accumulated distance of all waypoints belonging to this instruction.
Definition: RoutingInstruction.cpp:215
QTextStream & operator<<(QTextStream &stream, const RoutingInstruction &i)
Definition: RoutingInstruction.cpp:461
QStringList arguments()
int size() const
QString arg(qlonglong a, int fieldWidth, int base, const QChar &fillChar) const
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:13:41 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:13:41 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.