7#include <QGeoRectangle>
9#include <QGeoRouteSegment>
54 if (!document.isObject())
60 m_json = document.object();
90void GeoRouteJsonParserEsri::parseDirections()
173 segment.setNextRouteSegment(firstSegment);
179void GeoRouteJsonParserEsri::parseRoutes()
184 parseRoute(feature.toObject());
187void GeoRouteJsonParserEsri::parseRoute(
const QJsonObject &route)
195 if (!
paths.isEmpty())
201 if (geoCoordinate.
size() == 2)
207 geoRoute.
setPath(geoCoordinates);
QList< QGeoRoute > routes() const
GeoRouteJsonParserEsri(const QJsonDocument &document)
QString errorString() const
void setInstructionText(const QString &instructionText)
void setTimeToNextInstruction(int secs)
void setDirection(InstructionDirection direction)
void setDistanceToNextInstruction(qreal distance)
void setRouteId(const QString &id)
void setFirstRouteSegment(const QGeoRouteSegment &routeSegment)
Sets the first route segment in the route to routeSegment.
void setDistance(qreal distance)
void setTravelTime(int secs)
void setTravelMode(QGeoRouteRequest::TravelMode mode)
Sets the travel mode for this route to mode.
void setPath(const QList< QGeoCoordinate > &path)
void setBounds(const QGeoRectangle &bounds)
\inmodule QtCore\reentrant
qsizetype size() const
Returns the number of values stored in the array.
QJsonValue at(qsizetype i) const
Returns a QJsonValue representing the value for index i.
\inmodule QtCore\reentrant
\inmodule QtCore\reentrant
QJsonValue value(const QString &key) const
Returns a QJsonValue representing the value for the key key.
bool contains(const QString &key) const
Returns true if the object contains key key.
\inmodule QtCore \reentrant
int toInt(int defaultValue=0) const
QJsonObject toObject() const
This is an overloaded member function, provided for convenience. It differs from the above function o...
QJsonArray toArray() const
This is an overloaded member function, provided for convenience. It differs from the above function o...
double toDouble(double defaultValue=0) const
Converts the value to a double and returns it.
QString toString() const
Converts the value to a QString and returns it.
T value(qsizetype i) const
void append(parameter_type t)
QList< T > values() const
\macro QT_RESTRICTED_CAST_FROM_ASCII
QString arg(qlonglong a, int fieldwidth=0, int base=10, QChar fillChar=u' ') const
bool isEmpty() const
Returns true if the string has no characters; otherwise returns false.
static const QString kDirectionsTotalDriveTimeKey(QStringLiteral("totalDriveTime"))
static const QString kDirectionsTotalLengthKey(QStringLiteral("totalLength"))
static const QString kRoutesFeaturesObjectIdKey(QStringLiteral("ObjectID"))
static const QString kDirectionsFeaturesAttributesTimeKey(QStringLiteral("time"))
static const QString kDirectionsRouteIdKey(QStringLiteral("routeId"))
static const QString kErrorKey(QStringLiteral("error"))
static const QString kBarriersKey(QStringLiteral("barriers"))
static const QString kDirectionsFeaturesAttributesLengthKey(QStringLiteral("length"))
static const QString kRoutesKey(QStringLiteral("routes"))
static const QString kMessagesKey(QStringLiteral("messages"))
static const QString kDirectionsFeaturesAttributesKey(QStringLiteral("attributes"))
static const QString kDirectionsFeaturesAttributesEtaKey(QStringLiteral("ETA"))
static const QString kErrorDetailsKey(QStringLiteral("details"))
static const QString kDirectionsEnvelopeYmaxKey(QStringLiteral("ymax"))
static const QString kRoutesFeaturesKey(QStringLiteral("features"))
static const QString kDirectionsEnvelopeYminKey(QStringLiteral("ymin"))
static const QString kDirectionsFeaturesAttributesTextKey(QStringLiteral("text"))
static const QString kDirectionsFeaturesAttributesManeuverTypeKey(QStringLiteral("maneuverType"))
static const QString kDirectionsEnvelopeXminKey(QStringLiteral("xmin"))
static const QString kDirectionsFeaturesCompressedGeometryKey(QStringLiteral("compressedGeometry"))
static const QString kDirectionsFeaturesKey(QStringLiteral("features"))
static const QString kRoutesFeaturesGeometryKey(QStringLiteral("geometry"))
static const QString kDirectionsKey(QStringLiteral("directions"))
static const QString kDirectionsTotalTimeKey(QStringLiteral("totalTime"))
static const QString kDirectionsEnvelopeXmaxKey(QStringLiteral("xmax"))
static const QString kRoutesFeaturesGeometryPathsKey(QStringLiteral("paths"))
static const QString kErrorMessageKey(QStringLiteral("message"))
static const QString kErrorCodeKey(QStringLiteral("code"))
static const QString kRoutesFeaturesAttributesKey(QStringLiteral("attributes"))
static const QString kDirectionsRouteNameKey(QStringLiteral("routeName"))
static const QString kDirectionsSummaryKey(QStringLiteral("summary"))
static const QString kDirectionsEnvelopeKey(QStringLiteral("envelope"))
static QT_BEGIN_NAMESPACE const QString kErrorMessage(QStringLiteral("Error %1: %2."))
static const QString kErrorJson(QStringLiteral("Error: invalide JSON document."))
Combined button and popup list for selecting options.
DBusConnection const char DBusError * error
EGLOutputLayerEXT EGLint EGLAttrib value
[5]
GLenum GLuint GLenum GLsizei length
GLsizei const GLuint * paths
GLuint GLsizei const GLchar * message
#define QStringLiteral(str)
static double toDouble(Value v)