K4AboutPerson
#include <k4aboutdata.h>
Public Member Functions | |
K4AboutPerson (const K4AboutPerson &other) | |
K4AboutPerson (const KLocalizedString &name, const KLocalizedString &task, const QByteArray &emailAddress, const QByteArray &webAddress, const QByteArray &ocsUsername) | |
K4AboutPerson (const KLocalizedString &name, const KLocalizedString &task=KLocalizedString(), const QByteArray &emailAddress=QByteArray(), const QByteArray &webAddress=QByteArray()) | |
QString | emailAddress () const |
QString | name () const |
QString | ocsUsername () const |
K4AboutPerson & | operator= (const K4AboutPerson &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 K4AboutData class, but it can be used elsewhere as well. Normally you should at least define the person's name. Creating a K4AboutPerson object by yourself is relatively useless, but the K4AboutData methods K4AboutData::authors() and K4AboutData::credits() return lists of K4AboutPerson 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 K4AboutData is constructed.
- Deprecated:
- Instead, use KAboutData in KCoreAddons
Definition at line 76 of file k4aboutdata.h.
Constructor & Destructor Documentation
◆ K4AboutPerson() [1/3]
|
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 67 of file k4aboutdata.cpp.
◆ K4AboutPerson() [2/3]
|
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 79 of file k4aboutdata.cpp.
◆ K4AboutPerson() [3/3]
K4AboutPerson::K4AboutPerson | ( | const K4AboutPerson & | other | ) |
Copy constructor.
Performs a deep copy.
- Parameters
-
other object to copy
Definition at line 100 of file k4aboutdata.cpp.
Member Function Documentation
◆ emailAddress()
QString K4AboutPerson::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 126 of file k4aboutdata.cpp.
◆ name()
QString K4AboutPerson::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 110 of file k4aboutdata.cpp.
◆ ocsUsername()
QString K4AboutPerson::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 k4aboutdata.cpp.
◆ operator=()
K4AboutPerson & K4AboutPerson::operator= | ( | const K4AboutPerson & | other | ) |
Assignment operator.
Performs a deep copy.
- Parameters
-
other object to copy
Definition at line 141 of file k4aboutdata.cpp.
◆ task()
QString K4AboutPerson::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 k4aboutdata.cpp.
◆ webAddress()
QString K4AboutPerson::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 k4aboutdata.cpp.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2023 The KDE developers.
Generated on Tue Feb 7 2023 04:02:02 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.