Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Toggle main menu visibility
Loading...
Searching...
No Matches
qgeopositioninfosource_cl_p.h
Go to the documentation of this file.
1
// Copyright (C) 2016 The Qt Company Ltd.
2
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
// Qt-Security score:significant reason:default
4
5
#
ifndef
QGEOPOSITIONINFOSOURCECL_H
6
#
define
QGEOPOSITIONINFOSOURCECL_H
7
8
//
9
// W A R N I N G
10
// -------------
11
//
12
// This file is not part of the Qt API. It exists purely as an
13
// implementation detail. This header file may change from version to
14
// version without notice, or even be removed.
15
//
16
// We mean it.
17
//
18
19
#
import
<
CoreLocation
/
CoreLocation
.
h
>
20
21
#
include
"qgeopositioninfosource.h"
22
#
include
"qgeopositioninfo.h"
23
24
QT_BEGIN_NAMESPACE
25
26
class
QGeoPositionInfoSourceCL :
public
QGeoPositionInfoSource
27
{
28
Q_OBJECT
29
public
:
30
QGeoPositionInfoSourceCL(
const
QVariantMap ¶meters, QObject *parent =
nullptr
);
31
~QGeoPositionInfoSourceCL();
32
33
QGeoPositionInfo lastKnownPosition(
bool
fromSatellitePositioningMethodsOnly =
false
)
const
override;
34
PositioningMethods supportedPositioningMethods()
const
override;
35
36
void
setUpdateInterval(
int
msec) override;
37
int
minimumUpdateInterval()
const
override;
38
Error error()
const
override;
39
40
void
locationDataAvailable(QGeoPositionInfo location);
41
void
setError(QGeoPositionInfoSource::Error positionError);
42
void
changeAuthorizationStatus(CLAuthorizationStatus status);
43
44
private
:
45
bool
enableLocationManager();
46
void
setTimeoutInterval(
int
msec);
47
void
parseParameters(
const
QVariantMap ¶meters);
48
49
public
Q_SLOTS:
50
void
startUpdates() override;
51
void
stopUpdates() override;
52
53
void
requestUpdate(
int
timeout = 0) override;
54
55
protected
:
56
void
timerEvent(QTimerEvent *event) override;
57
58
private
:
59
Q_DISABLE_COPY(QGeoPositionInfoSourceCL);
60
bool
m_allowAutoPause =
true
;
61
62
CLLocationManager *m_locationManager;
63
bool
m_updatesWanted;
64
65
QGeoPositionInfo m_lastUpdate;
66
67
int
m_updateTimer;
68
int
m_updateTimeout;
69
70
QGeoPositionInfoSource::Error m_positionError;
71
};
72
73
QT_END_NAMESPACE
74
75
#
endif
// QGEOPOSITIONINFOSOURCECL_H
MINIMUM_UPDATE_INTERVAL
#define MINIMUM_UPDATE_INTERVAL
Definition
qgeopositioninfosource_cl.mm:20
kAllowAutoPause
static constexpr auto kAllowAutoPause
Definition
qgeopositioninfosource_cl.mm:18
qtpositioning
src
plugins
position
corelocation
qgeopositioninfosource_cl_p.h
Generated on
for Qt by
1.18.0