File indexing completed on 2024-03-24 03:59:11
0001 /* 0002 This file is part of KNewStuff2. 0003 SPDX-FileCopyrightText: 2002 Cornelius Schumacher <schumacher@kde.org> 0004 SPDX-FileCopyrightText: 2003-2007 Josef Spillner <spillner@kde.org> 0005 0006 SPDX-License-Identifier: LGPL-2.1-or-later 0007 */ 0008 0009 #ifndef KNEWSTUFF3_AUTHOR_P_H 0010 #define KNEWSTUFF3_AUTHOR_P_H 0011 0012 #include <QSharedData> 0013 #include <QString> 0014 #include <QUrl> 0015 0016 #include "knewstuffcore_export.h" 0017 0018 namespace KNSCore 0019 { 0020 class AuthorPrivate; 0021 0022 /** 0023 * @short KNewStuff author information. 0024 * 0025 * This class provides accessor methods to the author data 0026 * as used by KNewStuff. 0027 * It should probably not be used directly by the application. 0028 * 0029 * @author Josef Spillner (spillner@kde.org) 0030 */ 0031 class KNEWSTUFFCORE_EXPORT Author 0032 { 0033 Q_GADGET 0034 Q_PROPERTY(QString name READ name) 0035 Q_PROPERTY(QString email READ email) 0036 0037 public: 0038 explicit Author(); 0039 Author(const Author &other); 0040 Author &operator=(const Author &other); 0041 ~Author(); 0042 0043 /** 0044 * Sets the user ID of the author. 0045 */ 0046 void setId(const QString &id); 0047 0048 /** 0049 * Retrieve the author's user ID 0050 * @return the author's user ID 0051 */ 0052 QString id() const; 0053 0054 /** 0055 * Sets the full name of the author. 0056 */ 0057 void setName(const QString &name); 0058 0059 /** 0060 * Retrieve the author's name. 0061 * 0062 * @return author name 0063 */ 0064 QString name() const; 0065 0066 /** 0067 * Sets the email address of the author. 0068 */ 0069 void setEmail(const QString &email); 0070 0071 /** 0072 * Retrieve the author's email address. 0073 * 0074 * @return author email address 0075 */ 0076 QString email() const; 0077 0078 /** 0079 * Sets the jabber address of the author. 0080 */ 0081 void setJabber(const QString &jabber); 0082 0083 /** 0084 * Retrieve the author's jabber address. 0085 * 0086 * @return author jabber address 0087 */ 0088 QString jabber() const; 0089 0090 /** 0091 * Sets the homepage of the author. 0092 */ 0093 void setHomepage(const QString &homepage); 0094 0095 /** 0096 * Retrieve the author's homepage. 0097 * 0098 * @return author homepage 0099 */ 0100 QString homepage() const; 0101 0102 /** 0103 * Sets the profile page of the author, usually located on the server hosting the content. 0104 */ 0105 void setProfilepage(const QString &profilepage); 0106 0107 /** 0108 * Retrieve the author's profile page. 0109 * 0110 * @return author profile page 0111 */ 0112 QString profilepage() const; 0113 0114 /** 0115 * Sets the url for the user's avatar image 0116 */ 0117 void setAvatarUrl(const QUrl &avatarUrl); 0118 0119 /** 0120 * Retrieve the url of the user's avatar image 0121 * 0122 * @return a url for the user's avatar (may be empty) 0123 */ 0124 QUrl avatarUrl() const; 0125 0126 /** 0127 * Retrieve the user's description text 0128 * 0129 * @return A long(ish)-form text describing this user, usually self-entered 0130 */ 0131 QString description() const; 0132 /** 0133 * Set the user's description 0134 */ 0135 void setDescription(const QString &description); 0136 0137 private: 0138 QSharedDataPointer<AuthorPrivate> d; 0139 }; 0140 0141 } 0142 0143 #endif