10#include <QtLocation/QPlaceCategory>
12#include <QtCore/QSharedData>
13#include <QtCore/QList>
14#include <QtCore/QVariant>
19QT_DEFINE_QSDP_SPECIALIZATION_DTOR(QPlaceSearchRequestPrivate)
21bool QPlaceSearchRequestPrivate::operator==(
const QPlaceSearchRequestPrivate &other)
const
23 return searchTerm == other.searchTerm &&
24 categories == other.categories &&
25 searchArea == other.searchArea &&
26 recommendationId == other.recommendationId &&
27 visibilityScope == other.visibilityScope &&
28 relevanceHint == other.relevanceHint &&
29 limit == other.limit &&
30 searchContext == other.searchContext;
35void QPlaceSearchRequestPrivate::clear()
40 searchArea = QGeoShape();
41 recommendationId.clear();
42 visibilityScope = QLocation::UnspecifiedVisibility;
43 relevanceHint = QPlaceSearchRequest::UnspecifiedHint;
44 searchContext.clear();
49const QPlaceSearchRequestPrivate *QPlaceSearchRequestPrivate::get(
const QPlaceSearchRequest &request)
51 return request.d_ptr.constData();
54QPlaceSearchRequestPrivate *QPlaceSearchRequestPrivate::get(QPlaceSearchRequest &request)
56 return request.d_ptr.data();
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
86
89
90
91
92
93
94
95
96
97
98
99
100
103
104
105QPlaceSearchRequest::QPlaceSearchRequest()
106 : d_ptr(
new QPlaceSearchRequestPrivate())
111
112
113QPlaceSearchRequest::QPlaceSearchRequest(
const QPlaceSearchRequest &other)
noexcept =
default;
116
117
118QPlaceSearchRequest::~QPlaceSearchRequest() =
default;
121
122
123
124QPlaceSearchRequest &QPlaceSearchRequest::operator=(
const QPlaceSearchRequest & other)
noexcept
134
135
136
137
140
141
142
143
145bool QPlaceSearchRequest::isEqual(
const QPlaceSearchRequest &other)
const noexcept
147 Q_D(
const QPlaceSearchRequest);
148 return *d == *other.d_func();
152
153
154QString QPlaceSearchRequest::searchTerm()
const
156 Q_D(
const QPlaceSearchRequest);
157 return d->searchTerm;
161
162
163void QPlaceSearchRequest::setSearchTerm(
const QString &term)
165 Q_D(QPlaceSearchRequest);
166 d->searchTerm = term;
170
171
172
173
174QList<QPlaceCategory> QPlaceSearchRequest::categories()
const
176 Q_D(
const QPlaceSearchRequest);
177 return d->categories;
181
182
183
184
185void QPlaceSearchRequest::setCategory(
const QPlaceCategory &category)
187 Q_D(QPlaceSearchRequest);
188 d->categories.clear();
190 if (!category.categoryId().isEmpty())
191 d->categories.append(category);
195
196
197
198
199
200
201void QPlaceSearchRequest::setCategories(
const QList<QPlaceCategory> &categories)
203 Q_D(QPlaceSearchRequest);
204 d->categories = categories;
208
209
210
211QGeoShape QPlaceSearchRequest::searchArea()
const
213 Q_D(
const QPlaceSearchRequest);
214 return d->searchArea;
218
219
220void QPlaceSearchRequest::setSearchArea(
const QGeoShape &area)
222 Q_D(QPlaceSearchRequest);
223 d->searchArea = area;
227
228
229
230QString QPlaceSearchRequest::recommendationId()
const
232 Q_D(
const QPlaceSearchRequest);
233 return d->recommendationId;
237
238
239void QPlaceSearchRequest::setRecommendationId(
const QString &placeId)
241 Q_D(QPlaceSearchRequest);
242 d->recommendationId = placeId;
246
247
248
249
250QVariant QPlaceSearchRequest::searchContext()
const
252 Q_D(
const QPlaceSearchRequest);
253 return d->searchContext;
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271void QPlaceSearchRequest::setSearchContext(
const QVariant &context)
273 Q_D(QPlaceSearchRequest);
274 d->searchContext = context;
278
279
280
281
282QLocation::VisibilityScope QPlaceSearchRequest::visibilityScope()
const
284 Q_D(
const QPlaceSearchRequest);
285 return d->visibilityScope;
289
290
291void QPlaceSearchRequest::setVisibilityScope(QLocation::VisibilityScope scope)
293 Q_D(QPlaceSearchRequest);
294 d->visibilityScope = scope;
298
299
300
301
302
303QPlaceSearchRequest::RelevanceHint QPlaceSearchRequest::relevanceHint()
const
305 Q_D(
const QPlaceSearchRequest);
306 return d->relevanceHint;
310
311
312void QPlaceSearchRequest::setRelevanceHint(QPlaceSearchRequest::RelevanceHint hint)
314 Q_D(QPlaceSearchRequest);
315 d->relevanceHint = hint;
319
320
321
322
323
324int QPlaceSearchRequest::limit()
const
326 Q_D(
const QPlaceSearchRequest);
331
332
333void QPlaceSearchRequest::setLimit(
int limit)
335 Q_D(QPlaceSearchRequest);
340
341
342void QPlaceSearchRequest::clear()
344 Q_D(QPlaceSearchRequest);
348inline QPlaceSearchRequestPrivate *QPlaceSearchRequest::d_func()
350 return static_cast<QPlaceSearchRequestPrivate *>(d_ptr.data());
353inline const QPlaceSearchRequestPrivate *QPlaceSearchRequest::d_func()
const
355 return static_cast<
const QPlaceSearchRequestPrivate *>(d_ptr.constData());
Combined button and popup list for selecting options.