org.kde.koala

Class KAboutData

public class KAboutData extends Object implements QtSupport

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)

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

Field Summary
static intLicense_Artistic
static intLicense_BSD
static intLicense_Custom
Descibes the license of the software.
static intLicense_File
static intLicense_GPL
static intLicense_GPL_V2
static intLicense_LGPL
static intLicense_LGPL_V2
static intLicense_QPL
static intLicense_QPL_V1_0
static intLicense_Unknown
Constructor Summary
protected KAboutData(Class dummy)
KAboutData(String appName, String programName, String version, String shortDescription, int licenseType, String copyrightStatement, String text, String homePageAddress, String bugsEmailAddress)
Constructor.
KAboutData(String appName, String programName, String version, String shortDescription, int licenseType, String copyrightStatement, String text, String homePageAddress)
KAboutData(String appName, String programName, String version, String shortDescription, int licenseType, String copyrightStatement, String text)
KAboutData(String appName, String programName, String version, String shortDescription, int licenseType, String copyrightStatement)
KAboutData(String appName, String programName, String version, String shortDescription, int licenseType)
KAboutData(String appName, String programName, String version, String shortDescription)
KAboutData(String appName, String programName, String version)
Method Summary
static StringaboutTranslationTeam()
Returns a message about the translation team.
voidaddAuthor(String name, String task, String emailAddress, String webAddress)
Defines an author.
voidaddAuthor(String name, String task, String emailAddress)
voidaddAuthor(String name, String task)
voidaddAuthor(String name)
voidaddCredit(String name, String task, String emailAddress, String webAddress)
Defines a person that deserves credit.
voidaddCredit(String name, String task, String emailAddress)
voidaddCredit(String name, String task)
voidaddCredit(String name)
StringappName()
Returns the application's internal name.
StringbugAddress()
Returns the email address for bugs.
StringcopyrightStatement()
Returns the copyright statement.
StringcustomAuthorPlainText()
Returns the plain text displayed around the list of authors instead of the default message telling users to send bug reports to bugAddress().
StringcustomAuthorRichText()
Returns the rich text displayed around the list of authors instead of the default message telling users to send bug reports to bugAddress().
booleancustomAuthorTextEnabled()
Returns whether custom text should be displayed around the list of authors.
voiddispose()
Delete the wrapped C++ instance ahead of finalize()
protected voidfinalize()
Deletes the wrapped C++ instance
Stringhomepage()
Returns the application homepage.
booleanisDisposed()
Has the wrapped C++ instance been deleted?
Stringlicense()
Returns the license.
StringotherText()
Returns a translated, free form text.
StringproductName()
Returns the application's product name, which will be used in KBugReport dialog.
QImageprogramLogo()
Returns the program logo image.
StringprogramName()
Returns the translated program name.
voidsetAppName(String appName)
Defines the program name used internally.
voidsetBugAddress(String bugAddress)
Defines the address where bug reports should be sent.
voidsetCopyrightStatement(String copyrightStatement)
Defines the copyright statement to show when displaying the license.
voidsetCustomAuthorText(String plainText, String richText)
Sets the custom text displayed around the list of authors instead of the default message telling users to send bug reports to bugAddress().
voidsetHomepage(String homepage)
Defines the program homepage.
voidsetLicense(int licenseKey)
Defines the license identifier.
voidsetLicenseText(String license)
Defines a license text.
voidsetLicenseTextFile(String file)
Defines a license text.
voidsetOtherText(String otherText)
Defines the additional text to show in the about dialog.
voidsetProductName(String name)
Defines the product name wich will be used in the KBugReport dialog.
voidsetProgramLogo(QImage image)
Defines the program logo.
voidsetProgramName(String programName)
Defines the displayable program name string.
voidsetShortDescription(String shortDescription)
Defines a short description of what the program does.
voidsetTranslator(String name, String emailAddress)
Sets the name of the translator of the gui.
voidsetVersion(String version)
Defines the program version string.
StringshortDescription()
Returns a short, translated description.
voidunsetCustomAuthorText()
Clears any custom text displayed around the list of authors and falls back to the default message telling users to send bug reports to bugAddress().
Stringversion()
Returns the program's version.

Field Detail

License_Artistic

public static final int License_Artistic

License_BSD

public static final int License_BSD

License_Custom

public static final int License_Custom
Descibes the license of the software.

UNKNOWN: Descibes the license of the software.

License_File

public static final int License_File

License_GPL

public static final int License_GPL

License_GPL_V2

public static final int License_GPL_V2

License_LGPL

public static final int License_LGPL

License_LGPL_V2

public static final int License_LGPL_V2

License_QPL

public static final int License_QPL

License_QPL_V1_0

public static final int License_QPL_V1_0

License_Unknown

public static final int License_Unknown

Constructor Detail

KAboutData

protected KAboutData(Class dummy)

KAboutData

public KAboutData(String appName, String programName, String version, String shortDescription, int licenseType, String copyrightStatement, String text, String homePageAddress, String bugsEmailAddress)
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.

UNKNOWN: Constructor.

KAboutData

public KAboutData(String appName, String programName, String version, String shortDescription, int licenseType, String copyrightStatement, String text, String homePageAddress)

KAboutData

public KAboutData(String appName, String programName, String version, String shortDescription, int licenseType, String copyrightStatement, String text)

KAboutData

public KAboutData(String appName, String programName, String version, String shortDescription, int licenseType, String copyrightStatement)

KAboutData

public KAboutData(String appName, String programName, String version, String shortDescription, int licenseType)

KAboutData

public KAboutData(String appName, String programName, String version, String shortDescription)

KAboutData

public KAboutData(String appName, String programName, String version)

Method Detail

aboutTranslationTeam

public static String aboutTranslationTeam()
Returns a message about the translation team.

Returns: a message about the translation team

UNKNOWN: Returns a message about the translation team.

addAuthor

public void addAuthor(String name, String task, String emailAddress, String webAddress)
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 correct, "some.domain" is not. Can be 0.

UNKNOWN: Defines an author.

addAuthor

public void addAuthor(String name, String task, String emailAddress)

addAuthor

public void addAuthor(String name, String task)

addAuthor

public void addAuthor(String name)

addCredit

public void addCredit(String name, String task, String emailAddress, String webAddress)
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.

UNKNOWN: Defines a person that deserves credit.

addCredit

public void addCredit(String name, String task, String emailAddress)

addCredit

public void addCredit(String name, String task)

addCredit

public void addCredit(String name)

appName

public String appName()
Returns the application's internal name.

Returns: the internal program name.

UNKNOWN: Returns the application's internal name.

bugAddress

public String bugAddress()
Returns the email address for bugs.

Returns: the email address where to report bugs.

UNKNOWN: Returns the email address for bugs.

copyrightStatement

public String copyrightStatement()
Returns the copyright statement.

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

UNKNOWN: Returns the copyright statement.

customAuthorPlainText

public String customAuthorPlainText()
Returns the plain text displayed around the list of authors instead of the default message telling users to send bug reports to bugAddress().

Returns: the plain text displayed around the list of authors instead of the default message. Can be null.

UNKNOWN: Returns the plain text displayed around the list of authors instead of the default message telling users to send bug reports to bugAddress().

customAuthorRichText

public String customAuthorRichText()
Returns the rich text displayed around the list of authors instead of the default message telling users to send bug reports to bugAddress().

Returns: the rich text displayed around the list of authors instead of the default message. Can be null.

UNKNOWN: Returns the rich text displayed around the list of authors instead of the default message telling users to send bug reports to bugAddress().

customAuthorTextEnabled

public boolean customAuthorTextEnabled()
Returns whether custom text should be displayed around the list of authors.

Returns: whether custom text should be displayed around the list of authors.

UNKNOWN: Returns whether custom text should be displayed around the list of authors.

dispose

public void dispose()
Delete the wrapped C++ instance ahead of finalize()

finalize

protected void finalize()
Deletes the wrapped C++ instance

homepage

public String homepage()
Returns the application homepage.

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

UNKNOWN: Returns the application homepage.

isDisposed

public boolean isDisposed()
Has the wrapped C++ instance been deleted?

license

public String 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.

UNKNOWN: Returns the license.

otherText

public String otherText()
Returns a translated, free form text.

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

UNKNOWN: Returns a translated, free form text.

productName

public String productName()
Returns the application's product name, which will be used in KBugReport dialog. By default it returns appName(), otherwise the one which is set with setProductName()

Returns: the product name.

UNKNOWN: Returns the application's product name, which will be used in KBugReport dialog.

programLogo

public QImage programLogo()
Returns the program logo image.

Returns: the program logo data or null image if there is no custom application logo defined.

UNKNOWN: Returns the program logo image.

programName

public String programName()
Returns the translated program name.

Returns: the program name (translated).

UNKNOWN: Returns the translated program name.

setAppName

public void setAppName(String appName)
Defines the program name used internally.

Parameters: appName The application name. Example: "kate".

UNKNOWN: Defines the program name used internally.

setBugAddress

public void setBugAddress(String bugAddress)
Defines the address where bug reports should be sent.

Parameters: bugAddress The bug report email address string. This defaults to the kde.org bug system.

UNKNOWN: Defines the address where bug reports should be sent.

setCopyrightStatement

public void setCopyrightStatement(String copyrightStatement)
Defines the copyright statement to show when displaying the license.

Parameters: 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.

UNKNOWN: Defines the copyright statement to show when displaying the license.

setCustomAuthorText

public void setCustomAuthorText(String plainText, String richText)
Sets the custom text displayed around the list of authors instead of the default message telling users to send bug reports to bugAddress().

Parameters: plainText The plain text. richText The rich text. Both parameters can be null to not display any message at all. Call unsetCustomAuthorText() to revert to the default mesage.

UNKNOWN: Sets the custom text displayed around the list of authors instead of the default message telling users to send bug reports to bugAddress().

setHomepage

public void setHomepage(String homepage)
Defines the program homepage.

Parameters: homepage The program homepage string. Start the address with "http://". "http://kate.kde.org" is is correct, "kde.kde.org" is not.

UNKNOWN: Defines the program homepage.

setLicense

public void setLicense(int licenseKey)
Defines the license identifier.

Parameters: licenseKey The license identifier.

UNKNOWN: Defines the license identifier.

setLicenseText

public void setLicenseText(String license)
Defines a license 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.

UNKNOWN: Defines a license text.

setLicenseTextFile

public void setLicenseTextFile(String file)
Defines a license text.

Parameters: file File containing the license text.

UNKNOWN: Defines a license text.

setOtherText

public void setOtherText(String otherText)
Defines the additional text to show in the about dialog.

Parameters: otherText Some free form text, that can contain any kind of information. The text can contain newlines. This string should be marked for translation.

UNKNOWN: Defines the additional text to show in the about dialog.

setProductName

public void setProductName(String name)
Defines the product name wich will be used in the KBugReport dialog. By default it's the appName, but you can overwrite it here to provide support for special components e.g. 'product/component' like 'kontact/summary'.

Parameters: name The name of product

UNKNOWN: Defines the product name wich will be used in the KBugReport dialog.

setProgramLogo

public void setProgramLogo(QImage image)
Defines the program logo. Use this if you need to have application logo in AboutData other than application icon.

Parameters: image logo image.

See Also: KAboutData

UNKNOWN: Defines the program logo.

setProgramName

public void setProgramName(String programName)
Defines the displayable program name string.

Parameters: programName The program name. This string should be marked for translation. Example: I18N_NOOP("Advanced Text Editor").

UNKNOWN: Defines the displayable program name string.

setShortDescription

public void setShortDescription(String shortDescription)
Defines a short description of what the program does.

Parameters: shortDescription The program description This string should be marked for translation. Example: I18N_NOOP("An advanced text editor with syntax highlithing support.").

UNKNOWN: Defines a short description of what the program does.

setTranslator

public void setTranslator(String name, String 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

UNKNOWN: Sets the name of the translator of the gui.

setVersion

public void setVersion(String version)
Defines the program version string.

Parameters: version The program version.

UNKNOWN: Defines the program version string.

shortDescription

public String shortDescription()
Returns a short, translated description.

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

UNKNOWN: Returns a short, translated description.

unsetCustomAuthorText

public void unsetCustomAuthorText()
Clears any custom text displayed around the list of authors and falls back to the default message telling users to send bug reports to bugAddress().

UNKNOWN: Clears any custom text displayed around the list of authors and falls back to the default message telling users to send bug reports to bugAddress().

version

public String version()
Returns the program's version.

Returns: the version string.

UNKNOWN: Returns the program's version.