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