GeocodingService Class Reference
Geocoding service.
More...
#include <geocodingservice.h>
List of all members.
Public Slots |
void | requestFinished (QNetworkReply *reply) |
| Public slot, which indicates when http request has been completed.
|
void | requestLocation (const QString &location) |
| Request location information from the server.
|
Signals |
void | error (const int context, const int error) |
| Signals error.
|
void | locationDataParsed (const QList< Location > &result) |
| Emited when location request is parsed and is ready for further processing.
|
Public Member Functions |
| GeocodingService (QObject *parent=0) |
| Default constructor.
|
Private Member Functions |
void | parseSearchResults (const QByteArray &jsonReply) |
| Parses location data from JSON string.
|
void | sendRequest (const QUrl &url) |
| Sends http request.
|
Private Attributes |
QList< Location > | m_searchResults |
| List of search results.
|
NetworkAccessManager * | m_networkManager |
| Pointer to QNetworkAccessManager.
|
Detailed Description
Geocoding service.
Searching coordinates for places based on names and addresses. Parsing the result json data into list.
- Author:
- Henri Lampela - henri.lampela@ixonos.com
-
Sami Rämö - sami.ramo@ixonos.com
Constructor & Destructor Documentation
GeocodingService::GeocodingService |
( |
QObject * |
parent = 0 |
) |
|
Default constructor.
- Parameters:
-
| parent | instance of parent |
Member Function Documentation
void GeocodingService::error |
( |
const int |
context, |
|
|
const int |
error | |
|
) |
| | [signal] |
Signals error.
- Parameters:
-
| context | error context |
| error | error code |
void GeocodingService::locationDataParsed |
( |
const QList< Location > & |
result |
) |
[signal] |
Emited when location request is parsed and is ready for further processing.
- Parameters:
-
void GeocodingService::parseSearchResults |
( |
const QByteArray & |
jsonReply |
) |
[private] |
Parses location data from JSON string.
- Parameters:
-
void GeocodingService::requestFinished |
( |
QNetworkReply * |
reply |
) |
[slot] |
Public slot, which indicates when http request has been completed.
- Parameters:
-
| reply | storage for http reply |
void GeocodingService::requestLocation |
( |
const QString & |
location |
) |
[slot] |
Request location information from the server.
- Parameters:
-
| location | location (address, city etc.) |
void GeocodingService::sendRequest |
( |
const QUrl & |
url |
) |
[private] |
Sends http request.
- Parameters:
-
The documentation for this class was generated from the following files: