9#include <QtLocation/QPlaceCategory>
11#include <QtCore/QSharedData>
12#include <QtCore/QList>
13#include <QtCore/QVariant>
18QT_DEFINE_QSDP_SPECIALIZATION_DTOR(QPlaceSearchRequestPrivate)
20bool QPlaceSearchRequestPrivate::operator==(
const QPlaceSearchRequestPrivate &other)
const
22 return searchTerm == other.searchTerm &&
23 categories == other.categories &&
24 searchArea == other.searchArea &&
25 recommendationId == other.recommendationId &&
26 visibilityScope == other.visibilityScope &&
27 relevanceHint == other.relevanceHint &&
28 limit == other.limit &&
29 searchContext == other.searchContext;
34void QPlaceSearchRequestPrivate::clear()
39 searchArea = QGeoShape();
40 recommendationId.clear();
41 visibilityScope = QLocation::UnspecifiedVisibility;
42 relevanceHint = QPlaceSearchRequest::UnspecifiedHint;
43 searchContext.clear();
48const QPlaceSearchRequestPrivate *QPlaceSearchRequestPrivate::get(
const QPlaceSearchRequest &request)
50 return request.d_ptr.constData();
53QPlaceSearchRequestPrivate *QPlaceSearchRequestPrivate::get(QPlaceSearchRequest &request)
55 return request.d_ptr.data();
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
88
89
90
91
92
93
94
95
96
97
98
99
102
103
104QPlaceSearchRequest::QPlaceSearchRequest()
105 : d_ptr(
new QPlaceSearchRequestPrivate())
110
111
112QPlaceSearchRequest::QPlaceSearchRequest(
const QPlaceSearchRequest &other)
noexcept =
default;
115
116
117QPlaceSearchRequest::~QPlaceSearchRequest() =
default;
120
121
122
123QPlaceSearchRequest &QPlaceSearchRequest::operator=(
const QPlaceSearchRequest & other)
noexcept
133
134
135
136
139
140
141
142
144bool QPlaceSearchRequest::isEqual(
const QPlaceSearchRequest &other)
const noexcept
146 Q_D(
const QPlaceSearchRequest);
147 return *d == *other.d_func();
151
152
153QString QPlaceSearchRequest::searchTerm()
const
155 Q_D(
const QPlaceSearchRequest);
156 return d->searchTerm;
160
161
162void QPlaceSearchRequest::setSearchTerm(
const QString &term)
164 Q_D(QPlaceSearchRequest);
165 d->searchTerm = term;
169
170
171
172
173QList<QPlaceCategory> QPlaceSearchRequest::categories()
const
175 Q_D(
const QPlaceSearchRequest);
176 return d->categories;
180
181
182
183
184void QPlaceSearchRequest::setCategory(
const QPlaceCategory &category)
186 Q_D(QPlaceSearchRequest);
187 d->categories.clear();
189 if (!category.categoryId().isEmpty())
190 d->categories.append(category);
194
195
196
197
198
199
200void QPlaceSearchRequest::setCategories(
const QList<QPlaceCategory> &categories)
202 Q_D(QPlaceSearchRequest);
203 d->categories = categories;
207
208
209
210QGeoShape QPlaceSearchRequest::searchArea()
const
212 Q_D(
const QPlaceSearchRequest);
213 return d->searchArea;
217
218
219void QPlaceSearchRequest::setSearchArea(
const QGeoShape &area)
221 Q_D(QPlaceSearchRequest);
222 d->searchArea = area;
226
227
228
229QString QPlaceSearchRequest::recommendationId()
const
231 Q_D(
const QPlaceSearchRequest);
232 return d->recommendationId;
236
237
238void QPlaceSearchRequest::setRecommendationId(
const QString &placeId)
240 Q_D(QPlaceSearchRequest);
241 d->recommendationId = placeId;
245
246
247
248
249QVariant QPlaceSearchRequest::searchContext()
const
251 Q_D(
const QPlaceSearchRequest);
252 return d->searchContext;
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270void QPlaceSearchRequest::setSearchContext(
const QVariant &context)
272 Q_D(QPlaceSearchRequest);
273 d->searchContext = context;
277
278
279
280
281QLocation::VisibilityScope QPlaceSearchRequest::visibilityScope()
const
283 Q_D(
const QPlaceSearchRequest);
284 return d->visibilityScope;
288
289
290void QPlaceSearchRequest::setVisibilityScope(QLocation::VisibilityScope scope)
292 Q_D(QPlaceSearchRequest);
293 d->visibilityScope = scope;
297
298
299
300
301
302QPlaceSearchRequest::RelevanceHint QPlaceSearchRequest::relevanceHint()
const
304 Q_D(
const QPlaceSearchRequest);
305 return d->relevanceHint;
309
310
311void QPlaceSearchRequest::setRelevanceHint(QPlaceSearchRequest::RelevanceHint hint)
313 Q_D(QPlaceSearchRequest);
314 d->relevanceHint = hint;
318
319
320
321
322
323int QPlaceSearchRequest::limit()
const
325 Q_D(
const QPlaceSearchRequest);
330
331
332void QPlaceSearchRequest::setLimit(
int limit)
334 Q_D(QPlaceSearchRequest);
339
340
341void QPlaceSearchRequest::clear()
343 Q_D(QPlaceSearchRequest);
347inline QPlaceSearchRequestPrivate *QPlaceSearchRequest::d_func()
349 return static_cast<QPlaceSearchRequestPrivate *>(d_ptr.data());
352inline const QPlaceSearchRequestPrivate *QPlaceSearchRequest::d_func()
const
354 return static_cast<
const QPlaceSearchRequestPrivate *>(d_ptr.constData());
Combined button and popup list for selecting options.