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
157
158
159
160
161
162
163
164QGeoSatelliteInfo::SatelliteSystem QGeoSatelliteInfo::satelliteSystem()
const
170
171
172
173
174
175
176
177
178
179
180
181
182
183void QGeoSatelliteInfo::setSatelliteIdentifier(
int satId)
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
216
217
218
219
220int QGeoSatelliteInfo::satelliteIdentifier()
const
226
227
228void QGeoSatelliteInfo::setSignalStrength(
int signalStrength)
231 d->signal = signalStrength;
235
236
237
240
241
242int QGeoSatelliteInfo::signalStrength()
const
248
249
250void QGeoSatelliteInfo::setAttribute(Attribute attribute, qreal value)
253 d->doubleAttribs[attribute] = value;
257
258
259
260
261
262
263qreal QGeoSatelliteInfo::attribute(Attribute attribute)
const
265 return d->doubleAttribs.value(attribute, -1);
269
270
271void QGeoSatelliteInfo::removeAttribute(Attribute attribute)
273 const auto it = d->doubleAttribs.constFind(attribute);
274 if (it != d->doubleAttribs.cend()) {
276 d->doubleAttribs.erase(it);
281
282
283bool QGeoSatelliteInfo::hasAttribute(Attribute attribute)
const
285 return d->doubleAttribs.contains(attribute);
289
290
291void QGeoSatelliteInfo::detach()
296 d =
new QGeoSatelliteInfoPrivate;
299bool QGeoSatelliteInfo::equals(
const QGeoSatelliteInfo &lhs,
const QGeoSatelliteInfo &rhs)
301 return *lhs.d == *rhs.d;
304#ifndef QT_NO_DEBUG_STREAM
305QDebug QGeoSatelliteInfo::debugStreaming(QDebug dbg,
const QGeoSatelliteInfo &info)
307 QDebugStateSaver saver(dbg);
308 dbg.nospace() <<
"QGeoSatelliteInfo(system=" << info.d->system;
309 dbg <<
", satId=" << info.d->satId;
310 dbg <<
", signal-strength=" << info.d->signal;
313 const QList<QGeoSatelliteInfo::Attribute> attribs = info.d->doubleAttribs.keys();
314 for (qsizetype i = 0; i < attribs.size(); ++i) {
316 switch (attribs[i]) {
317 case QGeoSatelliteInfo::Elevation:
320 case QGeoSatelliteInfo::Azimuth:
324 dbg << info.d->doubleAttribs[attribs[i]];
331#ifndef QT_NO_DATASTREAM
333
334
335
336
337
338
339
341QDataStream &QGeoSatelliteInfo::dataStreamOut(QDataStream &stream,
const QGeoSatelliteInfo &info)
343 stream << info.d->signal;
344 stream << info.d->doubleAttribs;
345 stream << info.d->satId;
346 stream <<
int(info.d->system);
351#ifndef QT_NO_DATASTREAM
353
354
355
356
357
358
359
361QDataStream &QGeoSatelliteInfo::dataStreamIn(QDataStream &stream, QGeoSatelliteInfo &info)
364 stream >> info.d->signal;
365 stream >> info.d->doubleAttribs;
366 stream >> info.d->satId;
368 info.d->system = (QGeoSatelliteInfo::SatelliteSystem)system;
373QGeoSatelliteInfoPrivate::QGeoSatelliteInfoPrivate() : QSharedData()
378QGeoSatelliteInfoPrivate::QGeoSatelliteInfoPrivate(
const QGeoSatelliteInfoPrivate &other)
381 signal = other.signal;
383 system = other.system;
384 doubleAttribs = other.doubleAttribs;
387QGeoSatelliteInfoPrivate::~QGeoSatelliteInfoPrivate() {}
389bool QGeoSatelliteInfoPrivate::operator==(
const QGeoSatelliteInfoPrivate &other)
const
391 return signal == other.signal
392 && satId == other.satId
393 && system == other.system
394 && doubleAttribs == other.doubleAttribs;
397QGeoSatelliteInfoPrivate *QGeoSatelliteInfoPrivate::get(
const QGeoSatelliteInfo &info)
399 return info.d.data();
405 return qHashMulti(seed, key.d->satId, key.d->system);