org.kde.koala
Class KAboutData

java.lang.Object
  extended by org.kde.koala.KAboutData
All Implemented Interfaces:
org.kde.qt.QtSupport

public class KAboutData
extends java.lang.Object
implements org.kde.qt.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)

Field Summary
static int License_Artistic
           
static int License_BSD
           
static int License_Custom
          Descibes the license of the software.
static int License_File
           
static int License_GPL
           
static int License_GPL_V2
           
static int License_LGPL
           
static int License_LGPL_V2
           
static int License_QPL
           
static int License_QPL_V1_0
           
static int License_Unknown
           
 
Constructor Summary
protected KAboutData(java.lang.Class dummy)
           
  KAboutData(java.lang.String appName, java.lang.String programName, java.lang.String version)
           
  KAboutData(java.lang.String appName, java.lang.String programName, java.lang.String version, java.lang.String shortDescription)
           
  KAboutData(java.lang.String appName, java.lang.String programName, java.lang.String version, java.lang.String shortDescription, int licenseType)
           
  KAboutData(java.lang.String appName, java.lang.String programName, java.lang.String version, java.lang.String shortDescription, int licenseType, java.lang.String copyrightStatement)
           
  KAboutData(java.lang.String appName, java.lang.String programName, java.lang.String version, java.lang.String shortDescription, int licenseType, java.lang.String copyrightStatement, java.lang.String text)
           
  KAboutData(java.lang.String appName, java.lang.String programName, java.lang.String version, java.lang.String shortDescription, int licenseType, java.lang.String copyrightStatement, java.lang.String text, java.lang.String homePageAddress)
           
  KAboutData(java.lang.String appName, java.lang.String programName, java.lang.String version, java.lang.String shortDescription, int licenseType, java.lang.String copyrightStatement, java.lang.String text, java.lang.String homePageAddress, java.lang.String bugsEmailAddress)
          Constructor.
 
Method Summary
static java.lang.String aboutTranslationTeam()
          Returns a message about the translation team.
 void addAuthor(java.lang.String name)
           
 void addAuthor(java.lang.String name, java.lang.String task)
           
 void addAuthor(java.lang.String name, java.lang.String task, java.lang.String emailAddress)
           
 void addAuthor(java.lang.String name, java.lang.String task, java.lang.String emailAddress, java.lang.String webAddress)
          Defines an author.
 void addCredit(java.lang.String name)
           
 void addCredit(java.lang.String name, java.lang.String task)
           
 void addCredit(java.lang.String name, java.lang.String task, java.lang.String emailAddress)
           
 void addCredit(java.lang.String name, java.lang.String task, java.lang.String emailAddress, java.lang.String webAddress)
          Defines a person that deserves credit.
 java.lang.String appName()
          Returns the application's internal name.
 java.lang.String bugAddress()
          Returns the email address for bugs.
 java.lang.String copyrightStatement()
          Returns the copyright statement.
 java.lang.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().
 java.lang.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().
 boolean customAuthorTextEnabled()
          Returns whether custom text should be displayed around the list of authors.
 void dispose()
          Delete the wrapped C++ instance ahead of finalize()
protected  void finalize()
          Deletes the wrapped C++ instance
 java.lang.String homepage()
          Returns the application homepage.
 boolean isDisposed()
          Has the wrapped C++ instance been deleted?
 java.lang.String license()
          Returns the license.
 java.lang.String otherText()
          Returns a translated, free form text.
 java.lang.String productName()
          Returns the application's product name, which will be used in KBugReport dialog.
 org.kde.qt.QImage programLogo()
          Returns the program logo image.
 java.lang.String programName()
          Returns the translated program name.
 void setAppName(java.lang.String appName)
          Defines the program name used internally.
 void setBugAddress(java.lang.String bugAddress)
          Defines the address where bug reports should be sent.
 void setCopyrightStatement(java.lang.String copyrightStatement)
          Defines the copyright statement to show when displaying the license.
 void setCustomAuthorText(java.lang.String plainText, java.lang.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().
 void setHomepage(java.lang.String homepage)
          Defines the program homepage.
 void setLicense(int licenseKey)
          Defines the license identifier.
 void setLicenseText(java.lang.String license)
          Defines a license text.
 void setLicenseTextFile(java.lang.String file)
          Defines a license text.
 void setOtherText(java.lang.String otherText)
          Defines the additional text to show in the about dialog.
 void setProductName(java.lang.String name)
          Defines the product name wich will be used in the KBugReport dialog.
 void setProgramLogo(org.kde.qt.QImage image)
          Defines the program logo.
 void setProgramName(java.lang.String programName)
          Defines the displayable program name string.
 void setShortDescription(java.lang.String shortDescription)
          Defines a short description of what the program does.
 void setTranslator(java.lang.String name, java.lang.String emailAddress)
          Sets the name of the translator of the gui.
 void setVersion(java.lang.String version)
          Defines the program version string.
 java.lang.String shortDescription()
          Returns a short, translated description.
 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().
 java.lang.String version()
          Returns the program's version.
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

License_Custom

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

See Also:
Constant Field Values

License_File

public static final int License_File
See Also:
Constant Field Values

License_Unknown

public static final int License_Unknown
See Also:
Constant Field Values

License_GPL

public static final int License_GPL
See Also:
Constant Field Values

License_GPL_V2

public static final int License_GPL_V2
See Also:
Constant Field Values

License_LGPL

public static final int License_LGPL
See Also:
Constant Field Values

License_LGPL_V2

public static final int License_LGPL_V2
See Also:
Constant Field Values

License_BSD

public static final int License_BSD
See Also:
Constant Field Values

License_Artistic

public static final int License_Artistic
See Also:
Constant Field Values

License_QPL

public static final int License_QPL
See Also:
Constant Field Values

License_QPL_V1_0

public static final int License_QPL_V1_0
See Also:
Constant Field Values
Constructor Detail

KAboutData

protected KAboutData(java.lang.Class dummy)

KAboutData

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

KAboutData

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

KAboutData

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

KAboutData

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

KAboutData

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

KAboutData

public KAboutData(java.lang.String appName,
                  java.lang.String programName,
                  java.lang.String version,
                  java.lang.String shortDescription)

KAboutData

public KAboutData(java.lang.String appName,
                  java.lang.String programName,
                  java.lang.String version)
Method Detail

addAuthor

public void addAuthor(java.lang.String name,
                      java.lang.String task,
                      java.lang.String emailAddress,
                      java.lang.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.

addAuthor

public void addAuthor(java.lang.String name,
                      java.lang.String task,
                      java.lang.String emailAddress)

addAuthor

public void addAuthor(java.lang.String name,
                      java.lang.String task)

addAuthor

public void addAuthor(java.lang.String name)

addCredit

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

addCredit

public void addCredit(java.lang.String name,
                      java.lang.String task,
                      java.lang.String emailAddress)

addCredit

public void addCredit(java.lang.String name,
                      java.lang.String task)

addCredit

public void addCredit(java.lang.String name)

setTranslator

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

setLicenseText

public void setLicenseText(java.lang.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.

setLicenseTextFile

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

Parameters:
file - File containing the license text.

setAppName

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

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

setProgramName

public void setProgramName(java.lang.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").

setProgramLogo

public void setProgramLogo(org.kde.qt.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:
programLogo()

setVersion

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

Parameters:
version - The program version.

setShortDescription

public void setShortDescription(java.lang.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.").

setLicense

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

Parameters:
licenseKey - The license identifier.

setCopyrightStatement

public void setCopyrightStatement(java.lang.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.

setOtherText

public void setOtherText(java.lang.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.

setHomepage

public void setHomepage(java.lang.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.

setBugAddress

public void setBugAddress(java.lang.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.

setProductName

public void setProductName(java.lang.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

appName

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

Returns:
the internal program name.

productName

public java.lang.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.

programName

public java.lang.String programName()
Returns the translated program name.

Returns:
the program name (translated).

programLogo

public org.kde.qt.QImage programLogo()
Returns the program logo image.

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

version

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

Returns:
the version string.

shortDescription

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

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

homepage

public java.lang.String homepage()
Returns the application homepage.

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

bugAddress

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

Returns:
the email address where to report bugs.

otherText

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

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

license

public java.lang.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.

copyrightStatement

public java.lang.String copyrightStatement()
Returns the copyright statement.

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

customAuthorPlainText

public java.lang.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.

customAuthorRichText

public java.lang.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.

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.

setCustomAuthorText

public void setCustomAuthorText(java.lang.String plainText,
                                java.lang.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.

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


aboutTranslationTeam

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

Returns:
a message about the translation team

finalize

protected void finalize()
                 throws java.lang.InternalError
Deletes the wrapped C++ instance

Overrides:
finalize in class java.lang.Object
Throws:
java.lang.InternalError

dispose

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


isDisposed

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