File indexing completed on 2024-04-14 03:54:06
0001 /* 0002 This file is part of KNewStuff2. 0003 SPDX-FileCopyrightText: 2002 Cornelius Schumacher <schumacher@kde.org> 0004 SPDX-FileCopyrightText: 2003-2007 Josef Spillner <spillner@kde.org> 0005 0006 SPDX-License-Identifier: LGPL-2.1-or-later 0007 */ 0008 0009 #include "author.h" 0010 0011 #include <QHash> 0012 0013 namespace KNSCore 0014 { 0015 class AuthorPrivate : public QSharedData 0016 { 0017 public: 0018 QString id; 0019 QString profilepage; 0020 QUrl avatarUrl; 0021 QString description; 0022 0023 QString name; 0024 QString email; 0025 QString jabber; 0026 QString homepage; 0027 }; 0028 } 0029 0030 using namespace KNSCore; 0031 0032 Author::Author() 0033 : d(new AuthorPrivate()) 0034 { 0035 } 0036 0037 KNSCore::Author::Author(const KNSCore::Author &other) 0038 : d(other.d) 0039 { 0040 } 0041 0042 Author &Author::operator=(const Author &rhs) 0043 { 0044 if (&rhs != this) { 0045 d = rhs.d; 0046 } 0047 0048 return *this; 0049 } 0050 0051 Author::~Author() = default; 0052 0053 void KNSCore::Author::setId(const QString &id) 0054 { 0055 d->id = id; 0056 } 0057 0058 QString KNSCore::Author::id() const 0059 { 0060 return d->id; 0061 } 0062 0063 void Author::setName(const QString &name) 0064 { 0065 d->name = name; 0066 } 0067 0068 QString Author::name() const 0069 { 0070 return d->name; 0071 } 0072 0073 void Author::setEmail(const QString &email) 0074 { 0075 d->email = email; 0076 } 0077 0078 QString Author::email() const 0079 { 0080 return d->email; 0081 } 0082 0083 void Author::setJabber(const QString &jabber) 0084 { 0085 d->jabber = jabber; 0086 } 0087 0088 QString Author::jabber() const 0089 { 0090 return d->jabber; 0091 } 0092 0093 void Author::setHomepage(const QString &homepage) 0094 { 0095 d->homepage = homepage; 0096 } 0097 0098 QString Author::homepage() const 0099 { 0100 return d->homepage; 0101 } 0102 0103 void Author::setProfilepage(const QString &profilepage) 0104 { 0105 d->profilepage = profilepage; 0106 } 0107 0108 QString Author::profilepage() const 0109 { 0110 return d->profilepage; 0111 } 0112 0113 void Author::setAvatarUrl(const QUrl &avatarUrl) 0114 { 0115 d->avatarUrl = avatarUrl; 0116 } 0117 0118 QUrl Author::avatarUrl() const 0119 { 0120 return d->avatarUrl; 0121 } 0122 0123 void Author::setDescription(const QString &description) 0124 { 0125 d->description = description; 0126 } 0127 0128 QString Author::description() const 0129 { 0130 return d->description; 0131 }