1 | /* |
2 | This file is part of KDE. |
3 | |
4 | SPDX-FileCopyrightText: 2010 Intel Corporation |
5 | SPDX-FileContributor: Mateu Batle Sastre <mbatle@collabora.co.uk> |
6 | |
7 | SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL |
8 | */ |
9 | |
10 | #ifndef ATTICA_COMMENT_H |
11 | #define |
12 | |
13 | #include "attica_export.h" |
14 | |
15 | #include <QDateTime> |
16 | #include <QSharedDataPointer> |
17 | |
18 | #include <QUrl> |
19 | |
20 | namespace Attica |
21 | { |
22 | |
23 | /*! |
24 | * \class Attica::Comment |
25 | * \inheaderfile Attica/Comment |
26 | * \inmodule Attica |
27 | * |
28 | * \brief Represents a comment. |
29 | */ |
30 | class ATTICA_EXPORT |
31 | { |
32 | public: |
33 | /*! |
34 | * |
35 | */ |
36 | typedef QList<Comment> ; |
37 | class ; |
38 | |
39 | /*! |
40 | * \value ContentComment |
41 | * \value ForumComment |
42 | * \value KnowledgeBaseComment |
43 | * \value EventComment |
44 | */ |
45 | enum { |
46 | , |
47 | , |
48 | , |
49 | , |
50 | }; |
51 | |
52 | /*! |
53 | * |
54 | */ |
55 | static QString (const Comment::Type type); |
56 | |
57 | /*! |
58 | * |
59 | */ |
60 | (); |
61 | (const Comment &other); |
62 | Comment &(const Comment &other); |
63 | (); |
64 | |
65 | /*! |
66 | * |
67 | */ |
68 | void (const QString &id); |
69 | |
70 | /*! |
71 | * |
72 | */ |
73 | QString () const; |
74 | |
75 | /*! |
76 | * |
77 | */ |
78 | void (const QString &subject); |
79 | |
80 | /*! |
81 | * |
82 | */ |
83 | QString () const; |
84 | |
85 | /*! |
86 | * |
87 | */ |
88 | void (const QString &text); |
89 | |
90 | /*! |
91 | * |
92 | */ |
93 | QString () const; |
94 | |
95 | /*! |
96 | * |
97 | */ |
98 | void (const int childCount); |
99 | |
100 | /*! |
101 | * |
102 | */ |
103 | int () const; |
104 | |
105 | /*! |
106 | * |
107 | */ |
108 | void (const QString &user); |
109 | |
110 | /*! |
111 | * |
112 | */ |
113 | QString () const; |
114 | |
115 | /*! |
116 | * |
117 | */ |
118 | void (const QDateTime &date); |
119 | |
120 | /*! |
121 | * |
122 | */ |
123 | QDateTime () const; |
124 | |
125 | /*! |
126 | This is for internal usage, see Provider::setCommentScore to set scores in comments. |
127 | |
128 | \a score average comment score in scale from 0 to 100 |
129 | */ |
130 | void (const int score); |
131 | /*! |
132 | Returns score of this comment. |
133 | |
134 | \a score average comment score in scale from 0 to 100 |
135 | */ |
136 | int () const; |
137 | |
138 | /*! |
139 | * |
140 | */ |
141 | void (QList<Comment> ); |
142 | |
143 | /*! |
144 | * |
145 | */ |
146 | QList<Comment> () const; |
147 | |
148 | /*! |
149 | * |
150 | */ |
151 | bool () const; |
152 | |
153 | private: |
154 | class ; |
155 | QSharedDataPointer<Private> ; |
156 | }; |
157 | |
158 | } |
159 | |
160 | #endif |
161 | |