K4AboutPerson

K4AboutPerson Class Reference

#include <k4aboutdata.h>

Public Member Functions

 K4AboutPerson (const KLocalizedString &name, const KLocalizedString &task=KLocalizedString(), const QByteArray &emailAddress=QByteArray(), const QByteArray &webAddress=QByteArray())
 
 K4AboutPerson (const KLocalizedString &name, const KLocalizedString &task, const QByteArray &emailAddress, const QByteArray &webAddress, const QByteArray &ocsUsername)
 
 K4AboutPerson (const K4AboutPerson &other)
 
QString emailAddress () const
 
QString name () const
 
QString ocsUsername () const
 
K4AboutPersonoperator= (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:

K4AboutData about("khello", "khello", ki18n("KHello"), "0.1",
ki18n("A KDE version of Hello, world!"),
K4AboutData::License_LGPL,
ki18n("Copyright (C) 2003 Developer"));
about.addAuthor(ki18n("Joe Developer"), ki18n("developer"), "[email protected]", 0);
QList<K4AboutPerson> people = about.authors();
about.addCredit(people[0].name(), people[0].task());
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.
Binary Compatible:
KDE4
Deprecated:
Instead, use KAboutData in KCoreAddons

Definition at line 76 of file k4aboutdata.h.

Constructor & Destructor Documentation

K4AboutPerson::K4AboutPerson ( const KLocalizedString name,
const KLocalizedString task = KLocalizedString(),
const QByteArray emailAddress = QByteArray(),
const QByteArray webAddress = QByteArray() 
)
explicit

Convenience constructor.

Parameters
nameThe name of the person.
taskThe task of this person.
emailAddressThe email address of the person.
webAddressHome page of the person.

Definition at line 67 of file k4aboutdata.cpp.

K4AboutPerson::K4AboutPerson ( const KLocalizedString name,
const KLocalizedString task,
const QByteArray emailAddress,
const QByteArray webAddress,
const QByteArray ocsUsername 
)
explicit

Convenience constructor with Open Collaboration Services data.

Parameters
nameThe name of the person.
taskThe task of this person.
emailAddressThe email address of the person.
webAddressHome page of the person.
ocsUsernameOpen Collaboration Services username of the person.

Definition at line 79 of file k4aboutdata.cpp.

K4AboutPerson::K4AboutPerson ( const K4AboutPerson other)

Copy constructor.

Performs a deep copy.

Parameters
otherobject to copy

Definition at line 100 of file k4aboutdata.cpp.

Member Function Documentation

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.

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.

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.

K4AboutPerson & K4AboutPerson::operator= ( const K4AboutPerson other)

Assignment operator.

Performs a deep copy.

Parameters
otherobject to copy

Definition at line 141 of file k4aboutdata.cpp.

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.

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:
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Wed Aug 5 2020 22:56:35 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.