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#ifndef KNEWSTUFF3_AUTHOR_P_H
10#define KNEWSTUFF3_AUTHOR_P_H
11
12#include <QSharedData>
13#include <QString>
14#include <QUrl>
15
16#include "knewstuffcore_export.h"
17
18namespace KNSCore
19{
20class AuthorPrivate;
21
22/**
23 * @short KNewStuff author information.
24 *
25 * This class provides accessor methods to the author data
26 * as used by KNewStuff.
27 * It should probably not be used directly by the application.
28 *
29 * @author Josef Spillner (spillner@kde.org)
30 */
31class KNEWSTUFFCORE_EXPORT Author
32{
33 Q_GADGET
34 Q_PROPERTY(QString name READ name)
35 Q_PROPERTY(QString email READ email)
36
37public:
38 explicit Author();
39 Author(const Author &other);
40 Author &operator=(const Author &other);
41 ~Author();
42
43 /**
44 * Sets the user ID of the author.
45 */
46 void setId(const QString &id);
47
48 /**
49 * Retrieve the author's user ID
50 * @return the author's user ID
51 */
52 QString id() const;
53
54 /**
55 * Sets the full name of the author.
56 */
57 void setName(const QString &name);
58
59 /**
60 * Retrieve the author's name.
61 *
62 * @return author name
63 */
64 QString name() const;
65
66 /**
67 * Sets the email address of the author.
68 */
69 void setEmail(const QString &email);
70
71 /**
72 * Retrieve the author's email address.
73 *
74 * @return author email address
75 */
76 QString email() const;
77
78 /**
79 * Sets the jabber address of the author.
80 */
81 void setJabber(const QString &jabber);
82
83 /**
84 * Retrieve the author's jabber address.
85 *
86 * @return author jabber address
87 */
88 QString jabber() const;
89
90 /**
91 * Sets the homepage of the author.
92 */
93 void setHomepage(const QString &homepage);
94
95 /**
96 * Retrieve the author's homepage.
97 *
98 * @return author homepage
99 */
100 QString homepage() const;
101
102 /**
103 * Sets the profile page of the author, usually located on the server hosting the content.
104 */
105 void setProfilepage(const QString &profilepage);
106
107 /**
108 * Retrieve the author's profile page.
109 *
110 * @return author profile page
111 */
112 QString profilepage() const;
113
114 /**
115 * Sets the url for the user's avatar image
116 */
117 void setAvatarUrl(const QUrl &avatarUrl);
118
119 /**
120 * Retrieve the url of the user's avatar image
121 *
122 * @return a url for the user's avatar (may be empty)
123 */
124 QUrl avatarUrl() const;
125
126 /**
127 * Retrieve the user's description text
128 *
129 * @return A long(ish)-form text describing this user, usually self-entered
130 */
131 QString description() const;
132 /**
133 * Set the user's description
134 */
135 void setDescription(const QString &description);
136
137private:
138 QSharedDataPointer<AuthorPrivate> d;
139};
140
141}
142
143#endif
144

source code of knewstuff/src/core/author.h