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
qplaceuser.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 QPLACEUSER_H
6#define QPLACEUSER_H
7
8#include <QtCore/QMetaType>
9#include <QtCore/QSharedDataPointer>
10#include <QtLocation/qlocationglobal.h>
11#include <QtQml/qqml.h>
12
13QT_BEGIN_NAMESPACE
14
15class QPlaceUserPrivate;
16QT_DECLARE_QSDP_SPECIALIZATION_DTOR_WITH_EXPORT(QPlaceUserPrivate, Q_LOCATION_EXPORT)
17
18class Q_LOCATION_EXPORT QPlaceUser
19{
20 Q_GADGET
21 QML_VALUE_TYPE(user)
22 QML_STRUCTURED_VALUE
23
24 Q_PROPERTY(QString userId READ userId WRITE setUserId)
25 Q_PROPERTY(QString name READ name WRITE setName)
26
27public:
28 QPlaceUser();
29 QPlaceUser(const QPlaceUser &other) noexcept;
30 QPlaceUser(QPlaceUser &&other) noexcept = default;
31 ~QPlaceUser();
32
33 QPlaceUser &operator=(const QPlaceUser &other) noexcept;
34 QT_MOVE_ASSIGNMENT_OPERATOR_IMPL_VIA_MOVE_AND_SWAP(QPlaceUser)
35
36 void swap(QPlaceUser &other) noexcept { d.swap(other.d); }
37
38 friend inline bool operator==(const QPlaceUser &lhs, const QPlaceUser &rhs) noexcept
39 { return lhs.isEqual(rhs); }
40 friend inline bool operator!=(const QPlaceUser &lhs, const QPlaceUser &rhs) noexcept
41 { return !lhs.isEqual(rhs); }
42
43 QString userId() const;
44 void setUserId(const QString &identifier);
45
46 QString name() const;
47 void setName(const QString &name);
48
49private:
50 QSharedDataPointer<QPlaceUserPrivate> d;
51
52 bool isEqual(const QPlaceUser &other) const noexcept;
53};
54
55QT_END_NAMESPACE
56
57Q_DECLARE_METATYPE(QPlaceUser)
58
59#endif
\inmodule QtLocation
The QPlaceSupplier class represents a supplier of a place or content associated with a place.
\inmodule QtLocation
Definition qplaceuser.h:19