![]() |
Qt 6.x
The Qt SDK
|
\inmodule QtPositioning More...
#include <qgeolocation.h>
Collaboration diagram for QGeoLocation: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.
References QGeoLocationPrivate::address.
Referenced by RequestHandler::handleSearchReply(), and setAddress().
Here is the caller graph for this function:| 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.
References QGeoLocationPrivate::viewport.
Referenced by setBoundingShape().
Here is the caller graph for this function:| QGeoCoordinate QGeoLocation::coordinate | ( | ) | const |
Returns the coordinate of the location.
Definition at line 153 of file qgeolocation.cpp.
References QGeoLocationPrivate::coordinate.
Referenced by RequestHandler::convertSearchResult(), RequestHandler::handleSearchReply(), and setCoordinate().
Here is the caller graph for this function:| 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.
References QGeoLocationPrivate::extendedAttributes.
| 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.
References QGeoLocationPrivate::isEmpty().
Here is the call graph for this function:| 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.
Here is the call graph for this function:| void QGeoLocation::setAddress | ( | const QGeoAddress & | address | ) |
Sets the address of the location.
Definition at line 145 of file qgeolocation.cpp.
References address(), and QGeoLocationPrivate::address.
Referenced by QDeclarativeGeoLocation::location(), and QT_BEGIN_NAMESPACE::parseLocation().
Here is the call graph for this function:
Here is the caller graph for this function:Sets the boundingShape of the location.
Definition at line 191 of file qgeolocation.cpp.
References boundingShape(), and QGeoLocationPrivate::viewport.
Referenced by QDeclarativeGeoLocation::location(), and QT_BEGIN_NAMESPACE::parseLocation().
Here is the call graph for this function:
Here is the caller graph for this function:| void QGeoLocation::setCoordinate | ( | const QGeoCoordinate & | position | ) |
Sets the coordinate of the location.
Definition at line 161 of file qgeolocation.cpp.
References coordinate(), and QGeoLocationPrivate::coordinate.
Referenced by QDeclarativeGeoLocation::location(), and QT_BEGIN_NAMESPACE::parseLocation().
Here is the call graph for this function:
Here is the caller graph for this function:| 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.
References QGeoLocationPrivate::extendedAttributes.
Referenced by QDeclarativeGeoLocation::location().
Here is the caller graph for this function:
|
inlinenoexcept |
|
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.
References qHashMulti(), and seed.
Here is the call graph for this function: