Container for a single location search result. More...
#include <location.h>
Public Member Functions | |
Location () | |
Constructor. | |
QStringList | addressComponents () const |
Gets the address components of the location. | |
const GeoCoordinate & | coordinates () const |
Gets the coordinates of the location. | |
const QString & | formattedAddress () const |
Gets the formatted address of the location e.g. Oxford street 1, London W1, United kingdom. | |
void | setCoordinates (const GeoCoordinate &coordinate) |
Sets the coordinates of the location. | |
void | setFormattedAddress (const QString &formattedAddress) |
Sets the formatted address of the location. | |
void | setViewPort (const GeoCoordinate &southwest, const GeoCoordinate &northeast) |
Set recommended viewport corner coordinates. | |
void | viewport (GeoCoordinate &southwest, GeoCoordinate &northeast) const |
Gets the coordinates of the recommended viewport of the location. | |
Private Attributes | |
QString | m_formattedAddress |
Placeholder for formatted address. | |
GeoCoordinate | m_coordinates |
Placeholcer for coordinates. | |
GeoCoordinate | m_viewportNE |
Placeholder for viewport northeast corner. | |
GeoCoordinate | m_viewportSW |
Placeholder for viewport southwest corner. |
Container for a single location search result.
Contains all data for a single location search result item.
Location::Location | ( | ) |
Constructor.
Constructs empty Location object.
QStringList Location::addressComponents | ( | ) | const |
Gets the address components of the location.
const GeoCoordinate & Location::coordinates | ( | ) | const |
Gets the coordinates of the location.
const QString & Location::formattedAddress | ( | ) | const |
Gets the formatted address of the location e.g. Oxford street 1, London W1, United kingdom.
void Location::setCoordinates | ( | const GeoCoordinate & | coordinate | ) |
Sets the coordinates of the location.
coordinate | Coordinates of the location |
void Location::setViewPort | ( | const GeoCoordinate & | southwest, | |
const GeoCoordinate & | northeast | |||
) |
Set recommended viewport corner coordinates.
southwest | Coordinates of the southwest corner | |
northeast | Coordinates of the northeast corner |
void Location::viewport | ( | GeoCoordinate & | southwest, | |
GeoCoordinate & | northeast | |||
) | const |
Gets the coordinates of the recommended viewport of the location.
[out] | southwest | returns southwest corner coordinates of the recommended viewport |
[out] | northeast | returns northeast corner coordinates of the recommended viewport |