Attica

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

KDE's Doxygen guidelines are available online.