Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
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
12
13class QString;
14class QGeoLocation;
15class QPlaceAttribute;
16class QPlaceCategory;
18class QPlaceIcon;
19class QPlacePrivate;
20class QPlaceRatings;
21
23
24class Q_LOCATION_EXPORT QPlace
25{
26public:
27 QPlace();
28 QPlace(const QPlace &other) noexcept;
29 QPlace(QPlace &&other) noexcept = default;
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
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
108
110
112
113#endif
static bool isEqual(const aiUVTransform &a, const aiUVTransform &b)
\inmodule QtPositioning
\inmodule QtLocation
\inmodule QtLocation
The QPlaceContactDetail class represents a contact detail such as a phone number or website url.
Type
Defines the type of content.
\inmodule QtLocation
Definition qplaceicon.h:23
\inmodule QtLocation
QPlaceRatings & operator=(const QPlaceRatings &other) noexcept
Assigns other to this ratings object and returns a reference to this ratings object.
bool isEmpty() const
Returns true if all fields of the place ratings are 0; otherwise returns false.
\inmodule QtLocation
\inmodule QtLocation
Definition qplace.h:25
friend bool operator==(const QPlace &lhs, const QPlace &rhs) noexcept
Returns true if lhs is equal to rhs, otherwise returns false.
Definition qplace.h:37
QPlace(const QPlace &other) noexcept
Constructs a copy of other.
friend bool operator!=(const QPlace &lhs, const QPlace &rhs) noexcept
Returns true if lhs is not equal to rhs, otherwise returns false.
Definition qplace.h:39
QPlace(QPlace &&other) noexcept=default
~QPlace()
Destroys this place.
\inmodule QtCore
\macro QT_RESTRICTED_CAST_FROM_ASCII
Definition qstring.h:129
\inmodule QtCore
Definition qurl.h:94
const QLoggingCategory & category()
[1]
employee setName("Richard Schmit")
Combined button and popup list for selecting options.
DBusConnection const char DBusError DBusBusType DBusError return DBusConnection DBusHandleMessageFunction void DBusFreeFunction return DBusConnection return DBusConnection return const char DBusError return DBusConnection DBusMessage dbus_uint32_t return DBusConnection dbus_bool_t DBusConnection DBusAddWatchFunction DBusRemoveWatchFunction DBusWatchToggledFunction void DBusFreeFunction return DBusConnection DBusDispatchStatusFunction void DBusFreeFunction DBusTimeout return DBusTimeout return DBusWatch return DBusWatch unsigned int return DBusError const DBusError return const DBusMessage return DBusMessage return DBusMessage return DBusMessage return DBusMessage return DBusMessage return DBusMessageIter int const void return DBusMessageIter DBusMessageIter return DBusMessageIter void DBusMessageIter void int return DBusMessage DBusMessageIter return DBusMessageIter return DBusMessageIter DBusMessageIter const char const char const char const char return DBusMessage return DBusMessage const char return DBusMessage dbus_bool_t return DBusMessage dbus_uint32_t return DBusMessage void
EGLOutputLayerEXT EGLint attribute
#define Q_DECLARE_METATYPE(TYPE)
Definition qmetatype.h:1525
GLint location
GLenum type
GLuint name
GLsizei GLenum * categories
#define QT_DECLARE_QSDP_SPECIALIZATION_DTOR_WITH_EXPORT(Class, ExportMacro)
@ Q_RELOCATABLE_TYPE
Definition qtypeinfo.h:158
#define Q_DECLARE_TYPEINFO(TYPE, FLAGS)
Definition qtypeinfo.h:180
QSharedPointer< T > other(t)
[5]
this swap(other)
myAction setIcon(SomeIcon)