![]() |
Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
|
Access the user's location. More...
#include <qpermissions.h>
Public Types | |
enum | Accuracy : quint8 { Approximate , Precise } |
This enum is used to control the accuracy of the location data. More... | |
enum | Availability : quint8 { WhenInUse , Always } |
This enum is used to control the availability of the location data. More... | |
Public Member Functions | |
Q_CORE_EXPORT void | setAccuracy (Accuracy accuracy) |
Sets the desired accuracy of the request. | |
Q_CORE_EXPORT Accuracy | accuracy () const |
Returns the accuracy of the request. | |
Q_CORE_EXPORT void | setAvailability (Availability availability) |
Sets the desired availability of the request. | |
Q_CORE_EXPORT Availability | availability () const |
Returns the availability of the request. | |
Access the user's location.
By default the request is for approximate accuracy, and only while the application is in use. Use setAccuracy() and/or setAvailability() to override the default.
Definition at line 98 of file qpermissions.h.
This enum is used to control the accuracy of the location data.
\value Approximate An approximate location is requested. \value Precise A precise location is requested.
Enumerator | |
---|---|
Approximate | |
Precise |
Definition at line 102 of file qpermissions.h.
This enum is used to control the availability of the location data.
\value WhenInUse The location is only available only when the application is in use. \value Always The location is available at all times, including when the application is in the background.
Enumerator | |
---|---|
WhenInUse | |
Always |
Definition at line 111 of file qpermissions.h.
QLocationPermission::Accuracy QLocationPermission::accuracy | ( | ) | const |
Returns the accuracy of the request.
Definition at line 520 of file qpermissions.cpp.
QLocationPermission::Availability QLocationPermission::availability | ( | ) | const |
Returns the availability of the request.
Definition at line 536 of file qpermissions.cpp.
Sets the desired accuracy of the request.
Definition at line 512 of file qpermissions.cpp.
void QLocationPermission::setAvailability | ( | Availability | availability | ) |
Sets the desired availability of the request.
Definition at line 528 of file qpermissions.cpp.