Attica::Comment Class
class Attica::CommentRepresents a comment. More...
Header: | #include <Attica/Comment> |
CMake: | find_package(KF6 REQUIRED COMPONENTS Attica) target_link_libraries(mytarget PRIVATE KF6::Attica) |
Public Types
Public Functions
Comment() | |
int | childCount() const |
QList<Attica::Comment> | children() const |
QDateTime | date() const |
QString | id() const |
bool | isValid() const |
int | score() const |
void | setChildCount(const int childCount) |
void | setChildren(QList<Attica::Comment> comments) |
void | setDate(const QDateTime &date) |
void | setId(const QString &id) |
void | setScore(const int score) |
void | setSubject(const QString &subject) |
void | setText(const QString &text) |
void | setUser(const QString &user) |
QString | subject() const |
QString | text() const |
QString | user() const |
Static Public Members
QString | commentTypeToString(const Attica::Comment::Type type) |
Detailed Description
Member Type Documentation
Comment::List
enum Comment::Type
Constant | Value |
---|---|
Attica::Comment::ContentComment | 0 |
Attica::Comment::ForumComment | 1 |
Attica::Comment::KnowledgeBaseComment | 2 |
Attica::Comment::EventComment | 3 |
Member Function Documentation
Comment::Comment()
int Comment::childCount() const
See also setChildCount().
QList<Attica::Comment> Comment::children() const
See also setChildren().
[static]
QString Comment::commentTypeToString(const Attica::Comment::Type type)
QDateTime Comment::date() const
See also setDate().
QString Comment::id() const
See also setId().
bool Comment::isValid() const
int Comment::score() const
Returns score of this comment.
score average comment score in scale from 0 to 100
See also setScore().
void Comment::setChildCount(const int childCount)
See also childCount().
void Comment::setChildren(QList<Attica::Comment> comments)
See also children().
void Comment::setDate(const QDateTime &date)
See also date().
void Comment::setId(const QString &id)
See also id().
void Comment::setScore(const int score)
This is for internal usage, see Provider::setCommentScore to set scores in comments.
score average comment score in scale from 0 to 100
See also score().
void Comment::setSubject(const QString &subject)
See also subject().
void Comment::setText(const QString &text)
See also text().
void Comment::setUser(const QString &user)
See also user().
QString Comment::subject() const
See also setSubject().
QString Comment::text() const
See also setText().
QString Comment::user() const
See also setUser().