1 | /* |
2 | This file is part of KDE. |
3 | |
4 | SPDX-FileCopyrightText: 2011 Laszlo Papp <djszapi@archlinux.us> |
5 | |
6 | SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL |
7 | */ |
8 | |
9 | #ifndef ATTICA_FORUM_H |
10 | #define ATTICA_FORUM_H |
11 | |
12 | #include "attica_export.h" |
13 | |
14 | #include "topic.h" |
15 | |
16 | #include <QDateTime> |
17 | #include <QSharedDataPointer> |
18 | #include <QUrl> |
19 | |
20 | namespace Attica |
21 | { |
22 | |
23 | /*! |
24 | * \class Attica::Forum |
25 | * \inheaderfile Attica/Forum |
26 | * \inmodule Attica |
27 | * |
28 | * \brief Represents a forum. |
29 | */ |
30 | class ATTICA_EXPORT Forum |
31 | { |
32 | public: |
33 | /*! |
34 | * |
35 | */ |
36 | typedef QList<Forum> List; |
37 | class Parser; |
38 | |
39 | /*! |
40 | * |
41 | */ |
42 | Forum(); |
43 | Forum(const Forum &other); |
44 | Forum &operator=(const Forum &other); |
45 | ~Forum(); |
46 | |
47 | /*! |
48 | * |
49 | */ |
50 | void setId(const QString &id); |
51 | |
52 | /*! |
53 | * |
54 | */ |
55 | QString id() const; |
56 | |
57 | /*! |
58 | * |
59 | */ |
60 | void setName(const QString &name); |
61 | |
62 | /*! |
63 | * |
64 | */ |
65 | QString name() const; |
66 | |
67 | /*! |
68 | * |
69 | */ |
70 | void setDescription(const QString &description); |
71 | |
72 | /*! |
73 | * |
74 | */ |
75 | QString description() const; |
76 | |
77 | /*! |
78 | * |
79 | */ |
80 | void setDate(const QDateTime &date); |
81 | |
82 | /*! |
83 | * |
84 | */ |
85 | QDateTime date() const; |
86 | |
87 | /*! |
88 | * |
89 | */ |
90 | void setIcon(const QUrl &icon); |
91 | |
92 | /*! |
93 | * |
94 | */ |
95 | QUrl icon() const; |
96 | |
97 | /*! |
98 | * |
99 | */ |
100 | void setChildCount(const int childCount); |
101 | |
102 | /*! |
103 | * |
104 | */ |
105 | int childCount() const; |
106 | |
107 | /*! |
108 | * |
109 | */ |
110 | void setTopics(const int topics); |
111 | |
112 | /*! |
113 | * |
114 | */ |
115 | int topics() const; |
116 | |
117 | /*! |
118 | * |
119 | */ |
120 | void setChildren(QList<Forum> ); |
121 | |
122 | /*! |
123 | * |
124 | */ |
125 | QList<Forum> children() const; |
126 | |
127 | /*! |
128 | * |
129 | */ |
130 | bool isValid() const; |
131 | |
132 | private: |
133 | class Private; |
134 | QSharedDataPointer<Private> d; |
135 | }; |
136 | |
137 | } |
138 | |
139 | #endif |
140 | |