116
117
118
119
120
123
124
125
126
127
130
131
132
133
134
137
138
139
140
143
144
145void QGeoSatelliteInfo::setSatelliteSystem(SatelliteSystem system)
152
153
154
155
156
157
158
159
160
161QGeoSatelliteInfo::SatelliteSystem QGeoSatelliteInfo::satelliteSystem()
const
167
168
169
170
171
172
173
174
175
176
177
178
179
180void QGeoSatelliteInfo::setSatelliteIdentifier(
int satId)
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
213
214
215
216
217int QGeoSatelliteInfo::satelliteIdentifier()
const
223
224
225void QGeoSatelliteInfo::setSignalStrength(
int signalStrength)
228 d->signal = signalStrength;
232
233
234
237
238
239int QGeoSatelliteInfo::signalStrength()
const
245
246
247void QGeoSatelliteInfo::setAttribute(Attribute attribute, qreal value)
250 d->doubleAttribs[attribute] = value;
254
255
256
257
258
259
260qreal QGeoSatelliteInfo::attribute(Attribute attribute)
const
262 return d->doubleAttribs.value(attribute, -1);
266
267
268void QGeoSatelliteInfo::removeAttribute(Attribute attribute)
270 const auto it = d->doubleAttribs.constFind(attribute);
271 if (it != d->doubleAttribs.cend()) {
273 d->doubleAttribs.erase(it);
278
279
280bool QGeoSatelliteInfo::hasAttribute(Attribute attribute)
const
282 return d->doubleAttribs.contains(attribute);
286
287
288void QGeoSatelliteInfo::detach()
293 d =
new QGeoSatelliteInfoPrivate;
296bool QGeoSatelliteInfo::equals(
const QGeoSatelliteInfo &lhs,
const QGeoSatelliteInfo &rhs)
298 return *lhs.d == *rhs.d;
301#ifndef QT_NO_DEBUG_STREAM
302QDebug QGeoSatelliteInfo::debugStreaming(QDebug dbg,
const QGeoSatelliteInfo &info)
304 QDebugStateSaver saver(dbg);
305 dbg.nospace() <<
"QGeoSatelliteInfo(system=" << info.d->system;
306 dbg <<
", satId=" << info.d->satId;
307 dbg <<
", signal-strength=" << info.d->signal;
310 const QList<QGeoSatelliteInfo::Attribute> attribs = info.d->doubleAttribs.keys();
311 for (qsizetype i = 0; i < attribs.size(); ++i) {
313 switch (attribs[i]) {
314 case QGeoSatelliteInfo::Elevation:
317 case QGeoSatelliteInfo::Azimuth:
321 dbg << info.d->doubleAttribs[attribs[i]];
328#ifndef QT_NO_DATASTREAM
330
331
332
333
334
335
336
338QDataStream &QGeoSatelliteInfo::dataStreamOut(QDataStream &stream,
const QGeoSatelliteInfo &info)
340 stream << info.d->signal;
341 stream << info.d->doubleAttribs;
342 stream << info.d->satId;
343 stream <<
int(info.d->system);
348#ifndef QT_NO_DATASTREAM
350
351
352
353
354
355
356
358QDataStream &QGeoSatelliteInfo::dataStreamIn(QDataStream &stream, QGeoSatelliteInfo &info)
361 stream >> info.d->signal;
362 stream >> info.d->doubleAttribs;
363 stream >> info.d->satId;
365 info.d->system = (QGeoSatelliteInfo::SatelliteSystem)system;
370QGeoSatelliteInfoPrivate::QGeoSatelliteInfoPrivate() : QSharedData()
375QGeoSatelliteInfoPrivate::QGeoSatelliteInfoPrivate(
const QGeoSatelliteInfoPrivate &other)
378 signal = other.signal;
380 system = other.system;
381 doubleAttribs = other.doubleAttribs;
384QGeoSatelliteInfoPrivate::~QGeoSatelliteInfoPrivate() {}
386bool QGeoSatelliteInfoPrivate::operator==(
const QGeoSatelliteInfoPrivate &other)
const
388 return signal == other.signal
389 && satId == other.satId
390 && system == other.system
391 && doubleAttribs == other.doubleAttribs;
394QGeoSatelliteInfoPrivate *QGeoSatelliteInfoPrivate::get(
const QGeoSatelliteInfo &info)
396 return info.d.data();
402 return qHashMulti(seed, key.d->satId, key.d->system);