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