1/*
2 This file is part of KDE.
3
4 SPDX-FileCopyrightText: 2008 Cornelius Schumacher <schumacher@kde.org>
5
6 SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
7*/
8
9#include "category.h"
10
11#include <QDebug>
12#include <QString>
13
14using namespace Attica;
15
16class Q_DECL_HIDDEN Category::Private : public QSharedData
17{
18public:
19 QString m_id;
20 QString m_name;
21 QString m_displayName;
22};
23
24Category::Category()
25 : d(new Private)
26{
27}
28
29Category::Category(const Attica::Category &other)
30 : d(other.d)
31{
32}
33
34Category &Category::operator=(const Attica::Category &other)
35{
36 d = other.d;
37 return *this;
38}
39
40Category::~Category()
41{
42}
43
44void Category::setId(const QString &u)
45{
46 d->m_id = u;
47}
48
49QString Category::id() const
50{
51 return d->m_id;
52}
53
54void Category::setName(const QString &name)
55{
56 d->m_name = name;
57}
58
59QString Category::name() const
60{
61 return d->m_name;
62}
63
64void Category::setDisplayName(const QString &name)
65{
66 d->m_displayName = name;
67}
68
69QString Category::displayName() const
70{
71 return d->m_displayName;
72}
73
74bool Category::isValid() const
75{
76 return !(d->m_id.isEmpty());
77}
78

source code of attica/src/category.cpp