6#include <QtCore/QVariantMap>
8#include <QtCore/QUrlQuery>
9#include <QtCore/QLocale>
10#include <QtNetwork/QNetworkAccessManager>
11#include <QtNetwork/QNetworkRequest>
12#include <QtPositioning/QGeoCoordinate>
13#include <QtPositioning/QGeoAddress>
14#include <QtPositioning/QGeoShape>
15#include <QtPositioning/QGeoRectangle>
46 m_userAgent =
"Qt Location based application";
51 m_urlPrefix =
QStringLiteral(
"https://nominatim.openstreetmap.org");
101 this, &QGeoCodingManagerEngineOsm::replyFinished);
103 this, &QGeoCodingManagerEngineOsm::replyError);
133 this, &QGeoCodingManagerEngineOsm::replyFinished);
135 this, &QGeoCodingManagerEngineOsm::replyError);
140void QGeoCodingManagerEngineOsm::replyFinished()
void finished()
This signal is emitted when this reply has finished processing.
void errorOccurred(QGeoCodeReply::Error error, const QString &errorString=QString())
This signal is emitted when an error has been detected in the processing of this reply.
Error
Describes an error which prevented the completion of the operation.
QGeoCodeReply * reverseGeocode(const QGeoCoordinate &coordinate, const QGeoShape &bounds) override
Begins the reverse geocoding of coordinate.
QGeoCodingManagerEngineOsm(const QVariantMap ¶meters, QGeoServiceProvider::Error *error, QString *errorString)
~QGeoCodingManagerEngineOsm()
QGeoCodeReply * geocode(const QGeoAddress &address, const QGeoShape &bounds) override
Begins the geocoding of address.
void errorOccurred(QGeoCodeReply *reply, QGeoCodeReply::Error error, const QString &errorString=QString())
void finished(QGeoCodeReply *reply)
QLocale locale() const
Returns the locale used to hint to this geocoding manager about what language to use for the results.
double longitude
This property holds the longitude in decimal degrees.
double latitude
This property holds the latitude in decimal degrees.
Error
Describes an error related to the loading and setup of a service provider plugin.
ShapeType type
This property holds the type of this geo shape.
Q_INVOKABLE QGeoRectangle boundingGeoRectangle() const
Returns a QGeoRectangle representing the geographical bounding rectangle of the geo shape,...
T value(const Key &key, const T &defaultValue=T()) const
bool contains(const Key &key) const
The QNetworkAccessManager class allows the application to send network requests and receive replies.
QNetworkReply * get(const QNetworkRequest &request)
Posts a request to obtain the contents of the target request and returns a new QNetworkReply object o...
The QNetworkReply class contains the data and headers for a request sent with QNetworkAccessManager.
The QNetworkRequest class holds a request to be sent with QNetworkAccessManager.
void setRawHeader(const QByteArray &headerName, const QByteArray &value)
Sets the header headerName to be of value headerValue.
void setUrl(const QUrl &url)
Sets the URL this network request is referring to be url.
static QMetaObject::Connection connect(const QObject *sender, const char *signal, const QObject *receiver, const char *member, Qt::ConnectionType=Qt::AutoConnection)
\threadsafe
QObject * sender() const
Returns a pointer to the object that sent the signal, if called in a slot activated by a signal; othe...
\macro QT_RESTRICTED_CAST_FROM_ASCII
QByteArray toLatin1() const &
void clear()
Clears the contents of the string and makes it null.
static QString number(int, int base=10)
This is an overloaded member function, provided for convenience. It differs from the above function o...
void setQuery(const QString &query, ParsingMode mode=TolerantMode)
Sets the query string of the URL to query.
QString toString() const
Returns the variant as a QString if the variant has a userType() including, but not limited to:
bool toBool() const
Returns the variant as a bool if the variant has userType() Bool.
static QString boundingBoxToLtrb(const QGeoRectangle &rect)
static QString addressToQuery(const QGeoAddress &address)
Combined button and popup list for selecting options.
DBusConnection const char DBusError * error
static QString boundingBoxToLtrb(const QGeoRectangle &rect)
static QT_BEGIN_NAMESPACE QString addressToQuery(const QGeoAddress &address)
GLenum GLuint GLintptr offset
GLuint GLuint64EXT address
#define QStringLiteral(str)
QUrl url("example.com")
[constructor-url-reference]
QNetworkRequest request(url)
\inmodule QtCore \reentrant