87 d->uid = QUuid::createUuid();
91
92
93QGeoAreaMonitorInfo::QGeoAreaMonitorInfo(
const QGeoAreaMonitorInfo &other)
99
100
101
102
103
104
105
106
107
110
111
112QGeoAreaMonitorInfo::~QGeoAreaMonitorInfo()
116QT_DEFINE_QESDP_SPECIALIZATION_DTOR(QGeoAreaMonitorInfoPrivate)
119
120
121
122QGeoAreaMonitorInfo &QGeoAreaMonitorInfo::operator=(
const QGeoAreaMonitorInfo &other)
129
130
131
132
133
134
135
136
137
138
141
142
143
144
145
148
149
150
151
152
155
156
157
158
161
162
163
164QString QGeoAreaMonitorInfo::name()
const
170
171
172void QGeoAreaMonitorInfo::setName(
const QString &name)
174 if (d->name != name) {
181
182
183
184
186QString QGeoAreaMonitorInfo::identifier()
const
188 return d->uid.toString();
192
193
194
195
196bool QGeoAreaMonitorInfo::isValid()
const
198 return (!d->name.isEmpty() && !d->shape.isEmpty());
202
203
204
205
206QGeoShape QGeoAreaMonitorInfo::area()
const
212
213
214
215
216void QGeoAreaMonitorInfo::setArea(
const QGeoShape &newShape)
223
224
225
226
227
228
229
230
231
232
233
234
235QDateTime QGeoAreaMonitorInfo::expiration()
const
241
242
243void QGeoAreaMonitorInfo::setExpiration(
const QDateTime &expiry)
250
251
252
253
254
255
256
257
258
259
260
261
262bool QGeoAreaMonitorInfo::isPersistent()
const
264 return d->persistent;
268
269
270
271
272
273
274
275
276
277void QGeoAreaMonitorInfo::setPersistent(
bool isPersistent)
280 d->persistent = isPersistent;
285
286
287
288
289
290QVariantMap QGeoAreaMonitorInfo::notificationParameters()
const
292 return d->notificationParameters;
296
297
298
299
300void QGeoAreaMonitorInfo::setNotificationParameters(
const QVariantMap ¶meters)
303 d->notificationParameters = parameters;
307
308
309void QGeoAreaMonitorInfo::detach()
314 d =
new QGeoAreaMonitorInfoPrivate;
317bool QGeoAreaMonitorInfo::equals(
const QGeoAreaMonitorInfo &lhs,
const QGeoAreaMonitorInfo &rhs)
319 return (lhs.d->name == rhs.d->name &&
320 lhs.d->uid == rhs.d->uid &&
321 lhs.d->shape == rhs.d->shape &&
322 lhs.d->persistent == rhs.d->persistent &&
323 lhs.d->expiry == rhs.d->expiry &&
324 lhs.d->notificationParameters == rhs.d->notificationParameters);
327#ifndef QT_NO_DATASTREAM
330
331
332
333
334
335
336QDataStream &QGeoAreaMonitorInfo::dataStreamOut(QDataStream &ds,
const QGeoAreaMonitorInfo &monitor)
338 ds << monitor.name() << monitor.d->uid << monitor.area()
339 << monitor.isPersistent() << monitor.notificationParameters() << monitor.expiration();
344
345
346
347
348
349
350
351QDataStream &QGeoAreaMonitorInfo::dataStreamIn(QDataStream &ds, QGeoAreaMonitorInfo &monitor)
355 monitor = QGeoAreaMonitorInfo(s);
363 monitor.setArea(shape);
367 monitor.setPersistent(persistent);
371 monitor.setNotificationParameters(map);
375 monitor.setExpiration(dt);
382#ifndef QT_NO_DEBUG_STREAM
383QDebug QGeoAreaMonitorInfo::debugStreaming(QDebug dbg,
const QGeoAreaMonitorInfo &monitor)
385 QDebugStateSaver saver(dbg);
386 dbg.nospace() <<
"QGeoAreaMonitorInfo(\"" << qPrintable(monitor.name())
387 <<
"\", " << monitor.area()
388 <<
", persistent: " << monitor.isPersistent()
389 <<
", expiry: " << monitor.expiration() <<
")";
397 return qHashMulti(seed, key.d->uid);