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
qplaceicon.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 QPLACEICON_H
5#define QPLACEICON_H
6
7#include <QtLocation/qlocationglobal.h>
8
9#include <QtCore/QMetaType>
10#include <QtCore/QSize>
11#include <QtCore/QSharedDataPointer>
12#include <QtQml/qqml.h>
13
14QT_BEGIN_NAMESPACE
15
16class QUrl;
17class QPlaceManager;
19
20QT_DECLARE_QSDP_SPECIALIZATION_DTOR_WITH_EXPORT(QPlaceIconPrivate, Q_LOCATION_EXPORT)
21
22class Q_LOCATION_EXPORT QPlaceIcon
23{
24 Q_GADGET
25 QML_VALUE_TYPE(icon)
26 QML_STRUCTURED_VALUE
27
28 Q_PROPERTY(QVariantMap parameters READ parameters WRITE setParameters)
29 Q_PROPERTY(QPlaceManager *manager READ manager WRITE setManager)
30
31public:
32 static const QString SingleUrl;
33
34 QPlaceIcon();
35 QPlaceIcon(const QPlaceIcon &other) noexcept;
36 QPlaceIcon(QPlaceIcon &&other) noexcept = default;
37 ~QPlaceIcon();
38
39 QPlaceIcon &operator=(const QPlaceIcon &other) noexcept;
40 QT_MOVE_ASSIGNMENT_OPERATOR_IMPL_VIA_MOVE_AND_SWAP(QPlaceIcon)
41
42 void swap(QPlaceIcon &other) noexcept { d.swap(other.d); }
43
44 friend inline bool operator==(const QPlaceIcon &lhs, const QPlaceIcon &rhs) noexcept
45 { return lhs.isEqual(rhs); }
46 friend inline bool operator!=(const QPlaceIcon &lhs, const QPlaceIcon &rhs) noexcept
47 { return !lhs.isEqual(rhs); }
48
49 Q_INVOKABLE QUrl url(const QSize &size = QSize()) const;
50
51 QPlaceManager *manager() const;
52 void setManager(QPlaceManager *manager);
53
54 QVariantMap parameters() const;
55 void setParameters(const QVariantMap &parameters);
56
57 bool isEmpty() const;
58
59private:
60 QSharedDataPointer<QPlaceIconPrivate> d;
61
62 bool isEqual(const QPlaceIcon &other) const noexcept;
63};
64
65QT_END_NAMESPACE
66
67Q_DECLARE_METATYPE(QPlaceIcon)
68
69#endif
\inmodule QtLocation
\inmodule QtLocation
Definition qplaceicon.h:23
Q_DECLARE_TYPEINFO(QByteArrayView, Q_PRIMITIVE_TYPE)