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 Comment comment.h <Attica/Comment> |
25 | * |
26 | * Represents a comment. |
27 | */ |
28 | class ATTICA_EXPORT |
29 | { |
30 | public: |
31 | typedef QList<Comment> ; |
32 | class ; |
33 | |
34 | enum { |
35 | , |
36 | , |
37 | , |
38 | , |
39 | }; |
40 | static QString (const Comment::Type type); |
41 | |
42 | (); |
43 | (const Comment &other); |
44 | Comment &(const Comment &other); |
45 | (); |
46 | |
47 | void (const QString &id); |
48 | QString () const; |
49 | |
50 | void (const QString &subject); |
51 | QString () const; |
52 | |
53 | void (const QString &text); |
54 | QString () const; |
55 | |
56 | void (const int childCount); |
57 | int () const; |
58 | |
59 | void (const QString &user); |
60 | QString () const; |
61 | |
62 | void (const QDateTime &date); |
63 | QDateTime () const; |
64 | |
65 | /** |
66 | This is for internal usage, @see Provider::setCommentScore to set scores in comments. |
67 | @param score average comment score in scale from 0 to 100 |
68 | */ |
69 | void (const int score); |
70 | /** |
71 | Returns score of this comment. |
72 | @param score average comment score in scale from 0 to 100 |
73 | */ |
74 | int () const; |
75 | |
76 | void (QList<Comment> ); |
77 | QList<Comment> () const; |
78 | |
79 | bool () const; |
80 | |
81 | private: |
82 | class ; |
83 | QSharedDataPointer<Private> ; |
84 | }; |
85 | |
86 | } |
87 | |
88 | #endif |
89 | |