Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
QLocationPermission Class Reference

Access the user's location. More...

#include <qpermissions.h>

+ Collaboration diagram for QLocationPermission:

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.
 

Detailed Description

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.

Member Enumeration Documentation

◆ Accuracy

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.

◆ Availability

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.

Member Function Documentation

◆ accuracy()

QLocationPermission::Accuracy QLocationPermission::accuracy ( ) const

Returns the accuracy of the request.

Definition at line 511 of file qpermissions.cpp.

Referenced by nativeLocationPermission(), and setAccuracy().

+ Here is the caller graph for this function:

◆ availability()

QLocationPermission::Availability QLocationPermission::availability ( ) const

Returns the availability of the request.

Definition at line 527 of file qpermissions.cpp.

Referenced by nativeLocationPermission(), and setAvailability().

+ Here is the caller graph for this function:

◆ setAccuracy()

void QLocationPermission::setAccuracy ( Accuracy accuracy)

Sets the desired accuracy of the request.

Definition at line 503 of file qpermissions.cpp.

References accuracy().

Referenced by AndroidPositioning::hasPositioningPermissions().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setAvailability()

void QLocationPermission::setAvailability ( Availability availability)

Sets the desired availability of the request.

Definition at line 519 of file qpermissions.cpp.

References availability().

Referenced by AndroidPositioning::hasPositioningPermissions().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

The documentation for this class was generated from the following files: