KDECore
#include <kaboutdata.h>
Public Member Functions | |
KAboutPerson (const KLocalizedString &name, const KLocalizedString &task=KLocalizedString(), const QByteArray &emailAddress=QByteArray(), const QByteArray &webAddress=QByteArray()) | |
KAboutPerson (const KLocalizedString &name, const KLocalizedString &task, const QByteArray &emailAddress, const QByteArray &webAddress, const QByteArray &ocsUsername) | |
KAboutPerson (const KAboutPerson &other) | |
~KAboutPerson () | |
QString | emailAddress () const |
QString | name () const |
QString | ocsUsername () const |
KAboutPerson & | operator= (const KAboutPerson &other) |
QString | task () const |
QString | webAddress () const |
Detailed Description
This class is used to store information about a person or developer.
It can store the person's name, a task, an email address and a link to a home page. This class is intended for use in the KAboutData class, but it can be used elsewhere as well. Normally you should at least define the person's name. Creating a KAboutPerson object by yourself is relatively useless, but the KAboutData methods KAboutData::authors() and KAboutData::credits() return lists of KAboutPerson data objects which you can examine.
Example usage within a main(), retrieving the list of people involved with a program and re-using data from one of them:
- Note
- Instead of the more usual i18n calls, for translatable text the ki18n calls are used to produce KLocalizedStrings, which can delay the translation lookup. This is necessary because the translation catalogs are usually not yet initialized at the point where KAboutData is constructed.
Definition at line 68 of file kaboutdata.h.
Constructor & Destructor Documentation
|
explicit |
Convenience constructor.
- Parameters
-
name The name of the person. task The task of this person. emailAddress The email address of the person. webAddress Home page of the person.
Definition at line 68 of file kaboutdata.cpp.
|
explicit |
Convenience constructor with Open Collaboration Services data.
- Parameters
-
name The name of the person. task The task of this person. emailAddress The email address of the person. webAddress Home page of the person. ocsUsername Open Collaboration Services username of the person.
Definition at line 80 of file kaboutdata.cpp.
KAboutPerson::KAboutPerson | ( | const KAboutPerson & | other | ) |
Copy constructor.
Performs a deep copy.
- Parameters
-
other object to copy
Definition at line 101 of file kaboutdata.cpp.
KAboutPerson::~KAboutPerson | ( | ) |
Definition at line 106 of file kaboutdata.cpp.
Member Function Documentation
QString KAboutPerson::emailAddress | ( | ) | const |
The person's email address.
- Returns
- the person's email address (can be QString(), if it has been constructed with an empty email)
Definition at line 125 of file kaboutdata.cpp.
QString KAboutPerson::name | ( | ) | const |
The person's name.
- Returns
- the person's name (can be QString(), if it has been constructed with an empty name)
Definition at line 111 of file kaboutdata.cpp.
QString KAboutPerson::ocsUsername | ( | ) | const |
The person's Open Collaboration Services username.
- Returns
- the persons OCS username (can be QString(), if it has been constructed with an empty username)
Definition at line 136 of file kaboutdata.cpp.
KAboutPerson & KAboutPerson::operator= | ( | const KAboutPerson & | other | ) |
Assignment operator.
Performs a deep copy.
- Parameters
-
other object to copy
Definition at line 141 of file kaboutdata.cpp.
QString KAboutPerson::task | ( | ) | const |
The person's task.
- Returns
- the person's task (can be QString(), if it has been constructed with an empty task)
Definition at line 118 of file kaboutdata.cpp.
QString KAboutPerson::webAddress | ( | ) | const |
The home page or a relevant link.
- Returns
- the persons home page (can be QString(), if it has been constructed with an empty home page)
Definition at line 131 of file kaboutdata.cpp.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:22:12 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.