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
qnmeapositioninfosource.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#ifndef QNMEAPOSITIONINFOSOURCE_H
4#define QNMEAPOSITIONINFOSOURCE_H
5
6#include <QtPositioning/QGeoPositionInfoSource>
7
9
10class QIODevice;
11
13class Q_POSITIONING_EXPORT QNmeaPositionInfoSource : public QGeoPositionInfoSource
14{
16public:
18 RealTimeMode = 1,
19 SimulationMode
20 };
21
22 explicit QNmeaPositionInfoSource(UpdateMode updateMode, QObject *parent = nullptr);
24
25 void setUserEquivalentRangeError(double uere);
26 double userEquivalentRangeError() const;
27
28 UpdateMode updateMode() const;
29
30 void setDevice(QIODevice *source);
31 QIODevice *device() const;
32
33 void setUpdateInterval(int msec) override;
34
35 QGeoPositionInfo lastKnownPosition(bool fromSatellitePositioningMethodsOnly = false) const override;
36 PositioningMethods supportedPositioningMethods() const override;
37 int minimumUpdateInterval() const override;
38 Error error() const override;
39
40
41public Q_SLOTS:
42 void startUpdates() override;
43 void stopUpdates() override;
44 void requestUpdate(int timeout = 0) override;
45
46protected:
47#if QT_DEPRECATED_SINCE(7, 0)
48 QT6_ONLY(virtual)
49 bool parsePosInfoFromNmeaData(const char *data,
50 int size,
51 QGeoPositionInfo *posInfo,
52 bool *hasFix);
53#endif
54 // ### Qt 7: design a return type that gets rid of out-parameters
55 QT7_ONLY(virtual)
56 bool parsePosInfoFromNmeaData(QByteArrayView data,
57 QGeoPositionInfo *posInfo,
58 bool *hasFix);
59
60 void setError(QGeoPositionInfoSource::Error positionError);
61
63 Q_DISABLE_COPY(QNmeaPositionInfoSource)
66};
67
69
70#endif
IOBluetoothDevice * device
\inmodule QtPositioning
\inmodule QtPositioning
\inmodule QtCore \reentrant
Definition qiodevice.h:34
\inmodule QtPositioning
UpdateMode
Defines the available update modes.
\inmodule QtCore
Definition qobject.h:103
Combined button and popup list for selecting options.
class QT6_ONLY(Q_CORE_EXPORT) QChar
Definition qchar.h:44
DBusConnection const char DBusError * error
GLenum GLuint GLintptr GLsizeiptr size
[1]
GLbitfield GLuint64 timeout
[4]
GLint GLsizei GLsizei GLenum GLenum GLsizei void * data
GLsizei GLsizei GLchar * source
static void setError(QJsonObject *response, const QString &msg)
#define Q_OBJECT
#define Q_SLOTS