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