| 1 | /* |
| 2 | This file is part of KNewStuff2. |
| 3 | SPDX-FileCopyrightText: 2002 Cornelius Schumacher <schumacher@kde.org> |
| 4 | SPDX-FileCopyrightText: 2003-2007 Josef Spillner <spillner@kde.org> |
| 5 | |
| 6 | SPDX-License-Identifier: LGPL-2.1-or-later |
| 7 | */ |
| 8 | |
| 9 | #include "author.h" |
| 10 | |
| 11 | #include <QHash> |
| 12 | |
| 13 | namespace KNSCore |
| 14 | { |
| 15 | class AuthorPrivate : public QSharedData |
| 16 | { |
| 17 | public: |
| 18 | QString id; |
| 19 | QString profilepage; |
| 20 | QUrl avatarUrl; |
| 21 | QString description; |
| 22 | |
| 23 | QString name; |
| 24 | QString email; |
| 25 | QString jabber; |
| 26 | QString homepage; |
| 27 | }; |
| 28 | } |
| 29 | |
| 30 | using namespace KNSCore; |
| 31 | |
| 32 | Author::Author() |
| 33 | : d(new AuthorPrivate()) |
| 34 | { |
| 35 | } |
| 36 | |
| 37 | KNSCore::Author::Author(const KNSCore::Author &other) |
| 38 | : d(other.d) |
| 39 | { |
| 40 | } |
| 41 | |
| 42 | Author &Author::operator=(const Author &rhs) |
| 43 | { |
| 44 | if (&rhs != this) { |
| 45 | d = rhs.d; |
| 46 | } |
| 47 | |
| 48 | return *this; |
| 49 | } |
| 50 | |
| 51 | Author::~Author() = default; |
| 52 | |
| 53 | void KNSCore::Author::setId(const QString &id) |
| 54 | { |
| 55 | d->id = id; |
| 56 | } |
| 57 | |
| 58 | QString KNSCore::Author::id() const |
| 59 | { |
| 60 | return d->id; |
| 61 | } |
| 62 | |
| 63 | void Author::setName(const QString &name) |
| 64 | { |
| 65 | d->name = name; |
| 66 | } |
| 67 | |
| 68 | QString Author::name() const |
| 69 | { |
| 70 | return d->name; |
| 71 | } |
| 72 | |
| 73 | void Author::setEmail(const QString &email) |
| 74 | { |
| 75 | d->email = email; |
| 76 | } |
| 77 | |
| 78 | QString Author::email() const |
| 79 | { |
| 80 | return d->email; |
| 81 | } |
| 82 | |
| 83 | void Author::setJabber(const QString &jabber) |
| 84 | { |
| 85 | d->jabber = jabber; |
| 86 | } |
| 87 | |
| 88 | QString Author::jabber() const |
| 89 | { |
| 90 | return d->jabber; |
| 91 | } |
| 92 | |
| 93 | void Author::setHomepage(const QString &homepage) |
| 94 | { |
| 95 | d->homepage = homepage; |
| 96 | } |
| 97 | |
| 98 | QString Author::homepage() const |
| 99 | { |
| 100 | return d->homepage; |
| 101 | } |
| 102 | |
| 103 | void Author::setProfilepage(const QString &profilepage) |
| 104 | { |
| 105 | d->profilepage = profilepage; |
| 106 | } |
| 107 | |
| 108 | QString Author::profilepage() const |
| 109 | { |
| 110 | return d->profilepage; |
| 111 | } |
| 112 | |
| 113 | void Author::setAvatarUrl(const QUrl &avatarUrl) |
| 114 | { |
| 115 | d->avatarUrl = avatarUrl; |
| 116 | } |
| 117 | |
| 118 | QUrl Author::avatarUrl() const |
| 119 | { |
| 120 | return d->avatarUrl; |
| 121 | } |
| 122 | |
| 123 | void Author::setDescription(const QString &description) |
| 124 | { |
| 125 | d->description = description; |
| 126 | } |
| 127 | |
| 128 | QString Author::description() const |
| 129 | { |
| 130 | return d->description; |
| 131 | } |
| 132 | |
| 133 | #include "moc_author.cpp" |
| 134 | |