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
qplacecontactdetail.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 QPLACECONTACTDETAIL_H
5#define QPLACECONTACTDETAIL_H
6
7#include <QtCore/QString>
8#include <QtCore/QMetaType>
9#include <QtCore/QSharedDataPointer>
10
11#include <QtLocation/qlocationglobal.h>
12#include <QtQml/qqml.h>
13
15
16class QPlaceContactDetailPrivate;
17QT_DECLARE_QSDP_SPECIALIZATION_DTOR_WITH_EXPORT(QPlaceContactDetailPrivate, Q_LOCATION_EXPORT)
18
19class Q_LOCATION_EXPORT QPlaceContactDetail
20{
21 Q_GADGET
22 QML_VALUE_TYPE(contactDetail)
23 QML_STRUCTURED_VALUE
24 Q_PROPERTY(QString label READ label WRITE setLabel)
25 Q_PROPERTY(QString value READ value WRITE setValue)
26
27public:
28 static const QString Phone;
29 static const QString Email;
30 static const QString Website;
31 static const QString Fax;
32
33 QPlaceContactDetail();
34 QPlaceContactDetail(const QPlaceContactDetail &other) noexcept;
35 QPlaceContactDetail(QPlaceContactDetail &&other) noexcept = default;
36 ~QPlaceContactDetail();
37
38 QPlaceContactDetail &operator=(const QPlaceContactDetail &other) noexcept;
39 QT_MOVE_ASSIGNMENT_OPERATOR_IMPL_VIA_MOVE_AND_SWAP(QPlaceContactDetail)
40
41 void swap(QPlaceContactDetail &other) noexcept { d_ptr.swap(other.d_ptr); }
42
43 friend inline bool operator==(const QPlaceContactDetail &lhs, const QPlaceContactDetail &rhs) noexcept
44 { return lhs.isEqual(rhs); }
45 friend inline bool operator!=(const QPlaceContactDetail &lhs, const QPlaceContactDetail &rhs) noexcept
46 { return !lhs.isEqual(rhs); }
47
48 QString label() const;
49 void setLabel(const QString &label);
50
51 QString value() const;
52 void setValue(const QString &value);
53
54 void clear();
55
56private:
57 QSharedDataPointer<QPlaceContactDetailPrivate> d_ptr;
58
59 bool isEqual(const QPlaceContactDetail &other) const noexcept;
60};
61
62QT_END_NAMESPACE
63
64Q_DECLARE_METATYPE(QPlaceContactDetail)
65
66#endif
The QPlaceContactDetail class represents a contact detail such as a phone number or website url.