KNewStuff

core/author.cpp
1 /*
2  This file is part of KNewStuff2.
3  SPDX-FileCopyrightText: 2002 Cornelius Schumacher <[email protected]>
4  SPDX-FileCopyrightText: 2003-2007 Josef Spillner <[email protected]>
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 
54 {
55  d->id = id;
56 }
57 
59 {
60  return d->id;
61 }
62 
63 void Author::setName(const QString &name)
64 {
65  d->name = name;
66 }
67 
69 {
70  return d->name;
71 }
72 
73 void Author::setEmail(const QString &email)
74 {
75  d->email = email;
76 }
77 
79 {
80  return d->email;
81 }
82 
83 void Author::setJabber(const QString &jabber)
84 {
85  d->jabber = jabber;
86 }
87 
89 {
90  return d->jabber;
91 }
92 
93 void Author::setHomepage(const QString &homepage)
94 {
95  d->homepage = homepage;
96 }
97 
99 {
100  return d->homepage;
101 }
102 
103 void Author::setProfilepage(const QString &profilepage)
104 {
105  d->profilepage = profilepage;
106 }
107 
109 {
110  return d->profilepage;
111 }
112 
113 void Author::setAvatarUrl(const QUrl &avatarUrl)
114 {
115  d->avatarUrl = avatarUrl;
116 }
117 
119 {
120  return d->avatarUrl;
121 }
122 
123 void Author::setDescription(const QString &description)
124 {
125  d->description = description;
126 }
127 
129 {
130  return d->description;
131 }
QString profilepage() const
Retrieve the author's profile page.
QString description() const
Retrieve the user's description text.
QString email() const
Retrieve the author's email address.
Definition: core/author.cpp:78
QString homepage() const
Retrieve the author's homepage.
Definition: core/author.cpp:98
void setHomepage(const QString &homepage)
Sets the homepage of the author.
Definition: core/author.cpp:93
void setId(const QString &id)
Sets the user ID of the author.
Definition: core/author.cpp:53
QUrl avatarUrl() const
Retrieve the url of the user's avatar image.
KNewStuff author information.
Definition: core/author.h:31
void setJabber(const QString &jabber)
Sets the jabber address of the author.
Definition: core/author.cpp:83
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.
void setAvatarUrl(const QUrl &avatarUrl)
Sets the url for the user's avatar image.
QString jabber() const
Retrieve the author's jabber address.
Definition: core/author.cpp:88
QString id() const
Retrieve the author's user ID.
Definition: core/author.cpp:58
QString name(StandardShortcut id)
void setEmail(const QString &email)
Sets the email address of the author.
Definition: core/author.cpp:73
Contains the core functionality for handling interaction with NewStuff providers.
QString name() const
Retrieve the author's name.
Definition: core/author.cpp:68
void setName(const QString &name)
Sets the full name of the author.
Definition: core/author.cpp:63
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Wed Jun 7 2023 04:10:07 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.