| 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 | #include "topic.h" |
| 10 | |
| 11 | using namespace Attica; |
| 12 | |
| 13 | class Q_DECL_HIDDEN Topic::Private : public QSharedData |
| 14 | { |
| 15 | public: |
| 16 | QString m_id; |
| 17 | QString m_forumId; |
| 18 | QString m_user; |
| 19 | QDateTime m_date; |
| 20 | QString m_subject; |
| 21 | QString m_content; |
| 22 | int ; |
| 23 | |
| 24 | Private() |
| 25 | : m_comments(0) |
| 26 | { |
| 27 | } |
| 28 | }; |
| 29 | |
| 30 | Topic::Topic() |
| 31 | : d(new Private) |
| 32 | { |
| 33 | } |
| 34 | |
| 35 | Topic::Topic(const Topic &other) |
| 36 | : d(other.d) |
| 37 | { |
| 38 | } |
| 39 | |
| 40 | Topic &Topic::operator=(const Topic &other) |
| 41 | { |
| 42 | d = other.d; |
| 43 | return *this; |
| 44 | } |
| 45 | |
| 46 | Topic::~Topic() |
| 47 | { |
| 48 | } |
| 49 | |
| 50 | void Topic::setId(const QString &id) |
| 51 | { |
| 52 | d->m_id = id; |
| 53 | } |
| 54 | |
| 55 | QString Topic::id() const |
| 56 | { |
| 57 | return d->m_id; |
| 58 | } |
| 59 | |
| 60 | void Topic::setForumId(const QString &forumId) |
| 61 | { |
| 62 | d->m_forumId = forumId; |
| 63 | } |
| 64 | |
| 65 | QString Topic::forumId() const |
| 66 | { |
| 67 | return d->m_forumId; |
| 68 | } |
| 69 | |
| 70 | void Topic::setUser(const QString &user) |
| 71 | { |
| 72 | d->m_user = user; |
| 73 | } |
| 74 | |
| 75 | QString Topic::user() const |
| 76 | { |
| 77 | return d->m_user; |
| 78 | } |
| 79 | |
| 80 | void Topic::setDate(const QDateTime &date) |
| 81 | { |
| 82 | d->m_date = date; |
| 83 | } |
| 84 | |
| 85 | QDateTime Topic::date() const |
| 86 | { |
| 87 | return d->m_date; |
| 88 | } |
| 89 | |
| 90 | void Topic::setSubject(const QString &subject) |
| 91 | { |
| 92 | d->m_subject = subject; |
| 93 | } |
| 94 | |
| 95 | QString Topic::subject() const |
| 96 | { |
| 97 | return d->m_subject; |
| 98 | } |
| 99 | |
| 100 | void Topic::setContent(const QString &content) |
| 101 | { |
| 102 | d->m_content = content; |
| 103 | } |
| 104 | |
| 105 | QString Topic::content() const |
| 106 | { |
| 107 | return d->m_content; |
| 108 | } |
| 109 | |
| 110 | void Topic::(const int ) |
| 111 | { |
| 112 | d->m_comments = comments; |
| 113 | } |
| 114 | |
| 115 | int Topic::() const |
| 116 | { |
| 117 | return d->m_comments; |
| 118 | } |
| 119 | |
| 120 | bool Topic::isValid() const |
| 121 | { |
| 122 | return !(d->m_id.isEmpty()); |
| 123 | } |
| 124 | |