Module |
kdecore |
Namespace |
|
Class |
KAboutPerson |
Inherits |
|
|
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 people = about.authors();
about.addCredit(people[0].name(), people[0].task());
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
|