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

KDECore

Public Member Functions | List of all members
KAboutPerson Class Reference

#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:

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 68 of file kaboutdata.h.

Constructor & Destructor Documentation

KAboutPerson::KAboutPerson ( 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 68 of file kaboutdata.cpp.

KAboutPerson::KAboutPerson ( 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 80 of file kaboutdata.cpp.

KAboutPerson::KAboutPerson ( const KAboutPerson &  other)

Copy constructor.

Performs a deep copy.

Parameters
otherobject 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
otherobject 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:
  • kaboutdata.h
  • kaboutdata.cpp
This file is part of the KDE documentation.
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.

KDECore

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

kdelibs API Reference

Skip menu "kdelibs API Reference"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal