File indexing completed on 2024-04-28 11:43:30

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