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
159QGeoSatelliteInfo::SatelliteSystem QGeoSatelliteInfo::satelliteSystem()
const
165
166
167
168
169
170
171
172
173
174
175
176
177
178void QGeoSatelliteInfo::setSatelliteIdentifier(
int satId)
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210int QGeoSatelliteInfo::satelliteIdentifier()
const
216
217
218void QGeoSatelliteInfo::setSignalStrength(
int signalStrength)
221 d->signal = signalStrength;
225
226
227int QGeoSatelliteInfo::signalStrength()
const
233
234
235void QGeoSatelliteInfo::setAttribute(Attribute attribute, qreal value)
238 d->doubleAttribs[
int(attribute)] = value;
242
243
244
245
246
247
248qreal QGeoSatelliteInfo::attribute(Attribute attribute)
const
250 if (d->doubleAttribs.contains(
int(attribute)))
251 return d->doubleAttribs[
int(attribute)];
256
257
258void QGeoSatelliteInfo::removeAttribute(Attribute attribute)
261 d->doubleAttribs.remove(
int(attribute));
265
266
267bool QGeoSatelliteInfo::hasAttribute(Attribute attribute)
const
269 return d->doubleAttribs.contains(
int(attribute));
273
274
275void QGeoSatelliteInfo::detach()
280 d =
new QGeoSatelliteInfoPrivate;
283bool QGeoSatelliteInfo::equals(
const QGeoSatelliteInfo &lhs,
const QGeoSatelliteInfo &rhs)
285 return *lhs.d == *rhs.d;
288#ifndef QT_NO_DEBUG_STREAM
289QDebug QGeoSatelliteInfo::debugStreaming(QDebug dbg,
const QGeoSatelliteInfo &info)
291 QDebugStateSaver saver(dbg);
292 dbg.nospace() <<
"QGeoSatelliteInfo(system=" << info.d->system;
293 dbg <<
", satId=" << info.d->satId;
294 dbg <<
", signal-strength=" << info.d->signal;
297 QList<
int> attribs = info.d->doubleAttribs.keys();
298 for (
int i = 0; i < attribs.size(); ++i) {
300 switch (attribs[i]) {
301 case QGeoSatelliteInfo::Elevation:
304 case QGeoSatelliteInfo::Azimuth:
308 dbg << info.d->doubleAttribs[attribs[i]];
315#ifndef QT_NO_DATASTREAM
317
318
319
320
321
322
323
325QDataStream &QGeoSatelliteInfo::dataStreamOut(QDataStream &stream,
const QGeoSatelliteInfo &info)
327 stream << info.d->signal;
328 stream << info.d->doubleAttribs;
329 stream << info.d->satId;
330 stream <<
int(info.d->system);
335#ifndef QT_NO_DATASTREAM
337
338
339
340
341
342
343
345QDataStream &QGeoSatelliteInfo::dataStreamIn(QDataStream &stream, QGeoSatelliteInfo &info)
348 stream >> info.d->signal;
349 stream >> info.d->doubleAttribs;
350 stream >> info.d->satId;
352 info.d->system = (QGeoSatelliteInfo::SatelliteSystem)system;
357QGeoSatelliteInfoPrivate::QGeoSatelliteInfoPrivate() : QSharedData()
362QGeoSatelliteInfoPrivate::QGeoSatelliteInfoPrivate(
const QGeoSatelliteInfoPrivate &other)
365 signal = other.signal;
367 system = other.system;
368 doubleAttribs = other.doubleAttribs;
371QGeoSatelliteInfoPrivate::~QGeoSatelliteInfoPrivate() {}
373bool QGeoSatelliteInfoPrivate::operator==(
const QGeoSatelliteInfoPrivate &other)
const
375 return signal == other.signal
376 && satId == other.satId
377 && system == other.system
378 && doubleAttribs == other.doubleAttribs;
381QGeoSatelliteInfoPrivate *QGeoSatelliteInfoPrivate::get(
const QGeoSatelliteInfo &info)
383 return info.d.data();
389 return qHashMulti(seed, key.d->satId, key.d->system);