Qt 6.x
The Qt SDK
Loading...
Searching...
No Matches
qgeorouteparserosrmv5.cpp File Reference
#include "qgeorouteparserosrmv5_p.h"
#include "qgeoroute.h"
#include "qgeoroute_p.h"
#include "qgeorouteparser_p_p.h"
#include "qgeoroutesegment.h"
#include "qgeoroutesegment_p.h"
#include "qgeomaneuver.h"
#include <QtCore/QJsonDocument>
#include <QtCore/QJsonObject>
#include <QtCore/QJsonArray>
#include <QtCore/QUrlQuery>
#include <QtPositioning/qgeopath.h>
#include <QtCore/private/qobject_p.h>
#include <QtPositioning/private/qlocationutils_p.h>
+ Include dependency graph for qgeorouteparserosrmv5.cpp:

Go to the source code of this file.

Classes

class  QGeoRouteParserOsrmV5Private
 

Functions

static QT_BEGIN_NAMESPACE QList< QGeoCoordinatedecodePolyline (const QString &polylineString)
 
static QString cardinalDirection4 (QLocationUtils::CardinalDirection direction)
 
static QString exitOrdinal (int exit)
 
static QString exitDirection (int exit, const QString &wayName)
 
static QString instructionArrive (QGeoManeuver::InstructionDirection direction)
 
static QString instructionContinue (const QString &wayName, QGeoManeuver::InstructionDirection direction)
 
static QString instructionDepart (const QJsonObject &maneuver, const QString &wayName)
 
static QString instructionEndOfRoad (const QString &wayName, QGeoManeuver::InstructionDirection direction)
 
static QString instructionFerry (const QString &wayName)
 
static QString instructionFork (const QString &wayName, QGeoManeuver::InstructionDirection direction)
 
static QString instructionMerge (const QString &wayName, QGeoManeuver::InstructionDirection direction)
 
static QString instructionNewName (const QString &wayName, QGeoManeuver::InstructionDirection direction)
 
static QString instructionNotification (const QString &wayName, QGeoManeuver::InstructionDirection direction)
 
static QString instructionOffRamp (const QString &wayName, QGeoManeuver::InstructionDirection direction)
 
static QString instructionOnRamp (const QString &wayName, QGeoManeuver::InstructionDirection direction)
 
static QString instructionPushingBike (const QString &wayName)
 
static QString instructionRotary (const QJsonObject &step, const QJsonObject &maneuver, const QString &wayName)
 
static QString instructionRoundabout (const QJsonObject &maneuver, const QString &wayName)
 
static QString instructionRoundaboutTurn (const QString &wayName, QGeoManeuver::InstructionDirection direction)
 
static QString instructionTrain (const QString &wayName)
 
static QString instructionTurn (const QString &wayName, QGeoManeuver::InstructionDirection direction)
 
static QString instructionUseLane (const QJsonObject &maneuver, const QString &wayName, QGeoManeuver::InstructionDirection direction)
 
static QString instructionText (const QJsonObject &step, const QJsonObject &maneuver, QGeoManeuver::InstructionDirection direction)
 
static QGeoManeuver::InstructionDirection instructionDirection (const QJsonObject &maneuver, QGeoRouteParser::TrafficSide trafficSide)
 

Function Documentation

◆ cardinalDirection4()

static QString cardinalDirection4 ( QLocationUtils::CardinalDirection  direction)
static

Definition at line 66 of file qgeorouteparserosrmv5.cpp.

References QLocationUtils::CardinalE, QLocationUtils::CardinalN, QLocationUtils::CardinalS, QLocationUtils::CardinalW, and direction.

Referenced by instructionDepart().

+ Here is the caller graph for this function:

◆ decodePolyline()

static QT_BEGIN_NAMESPACE QList< QGeoCoordinate > decodePolyline ( const QString polylineString)
static

Definition at line 23 of file qgeorouteparserosrmv5.cpp.

References i, QString::isEmpty(), shift(), and QString::toLatin1().

Referenced by QGeoRouteParserOsrmV5Private::parseStep().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ exitDirection()

static QString exitDirection ( int  exit,
const QString wayName 
)
static

Definition at line 118 of file qgeorouteparserosrmv5.cpp.

References QString::arg(), exitOrdinal(), and QString::isEmpty().

Referenced by instructionRotary(), and instructionRoundabout().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ exitOrdinal()

static QString exitOrdinal ( int  exit)
static

Definition at line 84 of file qgeorouteparserosrmv5.cpp.

References QList< T >::append(), and QList< T >::size().

Referenced by exitDirection().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ instructionArrive()

◆ instructionContinue()

static QString instructionContinue ( const QString wayName,
QGeoManeuver::InstructionDirection  direction 
)
static

Definition at line 158 of file qgeorouteparserosrmv5.cpp.

References direction, QGeoManeuver::DirectionBearLeft, QGeoManeuver::DirectionBearRight, QGeoManeuver::DirectionForward, QGeoManeuver::DirectionHardLeft, QGeoManeuver::DirectionHardRight, QGeoManeuver::DirectionLeft, QGeoManeuver::DirectionLightLeft, QGeoManeuver::DirectionLightRight, QGeoManeuver::DirectionRight, QGeoManeuver::DirectionUTurnLeft, QGeoManeuver::DirectionUTurnRight, and QString::isEmpty().

Referenced by instructionText().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ instructionDepart()

static QString instructionDepart ( const QJsonObject maneuver,
const QString wayName 
)
static

Definition at line 204 of file qgeorouteparserosrmv5.cpp.

References QLocationUtils::azimuthToCardinalDirection4(), cardinalDirection4(), QString::isEmpty(), QJsonValue::toDouble(), and QJsonObject::value().

Referenced by instructionText().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ instructionDirection()

static QGeoManeuver::InstructionDirection instructionDirection ( const QJsonObject maneuver,
QGeoRouteParser::TrafficSide  trafficSide 
)
static

Definition at line 740 of file qgeorouteparserosrmv5.cpp.

References QGeoManeuver::DirectionForward, QGeoManeuver::DirectionHardLeft, QGeoManeuver::DirectionHardRight, QGeoManeuver::DirectionLeft, QGeoManeuver::DirectionLightLeft, QGeoManeuver::DirectionLightRight, QGeoManeuver::DirectionRight, QGeoManeuver::DirectionUTurnLeft, QGeoManeuver::DirectionUTurnRight, QString::isEmpty(), QGeoRouteParser::LeftHandTraffic, QGeoManeuver::NoDirection, QGeoRouteParser::RightHandTraffic, QJsonValue::toString(), and QJsonObject::value().

Referenced by QGeoRouteParserOsrmV5Private::parseStep().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ instructionEndOfRoad()

static QString instructionEndOfRoad ( const QString wayName,
QGeoManeuver::InstructionDirection  direction 
)
static

Definition at line 221 of file qgeorouteparserosrmv5.cpp.

References direction, QGeoManeuver::DirectionBearLeft, QGeoManeuver::DirectionBearRight, QGeoManeuver::DirectionForward, QGeoManeuver::DirectionHardLeft, QGeoManeuver::DirectionHardRight, QGeoManeuver::DirectionLeft, QGeoManeuver::DirectionLightLeft, QGeoManeuver::DirectionLightRight, QGeoManeuver::DirectionRight, QGeoManeuver::DirectionUTurnLeft, QGeoManeuver::DirectionUTurnRight, and QString::isEmpty().

Referenced by instructionText().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ instructionFerry()

static QString instructionFerry ( const QString wayName)
static

Definition at line 259 of file qgeorouteparserosrmv5.cpp.

References QString::isEmpty().

Referenced by instructionText().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ instructionFork()

static QString instructionFork ( const QString wayName,
QGeoManeuver::InstructionDirection  direction 
)
static

Definition at line 268 of file qgeorouteparserosrmv5.cpp.

References direction, QGeoManeuver::DirectionBearLeft, QGeoManeuver::DirectionBearRight, QGeoManeuver::DirectionForward, QGeoManeuver::DirectionHardLeft, QGeoManeuver::DirectionHardRight, QGeoManeuver::DirectionLeft, QGeoManeuver::DirectionLightLeft, QGeoManeuver::DirectionLightRight, QGeoManeuver::DirectionRight, QGeoManeuver::DirectionUTurnLeft, QGeoManeuver::DirectionUTurnRight, and QString::isEmpty().

Referenced by instructionText().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ instructionMerge()

static QString instructionMerge ( const QString wayName,
QGeoManeuver::InstructionDirection  direction 
)
static

Definition at line 322 of file qgeorouteparserosrmv5.cpp.

References direction, QGeoManeuver::DirectionBearLeft, QGeoManeuver::DirectionBearRight, QGeoManeuver::DirectionForward, QGeoManeuver::DirectionHardLeft, QGeoManeuver::DirectionHardRight, QGeoManeuver::DirectionLeft, QGeoManeuver::DirectionLightLeft, QGeoManeuver::DirectionLightRight, QGeoManeuver::DirectionRight, QGeoManeuver::DirectionUTurnLeft, QGeoManeuver::DirectionUTurnRight, and QString::isEmpty().

Referenced by instructionText().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ instructionNewName()

static QString instructionNewName ( const QString wayName,
QGeoManeuver::InstructionDirection  direction 
)
static

Definition at line 372 of file qgeorouteparserosrmv5.cpp.

References direction, QGeoManeuver::DirectionBearLeft, QGeoManeuver::DirectionBearRight, QGeoManeuver::DirectionForward, QGeoManeuver::DirectionHardLeft, QGeoManeuver::DirectionHardRight, QGeoManeuver::DirectionLeft, QGeoManeuver::DirectionLightLeft, QGeoManeuver::DirectionLightRight, QGeoManeuver::DirectionRight, QGeoManeuver::DirectionUTurnLeft, QGeoManeuver::DirectionUTurnRight, and QString::isEmpty().

Referenced by instructionText().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ instructionNotification()

static QString instructionNotification ( const QString wayName,
QGeoManeuver::InstructionDirection  direction 
)
static

Definition at line 426 of file qgeorouteparserosrmv5.cpp.

References direction, QGeoManeuver::DirectionBearLeft, QGeoManeuver::DirectionBearRight, QGeoManeuver::DirectionForward, QGeoManeuver::DirectionHardLeft, QGeoManeuver::DirectionHardRight, QGeoManeuver::DirectionLeft, QGeoManeuver::DirectionLightLeft, QGeoManeuver::DirectionLightRight, QGeoManeuver::DirectionRight, QGeoManeuver::DirectionUTurnLeft, QGeoManeuver::DirectionUTurnRight, and QString::isEmpty().

Referenced by instructionText().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ instructionOffRamp()

static QString instructionOffRamp ( const QString wayName,
QGeoManeuver::InstructionDirection  direction 
)
static

Definition at line 456 of file qgeorouteparserosrmv5.cpp.

References direction, QGeoManeuver::DirectionBearLeft, QGeoManeuver::DirectionBearRight, QGeoManeuver::DirectionForward, QGeoManeuver::DirectionHardLeft, QGeoManeuver::DirectionHardRight, QGeoManeuver::DirectionLeft, QGeoManeuver::DirectionLightLeft, QGeoManeuver::DirectionLightRight, QGeoManeuver::DirectionRight, QGeoManeuver::DirectionUTurnLeft, QGeoManeuver::DirectionUTurnRight, and QString::isEmpty().

Referenced by instructionOnRamp(), and instructionText().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ instructionOnRamp()

static QString instructionOnRamp ( const QString wayName,
QGeoManeuver::InstructionDirection  direction 
)
static

Definition at line 486 of file qgeorouteparserosrmv5.cpp.

References direction, and instructionOffRamp().

Referenced by instructionText().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ instructionPushingBike()

static QString instructionPushingBike ( const QString wayName)
static

Definition at line 491 of file qgeorouteparserosrmv5.cpp.

References QString::isEmpty().

Referenced by instructionText().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ instructionRotary()

static QString instructionRotary ( const QJsonObject step,
const QJsonObject maneuver,
const QString wayName 
)
static

Definition at line 499 of file qgeorouteparserosrmv5.cpp.

References exitDirection(), QString::isEmpty(), QJsonValue::toInt(), QJsonValue::toString(), and QJsonObject::value().

Referenced by instructionText().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ instructionRoundabout()

static QString instructionRoundabout ( const QJsonObject maneuver,
const QString wayName 
)
static

Definition at line 514 of file qgeorouteparserosrmv5.cpp.

References exitDirection(), QJsonValue::toInt(), and QJsonObject::value().

Referenced by instructionText().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ instructionRoundaboutTurn()

static QString instructionRoundaboutTurn ( const QString wayName,
QGeoManeuver::InstructionDirection  direction 
)
static

Definition at line 526 of file qgeorouteparserosrmv5.cpp.

References direction, QGeoManeuver::DirectionBearLeft, QGeoManeuver::DirectionBearRight, QGeoManeuver::DirectionForward, QGeoManeuver::DirectionHardLeft, QGeoManeuver::DirectionHardRight, QGeoManeuver::DirectionLeft, QGeoManeuver::DirectionLightLeft, QGeoManeuver::DirectionLightRight, QGeoManeuver::DirectionRight, QGeoManeuver::DirectionUTurnLeft, QGeoManeuver::DirectionUTurnRight, and QString::isEmpty().

Referenced by instructionText().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ instructionText()

static QString instructionText ( const QJsonObject step,
const QJsonObject maneuver,
QGeoManeuver::InstructionDirection  direction 
)
static

Definition at line 688 of file qgeorouteparserosrmv5.cpp.

References direction, instructionArrive(), instructionContinue(), instructionDepart(), instructionEndOfRoad(), instructionFerry(), instructionFork(), instructionMerge(), instructionNewName(), instructionNotification(), instructionOffRamp(), instructionOnRamp(), instructionPushingBike(), instructionRotary(), instructionRoundabout(), instructionRoundaboutTurn(), instructionTrain(), instructionTurn(), instructionUseLane(), QJsonValue::toString(), and QJsonObject::value().

Referenced by QGeoRouteParserOsrmV5Private::parseStep().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ instructionTrain()

static QString instructionTrain ( const QString wayName)
static

Definition at line 564 of file qgeorouteparserosrmv5.cpp.

References QString::isEmpty().

Referenced by instructionText().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ instructionTurn()

static QString instructionTurn ( const QString wayName,
QGeoManeuver::InstructionDirection  direction 
)
static

Definition at line 571 of file qgeorouteparserosrmv5.cpp.

References direction, QGeoManeuver::DirectionBearLeft, QGeoManeuver::DirectionBearRight, QGeoManeuver::DirectionForward, QGeoManeuver::DirectionHardLeft, QGeoManeuver::DirectionHardRight, QGeoManeuver::DirectionLeft, QGeoManeuver::DirectionLightLeft, QGeoManeuver::DirectionLightRight, QGeoManeuver::DirectionRight, QGeoManeuver::DirectionUTurnLeft, QGeoManeuver::DirectionUTurnRight, and QString::isEmpty().

Referenced by instructionText().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ instructionUseLane()

static QString instructionUseLane ( const QJsonObject maneuver,
const QString wayName,
QGeoManeuver::InstructionDirection  direction 
)
static

Definition at line 617 of file qgeorouteparserosrmv5.cpp.

References QString::arg(), direction, QGeoManeuver::DirectionBearLeft, QGeoManeuver::DirectionBearRight, QGeoManeuver::DirectionForward, QGeoManeuver::DirectionHardLeft, QGeoManeuver::DirectionHardRight, QGeoManeuver::DirectionLeft, QGeoManeuver::DirectionLightLeft, QGeoManeuver::DirectionLightRight, QGeoManeuver::DirectionRight, QGeoManeuver::DirectionUTurnLeft, QGeoManeuver::DirectionUTurnRight, QString::isEmpty(), QJsonValue::toString(), and QJsonObject::value().

Referenced by instructionText().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: