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
qgeosatelliteinfosource.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 QGEOSATELLITEINFOSOURCE_H
4#define QGEOSATELLITEINFOSOURCE_H
5
6#include <QtPositioning/QGeoSatelliteInfo>
7
8#include <QtCore/QObject>
9#include <QtCore/QList>
10
12
14class Q_POSITIONING_EXPORT QGeoSatelliteInfoSource : public QObject
15{
17 Q_PROPERTY(int updateInterval READ updateInterval WRITE setUpdateInterval BINDABLE
18 bindableUpdateInterval)
19 Q_PROPERTY(int minimumUpdateInterval READ minimumUpdateInterval)
20
21public:
22 enum Error {
23 AccessError = 0,
24 ClosedError = 1,
26 UnknownSourceError = -1,
27 UpdateTimeoutError = 3,
28 };
30
31 explicit QGeoSatelliteInfoSource(QObject *parent);
33
34 static QGeoSatelliteInfoSource *createDefaultSource(QObject *parent);
35 static QGeoSatelliteInfoSource *createSource(const QString &sourceName, QObject *parent);
36 static QGeoSatelliteInfoSource *createDefaultSource(const QVariantMap &parameters, QObject *parent);
37 static QGeoSatelliteInfoSource *createSource(const QString &sourceName, const QVariantMap &parameters, QObject *parent);
38 static QStringList availableSources();
39
40 QString sourceName() const;
41
42 virtual void setUpdateInterval(int msec);
43 int updateInterval() const;
44 QBindable<int> bindableUpdateInterval();
45
46 virtual int minimumUpdateInterval() const = 0;
47 virtual Error error() const = 0;
48
49 virtual bool setBackendProperty(const QString &name, const QVariant &value);
50 virtual QVariant backendProperty(const QString &name) const;
51
52public Q_SLOTS:
53 virtual void startUpdates() = 0;
54 virtual void stopUpdates() = 0;
55
56 virtual void requestUpdate(int timeout = 0) = 0;
57
59 void satellitesInViewUpdated(const QList<QGeoSatelliteInfo> &satellites);
60 void satellitesInUseUpdated(const QList<QGeoSatelliteInfo> &satellites);
62
63protected:
65
66private:
67 Q_DISABLE_COPY(QGeoSatelliteInfoSource)
68 Q_DECLARE_PRIVATE(QGeoSatelliteInfoSource)
69};
70
72
73#endif
\inmodule QtPositioning
virtual void stopUpdates()=0
Stops emitting updates at regular intervals.
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.
virtual int minimumUpdateInterval() const =0
void satellitesInViewUpdated(const QList< QGeoSatelliteInfo > &satellites)
If startUpdates() or requestUpdate() is called, this signal is emitted when an update is available on...
void satellitesInUseUpdated(const QList< QGeoSatelliteInfo > &satellites)
If startUpdates() or requestUpdate() is called, this signal is emitted when an update is available on...
virtual Error error() const =0
Returns the last error that occurred.
void errorOccurred(QGeoSatelliteInfoSource::Error)
This signal is emitted after an error occurred.
virtual void startUpdates()=0
Starts emitting updates at regular intervals.
\inmodule QtCore
Definition qobject.h:103
\inmodule QtCore
\macro QT_RESTRICTED_CAST_FROM_ASCII
Definition qstring.h:129
\inmodule QtCore
Definition qvariant.h:65
Combined button and popup list for selecting options.
EGLOutputLayerEXT EGLint EGLAttrib value
[5]
GLbitfield GLuint64 timeout
[4]
GLuint name
@ NoError
Definition main.cpp:34
#define Q_ENUM(x)
#define Q_PROPERTY(...)
#define Q_OBJECT
#define Q_SLOTS
#define Q_SIGNALS