summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorabcd <qt-info@nokia.com>2011-07-31 21:33:56 +1000
committerabcd <qt_abcd1@ovi.com>2011-08-09 03:48:02 +0200
commit2904df66e87534ff348f7af13b0d513c8ecc746c (patch)
tree70fb416d39158f80d9445e1e9f0d1a2c6de20b48 /examples
parent38e2574bf27f66100bf9ec16592f938a4b7a02b1 (diff)
downloadqtlocation-2904df66e87534ff348f7af13b0d513c8ecc746c.tar.gz
Rename QGeoSearchManager to QGeocodingManager
Also do related renames like QGeoSearchReply to QGeocodeReply Change-Id: I31cc6da4fda03299e905b4938cdfcff3c20aa8c7 Reviewed-on: http://codereview.qt.nokia.com/2710 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: abcd <qt_abcd1@ovi.com>
Diffstat (limited to 'examples')
-rw-r--r--examples/maps/mainwindow.cpp18
-rw-r--r--examples/maps/mainwindow.h2
-rw-r--r--examples/maps/marker.cpp32
-rw-r--r--examples/maps/marker.h12
-rw-r--r--examples/maps/navigator.cpp8
-rw-r--r--examples/maps/navigator.h12
6 files changed, 42 insertions, 42 deletions
diff --git a/examples/maps/mainwindow.cpp b/examples/maps/mainwindow.cpp
index 4ffd6930..6978ef32 100644
--- a/examples/maps/mainwindow.cpp
+++ b/examples/maps/mainwindow.cpp
@@ -134,7 +134,7 @@ void MainWindow::initialize()
foreach (QString provider, providers) {
serviceProvider = new QGeoServiceProvider(provider);
if (serviceProvider->mappingManager() &&
- serviceProvider->searchManager() &&
+ serviceProvider->geocodingManager() &&
serviceProvider->routingManager())
break;
}
@@ -147,7 +147,7 @@ void MainWindow::initialize()
}
if (!serviceProvider->mappingManager() ||
- !serviceProvider->searchManager() ||
+ !serviceProvider->geocodingManager() ||
!serviceProvider->routingManager()) {
QMessageBox::information(this, tr("Maps Demo"),
tr("No geoservice found with mapping/search/routing"));
@@ -161,11 +161,11 @@ void MainWindow::initialize()
if (markerManager)
delete markerManager;
- markerManager = new MarkerManager(serviceProvider->searchManager());
+ markerManager = new MarkerManager(serviceProvider->geocodingManager());
mapsWidget->setMarkerManager(markerManager);
- connect(markerManager, SIGNAL(searchError(QGeoSearchReply::Error,QString)),
- this, SLOT(showErrorMessage(QGeoSearchReply::Error,QString)));
+ connect(markerManager, SIGNAL(searchError(QGeocodeReply::Error,QString)),
+ this, SLOT(showErrorMessage(QGeocodeReply::Error,QString)));
connect(mapsWidget, SIGNAL(markerClicked(Marker*)),
this, SLOT(showMarkerDialog(Marker*)));
connect(mapsWidget, SIGNAL(mapPanned()),
@@ -224,14 +224,14 @@ void MainWindow::showNavigateDialog()
lastNavigator->deleteLater();
Navigator *nvg = new Navigator(serviceProvider->routingManager(),
- serviceProvider->searchManager(),
+ serviceProvider->geocodingManager(),
mapsWidget, nd.destinationAddress(),
req);
lastNavigator = nvg;
- connect(nvg, SIGNAL(searchError(QGeoSearchReply::Error,QString)),
- this, SLOT(showErrorMessage(QGeoSearchReply::Error,QString)));
+ connect(nvg, SIGNAL(searchError(QGeocodeReply::Error,QString)),
+ this, SLOT(showErrorMessage(QGeocodeReply::Error,QString)));
connect(nvg, SIGNAL(routingError(QGeoRouteReply::Error,QString)),
this, SLOT(showErrorMessage(QGeoRouteReply::Error,QString)));
@@ -260,7 +260,7 @@ void MainWindow::showSearchDialog()
}
}
-void MainWindow::showErrorMessage(QGeoSearchReply::Error err, QString msg)
+void MainWindow::showErrorMessage(QGeocodeReply::Error err, QString msg)
{
Q_UNUSED(err)
QMessageBox::critical(this, tr("Error"), msg);
diff --git a/examples/maps/mainwindow.h b/examples/maps/mainwindow.h
index d1480757..dbe03380 100644
--- a/examples/maps/mainwindow.h
+++ b/examples/maps/mainwindow.h
@@ -76,7 +76,7 @@ private slots:
void updateMyPosition(QGeoPositionInfo info);
void disableTracking();
- void showErrorMessage(QGeoSearchReply::Error err, QString msg);
+ void showErrorMessage(QGeocodeReply::Error err, QString msg);
void showErrorMessage(QGeoRouteReply::Error err, QString msg);
void openNetworkSession();
diff --git a/examples/maps/marker.cpp b/examples/maps/marker.cpp
index 53efc908..c755d9d2 100644
--- a/examples/maps/marker.cpp
+++ b/examples/maps/marker.cpp
@@ -163,13 +163,13 @@ public:
QGraphicsGeoMap *map;
StatusBarItem *status;
- QGeoSearchManager *searchManager;
+ QGeocodingManager *searchManager;
- QSet<QGeoSearchReply*> forwardReplies;
- QSet<QGeoSearchReply*> reverseReplies;
+ QSet<QGeocodeReply*> forwardReplies;
+ QSet<QGeocodeReply*> reverseReplies;
};
-MarkerManager::MarkerManager(QGeoSearchManager *searchManager, QObject *parent) :
+MarkerManager::MarkerManager(QGeocodingManager *searchManager, QObject *parent) :
QObject(parent),
d(new MarkerManagerPrivate)
{
@@ -185,10 +185,10 @@ MarkerManager::MarkerManager(QGeoSearchManager *searchManager, QObject *parent)
connect(d->myLocation, SIGNAL(coordinateChanged(QGeoCoordinate)),
this, SLOT(myLocationChanged(QGeoCoordinate)));
- connect(d->searchManager, SIGNAL(finished(QGeoSearchReply*)),
- this, SLOT(replyFinished(QGeoSearchReply*)));
- connect(d->searchManager, SIGNAL(finished(QGeoSearchReply*)),
- this, SLOT(reverseReplyFinished(QGeoSearchReply*)));
+ connect(d->searchManager, SIGNAL(finished(QGeocodeReply*)),
+ this, SLOT(replyFinished(QGeocodeReply*)));
+ connect(d->searchManager, SIGNAL(finished(QGeocodeReply*)),
+ this, SLOT(reverseReplyFinished(QGeocodeReply*)));
}
MarkerManager::~MarkerManager()
@@ -216,15 +216,15 @@ void MarkerManager::setMyLocation(QGeoCoordinate coord)
void MarkerManager::search(QString query, qreal radius)
{
- QGeoSearchReply *reply;
+ QGeocodeReply *reply;
if (radius > 0) {
QGeoBoundingCircle *boundingCircle = new QGeoBoundingCircle(
d->myLocation->coordinate(), radius);
- reply = d->searchManager->search(query,
+ reply = d->searchManager->geocode(query,
-1, 0,
boundingCircle);
} else {
- reply = d->searchManager->search(query);
+ reply = d->searchManager->geocode(query);
}
d->forwardReplies.insert(reply);
@@ -237,8 +237,8 @@ void MarkerManager::search(QString query, qreal radius)
if (reply->isFinished()) {
replyFinished(reply);
} else {
- connect(reply, SIGNAL(error(QGeoSearchReply::Error,QString)),
- this, SIGNAL(searchError(QGeoSearchReply::Error,QString)));
+ connect(reply, SIGNAL(error(QGeocodeReply::Error,QString)),
+ this, SIGNAL(searchError(QGeocodeReply::Error,QString)));
}
}
@@ -260,7 +260,7 @@ void MarkerManager::myLocationChanged(QGeoCoordinate location)
if (d->revGeocodeRunning) {
d->myLocHasMoved = true;
} else {
- QGeoSearchReply *reply = d->searchManager->reverseGeocode(location);
+ QGeocodeReply *reply = d->searchManager->reverseGeocode(location);
d->reverseReplies.insert(reply);
d->myLocHasMoved = false;
@@ -273,7 +273,7 @@ void MarkerManager::myLocationChanged(QGeoCoordinate location)
}
}
-void MarkerManager::reverseReplyFinished(QGeoSearchReply *reply)
+void MarkerManager::reverseReplyFinished(QGeocodeReply *reply)
{
if (!d->reverseReplies.contains(reply))
return;
@@ -291,7 +291,7 @@ void MarkerManager::reverseReplyFinished(QGeoSearchReply *reply)
reply->deleteLater();
}
-void MarkerManager::replyFinished(QGeoSearchReply *reply)
+void MarkerManager::replyFinished(QGeocodeReply *reply)
{
if (!d->forwardReplies.contains(reply))
return;
diff --git a/examples/maps/marker.h b/examples/maps/marker.h
index c6ae4e00..b9fa7f4c 100644
--- a/examples/maps/marker.h
+++ b/examples/maps/marker.h
@@ -45,11 +45,11 @@
#include <QSignalMapper>
#include "qgeomappixmapobject.h"
-#include "qgeosearchmanager.h"
+#include "qgeocodingmanager.h"
#include "qgeocoordinate.h"
#include "qgraphicsgeomap.h"
#include "qgeoaddress.h"
-#include "qgeosearchreply.h"
+#include "qgeocodereply.h"
class StatusBarItem;
@@ -102,7 +102,7 @@ class MarkerManager : public QObject
{
Q_OBJECT
public:
- explicit MarkerManager(QGeoSearchManager *sm, QObject *parent=0);
+ explicit MarkerManager(QGeocodingManager *sm, QObject *parent=0);
~MarkerManager();
QGeoCoordinate myLocation() const;
@@ -115,16 +115,16 @@ public slots:
void removeSearchMarkers();
signals:
- void searchError(QGeoSearchReply::Error error, QString errorString);
+ void searchError(QGeocodeReply::Error error, QString errorString);
void searchFinished();
private:
MarkerManagerPrivate *d;
private slots:
- void replyFinished(QGeoSearchReply *reply);
+ void replyFinished(QGeocodeReply *reply);
void myLocationChanged(QGeoCoordinate location);
- void reverseReplyFinished(QGeoSearchReply *reply);
+ void reverseReplyFinished(QGeocodeReply *reply);
};
#endif // MARKER_H
diff --git a/examples/maps/navigator.cpp b/examples/maps/navigator.cpp
index c3b93ff0..617a9b6c 100644
--- a/examples/maps/navigator.cpp
+++ b/examples/maps/navigator.cpp
@@ -44,7 +44,7 @@
#include "marker.h"
Navigator::Navigator(QGeoRoutingManager *routingManager,
- QGeoSearchManager *searchManager,
+ QGeocodingManager *searchManager,
MapsWidget *mapsWidget, const QString &address,
const QGeoRouteRequest &requestTemplate) :
address(address),
@@ -85,12 +85,12 @@ void Navigator::start()
startMarker->setName("Start point");
mapsWidget->map()->addMapObject(startMarker);
- addressReply = searchManager->search(address);
+ addressReply = searchManager->geocode(address);
if (addressReply->isFinished()) {
on_addressSearchFinished();
} else {
- connect(addressReply, SIGNAL(error(QGeoSearchReply::Error,QString)),
- this, SIGNAL(searchError(QGeoSearchReply::Error,QString)));
+ connect(addressReply, SIGNAL(error(QGeocodeReply::Error,QString)),
+ this, SIGNAL(searchError(QGeocodeReply::Error,QString)));
connect(addressReply, SIGNAL(finished()),
this, SLOT(on_addressSearchFinished()));
}
diff --git a/examples/maps/navigator.h b/examples/maps/navigator.h
index b48e6c25..10c7a616 100644
--- a/examples/maps/navigator.h
+++ b/examples/maps/navigator.h
@@ -43,11 +43,11 @@
#define NAVIGATOR_H
#include <qgeoroutingmanager.h>
-#include <qgeosearchmanager.h>
+#include <qgeocodingmanager.h>
#include <qgeoroutereply.h>
#include <qgeoroutereply.h>
-#include <qgeosearchreply.h>
+#include <qgeocodereply.h>
#include <qgeomaprouteobject.h>
#include "marker.h"
@@ -58,7 +58,7 @@ class Navigator : public QObject
{
Q_OBJECT
public:
- Navigator(QGeoRoutingManager *routingManager, QGeoSearchManager *searchManager,
+ Navigator(QGeoRoutingManager *routingManager, QGeocodingManager *searchManager,
MapsWidget *mapsWidget, const QString &address,
const QGeoRouteRequest &requestTemplate);
~Navigator();
@@ -68,7 +68,7 @@ public:
signals:
void finished();
- void searchError(QGeoSearchReply::Error error, QString errorString);
+ void searchError(QGeocodeReply::Error error, QString errorString);
void routingError(QGeoRouteReply::Error error, QString errorString);
private slots:
@@ -80,10 +80,10 @@ private:
QGeoRouteRequest request;
QGeoRoutingManager *routingManager;
- QGeoSearchManager *searchManager;
+ QGeocodingManager *searchManager;
MapsWidget *mapsWidget;
- QGeoSearchReply *addressReply;
+ QGeocodeReply *addressReply;
QGeoRouteReply *routeReply;
QGeoMapRouteObject *routeObject;