Changeset View
Changeset View
Standalone View
Standalone View
src/core/author.h
Show All 14 Lines | 1 | /* | |||
---|---|---|---|---|---|
15 | 15 | | |||
16 | You should have received a copy of the GNU Lesser General Public | 16 | You should have received a copy of the GNU Lesser General Public | ||
17 | License along with this library. If not, see <http://www.gnu.org/licenses/>. | 17 | License along with this library. If not, see <http://www.gnu.org/licenses/>. | ||
18 | */ | 18 | */ | ||
19 | #ifndef KNEWSTUFF3_AUTHOR_P_H | 19 | #ifndef KNEWSTUFF3_AUTHOR_P_H | ||
20 | #define KNEWSTUFF3_AUTHOR_P_H | 20 | #define KNEWSTUFF3_AUTHOR_P_H | ||
21 | 21 | | |||
22 | #include <QString> | 22 | #include <QString> | ||
23 | #include <QUrl> | ||||
23 | 24 | | |||
24 | #include "knewstuffcore_export.h" | 25 | #include "knewstuffcore_export.h" | ||
25 | 26 | | |||
26 | namespace KNSCore | 27 | namespace KNSCore | ||
27 | { | 28 | { | ||
28 | struct AuthorPrivate; | 29 | struct AuthorPrivate; | ||
29 | 30 | | |||
30 | /** | 31 | /** | ||
31 | * @short KNewStuff author information. | 32 | * @short KNewStuff author information. | ||
32 | * | 33 | * | ||
33 | * This class provides accessor methods to the author data | 34 | * This class provides accessor methods to the author data | ||
34 | * as used by KNewStuff. | 35 | * as used by KNewStuff. | ||
35 | * It should probably not be used directly by the application. | 36 | * It should probably not be used directly by the application. | ||
36 | * | 37 | * | ||
37 | * @author Josef Spillner (spillner@kde.org) | 38 | * @author Josef Spillner (spillner@kde.org) | ||
38 | */ | 39 | */ | ||
39 | class KNEWSTUFFCORE_EXPORT Author | 40 | class KNEWSTUFFCORE_EXPORT Author | ||
40 | { | 41 | { | ||
41 | public: | 42 | public: | ||
43 | explicit Author(); | ||||
44 | Author(const Author &other); | ||||
45 | Author& operator=(const Author &other) = default; | ||||
46 | Author& operator=(Author&&) = default; | ||||
47 | ~Author(); | ||||
48 | | ||||
49 | /** | ||||
50 | * Sets the user ID of the author. | ||||
51 | */ | ||||
52 | void setId(const QString& id); | ||||
53 | | ||||
54 | /** | ||||
55 | * Retrieve the author's user ID | ||||
56 | * @return the author's user ID | ||||
57 | */ | ||||
58 | QString id() const; | ||||
59 | | ||||
42 | /** | 60 | /** | ||
43 | * Sets the full name of the author. | 61 | * Sets the full name of the author. | ||
44 | */ | 62 | */ | ||
45 | void setName(const QString &name); | 63 | void setName(const QString &name); | ||
46 | 64 | | |||
47 | /** | 65 | /** | ||
48 | * Retrieve the author's name. | 66 | * Retrieve the author's name. | ||
49 | * | 67 | * | ||
Show All 32 Lines | |||||
82 | 100 | | |||
83 | /** | 101 | /** | ||
84 | * Retrieve the author's homepage. | 102 | * Retrieve the author's homepage. | ||
85 | * | 103 | * | ||
86 | * @return author homepage | 104 | * @return author homepage | ||
87 | */ | 105 | */ | ||
88 | QString homepage() const; | 106 | QString homepage() const; | ||
89 | 107 | | |||
108 | /** | ||||
109 | * Sets the profile page of the author, usually located on the server hosting the content. | ||||
110 | */ | ||||
111 | void setProfilepage(const QString &profilepage); | ||||
broulik: `ProfilePage`? | |||||
In principle yes, except we can't change homepage to homePage, until KF6... and then we'd end up with mixed spelling styles, and that just makes me sad ;) leinir: In principle yes, except we can't change homepage to homePage, until KF6... and then we'd end… | |||||
112 | | ||||
113 | /** | ||||
114 | * Retrieve the author's profile page. | ||||
115 | * | ||||
116 | * @return author profile page | ||||
117 | */ | ||||
118 | QString profilepage() const; | ||||
119 | | ||||
120 | /** | ||||
121 | * Sets the url for the user's avatar image | ||||
122 | */ | ||||
123 | void setAvatarUrl(const QUrl &avatarUrl); | ||||
124 | | ||||
125 | /** | ||||
126 | * Retrieve the url of the user's avatar image | ||||
127 | * | ||||
128 | * @return a url for the user's avatar (may be empty) | ||||
129 | */ | ||||
130 | QUrl avatarUrl() const; | ||||
131 | | ||||
132 | /** | ||||
133 | * Retrieve the user's description text | ||||
134 | * | ||||
135 | * @return A long(ish)-form text describing this user, usually self-entered | ||||
136 | */ | ||||
137 | QString description() const; | ||||
138 | /** | ||||
139 | * Set the user's description | ||||
140 | */ | ||||
141 | void setDescription(const QString &description); | ||||
90 | private: | 142 | private: | ||
91 | QString mName; | 143 | QString mName; | ||
92 | QString mEmail; | 144 | QString mEmail; | ||
93 | QString mJabber; | 145 | QString mJabber; | ||
94 | QString mHomepage; | 146 | QString mHomepage; | ||
95 | }; | 147 | }; | ||
96 | 148 | | |||
97 | } | 149 | } | ||
98 | 150 | | |||
99 | #endif | 151 | #endif |
ProfilePage?