Main Page   Modules   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   Related Pages  

KAboutData Class Reference

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

#include <kaboutdata.h>

List of all members.

Public Types

enum  LicenseKey

Public Methods

 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")
void addAuthor (const char *name, const char *task=0, const char *emailAddress=0, const char *webAddress=0)
void addCredit (const char *name, const char *task=0, const char *emailAddress=0, const char *webAddress=0)
void setTranslator (const char *name, const char *emailAddress)
void setLicenseText (const char *license)
void setLicenseTextFile (const QString &file)
const char * appName () const
QString programName () const
QString version () const
QString shortDescription () const
QString homepage () const
QString bugAddress () const
const QValueList< KAboutPersonauthors () const
const QValueList< KAboutPersoncredits () const
const QValueList< KAboutTranslatortranslators () const
QString otherText () const
QString license () const
QString copyrightStatement () const

Static Public Methods

QString aboutTranslationTeam ()


Detailed Description

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

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

Author:
Espen Sand (espen@kde.org), David Faure (faure@kde.org)
Version:
Id:
kaboutdata.h,v 1.26.2.1 2003/04/25 18:14:50 waba Exp

Definition at line 167 of file kaboutdata.h.


Member Enumeration Documentation

enum KAboutData::LicenseKey
 

Descibes the license of the software.

Definition at line 173 of file kaboutdata.h.


Constructor & Destructor Documentation

KAboutData::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"
 

Constructor.

Parameters:
appName  The program name used internally. Example: "kedit"
programName  A displayable program name string. This string should be marked for translation. Example: I18N_NOOP("KEdit")
version  The program version string.
shortDescription  A short description of what the program does. This string should be marked for translation. Example: I18N_NOOP("A simple text editor.")
licenseType  The license identifier. Use setLicenseText if you use a license not predefined here.
copyrightStatement  A 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.
text  Some free form text, that can contain any kind of information. The text can contain newlines. This string should be marked for translation.
homePageAddress  The program homepage string. Start the address with "http://". "http://some.domain" is is correct, "some.domain" is not.
bugsEmailAddress  The bug report email address string. This defaults to the kde.org bug system.


Member Function Documentation

QString KAboutData::aboutTranslationTeam   [static]
 

Returns a message about the translation team.

Returns:
a message about the translation team

void KAboutData::addAuthor const char *    name,
const char *    task = 0,
const char *    emailAddress = 0,
const char *    webAddress = 0
 

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:
name  The developer's name in UTF-8 encoding.
task  What the person is responsible for. This text can contain newlines. It should be marked for translation like this: I18N_NOOP("Task description..."). Can be 0.
emailAddress  An Email address where the person can be reached. Can be 0.
webAddress  The person's homepage or a relevant link. Start the address with "http://". "http://some.domain" is is correct, "some.domain" is not. Can be 0.

void KAboutData::addCredit const char *    name,
const char *    task = 0,
const char *    emailAddress = 0,
const char *    webAddress = 0
 

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

Parameters:
name  The person's name in UTF-8 encoding.
task  What 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...") Can be 0.
emailAddress  An Email address when the person can be reached. Can be 0.
webAddress  The person's homepage or a relevant link. Start the address with "http://". "http://some.domain" is is correct, "some.domain" is not. Can be 0.

const char* KAboutData::appName  
 

Returns the application's internal name.

Returns:
the internal program name.

const QValueList<KAboutPerson> KAboutData::authors  
 

Returns a list of authors.

Returns:
author information (list of persons).

QString KAboutData::bugAddress  
 

Returns the email address for bugs.

Returns:
the email address where to report bugs.

QString KAboutData::copyrightStatement  
 

Returns the copyright statement.

Returns:
the copyright statement. Can be QString::null if not set.

const QValueList<KAboutPerson> KAboutData::credits  
 

Returns a list of persons who contributed.

Returns:
credit information (list of persons).

QString KAboutData::homepage  
 

Returns the application homepage.

Returns:
the application homepage URL. Can be QString::null if not set.

QString KAboutData::license  
 

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 KAboutData::otherText  
 

Returns a translated, free form text.

Returns:
the free form text (translated). Can be QString::null if not set.

QString KAboutData::programName  
 

Returns the translated program name.

Returns:
the program name (translated).

void KAboutData::setLicenseText const char *    license
 

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:
license  The license text in utf8 encoding.

void KAboutData::setLicenseTextFile const QString &    file
 

Defines a licence text.

Parameters:
file  File containing the license text.

void KAboutData::setTranslator const char *    name,
const char *    emailAddress
 

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.

Parameters:
name  the name of the translator
emailAddress  the email address of the translator
See also:
KAboutTranslator

QString KAboutData::shortDescription  
 

Returns a short, translated description.

Returns:
the short description (translated). Can be QString::null if not set.

const QValueList<KAboutTranslator> KAboutData::translators  
 

Returns a list of translators.

Returns:
translators information (list of persons)

QString KAboutData::version  
 

Returns the program's version.

Returns:
the version string.


The documentation for this class was generated from the following file:
Generated on Wed Aug 13 23:30:03 2003 for kdelibs by doxygen1.2.18