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 * \class KNSCore::Author
24 * \inheaderfile KNSCore/Author
25 * \inmodule KNewStuffCore
26 *
27 * \brief KNewStuff author information.
28 *
29 * This class provides accessor methods to the author data
30 * as used by KNewStuff.
31 *
32 * \warning This class should probably not be used directly by the application.
33 */
34class KNEWSTUFFCORE_EXPORT Author
35{
36 Q_GADGET
37
38 /*!
39 * \qmlproperty string Author::name
40 */
41 /*!
42 * \property KNSCore::Author::name
43 */
44 Q_PROPERTY(QString name READ name)
45
46 /*!
47 * \qmlproperty string Author::email
48 */
49 /*!
50 * \property KNSCore::Author::email
51 */
52 Q_PROPERTY(QString email READ email)
53
54public:
55 /*!
56 *
57 */
58 explicit Author();
59 Author(const Author &other);
60 Author &operator=(const Author &other);
61 ~Author();
62
63 /*!
64 * Sets the author's user ID to \a id.
65 */
66 void setId(const QString &id);
67
68 /*!
69 * Returns the author's user ID.
70 */
71 QString id() const;
72
73 /*!
74 * Sets the author's full \a name.
75 */
76 void setName(const QString &name);
77
78 /*!
79 * Returns the author's full name.
80 */
81 QString name() const;
82
83 /*!
84 * Sets the author's \a email address.
85 */
86 void setEmail(const QString &email);
87
88 /*!
89 * Returns the author's email address.
90 */
91 QString email() const;
92
93 /*!
94 * Sets the author's \a jabber address.
95 */
96 void setJabber(const QString &jabber);
97
98 /*!
99 * Returns the author's jabber address.
100 */
101 QString jabber() const;
102
103 /*!
104 * Sets the author's \a homepage URL.
105 */
106 void setHomepage(const QString &homepage);
107
108 /*!
109 * Returns the author's homepage URL.
110 */
111 QString homepage() const;
112
113 /*!
114 * Sets the profile page of the author, usually located on the server hosting the content.
115 *
116 * \a profilepage is the URL of the author's profile page
117 *
118 */
119 void setProfilepage(const QString &profilepage);
120
121 /*!
122 * Returns the author's profile page URL.
123 */
124 QString profilepage() const;
125
126 /*!
127 * Sets the author's avatar image URL to \a avatarUrl.
128 */
129 void setAvatarUrl(const QUrl &avatarUrl);
130
131 /*!
132 * Returns the author's avatar image URL (may be empty).
133 */
134 QUrl avatarUrl() const;
135
136 /*!
137 * Returns A long(ish)-form text describing this author, usually self-entered.
138 */
139 QString description() const;
140
141 /*!
142 * Sets the author's \a description.
143 */
144 void setDescription(const QString &description);
145
146private:
147 QSharedDataPointer<AuthorPrivate> d;
148};
149
150}
151
152#endif
153

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