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
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
4#ifndef QGEOPOSITIONINFOSOURCECL_H
5#define QGEOPOSITIONINFOSOURCECL_H
6
7//
8// W A R N I N G
9// -------------
10//
11// This file is not part of the Qt API. It exists purely as an
12// implementation detail. This header file may change from version to
13// version without notice, or even be removed.
14//
15// We mean it.
16//
17
18#import <CoreLocation/CoreLocation.h>
19
21#include "qgeopositioninfo.h"
22
24
26{
28public:
31
32 QGeoPositionInfo lastKnownPosition(bool fromSatellitePositioningMethodsOnly = false) const override;
33 PositioningMethods supportedPositioningMethods() const override;
34
35 void setUpdateInterval(int msec) override;
36 int minimumUpdateInterval() const override;
37 Error error() const override;
38
40 void setError(QGeoPositionInfoSource::Error positionError);
41 void changeAuthorizationStatus(CLAuthorizationStatus status);
42
43private:
44 bool enableLocationManager();
45 void setTimeoutInterval(int msec);
46
47public Q_SLOTS:
48 void startUpdates() override;
49 void stopUpdates() override;
50
51 void requestUpdate(int timeout = 0) override;
52
53protected:
54 void timerEvent(QTimerEvent *event) override;
55
56private:
57 Q_DISABLE_COPY(QGeoPositionInfoSourceCL);
58 CLLocationManager *m_locationManager;
59 bool m_updatesWanted;
60
61 QGeoPositionInfo m_lastUpdate;
62
63 int m_updateTimer;
64 int m_updateTimeout;
65
66 QGeoPositionInfoSource::Error m_positionError;
67};
68
70
71#endif // QGEOPOSITIONINFOSOURCECL_H
QGeoPositionInfoSourceCL(QObject *parent=0)
void setUpdateInterval(int msec) override
void requestUpdate(int timeout=0) override
void locationDataAvailable(QGeoPositionInfo location)
int minimumUpdateInterval() const override
Error error() const override
Returns the type of error that last occurred.
QGeoPositionInfo lastKnownPosition(bool fromSatellitePositioningMethodsOnly=false) const override
Returns an update containing the last known position, or a null update if none is available.
void timerEvent(QTimerEvent *event) override
This event handler can be reimplemented in a subclass to receive timer events for the object.
void changeAuthorizationStatus(CLAuthorizationStatus status)
PositioningMethods supportedPositioningMethods() const override
Returns the positioning methods available to this source.
void setError(QGeoPositionInfoSource::Error positionError)
\inmodule QtPositioning
Error
The Error enumeration represents the errors which can occur.
\inmodule QtPositioning
\inmodule QtCore
Definition qobject.h:103
QObject * parent() const
Returns a pointer to the parent object.
Definition qobject.h:346
\inmodule QtCore
Definition qcoreevent.h:366
Combined button and popup list for selecting options.
GLint location
GLbitfield GLuint64 timeout
[4]
struct _cl_event * event
#define Q_OBJECT
#define Q_SLOTS