Qt 6.x
The Qt SDK
Loading...
Searching...
No Matches
qnmeasatelliteinfosource.h
Go to the documentation of this file.
1// Copyright (C) 2021 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 QNMEASATELLITEINFOSOURCE_H
4#define QNMEASATELLITEINFOSOURCE_H
5
6#include <QtPositioning/QGeoSatelliteInfoSource>
7
9
10class QIODevice;
11
13class Q_POSITIONING_EXPORT QNmeaSatelliteInfoSource : public QGeoSatelliteInfoSource
14{
16public:
17 enum class UpdateMode {
18 RealTimeMode = 1,
19 SimulationMode
20 };
21
23
26
27 UpdateMode updateMode() const;
28
29 void setDevice(QIODevice *source);
30 QIODevice *device() const;
31
32 void setUpdateInterval(int msec) override;
33 int minimumUpdateInterval() const override;
34 Error error() const override;
35
36 bool setBackendProperty(const QString &name, const QVariant &value) override;
37 QVariant backendProperty(const QString &name) const override;
38
39public Q_SLOTS:
40 void startUpdates() override;
41 void stopUpdates() override;
42 void requestUpdate(int timeout = 0) override;
43
44protected:
45#if QT_DEPRECATED_SINCE(7, 0)
46 QT6_ONLY(virtual)
47 QGeoSatelliteInfo::SatelliteSystem
48 parseSatellitesInUseFromNmea(const char *data, int size, QList<int> &pnrsInUse);
49#endif
50 QT7_ONLY(virtual)
51 QGeoSatelliteInfo::SatelliteSystem
52 parseSatellitesInUseFromNmea(QByteArrayView data, QList<int> &pnrsInUse);
54 NotParsed = 0,
56 FullyParsed
57 };
58#if QT_DEPRECATED_SINCE(7, 0)
59 QT6_ONLY(virtual)
60 SatelliteInfoParseStatus parseSatelliteInfoFromNmea(const char *data, int size,
62 QGeoSatelliteInfo::SatelliteSystem &system);
63#endif
64 QT7_ONLY(virtual)
65 SatelliteInfoParseStatus parseSatelliteInfoFromNmea(QByteArrayView data,
67 QGeoSatelliteInfo::SatelliteSystem &system);
68
70 void setError(QGeoSatelliteInfoSource::Error satelliteError);
71
73 Q_DISABLE_COPY(QNmeaSatelliteInfoSource)
74
75 // for using the SatelliteInfoParseStatus enum
76 friend class QLocationUtils;
77};
78
80
81#endif // QNMEASATELLITEINFOSOURCE_H
IOBluetoothDevice * device
\inmodule QtPositioning
virtual QVariant backendProperty(const QString &name) const
virtual void stopUpdates()=0
Stops emitting updates at regular intervals.
virtual bool setBackendProperty(const QString &name, const QVariant &value)
virtual void setUpdateInterval(int msec)
virtual void requestUpdate(int timeout=0)=0
Attempts to get the current satellite information and emit satellitesInViewUpdated() and satellitesIn...
Error
The Error enumeration represents the errors which can occur.
int minimumUpdateInterval
This property holds the minimum time (in milliseconds) required to retrieve a satellite update.
virtual Error error() const =0
Returns the last error that occurred.
virtual void startUpdates()=0
Starts emitting updates at regular intervals.
\inmodule QtPositioning
\inmodule QtCore \reentrant
Definition qiodevice.h:34
Definition qlist.h:74
UpdateMode
Defines the available update modes.
SatelliteInfoParseStatus
Defines the parse status of satellite information.
static QString SimulationUpdateInterval
\variable QNmeaSatelliteInfoSource::SimulationUpdateInterval
\inmodule QtCore
Definition qobject.h:90
\macro QT_RESTRICTED_CAST_FROM_ASCII
Definition qstring.h:127
\inmodule QtCore
Definition qvariant.h:64
Combined button and popup list for selecting options.
EGLOutputLayerEXT EGLint EGLAttrib value
[5]
GLenum mode
GLenum GLuint GLintptr GLsizeiptr size
[1]
GLbitfield GLuint64 timeout
[4]
GLint GLsizei GLsizei GLenum GLenum GLsizei void * data
GLuint name
GLsizei GLsizei GLchar * source
static void setError(QJsonObject *response, const QString &msg)
QT_BEGIN_NAMESPACE class QT6_ONLY(Q_CORE_EXPORT) QReadWriteLock
#define Q_OBJECT
#define Q_SLOTS
IUIAutomationTreeWalker __RPC__deref_out_opt IUIAutomationElement ** parent