KNewStuff

core/author.cpp
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
13namespace KNSCore
14{
15class AuthorPrivate : public QSharedData
16{
17public:
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
30using namespace KNSCore;
31
32Author::Author()
33 : d(new AuthorPrivate())
34{
35}
36
37KNSCore::Author::Author(const KNSCore::Author &other)
38 : d(other.d)
39{
40}
41
42Author &Author::operator=(const Author &rhs)
43{
44 if (&rhs != this) {
45 d = rhs.d;
46 }
47
48 return *this;
49}
50
51Author::~Author() = default;
52
54{
55 d->id = id;
56}
57
59{
60 return d->id;
61}
62
63void Author::setName(const QString &name)
64{
65 d->name = name;
66}
67
68QString Author::name() const
69{
70 return d->name;
71}
72
73void Author::setEmail(const QString &email)
74{
75 d->email = email;
76}
77
78QString Author::email() const
79{
80 return d->email;
81}
82
83void Author::setJabber(const QString &jabber)
84{
85 d->jabber = jabber;
86}
87
89{
90 return d->jabber;
91}
92
93void Author::setHomepage(const QString &homepage)
94{
95 d->homepage = homepage;
96}
97
99{
100 return d->homepage;
101}
102
103void Author::setProfilepage(const QString &profilepage)
104{
105 d->profilepage = profilepage;
106}
107
109{
110 return d->profilepage;
111}
112
113void Author::setAvatarUrl(const QUrl &avatarUrl)
114{
115 d->avatarUrl = avatarUrl;
116}
117
119{
120 return d->avatarUrl;
121}
122
123void Author::setDescription(const QString &description)
124{
125 d->description = description;
126}
127
129{
130 return d->description;
131}
KNewStuff author information.
Definition core/author.h:32
QUrl avatarUrl() const
Retrieve the url of the user's avatar image.
QString homepage() const
Retrieve the author's homepage.
void setJabber(const QString &jabber)
Sets the jabber address of the author.
void setName(const QString &name)
Sets the full name of the author.
void setEmail(const QString &email)
Sets the email address of the author.
void setId(const QString &id)
Sets the user ID of the author.
QString id() const
Retrieve the author's user ID.
QString description() const
Retrieve the user's description text.
void setHomepage(const QString &homepage)
Sets the homepage of the author.
void setAvatarUrl(const QUrl &avatarUrl)
Sets the url for the user's avatar image.
QString jabber() const
Retrieve the author's jabber address.
QString profilepage() const
Retrieve the author's profile page.
void setDescription(const QString &description)
Set the user's description.
void setProfilepage(const QString &profilepage)
Sets the profile page of the author, usually located on the server hosting the content.
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Nov 22 2024 12:07:37 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.