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#ifndef ATTICA_CATEGORY_H
9#define ATTICA_CATEGORY_H
10
11#include <QList>
12#include <QSharedDataPointer>
13
14#include "attica_export.h"
15
16namespace Attica
17{
18/*!
19 * \class Attica::Category
20 * \inheaderfile Attica/Category
21 * \inmodule Attica
22 *
23 * \brief Represents a single content category.
24 */
25class ATTICA_EXPORT Category
26{
27public:
28 /*!
29 *
30 */
31 typedef QList<Category> List;
32 class Parser;
33
34 /*!
35 * Creates an empty Category
36 */
37 Category();
38
39 Category(const Category &other);
40
41 Category &operator=(const Category &other);
42
43 ~Category();
44
45 /*!
46 * Sets the id of the Category.
47 *
48 * The id uniquely identifies a Category with the OCS API.
49 *
50 * \a id the new id
51 */
52 void setId(const QString &);
53
54 /*!
55 * Returns the id of the Category.
56 *
57 * The id uniquely identifies a Category with the OCS API.
58 */
59 QString id() const;
60
61 /*!
62 * Sets the name of the Category.
63 *
64 * \a name the new name
65 */
66 void setName(const QString &name);
67
68 /*!
69 * Returns the name of the Category.
70 */
71 QString name() const;
72
73 /*!
74 * Returns whether this Category has an id
75 */
76 bool isValid() const;
77
78 /*!
79 * Sets the display name of the Category.
80 *
81 * This name is guaranteed to be user friendly, while name may be
82 * internal for the server
83 *
84 * \a name the new name
85 * \since 5.31
86 */
87 void setDisplayName(const QString &name);
88
89 /*!
90 * Returns the display name of the Category.
91 *
92 * This name is guaranteed to be user friendly, while name may be
93 * internal for the server
94 *
95 * \since 5.31
96 */
97 QString displayName() const;
98
99private:
100 class Private;
101 QSharedDataPointer<Private> d;
102};
103
104}
105
106#endif
107

source code of attica/src/category.h