Attica

category.h
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 Category category.h <Attica/Category>
20 *
21 * Represents a single content category
22 */
23class ATTICA_EXPORT Category
24{
25public:
26 typedef QList<Category> List;
27 class Parser;
28
29 /**
30 * Creates an empty Category
31 */
32 Category();
33
34 /**
35 * Copy constructor.
36 * @param other the Category to copy from
37 */
38 Category(const Category &other);
39
40 /**
41 * Assignment operator.
42 * @param other the Category to assign from
43 * @return pointer to this Category
44 */
45 Category &operator=(const Category &other);
46
47 /**
48 * Destructor.
49 */
50 ~Category();
51
52 /**
53 * Sets the id of the Category.
54 * The id uniquely identifies a Category with the OCS API.
55 * @param id the new id
56 */
57 void setId(const QString &);
58
59 /**
60 * Gets the id of the Category.
61 * The id uniquely identifies a Category with the OCS API.
62 * @return the id
63 */
64 QString id() const;
65
66 /**
67 * Sets the name of the Category.
68 * @param name the new name
69 */
70 void setName(const QString &name);
71
72 /**
73 * Gets the name of the Category.
74 * @return the name
75 */
76 QString name() const;
77
78 /**
79 * Checks whether this Category has an id
80 * @return @c true if an id has been set, @c false otherwise
81 */
82 bool isValid() const;
83
84 /**
85 * Sets the display name of the Category.
86 * This name is guaranteed to be user friendly, while name may be
87 * internal for the server
88 * @param name the new name
89 * @since 5.31
90 */
91 void setDisplayName(const QString &name);
92
93 /**
94 * Gets the display name of the Category.
95 * This name is guaranteed to be user friendly, while name may be
96 * internal for the server
97 * @return the name
98 * @since 5.31
99 */
100 QString displayName() const;
101
102private:
103 class Private;
105};
106
107}
108
109#endif
Represents a single content category.
Definition category.h:24
The Attica namespace,.
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:17:36 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.