Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qgeopositioninfosource_wasm_p.h
Go to the documentation of this file.
1// Copyright (C) 2024 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 QGEOPOSITIONINFOSOURCEWASM_H
6#define QGEOPOSITIONINFOSOURCEWASM_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
22
23
24#include <emscripten/val.h>
25
27
28using emscripten::val;
33
35
37{
39public:
40 static Geolocation geolocation();
41 QGeoPositionInfoSourceWasm(QObject *parent = 0);
43
44 QGeoPositionInfo lastKnownPosition(bool fromSatellitePositioningMethodsOnly = false) const override;
46
47 void setPreferredPositioningMethods(PositioningMethods methods) override;
48
49 void setUpdateInterval(int msec) override;
51 Error error() const override;
52
55
56public Q_SLOTS:
58 void stopUpdates() override;
59
60 void requestUpdate(int timeout = 0) override;
61
62private:
63 void reconfigureRunningSystem();
64
66 QGeoPositionInfo m_lastKnownPosition;
68 quint32 m_instanceId;
70 bool m_updates_running = false;
71 bool m_singleUpdatePending = false;
72 val successCallback;
73 val errorCallback;
75};
76
77QT_END_NAMESPACE
78
79#endif // QGEOPOSITIONINFOSOURCEWASM_H
static QGeoPositionInfoDispatcherWasm * instance()
void geolocationError(GeolocationPositionError error)
Error error() const override
Returns the type of error that last occurred.
void setPreferredPositioningMethods(PositioningMethods methods) override
void requestUpdate(int timeout=0) override
PositioningMethods supportedPositioningMethods() const override
Returns the positioning methods available to this source.
void geolocationSuccess(GeolocationPosition position)
QGeoPositionInfo lastKnownPosition(bool fromSatellitePositioningMethodsOnly=false) const override
Returns an update containing the last known position, or a null update if none is available.
Combined button and popup list for selecting options.
QT_BEGIN_NAMESPACE typedef emscripten::val GeolocationCoordinates
emscripten::val GeolocationPositionHandlerId
emscripten::val Geolocation
emscripten::val GeolocationPositionError
emscripten::val GeolocationPosition