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
qplace.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// Qt-Security score:significant reason:default
4
5#ifndef QPLACE_H
6#define QPLACE_H
7
8#include <QtCore/QSharedDataPointer>
9#include <QtLocation/QLocation>
10#include <QtLocation/QPlaceContent>
11
12QT_BEGIN_NAMESPACE
13
14class QString;
15class QGeoLocation;
16class QPlaceAttribute;
17class QPlaceCategory;
18class QPlaceContactDetail;
19class QPlaceIcon;
20class QPlacePrivate;
21class QPlaceRatings;
22
23QT_DECLARE_QSDP_SPECIALIZATION_DTOR_WITH_EXPORT(QPlacePrivate, Q_LOCATION_EXPORT)
24
25class Q_LOCATION_EXPORT QPlace
26{
27public:
28 QPlace();
29 QPlace(const QPlace &other) noexcept;
30 QPlace(QPlace &&other) noexcept = default;
31 ~QPlace();
32
33 QPlace &operator=(const QPlace &other) noexcept;
34 QT_MOVE_ASSIGNMENT_OPERATOR_IMPL_VIA_MOVE_AND_SWAP(QPlace)
35
36 void swap(QPlace &other) noexcept { d_ptr.swap(other.d_ptr); }
37
38 friend bool operator==(const QPlace &lhs, const QPlace &rhs) noexcept
39 { return lhs.isEqual(rhs); }
40 friend bool operator!=(const QPlace &lhs, const QPlace &rhs) noexcept
41 { return !lhs.isEqual(rhs); }
42
43 QList<QPlaceCategory> categories() const;
44 void setCategory(const QPlaceCategory &category);
45 void setCategories(const QList<QPlaceCategory> &categories);
46 QGeoLocation location() const;
47 void setLocation(const QGeoLocation &location);
48 QPlaceRatings ratings() const;
49 void setRatings(const QPlaceRatings &ratings);
50 QPlaceSupplier supplier() const;
51 void setSupplier(const QPlaceSupplier &supplier);
52
53 QString attribution() const;
54 void setAttribution(const QString &attribution);
55
56 QPlaceIcon icon() const;
57 void setIcon(const QPlaceIcon &icon);
58
59 QPlaceContent::Collection content(QPlaceContent::Type type) const;
60 void setContent(QPlaceContent::Type type, const QPlaceContent::Collection &content);
61 void insertContent(QPlaceContent::Type type, const QPlaceContent::Collection &content);
62
63 int totalContentCount(QPlaceContent::Type type) const;
64 void setTotalContentCount(QPlaceContent::Type type, int total);
65
66 QString name() const;
67 void setName(const QString &name);
68 QString placeId() const;
69 void setPlaceId(const QString &identifier);
70
71 QString primaryPhone() const;
72 QString primaryFax() const;
73 QString primaryEmail() const;
74 QUrl primaryWebsite() const;
75
76 bool detailsFetched() const;
77 void setDetailsFetched(bool fetched);
78
79 QStringList extendedAttributeTypes() const;
80 QPlaceAttribute extendedAttribute(const QString &attributeType) const;
81 void setExtendedAttribute(const QString &attributeType, const QPlaceAttribute &attribute);
82 void removeExtendedAttribute(const QString &attributeType);
83
84 QStringList contactTypes() const;
85 QList<QPlaceContactDetail> contactDetails(const QString &contactType) const;
86 void setContactDetails(const QString &contactType, QList<QPlaceContactDetail> details);
87 void appendContactDetail(const QString &contactType, const QPlaceContactDetail &detail);
88 void removeContactDetails(const QString &contactType);
89
90 QLocation::Visibility visibility() const;
91 void setVisibility(QLocation::Visibility visibility);
92
93 bool isEmpty() const;
94
95protected:
96 QPlace(const QSharedDataPointer<QPlacePrivate> &dd);
97
98private:
99 QSharedDataPointer<QPlacePrivate> d_ptr;
100
101 bool isEqual(const QPlace &other) const noexcept;
102
103 inline QPlacePrivate *d_func();
104 inline const QPlacePrivate *d_func() const;
105 friend class QDeclarativePlace;
106};
107
108Q_DECLARE_TYPEINFO(QPlace, Q_RELOCATABLE_TYPE);
109
110QT_END_NAMESPACE
111
112Q_DECLARE_METATYPE(QPlace)
113
114#endif
\inmodule QtLocation
Definition qplace.h:26
Combined button and popup list for selecting options.
Q_DECLARE_TYPEINFO(QByteArrayView, Q_PRIMITIVE_TYPE)