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
qplacecategory.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 QPLACECATEGORY_H
5#define QPLACECATEGORY_H
6
7#include <QtLocation/qlocationglobal.h>
8
9#include <QtCore/QSharedDataPointer>
10#include <QtCore/QString>
11#include <QtCore/QMetaType>
12#include <QtLocation/QLocation>
13
14QT_BEGIN_NAMESPACE
15
16class QPlaceIcon;
17
18class QPlaceCategoryPrivate;
19QT_DECLARE_QSDP_SPECIALIZATION_DTOR_WITH_EXPORT(QPlaceCategoryPrivate, Q_LOCATION_EXPORT)
20
21class Q_LOCATION_EXPORT QPlaceCategory
22{
23public:
24 QPlaceCategory();
25 QPlaceCategory(const QPlaceCategory &other) noexcept;
26 QPlaceCategory(QPlaceCategory &&other) noexcept = default;
27 ~QPlaceCategory();
28
29 QPlaceCategory &operator=(const QPlaceCategory &other) noexcept;
30 QT_MOVE_ASSIGNMENT_OPERATOR_IMPL_VIA_MOVE_AND_SWAP(QPlaceCategory)
31
32 void swap(QPlaceCategory &other) noexcept { d.swap(other.d); }
33
34 friend inline bool operator==(const QPlaceCategory &lhs, const QPlaceCategory &rhs) noexcept
35 { return lhs.isEqual(rhs); }
36 friend inline bool operator!=(const QPlaceCategory &lhs, const QPlaceCategory &rhs) noexcept
37 { return !lhs.isEqual(rhs); }
38
39 QString categoryId() const;
40 void setCategoryId(const QString &identifier);
41
42 QString name() const;
43 void setName(const QString &name);
44
45 QLocation::Visibility visibility() const;
46 void setVisibility(QLocation::Visibility visibility);
47
48 QPlaceIcon icon() const;
49 void setIcon(const QPlaceIcon &icon);
50
51 bool isEmpty() const;
52
53private:
54 QSharedDataPointer<QPlaceCategoryPrivate> d;
55
56 bool isEqual(const QPlaceCategory &other) const noexcept;
57};
58
59Q_DECLARE_TYPEINFO(QPlaceCategory, Q_RELOCATABLE_TYPE);
60
61QT_END_NAMESPACE
62
63Q_DECLARE_METATYPE(QPlaceCategory)
64
65#endif // QPLACECATEGORY_H
\inmodule QtLocation
Q_DECLARE_TYPEINFO(QByteArrayView, Q_PRIMITIVE_TYPE)