Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qplacesearchrequest.h
Go to the documentation of this file.
1// Copyright (C) 2015 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
4#ifndef QPLACESEARCHREQUEST_H
5#define QPLACESEARCHREQUEST_H
6
7#include <QtCore/QSharedDataPointer>
8#include <QtCore/QMetaType>
9#include <QtLocation/QLocation>
10
12
13class QGeoShape;
14class QPlaceCategory;
15class QPlaceSearchRequestPrivate;
16QT_DECLARE_QSDP_SPECIALIZATION_DTOR_WITH_EXPORT(QPlaceSearchRequestPrivate, Q_LOCATION_EXPORT)
17
18class Q_LOCATION_EXPORT QPlaceSearchRequest
19{
20public:
21 enum RelevanceHint {
22 UnspecifiedHint,
23 DistanceHint,
24 LexicalPlaceNameHint
25 };
26
27 QPlaceSearchRequest();
28 QPlaceSearchRequest(const QPlaceSearchRequest &other) noexcept;
29 QPlaceSearchRequest(QPlaceSearchRequest &&other) noexcept = default;
30 ~QPlaceSearchRequest();
31
32 QPlaceSearchRequest &operator=(const QPlaceSearchRequest &other) noexcept;
33 QT_MOVE_ASSIGNMENT_OPERATOR_IMPL_VIA_MOVE_AND_SWAP(QPlaceSearchRequest)
34
35 void swap(QPlaceSearchRequest &other) noexcept { d_ptr.swap(other.d_ptr); }
36
37 friend inline bool operator==(const QPlaceSearchRequest &lhs,
38 const QPlaceSearchRequest &rhs) noexcept
39 { return lhs.isEqual(rhs); }
40 friend inline bool operator!=(const QPlaceSearchRequest &lhs,
41 const QPlaceSearchRequest &rhs) noexcept
42 { return !lhs.isEqual(rhs); }
43
44 QString searchTerm() const;
45 void setSearchTerm(const QString &term);
46
47 QList<QPlaceCategory> categories() const;
48 void setCategory(const QPlaceCategory &category);
49 void setCategories(const QList<QPlaceCategory> &categories);
50
51 QGeoShape searchArea() const;
52 void setSearchArea(const QGeoShape &area);
53
54 QString recommendationId() const;
55 void setRecommendationId(const QString &recommendationId);
56
57 QVariant searchContext() const;
58 void setSearchContext(const QVariant &context);
59
60 QLocation::VisibilityScope visibilityScope() const;
61 void setVisibilityScope(QLocation::VisibilityScope visibilityScopes);
62
63 RelevanceHint relevanceHint() const;
64 void setRelevanceHint(RelevanceHint hint);
65
66 int limit() const;
67 void setLimit(int limit);
68
69 void clear();
70
71private:
72 QSharedDataPointer<QPlaceSearchRequestPrivate> d_ptr;
73
74 bool isEqual(const QPlaceSearchRequest &other) const noexcept;
75
76 inline QPlaceSearchRequestPrivate *d_func();
77 inline const QPlaceSearchRequestPrivate *d_func() const;
78
79 friend class QPlaceSearchRequestPrivate;
80};
81
82QT_END_NAMESPACE
83
84Q_DECLARE_METATYPE(QPlaceSearchRequest::RelevanceHint)
85
86#endif // QPLACESEARCHQUERY_H
\inmodule QtLocation
\inmodule QtLocation