summaryrefslogtreecommitdiff
path: root/src/location
diff options
context:
space:
mode:
Diffstat (limited to 'src/location')
-rw-r--r--src/location/maps/maps.pri18
-rw-r--r--src/location/maps/qgeocodereply.cpp (renamed from src/location/maps/qgeosearchreply.cpp)106
-rw-r--r--src/location/maps/qgeocodereply.h (renamed from src/location/maps/qgeosearchreply.h)20
-rw-r--r--src/location/maps/qgeocodereply_p.h (renamed from src/location/maps/qgeosearchreply_p.h)18
-rw-r--r--src/location/maps/qgeocodingmanager.cpp (renamed from src/location/maps/qgeosearchmanager.cpp)144
-rw-r--r--src/location/maps/qgeocodingmanager.h (renamed from src/location/maps/qgeosearchmanager.h)36
-rw-r--r--src/location/maps/qgeocodingmanager_p.h (renamed from src/location/maps/qgeosearchmanager_p.h)20
-rw-r--r--src/location/maps/qgeocodingmanagerengine.cpp (renamed from src/location/maps/qgeosearchmanagerengine.cpp)126
-rw-r--r--src/location/maps/qgeocodingmanagerengine.h (renamed from src/location/maps/qgeosearchmanagerengine.h)35
-rw-r--r--src/location/maps/qgeocodingmanagerengine_p.h (renamed from src/location/maps/qgeosearchmanagerengine_p.h)14
-rw-r--r--src/location/maps/qgeoserviceprovider.cpp54
-rw-r--r--src/location/maps/qgeoserviceprovider.h6
-rw-r--r--src/location/maps/qgeoserviceprovider_p.h8
-rw-r--r--src/location/maps/qgeoserviceproviderfactory.cpp10
-rw-r--r--src/location/maps/qgeoserviceproviderfactory.h2
15 files changed, 303 insertions, 314 deletions
diff --git a/src/location/maps/maps.pri b/src/location/maps/maps.pri
index 6a5e8f1b..ffe5bd8e 100644
--- a/src/location/maps/maps.pri
+++ b/src/location/maps/maps.pri
@@ -4,6 +4,9 @@ INCLUDEPATH += maps
include(tiled/tiled.pri)
PUBLIC_HEADERS += \
+ maps/qgeocodingmanager.h \
+ maps/qgeocodingmanagerengine.h \
+ maps/qgeocodereply.h \
maps/qgeomaneuver.h \
maps/qgeomapcircleobject.h \
maps/qgeomapcustomobject.h \
@@ -26,14 +29,14 @@ PUBLIC_HEADERS += \
maps/qgeoroutesegment.h \
maps/qgeoroutingmanager.h \
maps/qgeoroutingmanagerengine.h \
- maps/qgeosearchmanager.h \
- maps/qgeosearchmanagerengine.h \
- maps/qgeosearchreply.h \
maps/qgeoserviceprovider.h \
maps/qgeoserviceproviderfactory.h \
maps/qgraphicsgeomap.h
PRIVATE_HEADERS += \
+ maps/qgeocodingmanager_p.h \
+ maps/qgeocodingmanagerengine_p.h \
+ maps/qgeocodereply_p.h \
maps/qgeomaneuver_p.h \
maps/qgeomapcircleobject_p.h \
maps/qgeomapcustomobject_p.h \
@@ -56,14 +59,14 @@ PRIVATE_HEADERS += \
maps/qgeoroutesegment_p.h \
maps/qgeoroutingmanager_p.h \
maps/qgeoroutingmanagerengine_p.h \
- maps/qgeosearchmanager_p.h \
- maps/qgeosearchmanagerengine_p.h \
- maps/qgeosearchreply_p.h \
maps/qgeoserviceprovider_p.h \
maps/qgraphicsgeomap_p.h \
maps/qgeomapobjectengine_p.h
SOURCES += \
+ maps/qgeocodingmanager.cpp \
+ maps/qgeocodingmanagerengine.cpp \
+ maps/qgeocodereply.cpp \
maps/qgeomaneuver.cpp \
maps/qgeomapcircleobject.cpp \
maps/qgeomapcustomobject.cpp \
@@ -85,9 +88,6 @@ SOURCES += \
maps/qgeoroutesegment.cpp \
maps/qgeoroutingmanager.cpp \
maps/qgeoroutingmanagerengine.cpp \
- maps/qgeosearchmanager.cpp \
- maps/qgeosearchmanagerengine.cpp \
- maps/qgeosearchreply.cpp \
maps/qgeoserviceprovider.cpp \
maps/qgeoserviceproviderfactory.cpp \
maps/qgraphicsgeomap.cpp \
diff --git a/src/location/maps/qgeosearchreply.cpp b/src/location/maps/qgeocodereply.cpp
index dd8ed226..65739aa7 100644
--- a/src/location/maps/qgeosearchreply.cpp
+++ b/src/location/maps/qgeocodereply.cpp
@@ -39,15 +39,15 @@
**
****************************************************************************/
-#include "qgeosearchreply.h"
-#include "qgeosearchreply_p.h"
+#include "qgeocodereply.h"
+#include "qgeocodereply_p.h"
QT_BEGIN_NAMESPACE
/*!
- \class QGeoSearchReply
+ \class QGeocodeReply
- \brief The QGeoSearchReply class manages an operation started by an
- instance of QGeoSearchManager.
+ \brief The QGeocodeReply class manages an operation started by an
+ instance of QGeocodingManager.
\inmodule QtLocation
@@ -55,21 +55,21 @@ QT_BEGIN_NAMESPACE
\ingroup maps-places
- Instances of QGeoSearchReply manage the state and results of these
+ Instances of QGeocodeReply manage the state and results of these
operations.
The isFinished(), error() and errorString() methods provide information
on whether the operation has completed and if it completed successfully.
- The finished() and error(QGeoSearchReply::Error,QString)
+ The finished() and error(QGeocodeReply::Error,QString)
signals can be used to monitor the progress of the operation.
- It is possible that a newly created QGeoSearchReply may be in a finished
+ It is possible that a newly created QGeocodeReply may be in a finished
state, most commonly because an error has occurred. Since such an instance
will never emit the finished() or
- error(QGeoSearchReply::Error,QString) signals, it is
+ error(QGeocodeReply::Error,QString) signals, it is
important to check the result of isFinished() before making the connections
- to the signals. The documentation for QGeoSearchManager demonstrates how
+ to the signals. The documentation for QGeocodingManager demonstrates how
this might be carried out.
If the operation completes successfully the results will be able to be
@@ -77,14 +77,14 @@ QT_BEGIN_NAMESPACE
*/
/*!
- \enum QGeoSearchReply::Error
+ \enum QGeocodeReply::Error
Describes an error which prevented the completion of the operation.
\value NoError
No error has occurred.
\value EngineNotSetError
- The search manager that was used did not have a QGeoSearchManagerEngine instance associated with it.
+ The geocoding manager that was used did not have a QGeocodingManagerEngine instance associated with it.
\value CommunicationError
An error occurred while communicating with the service provider.
\value ParseError
@@ -99,23 +99,23 @@ QT_BEGIN_NAMESPACE
*/
/*!
- Constructs a search reply with the specified \a parent.
+ Constructs a geocode reply with the specified \a parent.
*/
-QGeoSearchReply::QGeoSearchReply(QObject *parent)
+QGeocodeReply::QGeocodeReply(QObject *parent)
: QObject(parent),
- d_ptr(new QGeoSearchReplyPrivate()) {}
+ d_ptr(new QGeocodeReplyPrivate()) {}
/*!
- Constructs a search reply with a given \a error and \a errorString and the specified \a parent.
+ Constructs a geocode reply with a given \a error and \a errorString and the specified \a parent.
*/
-QGeoSearchReply::QGeoSearchReply(Error error, const QString &errorString, QObject *parent)
+QGeocodeReply::QGeocodeReply(Error error, const QString &errorString, QObject *parent)
: QObject(parent),
- d_ptr(new QGeoSearchReplyPrivate(error, errorString)) {}
+ d_ptr(new QGeocodeReplyPrivate(error, errorString)) {}
/*!
- Destroys this search reply object.
+ Destroys this reply object.
*/
-QGeoSearchReply::~QGeoSearchReply()
+QGeocodeReply::~QGeocodeReply()
{
delete d_ptr;
}
@@ -126,11 +126,11 @@ QGeoSearchReply::~QGeoSearchReply()
If \a finished is true, this will cause the finished() signal to be
emitted.
- If the operation completed successfully, QGeoSearchReply::setLocations()
+ If the operation completed successfully, QGeocodeReply::setLocations()
should be called before this function. If an error occurred,
- QGeoSearchReply::setError() should be used instead.
+ QGeocodeReply::setError() should be used instead.
*/
-void QGeoSearchReply::setFinished(bool finished)
+void QGeocodeReply::setFinished(bool finished)
{
d_ptr->isFinished = finished;
if (d_ptr->isFinished)
@@ -141,7 +141,7 @@ void QGeoSearchReply::setFinished(bool finished)
Return true if the operation completed successfully or encountered an
error which cause the operation to come to a halt.
*/
-bool QGeoSearchReply::isFinished() const
+bool QGeocodeReply::isFinished() const
{
return d_ptr->isFinished;
}
@@ -153,7 +153,7 @@ bool QGeoSearchReply::isFinished() const
This wil also cause error() and finished() signals to be emitted, in that
order.
*/
-void QGeoSearchReply::setError(QGeoSearchReply::Error error, const QString &errorString)
+void QGeocodeReply::setError(QGeocodeReply::Error error, const QString &errorString)
{
d_ptr->error = error;
d_ptr->errorString = errorString;
@@ -164,9 +164,9 @@ void QGeoSearchReply::setError(QGeoSearchReply::Error error, const QString &erro
/*!
Returns the error state of this reply.
- If the result is QGeoSearchReply::NoError then no error has occurred.
+ If the result is QGeocodeReply::NoError then no error has occurred.
*/
-QGeoSearchReply::Error QGeoSearchReply::error() const
+QGeocodeReply::Error QGeocodeReply::error() const
{
return d_ptr->error;
}
@@ -179,9 +179,9 @@ QGeoSearchReply::Error QGeoSearchReply::error() const
which case this will also return an empty string.
To determine whether an error has occurred, check to see if
- QGeoSearchReply::error() is equal to QGeoSearchReply::NoError.
+ QGeocodeReply::error() is equal to QGeocodeReply::NoError.
*/
-QString QGeoSearchReply::errorString() const
+QString QGeocodeReply::errorString() const
{
return d_ptr->errorString;
}
@@ -189,7 +189,7 @@ QString QGeoSearchReply::errorString() const
/*!
Sets the viewport which contains the results to \a viewport.
*/
-void QGeoSearchReply::setViewport(QGeoBoundingArea *viewport)
+void QGeocodeReply::setViewport(QGeoBoundingArea *viewport)
{
d_ptr->viewport = viewport;
}
@@ -198,9 +198,9 @@ void QGeoSearchReply::setViewport(QGeoBoundingArea *viewport)
Returns the viewport which contains the results.
This function will return 0 if no viewport bias
- was specified in the QGeoSearchManager function which created this reply.
+ was specified in the QGeocodingManager function which created this reply.
*/
-QGeoBoundingArea* QGeoSearchReply::viewport() const
+QGeoBoundingArea* QGeocodeReply::viewport() const
{
return d_ptr->viewport;
}
@@ -209,9 +209,9 @@ QGeoBoundingArea* QGeoSearchReply::viewport() const
Returns a list of locations.
The locations are the results of the operation corresponding to the
- QGeoSearchManager function which created this reply.
+ QGeocodingManager function which created this reply.
*/
-QList<QGeoLocation> QGeoSearchReply::locations() const
+QList<QGeoLocation> QGeocodeReply::locations() const
{
return d_ptr->locations;
}
@@ -219,7 +219,7 @@ QList<QGeoLocation> QGeoSearchReply::locations() const
/*!
Adds \a location to the list of locations in this reply.
*/
-void QGeoSearchReply::addLocation(const QGeoLocation &location)
+void QGeocodeReply::addLocation(const QGeoLocation &location)
{
d_ptr->locations.append(location);
}
@@ -227,7 +227,7 @@ void QGeoSearchReply::addLocation(const QGeoLocation &location)
/*!
Sets the list of \a locations in the reply.
*/
-void QGeoSearchReply::setLocations(const QList<QGeoLocation> &locations)
+void QGeocodeReply::setLocations(const QList<QGeoLocation> &locations)
{
d_ptr->locations = locations;
}
@@ -237,7 +237,7 @@ void QGeoSearchReply::setLocations(const QList<QGeoLocation> &locations)
This will do nothing if the reply is finished.
*/
-void QGeoSearchReply::abort()
+void QGeocodeReply::abort()
{
if (!isFinished())
setFinished(true);
@@ -250,12 +250,8 @@ void QGeoSearchReply::abort()
This may be more than locations().length() if the number of responses
was less than the number requested.
-
- If QGeoSearchManager::search() is used along with
- QGeoSearchManager::setAdditionalLandmarkManagers the number of results can
- be as high as limit * (1 + number of additional landmark managers).
*/
-int QGeoSearchReply::limit() const
+int QGeocodeReply::limit() const
{
return d_ptr->limit;
}
@@ -264,7 +260,7 @@ int QGeoSearchReply::limit() const
Returns the offset into the entire result set at which to start
fetching results.
*/
-int QGeoSearchReply::offset() const
+int QGeocodeReply::offset() const
{
return d_ptr->offset;
}
@@ -274,7 +270,7 @@ int QGeoSearchReply::offset() const
If \a limit is -1 then all available responses will be returned.
*/
-void QGeoSearchReply::setLimit(int limit)
+void QGeocodeReply::setLimit(int limit)
{
d_ptr->limit = limit;
}
@@ -283,27 +279,27 @@ void QGeoSearchReply::setLimit(int limit)
Sets the offset in the entire result set at which to start
fetching result to \a offset.
*/
-void QGeoSearchReply::setOffset(int offset)
+void QGeocodeReply::setOffset(int offset)
{
d_ptr->offset = offset;
}
/*!
- \fn void QGeoSearchReply::finished()
+ \fn void QGeocodeReply::finished()
This signal is emitted when this reply has finished processing.
- If error() equals QGeoSearchReply::NoError then the processing
+ If error() equals QGeocodeReply::NoError then the processing
finished successfully.
- This signal and QGeoSearchManager::finished() will be
+ This signal and QGeocodingManager::finished() will be
emitted at the same time.
\note Do no delete this reply object in the slot connected to this
signal. Use deleteLater() instead.
*/
/*!
- \fn void QGeoSearchReply::error(QGeoSearchReply::Error error, const QString &errorString)
+ \fn void QGeocodeReply::error(QGeocodeReply::Error error, const QString &errorString)
This signal is emitted when an error has been detected in the processing of
this reply. The finished() signal will probably follow.
@@ -311,7 +307,7 @@ void QGeoSearchReply::setOffset(int offset)
The error will be described by the error code \a error. If \a errorString is
not empty it will contain a textual description of the error.
- This signal and QGeoSearchManager::error() will be emitted at the same time.
+ This signal and QGeocodingManager::error() will be emitted at the same time.
\note Do no delete this reply object in the slot connected to this
signal. Use deleteLater() instead.
@@ -320,15 +316,15 @@ void QGeoSearchReply::setOffset(int offset)
/*******************************************************************************
*******************************************************************************/
-QGeoSearchReplyPrivate::QGeoSearchReplyPrivate()
- : error(QGeoSearchReply::NoError),
+QGeocodeReplyPrivate::QGeocodeReplyPrivate()
+ : error(QGeocodeReply::NoError),
errorString(QLatin1String("")),
isFinished(false),
viewport(0),
limit(-1),
offset(0) {}
-QGeoSearchReplyPrivate::QGeoSearchReplyPrivate(QGeoSearchReply::Error error, const QString &errorString)
+QGeocodeReplyPrivate::QGeocodeReplyPrivate(QGeocodeReply::Error error, const QString &errorString)
: error(error),
errorString(errorString),
isFinished(true),
@@ -336,9 +332,9 @@ QGeoSearchReplyPrivate::QGeoSearchReplyPrivate(QGeoSearchReply::Error error, con
limit(-1),
offset(0) {}
-QGeoSearchReplyPrivate::~QGeoSearchReplyPrivate() {}
+QGeocodeReplyPrivate::~QGeocodeReplyPrivate() {}
-#include "moc_qgeosearchreply.cpp"
+#include "moc_qgeocodereply.cpp"
QT_END_NAMESPACE
diff --git a/src/location/maps/qgeosearchreply.h b/src/location/maps/qgeocodereply.h
index fc0c4d4c..4da67d5e 100644
--- a/src/location/maps/qgeosearchreply.h
+++ b/src/location/maps/qgeocodereply.h
@@ -39,8 +39,8 @@
**
****************************************************************************/
-#ifndef QGEOSEARCHREPLY_H
-#define QGEOSEARCHREPLY_H
+#ifndef QGEOCODEREPLY_H
+#define QGEOCODEREPLY_H
#include "qgeolocation.h"
@@ -49,9 +49,9 @@
QT_BEGIN_NAMESPACE
-class QGeoSearchReplyPrivate;
+class QGeocodeReplyPrivate;
-class Q_LOCATION_EXPORT QGeoSearchReply : public QObject
+class Q_LOCATION_EXPORT QGeocodeReply : public QObject
{
Q_OBJECT
@@ -66,8 +66,8 @@ public:
UnknownError
};
- QGeoSearchReply(Error error, const QString &errorString, QObject *parent = 0);
- virtual ~QGeoSearchReply();
+ QGeocodeReply(Error error, const QString &errorString, QObject *parent = 0);
+ virtual ~QGeocodeReply();
bool isFinished() const;
Error error() const;
@@ -83,10 +83,10 @@ public:
Q_SIGNALS:
void finished();
- void error(QGeoSearchReply::Error error, const QString &errorString = QString());
+ void error(QGeocodeReply::Error error, const QString &errorString = QString());
protected:
- QGeoSearchReply(QObject* parent = 0);
+ QGeocodeReply(QObject* parent = 0);
void setError(Error error, const QString &errorString);
void setFinished(bool finished);
@@ -99,8 +99,8 @@ protected:
void setOffset(int offset);
private:
- QGeoSearchReplyPrivate *d_ptr;
- Q_DISABLE_COPY(QGeoSearchReply)
+ QGeocodeReplyPrivate *d_ptr;
+ Q_DISABLE_COPY(QGeocodeReply)
};
QT_END_NAMESPACE
diff --git a/src/location/maps/qgeosearchreply_p.h b/src/location/maps/qgeocodereply_p.h
index 16431a6a..afcab0da 100644
--- a/src/location/maps/qgeosearchreply_p.h
+++ b/src/location/maps/qgeocodereply_p.h
@@ -39,8 +39,8 @@
**
****************************************************************************/
-#ifndef QGEOSEARCHREPLY_P_H
-#define QGEOSEARCHREPLY_P_H
+#ifndef QGEOCODEREPLY_P_H
+#define QGEOCODEREPLY_P_H
//
// W A R N I N G
@@ -53,7 +53,7 @@
// We mean it.
//
-#include "qgeosearchreply.h"
+#include "qgeocodereply.h"
#include "qgeoboundingarea.h"
@@ -63,14 +63,14 @@ QT_BEGIN_NAMESPACE
class QGeoLocation;
-class QGeoSearchReplyPrivate
+class QGeocodeReplyPrivate
{
public:
- QGeoSearchReplyPrivate();
- QGeoSearchReplyPrivate(QGeoSearchReply::Error error, const QString& errorString);
- ~QGeoSearchReplyPrivate();
+ QGeocodeReplyPrivate();
+ QGeocodeReplyPrivate(QGeocodeReply::Error error, const QString& errorString);
+ ~QGeocodeReplyPrivate();
- QGeoSearchReply::Error error;
+ QGeocodeReply::Error error;
QString errorString;
bool isFinished;
@@ -80,7 +80,7 @@ public:
int limit;
int offset;
private:
- Q_DISABLE_COPY(QGeoSearchReplyPrivate)
+ Q_DISABLE_COPY(QGeocodeReplyPrivate)
};
QT_END_NAMESPACE
diff --git a/src/location/maps/qgeosearchmanager.cpp b/src/location/maps/qgeocodingmanager.cpp
index c9e6f784..26382dee 100644
--- a/src/location/maps/qgeosearchmanager.cpp
+++ b/src/location/maps/qgeocodingmanager.cpp
@@ -39,9 +39,9 @@
**
****************************************************************************/
-#include "qgeosearchmanager.h"
-#include "qgeosearchmanager_p.h"
-#include "qgeosearchmanagerengine.h"
+#include "qgeocodingmanager.h"
+#include "qgeocodingmanager_p.h"
+#include "qgeocodingmanagerengine.h"
#include "qgeoboundingbox.h"
#include "qgeoboundingcircle.h"
@@ -51,10 +51,10 @@
QT_BEGIN_NAMESPACE
/*!
- \class QGeoSearchManager
+ \class QGeocodingManager
- \brief The QGeoSearchManager class provides support for searching
- operations related to geographic information.
+ \brief The QGeocodingManager class provides support for geocoding
+ operations.
\inmodule QtLocation
@@ -63,18 +63,18 @@ QT_BEGIN_NAMESPACE
\ingroup maps-places
The geocode(), reverseGeocode() and search() functions return
- QGeoSearchReply objects, which manage these operations and report on the
+ QGeocodeReply objects, which manage these operations and report on the
result of the operations and any errors which may have occurred.
The geocode() and reverseGeocode() functions can be used to convert
QGeoAddress instances to QGeoCoordinate instances and vice-versa.
- The search() function allows a user to perform a free text search
- for location information. If the string provided can be interpreted as
+ The geocode() function is also overloaded to allow a user to perform a free text
+ geocoding operation, if the string provided can be interpreted as
an address it can be geocoded to coordinate information.
- Instances of QGeoSearchManager can be accessed with
- QGeoServiceProvider::searchManager().
+ Instances of QGeocodingManager can be accessed with
+ QGeoServiceProvider::geocodingManager().
*/
/*!
@@ -82,47 +82,47 @@ QT_BEGIN_NAMESPACE
implementation provided by \a engine.
This constructor is used interally by QGeoServiceProviderFactory. Regular
- users should acquire instances of QGeoSearchManager with
- QGeoServiceProvider::searchManager();
+ users should acquire instances of QGeocodingManager with
+ QGeoServiceProvider::geocodingManager();
*/
-QGeoSearchManager::QGeoSearchManager(QGeoSearchManagerEngine *engine, QObject *parent)
+QGeocodingManager::QGeocodingManager(QGeocodingManagerEngine *engine, QObject *parent)
: QObject(parent),
- d_ptr(new QGeoSearchManagerPrivate())
+ d_ptr(new QGeocodingManagerPrivate())
{
d_ptr->engine = engine;
if (d_ptr->engine) {
d_ptr->engine->setParent(this);
connect(d_ptr->engine,
- SIGNAL(finished(QGeoSearchReply*)),
+ SIGNAL(finished(QGeocodeReply*)),
this,
- SIGNAL(finished(QGeoSearchReply*)));
+ SIGNAL(finished(QGeocodeReply*)));
connect(d_ptr->engine,
- SIGNAL(error(QGeoSearchReply*, QGeoSearchReply::Error, QString)),
+ SIGNAL(error(QGeocodeReply*, QGeocodeReply::Error, QString)),
this,
- SIGNAL(error(QGeoSearchReply*, QGeoSearchReply::Error, QString)));
+ SIGNAL(error(QGeocodeReply*, QGeocodeReply::Error, QString)));
} else {
- qFatal("The search manager engine that was set for this search manager was NULL.");
+ qFatal("The geocoding manager engine that was set for this geocoding manager was NULL.");
}
}
/*!
Destroys this manager.
*/
-QGeoSearchManager::~QGeoSearchManager()
+QGeocodingManager::~QGeocodingManager()
{
delete d_ptr;
}
/*!
Returns the name of the engine which implements the behaviour of this
- search manager.
+ geocoding manager.
The combination of managerName() and managerVersion() should be unique
amongst the plugin implementations.
*/
-QString QGeoSearchManager::managerName() const
+QString QGeocodingManager::managerName() const
{
// if (!d_ptr->engine)
// return QString();
@@ -132,12 +132,12 @@ QString QGeoSearchManager::managerName() const
/*!
Returns the version of the engine which implements the behaviour of this
- search manager.
+ geocoding manager.
The combination of managerName() and managerVersion() should be unique
amongst the plugin implementations.
*/
-int QGeoSearchManager::managerVersion() const
+int QGeocodingManager::managerVersion() const
{
// if (!d_ptr->engine)
// return -1;
@@ -149,16 +149,16 @@ int QGeoSearchManager::managerVersion() const
Begins the geocoding of \a address. Geocoding is the process of finding a
coordinate that corresponds to a given address.
- A QGeoSearchReply object will be returned, which can be used to manage the
+ A QGeocodeReply object will be returned, which can be used to manage the
geocoding operation and to return the results of the operation.
- This manager and the returned QGeoSearchReply object will emit signals
+ This manager and the returned QGeocodeReply object will emit signals
indicating if the operation completes or if errors occur.
If supportsGeocoding() returns false an
- QGeoSearchReply::UnsupportedOptionError will occur.
+ QGeocodeReply::UnsupportedOptionError will occur.
- Once the operation has completed, QGeoSearchReply::locations() can be used to
+ Once the operation has completed, QGeocodeReply::locations() can be used to
retrieve the results, which will consist of a list of QGeoLocation objects.
These object represent a combination of coordinate and address data.
@@ -172,14 +172,14 @@ int QGeoSearchManager::managerVersion() const
service will attempt to geocode all matches for the specified data.
The user is responsible for deleting the returned reply object, although
- this can be done in the slot connected to QGeoSearchManager::finished(),
- QGeoSearchManager::error(), QGeoSearchReply::finished() or
- QGeoSearchReply::error() with deleteLater().
+ this can be done in the slot connected to QGeocodingManager::finished(),
+ QGeocodingManager::error(), QGeocodeReply::finished() or
+ QGeocodeReply::error() with deleteLater().
*/
-QGeoSearchReply* QGeoSearchManager::geocode(const QGeoAddress &address, QGeoBoundingArea *bounds)
+QGeocodeReply* QGeocodingManager::geocode(const QGeoAddress &address, QGeoBoundingArea *bounds)
{
// if (!d_ptr->engine)
-// return new QGeoSearchReply(QGeoSearchReply::EngineNotSetError, "The search manager was not created with a valid engine.", this);
+// return new QGeocodeReply(QGeocodeReply::EngineNotSetError, "The geocoding manager was not created with a valid engine.", this);
return d_ptr->engine->geocode(address, bounds);
}
@@ -189,16 +189,16 @@ QGeoSearchReply* QGeoSearchManager::geocode(const QGeoAddress &address, QGeoBoun
Begins the reverse geocoding of \a coordinate. Reverse geocoding is the
process of finding an address that corresponds to a given coordinate.
- A QGeoSearchReply object will be returned, which can be used to manage the
+ A QGeocodeReply object will be returned, which can be used to manage the
reverse geocoding operation and to return the results of the operation.
- This manager and the returned QGeoSearchReply object will emit signals
+ This manager and the returned QGeocodeReply object will emit signals
indicating if the operation completes or if errors occur.
If supportsReverseGeocoding() returns false an
- QGeoSearchReply::UnsupportedOptionError will occur.
+ QGeocodeReply::UnsupportedOptionError will occur.
- At that point QGeoSearchReply::locations() can be used to retrieve the
+ At that point QGeocodeReply::locations() can be used to retrieve the
results, which will consist of a list of QGeoLocation objects. These object
represent a combination of coordinate and address data.
@@ -217,41 +217,35 @@ QGeoSearchReply* QGeoSearchManager::geocode(const QGeoAddress &address, QGeoBoun
limit the results to thos that are contained within \a bounds.
The user is responsible for deleting the returned reply object, although
- this can be done in the slot connected to QGeoSearchManager::finished(),
- QGeoSearchManager::error(), QGeoSearchReply::finished() or
- QGeoSearchReply::error() with deleteLater().
+ this can be done in the slot connected to QGeocodingManager::finished(),
+ QGeocodingManager::error(), QGeocodeReply::finished() or
+ QGeocodeReply::error() with deleteLater().
*/
-QGeoSearchReply* QGeoSearchManager::reverseGeocode(const QGeoCoordinate &coordinate, QGeoBoundingArea *bounds)
+QGeocodeReply* QGeocodingManager::reverseGeocode(const QGeoCoordinate &coordinate, QGeoBoundingArea *bounds)
{
// if (!d_ptr->engine)
-// return new QGeoSearchReply(QGeoSearchReply::EngineNotSetError, "The search manager was not created with a valid engine.", this);
+// return new QGeocodeReply(QGeocodeReply::EngineNotSetError, "The geocoding manager was not created with a valid engine.", this);
return d_ptr->engine->reverseGeocode(coordinate, bounds);
}
/*!
- Begins searching for a location matching \a searchString. The value of
- \a searchTypes will determine whether the search is for addresses only,
- for landmarks only or for both.
+ Begins geocoding for a location matching \a address.
- A QGeoSearchReply object will be returned, which can be used to manage the
+ A QGeocodeReply object will be returned, which can be used to manage the
geocoding operation and to return the results of the operation.
- This manager and the returned QGeoSearchReply object will emit signals
+ This manager and the returned QGeocodeReply object will emit signals
indicating if the operation completes or if errors occur.
- If supportsGeocoding() returns false and \a searchTypes is
- QGeoSearchManager::SearchGeocode an
- QGeoSearchReply::UnsupportedOptionError will occur.
-
- Once the operation has completed, QGeoSearchReply::locations() can be used to
+ Once the operation has completed, QGeocodeReply::locations() can be used to
retrieve the results, which will consist of a list of QGeoLocation objects.
These object represent a combination of coordinate and address data.
If \a limit is -1 the entire result set will be returned, otherwise at most
\a limit results will be returned.
- The \a offset parameter is used to ask the search service to not return the
+ The \a offset parameter is used to ask the geocoding service to not return the
first \a offset results.
The \a limit and \a offset results are used together to implement paging.
@@ -260,19 +254,19 @@ QGeoSearchReply* QGeoSearchManager::reverseGeocode(const QGeoCoordinate &coordin
limit the results to thos that are contained within \a bounds.
The user is responsible for deleting the returned reply object, although
- this can be done in the slot connected to QGeoSearchManager::finished(),
- QGeoSearchManager::error(), QGeoSearchReply::finished() or
- QGeoSearchReply::error() with deleteLater().
+ this can be done in the slot connected to QGeocodingManager::finished(),
+ QGeocodingManager::error(), QGeocodeReply::finished() or
+ QGeocodeReply::error() with deleteLater().
*/
-QGeoSearchReply* QGeoSearchManager::search(const QString &searchString,
+QGeocodeReply* QGeocodingManager::geocode(const QString &address,
int limit,
int offset,
QGeoBoundingArea *bounds)
{
// if (!d_ptr->engine)
-// return new QGeoSearchReply(QGeoSearchReply::EngineNotSetError, "The search manager was not created with a valid engine.", this);
+// return new QGeocodeReply(QGeocodeReply::EngineNotSetError, "The geocoding manager was not created with a valid engine.", this);
- QGeoSearchReply *reply = d_ptr->engine->search(searchString,
+ QGeocodeReply *reply = d_ptr->engine->geocode(address,
limit,
offset,
bounds);
@@ -282,7 +276,7 @@ QGeoSearchReply* QGeoSearchManager::search(const QString &searchString,
/*!
Returns whether this manager supports geocoding.
*/
-bool QGeoSearchManager::supportsGeocoding() const
+bool QGeocodingManager::supportsGeocoding() const
{
// if (!d_ptr->engine)
// return false;
@@ -293,7 +287,7 @@ bool QGeoSearchManager::supportsGeocoding() const
/*!
Returns whether this manager supports reverse geocoding.
*/
-bool QGeoSearchManager::supportsReverseGeocoding() const
+bool QGeocodingManager::supportsReverseGeocoding() const
{
return d_ptr->engine->supportsReverseGeocoding();
}
@@ -301,34 +295,34 @@ bool QGeoSearchManager::supportsReverseGeocoding() const
/*!
Sets the locale to be used by the this manager to \a locale.
- If this search manager supports returning the results
+ If this geocoding manager supports returning the results
in different languages, they will be returned in the language of \a locale.
The locale used defaults to the system locale if this is not set.
*/
-void QGeoSearchManager::setLocale(const QLocale &locale)
+void QGeocodingManager::setLocale(const QLocale &locale)
{
d_ptr->engine->setLocale(locale);
}
/*!
- Returns the locale used to hint to this search manager about what
+ Returns the locale used to hint to this geocoding manager about what
language to use for the results.
*/
-QLocale QGeoSearchManager::locale() const
+QLocale QGeocodingManager::locale() const
{
return d_ptr->engine->locale();
}
/*!
-\fn void QGeoSearchManager::finished(QGeoSearchReply* reply)
+\fn void QGeocodingManager::finished(QGeocodeReply* reply)
This signal is emitted when \a reply has finished processing.
- If reply::error() equals QGeoSearchReply::NoError then the processing
+ If reply::error() equals QGeocodeReply::NoError then the processing
finished successfully.
- This signal and QGeoSearchReply::finished() will be emitted at the same
+ This signal and QGeocodeReply::finished() will be emitted at the same
time.
\note Do no delete the \a reply object in the slot connected to this
@@ -336,15 +330,15 @@ QLocale QGeoSearchManager::locale() const
*/
/*!
-\fn void QGeoSearchManager::error(QGeoSearchReply* reply, QGeoSearchReply::Error error, QString errorString)
+\fn void QGeocodingManager::error(QGeocodeReply* reply, QGeocodeReply::Error error, QString errorString)
This signal is emitted when an error has been detected in the processing of
- \a reply. The QGeoSearchManager::finished() signal will probably follow.
+ \a reply. The QGeocodingManager::finished() signal will probably follow.
The error will be described by the error code \a error. If \a errorString is
not empty it will contain a textual description of the error.
- This signal and QGeoSearchReply::error() will be emitted at the same time.
+ This signal and QGeocodeReply::error() will be emitted at the same time.
\note Do no delete the \a reply object in the slot connected to this
signal. Use deleteLater() instead.
@@ -353,10 +347,10 @@ QLocale QGeoSearchManager::locale() const
/*******************************************************************************
*******************************************************************************/
-QGeoSearchManagerPrivate::QGeoSearchManagerPrivate()
+QGeocodingManagerPrivate::QGeocodingManagerPrivate()
: engine(0) {}
-QGeoSearchManagerPrivate::~QGeoSearchManagerPrivate()
+QGeocodingManagerPrivate::~QGeocodingManagerPrivate()
{
if (engine)
delete engine;
@@ -365,6 +359,6 @@ QGeoSearchManagerPrivate::~QGeoSearchManagerPrivate()
/*******************************************************************************
*******************************************************************************/
-#include "moc_qgeosearchmanager.cpp"
+#include "moc_qgeocodingmanager.cpp"
QT_END_NAMESPACE
diff --git a/src/location/maps/qgeosearchmanager.h b/src/location/maps/qgeocodingmanager.h
index 8255afa7..a981c9c6 100644
--- a/src/location/maps/qgeosearchmanager.h
+++ b/src/location/maps/qgeocodingmanager.h
@@ -39,10 +39,10 @@
**
****************************************************************************/
-#ifndef QGEOSEARCHMANAGER_H
-#define QGEOSEARCHMANAGER_H
+#ifndef QGEOCODINGMANAGER_H
+#define QGEOCODINGMANAGER_H
-#include "qgeosearchreply.h"
+#include "qgeocodereply.h"
#include "qgeoboundingbox.h"
#include <QObject>
@@ -52,30 +52,28 @@
QT_BEGIN_NAMESPACE
class QLocale;
-class QLandmarkManager;
+class QGeocodingManagerEngine;
+class QGeocodingManagerPrivate;
-class QGeoSearchManagerEngine;
-class QGeoSearchManagerPrivate;
-
-class Q_LOCATION_EXPORT QGeoSearchManager : public QObject
+class Q_LOCATION_EXPORT QGeocodingManager : public QObject
{
Q_OBJECT
public:
- ~QGeoSearchManager();
+ ~QGeocodingManager();
QString managerName() const;
int managerVersion() const;
- QGeoSearchReply* geocode(const QGeoAddress &address,
+ QGeocodeReply* geocode(const QGeoAddress &address,
QGeoBoundingArea *bounds = 0);
- QGeoSearchReply* reverseGeocode(const QGeoCoordinate &coordinate,
- QGeoBoundingArea *bounds = 0);
-
- QGeoSearchReply* search(const QString &searchString,
+ QGeocodeReply* geocode(const QString &searchString,
int limit = -1,
int offset = 0,
QGeoBoundingArea *bounds = 0);
+ QGeocodeReply* reverseGeocode(const QGeoCoordinate &coordinate,
+ QGeoBoundingArea *bounds = 0);
+
bool supportsGeocoding() const;
bool supportsReverseGeocoding() const;
@@ -83,14 +81,14 @@ public:
QLocale locale() const;
Q_SIGNALS:
- void finished(QGeoSearchReply* reply);
- void error(QGeoSearchReply* reply, QGeoSearchReply::Error error, QString errorString = QString());
+ void finished(QGeocodeReply* reply);
+ void error(QGeocodeReply* reply, QGeocodeReply::Error error, QString errorString = QString());
private:
- QGeoSearchManager(QGeoSearchManagerEngine *engine, QObject *parent = 0);
+ QGeocodingManager(QGeocodingManagerEngine *engine, QObject *parent = 0);
- QGeoSearchManagerPrivate *d_ptr;
- Q_DISABLE_COPY(QGeoSearchManager)
+ QGeocodingManagerPrivate *d_ptr;
+ Q_DISABLE_COPY(QGeocodingManager)
friend class QGeoServiceProvider;
};
diff --git a/src/location/maps/qgeosearchmanager_p.h b/src/location/maps/qgeocodingmanager_p.h
index 451b05c7..4cf00514 100644
--- a/src/location/maps/qgeosearchmanager_p.h
+++ b/src/location/maps/qgeocodingmanager_p.h
@@ -39,8 +39,8 @@
**
****************************************************************************/
-#ifndef QGEOSEARCHMANAGER_P_H
-#define QGEOSEARCHMANAGER_P_H
+#ifndef QGEOCODINGMANAGER_P_H
+#define QGEOCODINGMANAGER_P_H
//
// W A R N I N G
@@ -53,26 +53,26 @@
// We mean it.
//
-#include "qgeosearchmanager.h"
+#include "qgeocodingmanager.h"
-#include "qgeosearchreply.h"
+#include "qgeocodereply.h"
#include <QList>
QT_BEGIN_NAMESPACE
-class QGeoSearchManagerEngine;
+class QGeocodingManagerEngine;
-class QGeoSearchManagerPrivate
+class QGeocodingManagerPrivate
{
public:
- QGeoSearchManagerPrivate();
- ~QGeoSearchManagerPrivate();
+ QGeocodingManagerPrivate();
+ ~QGeocodingManagerPrivate();
- QGeoSearchManagerEngine *engine;
+ QGeocodingManagerEngine *engine;
private:
- Q_DISABLE_COPY(QGeoSearchManagerPrivate)
+ Q_DISABLE_COPY(QGeocodingManagerPrivate)
};
QT_END_NAMESPACE
diff --git a/src/location/maps/qgeosearchmanagerengine.cpp b/src/location/maps/qgeocodingmanagerengine.cpp
index 14bee38b..cdbee203 100644
--- a/src/location/maps/qgeosearchmanagerengine.cpp
+++ b/src/location/maps/qgeocodingmanagerengine.cpp
@@ -39,8 +39,8 @@
**
****************************************************************************/
-#include "qgeosearchmanagerengine.h"
-#include "qgeosearchmanagerengine_p.h"
+#include "qgeocodingmanagerengine.h"
+#include "qgeocodingmanagerengine_p.h"
#include "qgeoaddress.h"
#include "qgeocoordinate.h"
@@ -48,11 +48,11 @@
QT_BEGIN_NAMESPACE
/*!
- \class QGeoSearchManagerEngine
+ \class QGeocodingManagerEngine
- \brief The QGeoSearchManagerEngine class provides an interface and
+ \brief The QGeocodingManagerEngine class provides an interface and
convenience methods to implementers of QGeoServiceProvider plugins who want
- to provide support for searching operations related to geographic data.
+ to provide support for geocoding operations.
\inmodule QtLocation
\since 1.1
@@ -61,7 +61,7 @@ QT_BEGIN_NAMESPACE
In the default implementation, supportsGeocoding() and supportsReverseGeocoding() returns false while
geocode() and reverseGeocode()
- cause QGeoSearchReply::UnsupportedOptionError to occur.
+ cause QGeocodeReply::UnsupportedOptionError to occur.
If the service provider supports geocoding the subclass should provide an
implementation of geocode() and call setSupportsGeocoding(true) at
@@ -72,21 +72,21 @@ QT_BEGIN_NAMESPACE
setSupportsReverseGeocoding(true) at some point in time before
reverseGeoocode() is called.
- A subclass of QGeoSearchManagerEngine will often make use of a subclass
- fo QGeoSearchReply internally, in order to add any engine-specific
+ A subclass of QGeocodingManagerEngine will often make use of a subclass
+ fo QGeocodeReply internally, in order to add any engine-specific
data (such as a QNetworkReply object for network-based services) to the
- QGeoSearchReply instances used by the engine.
+ QGeocodeReply instances used by the engine.
- \sa QGeoSearchManager
+ \sa QGeocodingManager
*/
/*!
Constructs a new engine with the specified \a parent, using \a parameters
to pass any implementation specific data to the engine.
*/
-QGeoSearchManagerEngine::QGeoSearchManagerEngine(const QMap<QString, QVariant> &parameters, QObject *parent)
+QGeocodingManagerEngine::QGeocodingManagerEngine(const QMap<QString, QVariant> &parameters, QObject *parent)
: QObject(parent),
- d_ptr(new QGeoSearchManagerEnginePrivate())
+ d_ptr(new QGeocodingManagerEnginePrivate())
{
Q_UNUSED(parameters)
}
@@ -94,7 +94,7 @@ QGeoSearchManagerEngine::QGeoSearchManagerEngine(const QMap<QString, QVariant> &
/*!
Destroys this engine.
*/
-QGeoSearchManagerEngine::~QGeoSearchManagerEngine()
+QGeocodingManagerEngine::~QGeocodingManagerEngine()
{
delete d_ptr;
}
@@ -106,7 +106,7 @@ QGeoSearchManagerEngine::~QGeoSearchManagerEngine()
The combination of managerName() and managerVersion() should be unique
amongst plugin implementations.
*/
-void QGeoSearchManagerEngine::setManagerName(const QString &managerName)
+void QGeocodingManagerEngine::setManagerName(const QString &managerName)
{
d_ptr->managerName = managerName;
}
@@ -118,7 +118,7 @@ void QGeoSearchManagerEngine::setManagerName(const QString &managerName)
The combination of managerName() and managerVersion() should be unique
amongst plugin implementations.
*/
-QString QGeoSearchManagerEngine::managerName() const
+QString QGeocodingManagerEngine::managerName() const
{
return d_ptr->managerName;
}
@@ -129,7 +129,7 @@ QString QGeoSearchManagerEngine::managerName() const
The combination of managerName() and managerVersion() should be unique
amongst plugin implementations.
*/
-void QGeoSearchManagerEngine::setManagerVersion(int managerVersion)
+void QGeocodingManagerEngine::setManagerVersion(int managerVersion)
{
d_ptr->managerVersion = managerVersion;
}
@@ -140,7 +140,7 @@ void QGeoSearchManagerEngine::setManagerVersion(int managerVersion)
The combination of managerName() and managerVersion() should be unique
amongst plugin implementations.
*/
-int QGeoSearchManagerEngine::managerVersion() const
+int QGeocodingManagerEngine::managerVersion() const
{
return d_ptr->managerVersion;
}
@@ -149,16 +149,16 @@ int QGeoSearchManagerEngine::managerVersion() const
Begins the geocoding of \a address. Geocoding is the process of finding a
coordinate that corresponds to a given address.
- A QGeoSearchReply object will be returned, which can be used to manage the
+ A QGeocodeReply object will be returned, which can be used to manage the
geocoding operation and to return the results of the operation.
- This engine and the returned QGeoSearchReply object will emit signals
+ This engine and the returned QGeocodeReply object will emit signals
indicating if the operation completes or if errors occur.
If supportsGeocoding() returns false an
- QGeoSearchReply::UnsupportedOptionError will occur.
+ QGeocodeReply::UnsupportedOptionError will occur.
- Once the operation has completed, QGeoSearchReply::locations() can be used to
+ Once the operation has completed, QGeocodeReply::locations() can be used to
retrieve the results, which will consist of a list of QGeoLocation objects.
These object represent a combination of coordinate and address data.
@@ -172,16 +172,16 @@ int QGeoSearchManagerEngine::managerVersion() const
service will attempt to geocode all matches for the specified data.
The user is responsible for deleting the returned reply object, although
- this can be done in the slot connected to QGeoSearchManagerEngine::finished(),
- QGeoSearchManagerEngine::error(), QGeoSearchReply::finished() or
- QGeoSearchReply::error() with deleteLater().
+ this can be done in the slot connected to QGeocodingManagerEngine::finished(),
+ QGeocodingManagerEngine::error(), QGeocodeReply::finished() or
+ QGeocodeReply::error() with deleteLater().
*/
-QGeoSearchReply* QGeoSearchManagerEngine::geocode(const QGeoAddress &address,
+QGeocodeReply* QGeocodingManagerEngine::geocode(const QGeoAddress &address,
QGeoBoundingArea *bounds)
{
Q_UNUSED(address)
Q_UNUSED(bounds)
- return new QGeoSearchReply(QGeoSearchReply::UnsupportedOptionError,
+ return new QGeocodeReply(QGeocodeReply::UnsupportedOptionError,
QLatin1String("Geocoding is not supported by this service provider."), this);
}
@@ -189,16 +189,16 @@ QGeoSearchReply* QGeoSearchManagerEngine::geocode(const QGeoAddress &address,
Begins the reverse geocoding of \a coordinate. Reverse geocoding is the
process of finding an address that corresponds to a given coordinate.
- A QGeoSearchReply object will be returned, which can be used to manage the
+ A QGeocodeReply object will be returned, which can be used to manage the
reverse geocoding operation and to return the results of the operation.
- This engine and the returned QGeoSearchReply object will emit signals
+ This engine and the returned QGeocodeReply object will emit signals
indicating if the operation completes or if errors occur.
If supportsReverseGeocoding() returns false an
- QGeoSearchReply::UnsupportedOptionError will occur.
+ QGeocodeReply::UnsupportedOptionError will occur.
- At that point QGeoSearchReply::locations() can be used to retrieve the
+ At that point QGeocodeReply::locations() can be used to retrieve the
results, which will consist of a list of QGeoLocation objects. These object
represent a combination of coordinate and address data.
@@ -217,36 +217,36 @@ QGeoSearchReply* QGeoSearchManagerEngine::geocode(const QGeoAddress &address,
limit the results to those that are contained by \a bounds.
The user is responsible for deleting the returned reply object, although
- this can be done in the slot connected to QGeoSearchManagerEngine::finished(),
- QGeoSearchManagerEngine::error(), QGeoSearchReply::finished() or
- QGeoSearchReply::error() with deleteLater().
+ this can be done in the slot connected to QGeocodingManagerEngine::finished(),
+ QGeocodingManagerEngine::error(), QGeocodeReply::finished() or
+ QGeocodeReply::error() with deleteLater().
*/
-QGeoSearchReply* QGeoSearchManagerEngine::reverseGeocode(const QGeoCoordinate &coordinate,
+QGeocodeReply* QGeocodingManagerEngine::reverseGeocode(const QGeoCoordinate &coordinate,
QGeoBoundingArea *bounds)
{
Q_UNUSED(coordinate)
Q_UNUSED(bounds)
- return new QGeoSearchReply(QGeoSearchReply::UnsupportedOptionError,
+ return new QGeocodeReply(QGeocodeReply::UnsupportedOptionError,
QLatin1String("Reverse geocoding is not supported by this service provider."), this);
}
/*!
- Begins searching for a location matching \a searchString.
+ Begins geocoding for a location matching \a address.
- A QGeoSearchReply object will be returned, which can be used to manage the
+ A QGeocodeReply object will be returned, which can be used to manage the
geocoding operation and to return the results of the operation.
- This engine and the returned QGeoSearchReply object will emit signals
+ This engine and the returned QGeocodeReply object will emit signals
indicating if the operation completes or if errors occur.
- Once the operation has completed, QGeoSearchReply::locations() can be used to
+ Once the operation has completed, QGeocodeReply::locations() can be used to
retrieve the results, which will consist of a list of QGeoLocation objects.
These object represent a combination of coordinate and address data.
If \a limit is -1 the entire result set will be returned, otherwise at most
\a limit results will be returned.
- The \a offset parameter is used to ask the search service to not return the
+ The \a offset parameter is used to ask the geocoding service to not return the
first \a offset results.
The \a limit and \a offset results are used together to implement paging.
@@ -255,21 +255,21 @@ QGeoSearchReply* QGeoSearchManagerEngine::reverseGeocode(const QGeoCoordinate &c
limit the results to those that are contained by \a bounds.
The user is responsible for deleting the returned reply object, although
- this can be done in the slot connected to QGeoSearchManagerEngine::finished(),
- QGeoSearchManagerEngine::error(), QGeoSearchReply::finished() or
- QGeoSearchReply::error() with deleteLater().
+ this can be done in the slot connected to QGeocodingManagerEngine::finished(),
+ QGeocodingManagerEngine::error(), QGeocodeReply::finished() or
+ QGeocodeReply::error() with deleteLater().
*/
-QGeoSearchReply* QGeoSearchManagerEngine::search(const QString &searchString,
+QGeocodeReply* QGeocodingManagerEngine::geocode(const QString &address,
int limit,
int offset,
QGeoBoundingArea *bounds)
{
- Q_UNUSED(searchString)
+ Q_UNUSED(address)
Q_UNUSED(limit)
Q_UNUSED(offset)
Q_UNUSED(bounds)
- return new QGeoSearchReply(QGeoSearchReply::UnsupportedOptionError,
+ return new QGeocodeReply(QGeocodeReply::UnsupportedOptionError,
QLatin1String("Searching is not supported by this service provider."), this);
}
@@ -280,7 +280,7 @@ QGeoSearchReply* QGeoSearchManagerEngine::search(const QString &searchString,
reports its capabilities correctly. If this function is not used the
engine will report that it does not support geocoding.
*/
-void QGeoSearchManagerEngine::setSupportsGeocoding(bool supported)
+void QGeocodingManagerEngine::setSupportsGeocoding(bool supported)
{
d_ptr->supportsGeocoding = supported;
}
@@ -288,7 +288,7 @@ void QGeoSearchManagerEngine::setSupportsGeocoding(bool supported)
/*!
Returns whether this engine supports geocoding.
*/
-bool QGeoSearchManagerEngine::supportsGeocoding() const
+bool QGeocodingManagerEngine::supportsGeocoding() const
{
return d_ptr->supportsGeocoding;
}
@@ -300,7 +300,7 @@ bool QGeoSearchManagerEngine::supportsGeocoding() const
reports its capabilities correctly. If this function is not used the
engine will report that it does not support reverse geocoding.
*/
-void QGeoSearchManagerEngine::setSupportsReverseGeocoding(bool supported)
+void QGeocodingManagerEngine::setSupportsReverseGeocoding(bool supported)
{
d_ptr->supportsReverseGeocoding = supported;
}
@@ -308,7 +308,7 @@ void QGeoSearchManagerEngine::setSupportsReverseGeocoding(bool supported)
/*!
Returns whether this engine supports reverse geocoding.
*/
-bool QGeoSearchManagerEngine::supportsReverseGeocoding() const
+bool QGeocodingManagerEngine::supportsReverseGeocoding() const
{
return d_ptr->supportsReverseGeocoding;
}
@@ -316,34 +316,34 @@ bool QGeoSearchManagerEngine::supportsReverseGeocoding() const
/*!
Sets the locale to be used by the this manager to \a locale.
- If this search manager supports returning the results
+ If this geocoding manager supports returning the results
in different languages, they will be returned in the language of \a locale.
The locale used defaults to the system locale if this is not set.
*/
-void QGeoSearchManagerEngine::setLocale(const QLocale &locale)
+void QGeocodingManagerEngine::setLocale(const QLocale &locale)
{
d_ptr->locale = locale;
}
/*!
- Returns the locale used to hint to this search manager about what
+ Returns the locale used to hint to this geocoding manager about what
language to use for the results.
*/
-QLocale QGeoSearchManagerEngine::locale() const
+QLocale QGeocodingManagerEngine::locale() const
{
return d_ptr->locale;
}
/*!
-\fn void QGeoSearchManagerEngine::finished(QGeoSearchReply* reply)
+\fn void QGeocodingManagerEngine::finished(QGeocodeReply* reply)
This signal is emitted when \a reply has finished processing.
- If reply::error() equals QGeoSearchReply::NoError then the processing
+ If reply::error() equals QGeocodeReply::NoError then the processing
finished successfully.
- This signal and QGeoSearchReply::finished() will be emitted at the same
+ This signal and QGeocodeReply::finished() will be emitted at the same
time.
\note Do no delete the \a reply object in the slot connected to this
@@ -351,15 +351,15 @@ QLocale QGeoSearchManagerEngine::locale() const
*/
/*!
-\fn void QGeoSearchManagerEngine::error(QGeoSearchReply* reply, QGeoSearchReply::Error error, QString errorString)
+\fn void QGeocodingManagerEngine::error(QGeocodeReply* reply, QGeocodeReply::Error error, QString errorString)
This signal is emitted when an error has been detected in the processing of
- \a reply. The QGeoSearchManagerEngine::finished() signal will probably follow.
+ \a reply. The QGeocodingManagerEngine::finished() signal will probably follow.
The error will be described by the error code \a error. If \a errorString is
not empty it will contain a textual description of the error.
- This signal and QGeoSearchReply::error() will be emitted at the same time.
+ This signal and QGeocodeReply::error() will be emitted at the same time.
\note Do no delete the \a reply object in the slot connected to this
signal. Use deleteLater() instead.
@@ -368,15 +368,15 @@ QLocale QGeoSearchManagerEngine::locale() const
/*******************************************************************************
*******************************************************************************/
-QGeoSearchManagerEnginePrivate::QGeoSearchManagerEnginePrivate()
+QGeocodingManagerEnginePrivate::QGeocodingManagerEnginePrivate()
: managerVersion(-1),
supportsGeocoding(false),
supportsReverseGeocoding(false) {}
-QGeoSearchManagerEnginePrivate::~QGeoSearchManagerEnginePrivate()
+QGeocodingManagerEnginePrivate::~QGeocodingManagerEnginePrivate()
{
}
-#include "moc_qgeosearchmanagerengine.cpp"
+#include "moc_qgeocodingmanagerengine.cpp"
QT_END_NAMESPACE
diff --git a/src/location/maps/qgeosearchmanagerengine.h b/src/location/maps/qgeocodingmanagerengine.h
index 48bd7775..44df5e1c 100644
--- a/src/location/maps/qgeosearchmanagerengine.h
+++ b/src/location/maps/qgeocodingmanagerengine.h
@@ -39,11 +39,11 @@
**
****************************************************************************/
-#ifndef QGEOSEARCHMANAGERENGINE_H
-#define QGEOSEARCHMANAGERENGINE_H
+#ifndef QGEOCODINGMANAGERENGINE_H
+#define QGEOCODINGMANAGERENGINE_H
-#include "qgeosearchmanager.h"
-#include "qgeosearchreply.h"
+#include "qgeocodingmanager.h"
+#include "qgeocodereply.h"
#include "qgeoboundingbox.h"
#include <QObject>
@@ -51,27 +51,28 @@
QT_BEGIN_NAMESPACE
-class QGeoSearchManagerEnginePrivate;
+class QGeocodingManagerEnginePrivate;
-class Q_LOCATION_EXPORT QGeoSearchManagerEngine : public QObject
+class Q_LOCATION_EXPORT QGeocodingManagerEngine : public QObject
{
Q_OBJECT
public:
- QGeoSearchManagerEngine(const QMap<QString, QVariant> &parameters, QObject *parent = 0);
- virtual ~QGeoSearchManagerEngine();
+ QGeocodingManagerEngine(const QMap<QString, QVariant> &parameters, QObject *parent = 0);
+ virtual ~QGeocodingManagerEngine();
QString managerName() const;
int managerVersion() const;
- virtual QGeoSearchReply* geocode(const QGeoAddress &address,
+ virtual QGeocodeReply* geocode(const QGeoAddress &address,
QGeoBoundingArea *bounds);
- virtual QGeoSearchReply* reverseGeocode(const QGeoCoordinate &coordinate,
- QGeoBoundingArea *bounds);
-
- virtual QGeoSearchReply* search(const QString &searchString,
+ virtual QGeocodeReply* geocode(const QString &address,
int limit,
int offset,
QGeoBoundingArea *bounds);
+ virtual QGeocodeReply* reverseGeocode(const QGeoCoordinate &coordinate,
+ QGeoBoundingArea *bounds);
+
+
bool supportsGeocoding() const;
bool supportsReverseGeocoding() const;
@@ -80,8 +81,8 @@ public:
QLocale locale() const;
Q_SIGNALS:
- void finished(QGeoSearchReply* reply);
- void error(QGeoSearchReply* reply, QGeoSearchReply::Error error, QString errorString = QString());
+ void finished(QGeocodeReply* reply);
+ void error(QGeocodeReply* reply, QGeocodeReply::Error error, QString errorString = QString());
protected:
void setSupportsGeocoding(bool supported);
@@ -91,8 +92,8 @@ private:
void setManagerName(const QString &managerName);
void setManagerVersion(int managerVersion);
- QGeoSearchManagerEnginePrivate *d_ptr;
- Q_DISABLE_COPY(QGeoSearchManagerEngine)
+ QGeocodingManagerEnginePrivate *d_ptr;
+ Q_DISABLE_COPY(QGeocodingManagerEngine)
friend class QGeoServiceProvider;
};
diff --git a/src/location/maps/qgeosearchmanagerengine_p.h b/src/location/maps/qgeocodingmanagerengine_p.h
index 44ce49af..0f3d46c7 100644
--- a/src/location/maps/qgeosearchmanagerengine_p.h
+++ b/src/location/maps/qgeocodingmanagerengine_p.h
@@ -39,8 +39,8 @@
**
****************************************************************************/
-#ifndef QGEOSEARCHMANAGERENGINE_P_H
-#define QGEOSEARCHMANAGERENGINE_P_H
+#ifndef QGEOCODINGMANAGERENGINE_P_H
+#define QGEOCODINGMANAGERENGINE_P_H
//
// W A R N I N G
@@ -53,18 +53,18 @@
// We mean it.
//
-#include "qgeosearchmanagerengine.h"
+#include "qgeocodingmanagerengine.h"
#include <QList>
#include <QLocale>
QT_BEGIN_NAMESPACE
-class QGeoSearchManagerEnginePrivate
+class QGeocodingManagerEnginePrivate
{
public:
- QGeoSearchManagerEnginePrivate();
- ~QGeoSearchManagerEnginePrivate();
+ QGeocodingManagerEnginePrivate();
+ ~QGeocodingManagerEnginePrivate();
QString managerName;
int managerVersion;
@@ -75,7 +75,7 @@ public:
QLocale locale;
private:
- Q_DISABLE_COPY(QGeoSearchManagerEnginePrivate)
+ Q_DISABLE_COPY(QGeocodingManagerEnginePrivate)
};
QT_END_NAMESPACE
diff --git a/src/location/maps/qgeoserviceprovider.cpp b/src/location/maps/qgeoserviceprovider.cpp
index 360514ea..52bcec36 100644
--- a/src/location/maps/qgeoserviceprovider.cpp
+++ b/src/location/maps/qgeoserviceprovider.cpp
@@ -43,11 +43,11 @@
#include "qgeoserviceprovider_p.h"
#include "qgeoserviceproviderfactory.h"
-#include "qgeosearchmanager.h"
+#include "qgeocodingmanager.h"
#include "qgeomappingmanager.h"
#include "qgeoroutingmanager.h"
#include "qplacemanager.h"
-#include "qgeosearchmanagerengine.h"
+#include "qgeocodingmanagerengine.h"
#include "qgeomappingmanagerengine.h"
#include "qgeoroutingmanagerengine.h"
#include "qplacemanagerengine.h"
@@ -153,50 +153,50 @@ QGeoServiceProvider::~QGeoServiceProvider()
}
/*!
- Returns the QGeoSearchManager made available by the service
+ Returns the QGeocodingManager made available by the service
provider.
This function will return 0 if the service provider does not provide
any geocoding services.
- This function will attempt to construct a QGeoSearchManager instance
+ This function will attempt to construct a QGeocodingManager instance
when it is called for the first time. If the attempt is successful the
- QGeoSearchManager will be cached, otherwise each call of this function
- will attempt to construct a QGeoSearchManager instance until the
+ QGeocodingManager will be cached, otherwise each call of this function
+ will attempt to construct a QGeocodingManager instance until the
construction is successful.
After this function has been called, error() and errorString() will
report any errors which occurred during the construction of the
- QGeoSearchManager.
+ QGeocodingManager.
*/
-QGeoSearchManager* QGeoServiceProvider::searchManager() const
+QGeocodingManager* QGeoServiceProvider::geocodingManager() const
{
- if (!d_ptr->factory || (d_ptr->searchError != QGeoServiceProvider::NoError))
+ if (!d_ptr->factory || (d_ptr->geocodeError != QGeoServiceProvider::NoError))
return 0;
- if (!d_ptr->searchManager) {
- QGeoSearchManagerEngine *engine = d_ptr->factory->createSearchManagerEngine(d_ptr->parameterMap,
- &(d_ptr->searchError),
- &(d_ptr->searchErrorString));
+ if (!d_ptr->geocodingManager) {
+ QGeocodingManagerEngine *engine = d_ptr->factory->createGeocodingManagerEngine(d_ptr->parameterMap,
+ &(d_ptr->geocodeError),
+ &(d_ptr->geocodeErrorString));
if (engine) {
engine->setManagerName(d_ptr->factory->providerName());
engine->setManagerVersion(d_ptr->factory->providerVersion());
- d_ptr->searchManager = new QGeoSearchManager(engine);
+ d_ptr->geocodingManager = new QGeocodingManager(engine);
} else {
- d_ptr->searchError = QGeoServiceProvider::NotSupportedError;
- d_ptr->searchErrorString = QLatin1String("The service provider does not support searchManager().");
+ d_ptr->geocodeError = QGeoServiceProvider::NotSupportedError;
+ d_ptr->geocodeErrorString = QLatin1String("The service provider does not support geocodingManager().");
}
- if (d_ptr->searchError != QGeoServiceProvider::NoError) {
- if (d_ptr->searchManager)
- delete d_ptr->searchManager;
- d_ptr->searchManager = 0;
- d_ptr->error = d_ptr->searchError;
- d_ptr->errorString = d_ptr->searchErrorString;
+ if (d_ptr->geocodeError != QGeoServiceProvider::NoError) {
+ if (d_ptr->geocodingManager)
+ delete d_ptr->geocodingManager;
+ d_ptr->geocodingManager = 0;
+ d_ptr->error = d_ptr->geocodeError;
+ d_ptr->errorString = d_ptr->geocodeErrorString;
}
}
- return d_ptr->searchManager;
+ return d_ptr->geocodingManager;
}
/*!
@@ -362,11 +362,11 @@ QString QGeoServiceProvider::errorString() const
QGeoServiceProviderPrivate::QGeoServiceProviderPrivate()
: factory(0),
- searchManager(0),
+ geocodingManager(0),
routingManager(0),
mappingManager(0),
placeManager(0),
- searchError(QGeoServiceProvider::NoError),
+ geocodeError(QGeoServiceProvider::NoError),
routingError(QGeoServiceProvider::NoError),
mappingError(QGeoServiceProvider::NoError),
placeError(QGeoServiceProvider::NoError),
@@ -374,8 +374,8 @@ QGeoServiceProviderPrivate::QGeoServiceProviderPrivate()
QGeoServiceProviderPrivate::~QGeoServiceProviderPrivate()
{
- if (searchManager)
- delete searchManager;
+ if (geocodingManager)
+ delete geocodingManager;
if (routingManager)
delete routingManager;
diff --git a/src/location/maps/qgeoserviceprovider.h b/src/location/maps/qgeoserviceprovider.h
index ebda46c7..7dcc9a90 100644
--- a/src/location/maps/qgeoserviceprovider.h
+++ b/src/location/maps/qgeoserviceprovider.h
@@ -54,11 +54,11 @@ QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
class QStringList;
-class QGeoSearchManager;
+class QGeocodingManager;
class QGeoMappingManager;
class QGeoRoutingManager;
class QPlaceManager;
-class QGeoSearchManagerEngine;
+class QGeocodingManagerEngine;
class QGeoMappingManagerEngine;
class QGeoRoutingManagerEngine;
class QPlaceManagerEngine;
@@ -80,7 +80,7 @@ public:
~QGeoServiceProvider();
- QGeoSearchManager* searchManager() const;
+ QGeocodingManager* geocodingManager() const;
QGeoMappingManager* mappingManager() const;
QGeoRoutingManager* routingManager() const;
QPlaceManager *placeManager() const;
diff --git a/src/location/maps/qgeoserviceprovider_p.h b/src/location/maps/qgeoserviceprovider_p.h
index bb194e09..0d2bb772 100644
--- a/src/location/maps/qgeoserviceprovider_p.h
+++ b/src/location/maps/qgeoserviceprovider_p.h
@@ -59,7 +59,7 @@
QT_BEGIN_NAMESPACE
-class QGeoSearchManager;
+class QGeocodingManager;
class QGeoRoutingManager;
class QGeoMappingManager;
@@ -77,17 +77,17 @@ public:
QMap<QString, QVariant> parameterMap;
- QGeoSearchManager *searchManager;
+ QGeocodingManager *geocodingManager;
QGeoRoutingManager *routingManager;
QGeoMappingManager *mappingManager;
QPlaceManager *placeManager;
- QGeoServiceProvider::Error searchError;
+ QGeoServiceProvider::Error geocodeError;
QGeoServiceProvider::Error routingError;
QGeoServiceProvider::Error mappingError;
QGeoServiceProvider::Error placeError;
- QString searchErrorString;
+ QString geocodeErrorString;
QString routingErrorString;
QString mappingErrorString;
QString placeErrorString;
diff --git a/src/location/maps/qgeoserviceproviderfactory.cpp b/src/location/maps/qgeoserviceproviderfactory.cpp
index 196f6877..20d10834 100644
--- a/src/location/maps/qgeoserviceproviderfactory.cpp
+++ b/src/location/maps/qgeoserviceproviderfactory.cpp
@@ -88,8 +88,8 @@ amongst the plugins.
*/
/*!
- Returns a new QGeoSearchManagerEngine instance, initialized with \a
- parameters, which implements the location searching functionality.
+ Returns a new QGeocodingManagerEngine instance, initialized with \a
+ parameters, which implements the location geocoding functionality.
If \a error is not 0 it should be set to QGeoServiceProvider::NoError on
success or an appropriate QGeoServiceProvider::Error on failure.
@@ -100,7 +100,7 @@ amongst the plugins.
The default implementation returns 0, which causes a
QGeoServiceProvider::NotSupportedError in QGeoServiceProvider.
*/
-QGeoSearchManagerEngine* QGeoServiceProviderFactory::createSearchManagerEngine(const QMap<QString, QVariant> &parameters,
+QGeocodingManagerEngine* QGeoServiceProviderFactory::createGeocodingManagerEngine(const QMap<QString, QVariant> &parameters,
QGeoServiceProvider::Error *error,
QString *errorString) const
{
@@ -113,7 +113,7 @@ QGeoSearchManagerEngine* QGeoServiceProviderFactory::createSearchManagerEngine(c
/*!
Returns a new QGeoMappingManagerEngine instance, initialized with \a
- parameters, which implements the location searching functionality.
+ parameters, which implements mapping functionality.
If \a error is not 0 it should be set to QGeoServiceProvider::NoError on
success or an appropriate QGeoServiceProvider::Error on failure.
@@ -137,7 +137,7 @@ QGeoMappingManagerEngine* QGeoServiceProviderFactory::createMappingManagerEngine
/*!
Returns a new QGeoRoutingManagerEngine instance, initialized with \a
- parameters, which implements the location searching functionality.
+ parameters, which implements routing functionality.
If \a error is not 0 it should be set to QGeoServiceProvider::NoError on
success or an appropriate QGeoServiceProvider::Error on failure.
diff --git a/src/location/maps/qgeoserviceproviderfactory.h b/src/location/maps/qgeoserviceproviderfactory.h
index d8a80dd4..9877b5e8 100644
--- a/src/location/maps/qgeoserviceproviderfactory.h
+++ b/src/location/maps/qgeoserviceproviderfactory.h
@@ -59,7 +59,7 @@ public:
virtual QString providerName() const = 0;
virtual int providerVersion() const = 0;
- virtual QGeoSearchManagerEngine* createSearchManagerEngine(const QMap<QString, QVariant> &parameters,
+ virtual QGeocodingManagerEngine* createGeocodingManagerEngine(const QMap<QString, QVariant> &parameters,
QGeoServiceProvider::Error *error,
QString *errorString) const;
virtual QGeoMappingManagerEngine* createMappingManagerEngine(const QMap<QString, QVariant> &parameters,