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
qgeosatelliteinfo.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 QGEOSATELLITEINFO_H
4#define QGEOSATELLITEINFO_H
5
6#include <QtPositioning/qpositioningglobal.h>
7#include <QtCore/QSharedData>
8#include <QtCore/QMetaType>
9#include <QtCore/QDebug>
10
12
13class QDebug;
14class QDataStream;
15
17Q_POSITIONING_EXPORT size_t qHash(const QGeoSatelliteInfo &key, size_t seed = 0) noexcept;
18namespace QTest
19{
20
21Q_POSITIONING_EXPORT char *toString(const QGeoSatelliteInfo &info);
22
23} // namespace QTest
24
27
28class Q_POSITIONING_EXPORT QGeoSatelliteInfo
29{
31 Q_PROPERTY(SatelliteSystem satelliteSystem READ satelliteSystem FINAL)
32 Q_PROPERTY(int satelliteIdentifier READ satelliteIdentifier FINAL)
33 Q_PROPERTY(qreal signalStrength READ signalStrength FINAL)
34
35public:
36 enum Attribute {
38 Azimuth
39 };
40 Q_ENUM(Attribute)
41
43 Undefined = 0x00,
44 GPS = 0x01,
45 GLONASS = 0x02,
46 GALILEO = 0x03,
47 BEIDOU = 0x04,
48 QZSS = 0x05,
49 Multiple = 0xFF,
50 CustomType = 0x100
51 };
52 Q_ENUM(SatelliteSystem)
53
59
61 QT_MOVE_ASSIGNMENT_OPERATOR_IMPL_VIA_PURE_SWAP(QGeoSatelliteInfo)
62
63 void swap(QGeoSatelliteInfo &other) noexcept { d.swap(other.d); }
64
65 friend bool operator==(const QGeoSatelliteInfo &lhs, const QGeoSatelliteInfo &rhs)
66 {
67 return equals(lhs, rhs);
68 }
69 friend bool operator!=(const QGeoSatelliteInfo &lhs, const QGeoSatelliteInfo &rhs)
70 {
71 return !equals(lhs, rhs);
72 }
73
74 void setSatelliteSystem(SatelliteSystem system);
75 SatelliteSystem satelliteSystem() const;
76
77 void setSatelliteIdentifier(int satId);
78 int satelliteIdentifier() const;
79
80 void setSignalStrength(int signalStrength);
81 int signalStrength() const;
82
83 void setAttribute(Attribute attribute, qreal value);
84 Q_INVOKABLE qreal attribute(Attribute attribute) const;
85 void removeAttribute(Attribute attribute);
86
87 Q_INVOKABLE bool hasAttribute(Attribute attribute) const;
88
89 void detach();
90
91private:
92 static bool equals(const QGeoSatelliteInfo &lhs, const QGeoSatelliteInfo &rhs);
93#ifndef QT_NO_DEBUG_STREAM
95 {
96 return debugStreaming(dbg, info);
97 }
98 static QDebug debugStreaming(QDebug dbg, const QGeoSatelliteInfo &info);
99#endif
100#ifndef QT_NO_DATASTREAM
102 {
103 return dataStreamOut(stream, info);
104 }
106 {
107 return dataStreamIn(stream, info);
108 }
109 static QDataStream &dataStreamOut(QDataStream &stream, const QGeoSatelliteInfo &info);
110 static QDataStream &dataStreamIn(QDataStream &stream, QGeoSatelliteInfo &info);
111#endif
112 QExplicitlySharedDataPointer<QGeoSatelliteInfoPrivate> d;
114
115 friend Q_POSITIONING_EXPORT size_t qHash(const QGeoSatelliteInfo &key, size_t seed) noexcept;
116 friend Q_POSITIONING_EXPORT char *QTest::toString(const QGeoSatelliteInfo &info);
117};
118
119Q_DECLARE_SHARED(QGeoSatelliteInfo)
120
122
123QT_DECL_METATYPE_EXTERN(QGeoSatelliteInfo, Q_POSITIONING_EXPORT)
124
125#endif
\inmodule QtCore\reentrant
Definition qdatastream.h:46
\inmodule QtCore
QGeoSatelliteInfo::SatelliteSystem system
\inmodule QtPositioning
friend bool operator!=(const QGeoSatelliteInfo &lhs, const QGeoSatelliteInfo &rhs)
Returns true if any of the parameters of the lhs satellite are not the same as those of rhs.
friend QDebug operator<<(QDebug dbg, const QGeoSatelliteInfo &info)
QGeoSatelliteInfo(QGeoSatelliteInfo &&other) noexcept=default
friend bool operator==(const QGeoSatelliteInfo &lhs, const QGeoSatelliteInfo &rhs)
Returns true if all the parameters of the lhs satellite are the same as those of rhs.
Attribute
Defines the attributes for the satellite information.
SatelliteSystem
Defines the GNSS system of the satellite.
friend QDataStream & operator<<(QDataStream &stream, const QGeoSatelliteInfo &info)
Writes the given info to the specified stream.
friend QDataStream & operator>>(QDataStream &stream, QGeoSatelliteInfo &info)
Reads satellite information from the specified stream into the given info.
QSharedData & operator=(const QSharedData &)=delete
Combined button and popup list for selecting options.
char * toString(const MyPoint &point)
DBusConnection const char DBusError DBusBusType DBusError return DBusConnection DBusHandleMessageFunction void DBusFreeFunction return DBusConnection return DBusConnection return const char DBusError return DBusConnection DBusMessage dbus_uint32_t return DBusConnection dbus_bool_t DBusConnection DBusAddWatchFunction DBusRemoveWatchFunction DBusWatchToggledFunction void DBusFreeFunction return DBusConnection DBusDispatchStatusFunction void DBusFreeFunction DBusTimeout return DBusTimeout return DBusWatch return DBusWatch unsigned int return DBusError const DBusError return const DBusMessage return DBusMessage return DBusMessage return DBusMessage return DBusMessage return DBusMessage return DBusMessageIter int const void return DBusMessageIter DBusMessageIter return DBusMessageIter void DBusMessageIter void int return DBusMessage DBusMessageIter return DBusMessageIter return DBusMessageIter DBusMessageIter const char const char const char const char return DBusMessage return DBusMessage const char return DBusMessage dbus_bool_t return DBusMessage dbus_uint32_t return DBusMessage void
EGLStreamKHR stream
EGLOutputLayerEXT EGLint EGLAttrib value
[5]
EGLOutputLayerEXT EGLint attribute
Q_POSITIONING_EXPORT size_t qHash(const QGeoSatelliteInfo &key, size_t seed=0) noexcept
#define QT_DECL_METATYPE_EXTERN(TYPE, EXPORT)
Definition qmetatype.h:1388
GLuint64 key
static Q_CONSTINIT QBasicAtomicInteger< unsigned > seed
Definition qrandom.cpp:196
#define QT_DECLARE_QESDP_SPECIALIZATION_DTOR_WITH_EXPORT(Class, ExportMacro)
#define Q_ENUM(x)
#define Q_PROPERTY(...)
#define Q_INVOKABLE
#define Q_GADGET
double qreal
Definition qtypes.h:187
QSharedPointer< T > other(t)
[5]
this swap(other)
app setAttribute(Qt::AA_DontShowIconsInMenus)
QHostInfo info
[0]
char * toString(const MyType &t)
[31]