Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
|
\inmodule QtPositioning More...
#include <qgeolocation.h>
Public Member Functions | |
QGeoLocation () | |
Constructs an new location object. | |
QGeoLocation (const QGeoLocation &other) | |
Constructs a copy of other. | |
QGeoLocation (QGeoLocation &&other) noexcept=default | |
~QGeoLocation () | |
Destroys the location object. | |
QGeoLocation & | operator= (const QGeoLocation &other) |
Assigns other to this location and returns a reference to this location. | |
void | swap (QGeoLocation &other) noexcept |
QGeoAddress | address () const |
Returns the address of the location. | |
void | setAddress (const QGeoAddress &address) |
Sets the address of the location. | |
QGeoCoordinate | coordinate () const |
Returns the coordinate of the location. | |
void | setCoordinate (const QGeoCoordinate &position) |
Sets the coordinate of the location. | |
QGeoShape | boundingShape () const |
void | setBoundingShape (const QGeoShape &shape) |
QVariantMap | extendedAttributes () const |
Returns the extended attributes associated to this location. | |
void | setExtendedAttributes (const QVariantMap &data) |
Sets the extended attributes of the location with the parameters specified in data. | |
bool | isEmpty () const |
Returns true if the location coordinate is \l {QGeoCoordinate::isValid} {invalid}, and all the other location fields are empty. | |
Friends | |
bool | operator== (const QGeoLocation &lhs, const QGeoLocation &rhs) |
Returns true if the lhs location is equal to rhs, otherwise returns false . | |
bool | operator!= (const QGeoLocation &lhs, const QGeoLocation &rhs) |
Returns true if the lhs location is not equal to rhs, otherwise returns false . | |
Related Symbols | |
(Note that these are not member symbols.) | |
size_t | qHash (const QGeoLocation &location, size_t seed) noexcept |
Returns the hash value for the location, using seed for the calculation. | |
\inmodule QtPositioning
The QGeoLocation class represents basic information about a location.
A QGeoLocation consists of a coordinate and corresponding address, along with an optional bounding shape, which is the recommended region to be displayed when viewing the location.
Definition at line 19 of file qgeolocation.h.
QGeoLocation::QGeoLocation | ( | ) |
Constructs an new location object.
Definition at line 63 of file qgeolocation.cpp.
QGeoLocation::QGeoLocation | ( | const QGeoLocation & | other | ) |
Constructs a copy of other.
Definition at line 71 of file qgeolocation.cpp.
|
defaultnoexcept |
Constructs a geo location object by moving from other.
QGeoLocation::~QGeoLocation | ( | ) |
Destroys the location object.
Definition at line 90 of file qgeolocation.cpp.
QGeoAddress QGeoLocation::address | ( | ) | const |
Returns the address of the location.
Definition at line 137 of file qgeolocation.cpp.
QGeoShape QGeoLocation::boundingShape | ( | ) | const |
Returns a bounding shape which represents the recommended region to display when viewing this location.
For example, a building's location may have a region centered around the building, but the region is large enough to show it's immediate surrounding geographical context.
Definition at line 181 of file qgeolocation.cpp.
QGeoCoordinate QGeoLocation::coordinate | ( | ) | const |
Returns the coordinate of the location.
Definition at line 153 of file qgeolocation.cpp.
QVariantMap QGeoLocation::extendedAttributes | ( | ) | const |
Returns the extended attributes associated to this location.
Extended attributes are backend-dependent and can be location-dependent.
Definition at line 202 of file qgeolocation.cpp.
bool QGeoLocation::isEmpty | ( | ) | const |
Returns true
if the location coordinate is \l {QGeoCoordinate::isValid} {invalid}, and all the other location fields are empty.
Otherwise returns false
.
Definition at line 223 of file qgeolocation.cpp.
QGeoLocation & QGeoLocation::operator= | ( | const QGeoLocation & | other | ) |
Assigns other to this location and returns a reference to this location.
Move-assings other to this location and returns a reference to this location.
Definition at line 99 of file qgeolocation.cpp.
void QGeoLocation::setAddress | ( | const QGeoAddress & | address | ) |
Sets the address of the location.
Definition at line 145 of file qgeolocation.cpp.
void QGeoLocation::setCoordinate | ( | const QGeoCoordinate & | position | ) |
Sets the coordinate of the location.
Definition at line 161 of file qgeolocation.cpp.
void QGeoLocation::setExtendedAttributes | ( | const QVariantMap & | data | ) |
Sets the extended attributes of the location with the parameters specified in data.
Definition at line 213 of file qgeolocation.cpp.
|
inlinenoexcept |
Definition at line 30 of file qgeolocation.h.
|
friend |
Returns true
if the lhs location is not equal to rhs, otherwise returns false
.
Definition at line 36 of file qgeolocation.h.
|
friend |
Returns true
if the lhs location is equal to rhs, otherwise returns false
.
Definition at line 32 of file qgeolocation.h.
|
related |
Returns the hash value for the location, using seed for the calculation.
Definition at line 243 of file qgeolocation.cpp.