class KAboutData

Holds information needed by the "About" box and other classes. More...

Definition#include <kaboutdata.h>
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

Public Types

Public Methods

Public Static Methods


Detailed Description

This class is used to store information about a program. It can store such values as version number, program name, home page, email address for bug reporting, multiple authors and contributors (using KAboutPerson), license and copyright information.

Currently, the values set here are shown by the "About" box (see KAboutDialog), used by the bug report dialog (see KBugReport), and by the help shown on command line (see KCmdLineArgs).

enum LicenseKey { License_Custom = -2, License_File = -1, License_Unknown = 0, License_GPL = 1, License_GPL_V2 = 1, License_LGPL = 2, License_LGPL_V2 = 2, License_BSD = 3, License_Artistic = 4, License_QPL = 5, License_QPL_V1_0 = 5 }

LicenseKey

 KAboutData ( const char *appName, const char *programName, const char *version, const char *shortDescription = 0, int licenseType = License_Unknown, const char *copyrightStatement = 0, const char *text = 0, const char *homePageAddress = 0, const char *bugsEmailAddress = "submit@bugs.kde.org" )

KAboutData

Constructor.

Parameters:
appNameThe program name used internally. Example: "kedit"
programNameA displayable program name string. This string should be marked for translation. Example: I18N_NOOP("KEdit")
versionThe program version string.
shortDescriptionA short description of what the program does. This string should be marked for translation. Example: I18N_NOOP("A simple text editor.")
licenseTypeThe license identifier. Use setLicenseText if you use a license not predefined here.
copyrightStatementA copyright statement, that can look like this: "(c) 1999-2000, Name". The string specified here is not modified in any manner. The author information from addAuthor is not used.
textSome free form text, that can contain any kind of information. The text can contain newlines. This string should be marked for translation.
homePageAddressThe program homepage string. Start the address with "http://". "http://some.domain" is is correct, "some.domain" is not.
bugsEmailAddressThe bug report email address string. This defaults to the kde.org bug system.

 ~KAboutData ()

~KAboutData

void  addAuthor ( const char *name, const char *task=0, const char *emailAddress=0, const char *webAddress=0 )

addAuthor

Defines an author. You can call this function as many times you need. Each entry is appended to a list. The person in the first entry is assumed to be the leader of the project.

Parameters:
nameThe developer's name in UTF-8 encoding.
taskWhat the person is responsible for. This text can contain newlines. It should be marked for translation like this: I18N_NOOP("Task description...")
emailAddressAn Email address where the person can be reached.
webAddressThe person's homepage or a relevant link. Start the address with "http://". "http://some.domain" is is correct, "some.domain" is not.

void  addCredit ( const char *name, const char *task=0, const char *emailAddress=0, const char *webAddress=0 )

addCredit

Defines a person that deserves credit. You can call this function as many times you need. Each entry is appended to a list.

Parameters:
nameThe person's name in UTF-8 encoding.
taskWhat the person has done to deserve the honor. The text can contain newlines. It should be marked for translation like this: I18N_NOOP("Task description...")
emailAddressAn Email address when the person can be reached.
webAddressThe person's homepage or a relevant link. Start the address with "http://". "http://some.domain" is is correct, "some.domain" is not.

void  setTranslator (const char* name, const char* emailAddress)

setTranslator

Sets the name of the translator of the gui. Since this depends on the language, just use a dummy text marked for translation.

For example: setTranslator(I18N_NOOP("_: NAME OF TRANSLATORS\nYour names") ,I18N_NOOP("_: EMAIL OF TRANSLATORS\nYour emails"));

The translator can then translate this dummy text with his name or with a list of names separated with ",". If there is no translation or the application is used with the default language, this function call is ignored.

Note: If you are using the default KDE automake environment, there is no need to use this function, because the two default strings above are added to the applications po file automatically.

See also: KAboutTranslator

void  setLicenseText ( const char *license )

setLicenseText

Defines a licence text.

The text will be translated if it got marked for translations with the I18N_NOOP() macro.

Example: setLicenseText( I18N_NOOP("This is my license"));

NOTE: No copy of the text is made.

Parameters:
licenseThe license text in utf8 encoding.

void  setLicenseTextFile ( const QString &file )

setLicenseTextFile

Defines a licence text.

Parameters:
fileFile containing the license text.

const char * appName ()

appName

[const]

Returns: the internal program name.

QString  programName ()

programName

[const]

Returns: the program name (translated).

QString  version ()

version

[const]

Returns: the version string.

QString  shortDescription ()

shortDescription

[const]

Returns: the short description (translated).

QString  homepage ()

homepage

[const]

Returns: the application homepage URL.

QString  bugAddress ()

bugAddress

[const]

Returns: the email address where to report bugs.

const QValueList<KAboutPerson>  authors ()

authors

[const]

Returns: author information (list of persons).

const QValueList<KAboutPerson>  credits ()

credits

[const]

Returns: credit information (list of persons).

const QValueList<KAboutTranslator>  translators ()

translators

[const]

Returns: translators information (list of persons)

QString  aboutTranslationTeam ()

aboutTranslationTeam

[static]

Returns: a message about the translation team

QString  otherText ()

otherText

[const]

Returns: the free form text (translated).

QString  license ()

license

[const]

Returns the license. If the licenseType argument of the constructor has been used, any text defined by setLicenseText is ignored, and the standard text for the chosen license will be returned.

Returns: The license text.

QString  copyrightStatement ()

copyrightStatement

[const]

Returns: the copyright statement.