Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
qplaceattribute.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 QPLACEATTRIBUTE_H
5#define QPLACEATTRIBUTE_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
18
19class Q_LOCATION_EXPORT QPlaceAttribute
20{
22 QML_VALUE_TYPE(placeAttribute)
24 Q_PROPERTY(QString label READ label WRITE setLabel)
26
27public:
28 static const QString OpeningHours;
29 static const QString Payment;
30 static const QString Provider;
31
34 QPlaceAttribute(QPlaceAttribute &&other) noexcept = default;
36
37 QPlaceAttribute &operator=(const QPlaceAttribute &other) noexcept;
38 QT_MOVE_ASSIGNMENT_OPERATOR_IMPL_VIA_MOVE_AND_SWAP(QPlaceAttribute)
39
40 void swap(QPlaceAttribute &other) noexcept { d_ptr.swap(other.d_ptr); }
41
42 friend inline bool operator==(const QPlaceAttribute &lhs, const QPlaceAttribute &rhs) noexcept
43 { return lhs.isEqual(rhs); }
44 friend inline bool operator!=(const QPlaceAttribute &lhs, const QPlaceAttribute &rhs) noexcept
45 { return !lhs.isEqual(rhs); }
46
47 QString label() const;
48 void setLabel(const QString &label);
49
50 QString text() const;
51 void setText(const QString &text);
52
53 bool isEmpty() const;
54
55private:
56 QSharedDataPointer<QPlaceAttributePrivate> d_ptr;
57 bool isEqual(const QPlaceAttribute &other) const noexcept;
58};
59
61
63
64#endif
static bool isEqual(const aiUVTransform &a, const aiUVTransform &b)
\inmodule QtLocation
friend bool operator!=(const QPlaceAttribute &lhs, const QPlaceAttribute &rhs) noexcept
Returns true if lhs is not equal to rhs, otherwise returns false.
void swap(QPlaceAttribute &other) noexcept
friend bool operator==(const QPlaceAttribute &lhs, const QPlaceAttribute &rhs) noexcept
Returns true if lhs is equal to rhs, otherwise returns false.
\macro QT_RESTRICTED_CAST_FROM_ASCII
Definition qstring.h:129
QString text
Combined button and popup list for selecting options.
#define Q_DECLARE_METATYPE(TYPE)
Definition qmetatype.h:1525
GLuint GLsizei const GLchar * label
[43]
#define QML_VALUE_TYPE(NAME)
#define QML_STRUCTURED_VALUE
#define QT_DECLARE_QSDP_SPECIALIZATION_DTOR_WITH_EXPORT(Class, ExportMacro)
#define Q_PROPERTY(...)
#define Q_GADGET
QSharedPointer< T > other(t)
[5]
this swap(other)
insertRed setText("insert red text")