KAboutPerson
#include <KAboutPerson>
Properties | |
QUrl | avatarUrl |
QString | emailAddress |
QString | name |
QString | task |
QString | webAddress |
Public Member Functions | |
KAboutPerson (const KAboutPerson &other) | |
KAboutPerson (const QString &name=QString(), const QString &task=QString(), const QString &emailAddress=QString(), const QString &webAddress=QString(), const QUrl &avatarUrl=QUrl()) | |
QUrl | avatarUrl () const |
QString | emailAddress () const |
QString | name () const |
KAboutPerson & | operator= (const KAboutPerson &other) |
QString | task () const |
QString | webAddress () const |
Static Public Member Functions | |
static KAboutPerson | fromJSON (const QJsonObject &obj) |
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:
Definition at line 63 of file kaboutdata.h.
Property Documentation
◆ avatarUrl
|
read |
Definition at line 70 of file kaboutdata.h.
◆ emailAddress
|
read |
Definition at line 68 of file kaboutdata.h.
◆ name
|
read |
Definition at line 66 of file kaboutdata.h.
◆ task
|
read |
Definition at line 67 of file kaboutdata.h.
◆ webAddress
|
read |
Definition at line 69 of file kaboutdata.h.
Constructor & Destructor Documentation
◆ KAboutPerson() [1/2]
|
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. avatarUrl URL to the avatar of the person, since 6.0
name
default argument
- Since
- 5.53
Definition at line 48 of file kaboutdata.cpp.
◆ KAboutPerson() [2/2]
|
default |
Copy constructor.
Performs a deep copy.
- Parameters
-
other object to copy
Member Function Documentation
◆ avatarUrl()
QUrl KAboutPerson::avatarUrl | ( | ) | const |
◆ emailAddress()
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 79 of file kaboutdata.cpp.
◆ fromJSON()
|
static |
Creates a KAboutPerson
from a JSON object with the following structure:
Key | Accessor |
---|---|
Name | name() |
emailAddress() | |
Task | task() |
Website | webAddress() |
AvatarUrl | avatarUrl() |
The Name
and Task
key are translatable (by using e.g. a "Task[de_DE]" key) The AvatarUrl exists since version 6.0
- Since
- 5.18
Definition at line 96 of file kaboutdata.cpp.
◆ name()
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 69 of file kaboutdata.cpp.
◆ operator=()
|
default |
Assignment operator.
Performs a deep copy.
- Parameters
-
other object to copy
◆ task()
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 74 of file kaboutdata.cpp.
◆ webAddress()
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 84 of file kaboutdata.cpp.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Dec 6 2024 12:00:44 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.