Attica

comment.h
1 /*
2  This file is part of KDE.
3 
4  SPDX-FileCopyrightText: 2010 Intel Corporation
5  SPDX-FileContributor: Mateu Batle Sastre <[email protected]>
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 ATTICA_COMMENT_H
12 
13 #include "attica_export.h"
14 
15 #include <QDateTime>
16 #include <QSharedDataPointer>
17 
18 #include <QUrl>
19 
20 namespace Attica
21 {
22 
23 class ATTICA_EXPORT Comment
24 {
25 public:
26  typedef QList<Comment> List;
27  class Parser;
28 
29  enum Type {
30  ContentComment,
31  ForumComment,
32  KnowledgeBaseComment,
33  EventComment
34  };
35  static QString commentTypeToString(const Comment::Type type);
36 
37  Comment();
38  Comment(const Comment &other);
39  Comment &operator=(const Comment &other);
40  ~Comment();
41 
42  void setId(const QString &id);
43  QString id() const;
44 
45  void setSubject(const QString &subject);
46  QString subject() const;
47 
48  void setText(const QString &text);
49  QString text() const;
50 
51  void setChildCount(const int childCount);
52  int childCount() const;
53 
54  void setUser(const QString &user);
55  QString user() const;
56 
57  void setDate(const QDateTime &date);
58  QDateTime date() const;
59 
64  void setScore(const int score);
69  int score() const;
70 
71  void setChildren(QList<Comment> comments);
72  QList<Comment> children() const;
73 
74  bool isValid() const;
75 
76 private:
77  class Private;
79 };
80 
81 }
82 
83 #endif
Comment
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Mon Jan 25 2021 23:06:24 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.