86 d->uid = QUuid::createUuid();
90
91
92QGeoAreaMonitorInfo::QGeoAreaMonitorInfo(
const QGeoAreaMonitorInfo &other)
98
99
100
101
102
103
104
105
106
109
110
111QGeoAreaMonitorInfo::~QGeoAreaMonitorInfo()
115QT_DEFINE_QESDP_SPECIALIZATION_DTOR(QGeoAreaMonitorInfoPrivate)
118
119
120
121QGeoAreaMonitorInfo &QGeoAreaMonitorInfo::operator=(
const QGeoAreaMonitorInfo &other)
128
129
130
131
132
133
134
135
136
137
140
141
142
143
144
147
148
149
150
151
154
155
156
157
160
161
162
163QString QGeoAreaMonitorInfo::name()
const
169
170
171void QGeoAreaMonitorInfo::setName(
const QString &name)
173 if (d->name != name) {
180
181
182
183
185QString QGeoAreaMonitorInfo::identifier()
const
187 return d->uid.toString();
191
192
193
194
195bool QGeoAreaMonitorInfo::isValid()
const
197 return (!d->name.isEmpty() && !d->shape.isEmpty());
201
202
203
204
205QGeoShape QGeoAreaMonitorInfo::area()
const
211
212
213
214
215void QGeoAreaMonitorInfo::setArea(
const QGeoShape &newShape)
222
223
224
225
226
227
228
229
230
231
232
233
234QDateTime QGeoAreaMonitorInfo::expiration()
const
240
241
242void QGeoAreaMonitorInfo::setExpiration(
const QDateTime &expiry)
249
250
251
252
253
254
255
256
257
258
259
260
261bool QGeoAreaMonitorInfo::isPersistent()
const
263 return d->persistent;
267
268
269
270
271
272
273
274
275
276void QGeoAreaMonitorInfo::setPersistent(
bool isPersistent)
279 d->persistent = isPersistent;
284
285
286
287
288
289QVariantMap QGeoAreaMonitorInfo::notificationParameters()
const
291 return d->notificationParameters;
295
296
297
298
299void QGeoAreaMonitorInfo::setNotificationParameters(
const QVariantMap ¶meters)
302 d->notificationParameters = parameters;
306
307
308void QGeoAreaMonitorInfo::detach()
313 d =
new QGeoAreaMonitorInfoPrivate;
316bool QGeoAreaMonitorInfo::equals(
const QGeoAreaMonitorInfo &lhs,
const QGeoAreaMonitorInfo &rhs)
318 return (lhs.d->name == rhs.d->name &&
319 lhs.d->uid == rhs.d->uid &&
320 lhs.d->shape == rhs.d->shape &&
321 lhs.d->persistent == rhs.d->persistent &&
322 lhs.d->expiry == rhs.d->expiry &&
323 lhs.d->notificationParameters == rhs.d->notificationParameters);
326#ifndef QT_NO_DATASTREAM
329
330
331
332
333
334
335QDataStream &QGeoAreaMonitorInfo::dataStreamOut(QDataStream &ds,
const QGeoAreaMonitorInfo &monitor)
337 ds << monitor.name() << monitor.d->uid << monitor.area()
338 << monitor.isPersistent() << monitor.notificationParameters() << monitor.expiration();
343
344
345
346
347
348
349
350QDataStream &QGeoAreaMonitorInfo::dataStreamIn(QDataStream &ds, QGeoAreaMonitorInfo &monitor)
354 monitor = QGeoAreaMonitorInfo(s);
362 monitor.setArea(shape);
366 monitor.setPersistent(persistent);
370 monitor.setNotificationParameters(map);
374 monitor.setExpiration(dt);
381#ifndef QT_NO_DEBUG_STREAM
382QDebug QGeoAreaMonitorInfo::debugStreaming(QDebug dbg,
const QGeoAreaMonitorInfo &monitor)
384 QDebugStateSaver saver(dbg);
385 dbg.nospace() <<
"QGeoAreaMonitorInfo(\"" << qPrintable(monitor.name())
386 <<
"\", " << monitor.area()
387 <<
", persistent: " << monitor.isPersistent()
388 <<
", expiry: " << monitor.expiration() <<
")";
396 return qHashMulti(seed, key.d->uid);