118
119
120
121
122
125
126
127
128
129
132
133
134
135
136
139
140
141
142
145
146
147void QGeoSatelliteInfo::setSatelliteSystem(SatelliteSystem system)
154
155
156
157
158
159
160
161
162
163QGeoSatelliteInfo::SatelliteSystem QGeoSatelliteInfo::satelliteSystem()
const
169
170
171
172
173
174
175
176
177
178
179
180
181
182void QGeoSatelliteInfo::setSatelliteIdentifier(
int satId)
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
215
216
217
218
219int QGeoSatelliteInfo::satelliteIdentifier()
const
225
226
227void QGeoSatelliteInfo::setSignalStrength(
int signalStrength)
230 d->signal = signalStrength;
234
235
236
239
240
241int QGeoSatelliteInfo::signalStrength()
const
247
248
249void QGeoSatelliteInfo::setAttribute(Attribute attribute, qreal value)
252 d->doubleAttribs[attribute] = value;
256
257
258
259
260
261
262qreal QGeoSatelliteInfo::attribute(Attribute attribute)
const
264 return d->doubleAttribs.value(attribute, -1);
268
269
270void QGeoSatelliteInfo::removeAttribute(Attribute attribute)
272 const auto it = d->doubleAttribs.constFind(attribute);
273 if (it != d->doubleAttribs.cend()) {
275 d->doubleAttribs.erase(it);
280
281
282bool QGeoSatelliteInfo::hasAttribute(Attribute attribute)
const
284 return d->doubleAttribs.contains(attribute);
288
289
290void QGeoSatelliteInfo::detach()
295 d =
new QGeoSatelliteInfoPrivate;
298bool QGeoSatelliteInfo::equals(
const QGeoSatelliteInfo &lhs,
const QGeoSatelliteInfo &rhs)
300 return *lhs.d == *rhs.d;
303#ifndef QT_NO_DEBUG_STREAM
304QDebug QGeoSatelliteInfo::debugStreaming(QDebug dbg,
const QGeoSatelliteInfo &info)
306 QDebugStateSaver saver(dbg);
307 dbg.nospace() <<
"QGeoSatelliteInfo(system=" << info.d->system;
308 dbg <<
", satId=" << info.d->satId;
309 dbg <<
", signal-strength=" << info.d->signal;
312 const QList<QGeoSatelliteInfo::Attribute> attribs = info.d->doubleAttribs.keys();
313 for (qsizetype i = 0; i < attribs.size(); ++i) {
315 switch (attribs[i]) {
316 case QGeoSatelliteInfo::Elevation:
319 case QGeoSatelliteInfo::Azimuth:
323 dbg << info.d->doubleAttribs[attribs[i]];
330#ifndef QT_NO_DATASTREAM
332
333
334
335
336
337
338
340QDataStream &QGeoSatelliteInfo::dataStreamOut(QDataStream &stream,
const QGeoSatelliteInfo &info)
342 stream << info.d->signal;
343 stream << info.d->doubleAttribs;
344 stream << info.d->satId;
345 stream <<
int(info.d->system);
350#ifndef QT_NO_DATASTREAM
352
353
354
355
356
357
358
360QDataStream &QGeoSatelliteInfo::dataStreamIn(QDataStream &stream, QGeoSatelliteInfo &info)
363 stream >> info.d->signal;
364 stream >> info.d->doubleAttribs;
365 stream >> info.d->satId;
367 info.d->system = (QGeoSatelliteInfo::SatelliteSystem)system;
372QGeoSatelliteInfoPrivate::QGeoSatelliteInfoPrivate() : QSharedData()
377QGeoSatelliteInfoPrivate::QGeoSatelliteInfoPrivate(
const QGeoSatelliteInfoPrivate &other)
380 signal = other.signal;
382 system = other.system;
383 doubleAttribs = other.doubleAttribs;
386QGeoSatelliteInfoPrivate::~QGeoSatelliteInfoPrivate() {}
388bool QGeoSatelliteInfoPrivate::operator==(
const QGeoSatelliteInfoPrivate &other)
const
390 return signal == other.signal
391 && satId == other.satId
392 && system == other.system
393 && doubleAttribs == other.doubleAttribs;
396QGeoSatelliteInfoPrivate *QGeoSatelliteInfoPrivate::get(
const QGeoSatelliteInfo &info)
398 return info.d.data();
404 return qHashMulti(seed, key.d->satId, key.d->system);