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_winrt_p.h
Go to the documentation of this file.
1// Copyright (C) 2015 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 QGEOPOSITIONINFOSOURCEWINRT_H
5#define QGEOPOSITIONINFOSOURCEWINRT_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
19#include "qgeopositioninfo.h"
20
21#include <QtCore/qtimer.h>
22
23#include <EventToken.h>
24#include <wrl.h>
25
26namespace ABI {
27 namespace Windows {
28 namespace Devices {
29 namespace Geolocation{
30 struct IGeolocator;
31 struct IPositionChangedEventArgs;
32 struct IStatusChangedEventArgs;
33 }
34 }
35 }
36}
37
39
41
43{
45public:
48 int init();
49
50 QGeoPositionInfo lastKnownPosition(bool fromSatellitePositioningMethodsOnly = false) const override;
51 PositioningMethods supportedPositioningMethods() const override;
52
53 void setPreferredPositioningMethods(PositioningMethods methods) override;
54
55 void setUpdateInterval(int msec) override;
56 int minimumUpdateInterval() const override;
57 Error error() const override;
58
59 HRESULT onPositionChanged(ABI::Windows::Devices::Geolocation::IGeolocator *locator,
60 ABI::Windows::Devices::Geolocation::IPositionChangedEventArgs *args);
61 HRESULT onStatusChanged(ABI::Windows::Devices::Geolocation::IGeolocator *locator,
62 ABI::Windows::Devices::Geolocation::IStatusChangedEventArgs *args);
63
64 bool requestAccess() const;
67public slots:
68 void startUpdates() override;
69 void stopUpdates() override;
70
71 void requestUpdate(int timeout = 0) override;
72
73private slots:
74 void stopHandler();
75 void virtualPositionUpdate();
76 void singleUpdateTimeOut();
77 void updateSynchronized(const QGeoPositionInfo info);
78 void reactOnError(QGeoPositionInfoSource::Error positionError);
79private:
80 bool startHandler();
81
82 Q_DISABLE_COPY(QGeoPositionInfoSourceWinRT)
83 void setError(QGeoPositionInfoSource::Error positionError);
84
85 QScopedPointer<QGeoPositionInfoSourceWinRTPrivate> d_ptr;
86 Q_DECLARE_PRIVATE(QGeoPositionInfoSourceWinRT)
87};
88
90
91#endif // QGEOPOSITIONINFOSOURCEWINRT_H
static JNINativeMethod methods[]
HRESULT onStatusChanged(ABI::Windows::Devices::Geolocation::IGeolocator *locator, ABI::Windows::Devices::Geolocation::IStatusChangedEventArgs *args)
QGeoPositionInfo lastKnownPosition(bool fromSatellitePositioningMethodsOnly=false) const override
Returns an update containing the last known position, or a null update if none is available.
Error error() const override
Returns the type of error that last occurred.
void nativePositionUpdate(const QGeoPositionInfo)
QGeoPositionInfoSourceWinRT(QObject *parent=nullptr)
HRESULT onPositionChanged(ABI::Windows::Devices::Geolocation::IGeolocator *locator, ABI::Windows::Devices::Geolocation::IPositionChangedEventArgs *args)
void requestUpdate(int timeout=0) override
void setPreferredPositioningMethods(PositioningMethods methods) override
PositioningMethods supportedPositioningMethods() const override
Returns the positioning methods available to this source.
\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
Combined button and popup list for selecting options.
GLbitfield GLuint64 timeout
[4]
#define Q_OBJECT
#define slots
#define Q_SIGNALS
long HRESULT
QHostInfo info
[0]
QJSValueList args