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
4#ifndef QGEOPOSITIONINFOSOURCEWASM_H
5#define QGEOPOSITIONINFOSOURCEWASM_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
21
22
23#include <emscripten/val.h>
24
26
27using emscripten::val;
32
34
36{
38public:
39 static Geolocation geolocation();
40 QGeoPositionInfoSourceWasm(QObject *parent = 0);
42
43 QGeoPositionInfo lastKnownPosition(bool fromSatellitePositioningMethodsOnly = false) const override;
45
46 void setPreferredPositioningMethods(PositioningMethods methods) override;
47
48 void setUpdateInterval(int msec) override;
50 Error error() const override;
51
54
55public Q_SLOTS:
57 void stopUpdates() override;
58
59 void requestUpdate(int timeout = 0) override;
60
61private:
62 void reconfigureRunningSystem();
63
65 QGeoPositionInfo m_lastKnownPosition;
67 quint32 m_instanceId;
69 bool m_updates_running = false;
70 bool m_singleUpdatePending = false;
71 val successCallback;
72 val errorCallback;
74};
75
76QT_END_NAMESPACE
77
78#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