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
qplacesupplier.h
Go to the documentation of this file.
1// Copyright (C) 2022 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 QPLACESUPPLIER_H
5#define QPLACESUPPLIER_H
6
7#include <QtLocation/qlocationglobal.h>
8#include <QtCore/QMetaType>
9#include <QtCore/QSharedDataPointer>
10#include <QtQml/qqml.h>
11
12QT_BEGIN_NAMESPACE
13
14class QUrl;
15class QPlaceIcon;
16class QPlaceSupplierPrivate;
17QT_DECLARE_QSDP_SPECIALIZATION_DTOR_WITH_EXPORT(QPlaceSupplierPrivate, Q_LOCATION_EXPORT)
18
19class Q_LOCATION_EXPORT QPlaceSupplier
20{
21 Q_GADGET
22 QML_VALUE_TYPE(supplier)
23 QML_STRUCTURED_VALUE
24
25 Q_PROPERTY(QString name READ name WRITE setName)
26 Q_PROPERTY(QString supplierId READ supplierId WRITE setSupplierId)
27 Q_PROPERTY(QUrl url READ url WRITE setUrl)
28 Q_PROPERTY(QPlaceIcon icon READ icon WRITE setIcon)
29
30public:
31 QPlaceSupplier();
32 QPlaceSupplier(const QPlaceSupplier &other) noexcept;
33 QPlaceSupplier(QPlaceSupplier &&other) noexcept = default;
34 ~QPlaceSupplier();
35
36 QPlaceSupplier &operator=(const QPlaceSupplier &other) noexcept;
37 QT_MOVE_ASSIGNMENT_OPERATOR_IMPL_VIA_MOVE_AND_SWAP(QPlaceSupplier)
38
39 void swap(QPlaceSupplier &other) noexcept { d.swap(other.d); }
40
41 friend inline bool operator==(const QPlaceSupplier &lhs,
42 const QPlaceSupplier &rhs) noexcept
43 { return lhs.isEqual(rhs); }
44 friend inline bool operator!=(const QPlaceSupplier &lhs,
45 const QPlaceSupplier &rhs) noexcept
46 { return !lhs.isEqual(rhs); }
47
48 QString name() const;
49 void setName(const QString &data);
50
51 QString supplierId() const;
52 void setSupplierId(const QString &identifier);
53
54 QUrl url() const;
55 void setUrl(const QUrl &data);
56
57 QPlaceIcon icon() const;
58 void setIcon(const QPlaceIcon &icon);
59
60 bool isEmpty() const;
61
62private:
63 QSharedDataPointer<QPlaceSupplierPrivate> d;
64
65 bool isEqual(const QPlaceSupplier &other) const noexcept;
66};
67
68QT_END_NAMESPACE
69
70Q_DECLARE_METATYPE(QPlaceSupplier)
71
72#endif // QPLACESUPPLIER_H
\inmodule QtLocation
\inmodule QtLocation