• Skip to content
  • Skip to link menu
KDE 4.1 API Reference
  • KDE API Reference
  • kdelibs
  • Sitemap
  • Contact Us
 

KDECore

KAboutPerson Class Reference

#include <kaboutdata.h>

List of all members.


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:

 KAboutData about("khello", "khello", ki18n("KHello"), "0.1",
                   ki18n("A KDE version of Hello, world!"),
                   KAboutData::License_LGPL,
                   ki18n("Copyright (c) 2003 Developer"));

 about.addAuthor(ki18n("Joe Developer"), ki18n("developer"), "joe@host.com", 0);
 QList<KAboutPerson> 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 KAboutData is constructed.
Binary Compatible:
KDE4

Definition at line 67 of file kaboutdata.h.


Public Member Functions

QString emailAddress () const
 KAboutPerson (const KAboutPerson &other)
 KAboutPerson (const KLocalizedString &name, const KLocalizedString &task=KLocalizedString(), const QByteArray &emailAddress=QByteArray(), const QByteArray &webAddress=QByteArray())
QString name () const
KAboutPerson & operator= (const KAboutPerson &other)
QString task () const
QString webAddress () const
 ~KAboutPerson ()

Constructor & Destructor Documentation

KAboutPerson::KAboutPerson ( const KLocalizedString &  name,
const KLocalizedString &  task = KLocalizedString(),
const QByteArray &  emailAddress = QByteArray(),
const QByteArray &  webAddress = QByteArray() 
) [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 66 of file kaboutdata.cpp.

KAboutPerson::KAboutPerson ( const KAboutPerson &  other  ) 

Copy constructor.

Performs a deep copy.

Parameters:
other object to copy

Definition at line 85 of file kaboutdata.cpp.

KAboutPerson::~KAboutPerson (  ) 

Definition at line 90 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 112 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 96 of file kaboutdata.cpp.

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

Assignment operator.

Performs a deep copy.

Parameters:
other object to copy

Definition at line 126 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 104 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 119 of file kaboutdata.cpp.


The documentation for this class was generated from the following files:
  • kaboutdata.h
  • kaboutdata.cpp

KDECore

Skip menu "KDECore"
  • Main Page
  • Modules
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

kdelibs

Skip menu "kdelibs"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • Kate
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • KIO
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • Kross
  • KUtils
  • Nepomuk
  • Solid
  • Sonnet
  • ThreadWeaver
Generated for kdelibs by doxygen 1.5.4
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal