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
qplacecategory.cpp
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#include "qplacecategory.h"
5#include "qplacecategory_p.h"
6
8
10
11
12bool QPlaceCategoryPrivate::isEmpty() const
13{
14 return categoryId.isEmpty()
15 && name.isEmpty()
16 && icon.isEmpty()
17 && QLocation::UnspecifiedVisibility == visibility;
18}
19
45
49QPlaceCategory::QPlaceCategory(const QPlaceCategory &other) noexcept = default;
50
55
60{
61 if (this == &other)
62 return *this;
63
64 d = other.d;
65 return *this;
66}
67
80bool QPlaceCategory::isEqual(const QPlaceCategory &other) const noexcept
81{
82 return d->categoryId == other.d->categoryId &&
83 d->name == other.d->name &&
84 (d->visibility == QLocation::UnspecifiedVisibility ||
85 other.d->visibility == QLocation::UnspecifiedVisibility ||
86 d->visibility == other.d->visibility) &&
87 d->icon == other.d->icon;
88}
89
96{
97 return d->categoryId;
98}
99
104{
105 d->categoryId = identifier;
106}
107
112{
113 return d->name;
114}
115
120{
121 d->name = name;
122}
123
131
139
144{
145 return d->icon;
146}
147
152{
153 d->icon = icon;
154}
155
160{
161 return d->isEmpty();
162}
163
QLocation::Visibility visibility
\inmodule QtLocation
void setVisibility(QLocation::Visibility visibility)
Sets the visibility of the category.
void setCategoryId(const QString &identifier)
Sets the identifier of the category.
QPlaceCategory()
Constructs a category.
QPlaceCategory & operator=(const QPlaceCategory &other) noexcept
Assigns other to this category and returns a reference to this category.
QString categoryId() const
Returns the identifier of the category.
void setIcon(const QPlaceIcon &icon)
Sets the icon of the category.
~QPlaceCategory()
Destroys the category.
bool isEmpty() const
Returns a boolean indicating whether the all the fields of the place category are empty or not.
QLocation::Visibility visibility() const
Returns the visibility of the category.
void setName(const QString &name)
Sets the name of the category.
QString name() const
Returns the name of category.
QPlaceIcon icon() const
Returns the icon associated with the category.
\inmodule QtLocation
Definition qplaceicon.h:23
\macro QT_RESTRICTED_CAST_FROM_ASCII
Definition qstring.h:129
@ UnspecifiedVisibility
Definition qlocation.h:18
Combined button and popup list for selecting options.
GLuint name
#define QT_DEFINE_QSDP_SPECIALIZATION_DTOR(Class)
QSharedPointer< T > other(t)
[5]