KDE 4.7 PyKDE API Reference

- KDE's Python API

# KAboutPerson Class Reference

`from PyKDE4.kdecore import *`

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

KDE4

## Methods
| __init__ (self, KLocalizedString name, KLocalizedString task=KLocalizedString(), QByteArray emailAddress=QByteArray(), QByteArray webAddress=QByteArray())
| __init__ (self, KAboutPerson other)
| __init__ (self, QString name, QString email)
| __init__ (self, KLocalizedString name, KLocalizedString task, QByteArray emailAddress, QByteArray webAddress, QByteArray ocsUsername)
QString | emailAddress (self)
QString | name (self)
QString | ocsUsername (self)
QString | task (self)
QString | webAddress (self)

## Method Documentation

__init__ | ( | self, |
|  | KLocalizedString | name,
|  | KLocalizedString | task=KLocalizedString(),
|  | QByteArray | emailAddress=QByteArray(),
|  | QByteArray | webAddress=QByteArray()
| ) |  |  |

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.

__init__ | ( | self, |
|  | KAboutPerson | other
| ) |  |  |

Copy constructor. Performs a deep copy.

Parameters:

  | other | object to copy

__init__ | ( | self, |
|  | QString | name,
|  | QString | email
| ) |  |  |

Internal:
  Used by KAboutData to construct translator data.

__init__ | ( | self, |
|  | KLocalizedString | name,
|  | KLocalizedString | task,
|  | QByteArray | emailAddress,
|  | QByteArray | webAddress,
|  | QByteArray | ocsUsername
| ) |  |  |

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.

QString emailAddress | ( |  | self ) |

The person's email address

Returns:
  the person's email address (can be QString(), if it has been constructed with an empty email)

QString name | ( |  | self ) |

The person's name

Returns:
  the person's name (can be QString(), if it has been constructed with an empty name)

QString ocsUsername | ( |  | self ) |

The person's Open Collaboration Services username

Returns:
  the persons OCS username (can be QString(), if it has been constructed with an empty username)

QString task | ( |  | self ) |

The person's task

Returns:
  the person's task (can be QString(), if it has been constructed with an empty task)

QString webAddress | ( |  | self ) |

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)