# class KAboutData

###

Table of contents
Modules
kdecore Classes
All Classes

Module | kdecore
Namespace | global
Class | KAboutData
Inherits |

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

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 usualy not yet initialized at the point where KAboutData is constructed.

Holds information needed by the "About" box and other classes. Author Espen Sand (espen@kde.org), David Faure (faure@kde.org)

### enums

- LicenseKey = { License_Custom, License_File, License_Unknown, License_GPL, License_GPL_V2, License_LGPL, License_LGPL_V2, License_BSD, License_Artistic, License_QPL, License_QPL_V1_0 }
- NameFormat = { ShortName, FullName }

enum details

### methods

- KAboutData (appName, catalogName, programName, version, shortDescription, licenseType, copyrightStatement, text, homePageAddress, bugsEmailAddress)

  returns a KAboutData object

  Argument | Type | Default
  --- | --- | ---
  appName | QByteArray |
  catalogName | QByteArray |
  programName | KLocalizedString |
  version | QByteArray |
  shortDescription | KLocalizedString | KLocalizedString ()
  licenseType | KAboutData.LicenseKey | KAboutData.License_Unknown
  copyrightStatement | KLocalizedString | KLocalizedString ()
  text | KLocalizedString | KLocalizedString ()
  homePageAddress | QByteArray | QByteArray ()
  bugsEmailAddress | QByteArray | "submit@bugs.kde.org"

  Constructor.

  appName - The program name used internally. Example: "kedit"

  catalogName - The translation catalog name; if null or empty, the appName will be used. You may want the catalog name to differ from program name, for example, when you want to group translations of several smaller utilities under the same catalog.

  programName - A displayable program name string. This string should be marked for translation. Example: ki18n("KEdit")

  version - The program version string.

  shortDescription - A short description of what the program does. This string should be marked for translation. Example: ki18n("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: ki18n("(c) 1999-2000, Name"). The string specified here is not taken verbatim; 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. IMPORTANT: if you set a home page address, this will change the "organization domain" of the application, which is used for automatic DBUS registration.

  See also setOrganizationDomain

  bugsEmailAddress - The bug report email address string. This defaults to the kde.org bug system.

- KAboutData (other)

  returns a KAboutData object

  Argument | Type | Default
  --- | --- | ---
  other | KAboutData |

  Copy constructor. Performs a deep copy.

  other - object to copy

- aboutTranslationTeam ()

  returns (QString)
  static

  Returns a message about the translation team. Returns a message about the translation team

- addAuthor (name, task, emailAddress, webAddress)

  returns (KAboutData)

  Argument | Type | Default
  --- | --- | ---
  name | KLocalizedString |
  task | KLocalizedString | KLocalizedString ()
  emailAddress | QByteArray | QByteArray ()
  webAddress | QByteArray | QByteArray ()

  Defines an author.

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

  name - The developer's name. It should be marked for translation like this: ki18n("Developer Name")

  task - What the person is responsible for. This text can contain newlines. It should be marked for translation like this: ki18n("Task description..."). Can be left empty.

  emailAddress - An Email address where the person can be reached. Can be left empty.

  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 left empty.

- addCredit (name, task, emailAddress, webAddress)

  returns (KAboutData)

  Argument | Type | Default
  --- | --- | ---
  name | KLocalizedString |
  task | KLocalizedString | KLocalizedString ()
  emailAddress | QByteArray | QByteArray ()
  webAddress | QByteArray | QByteArray ()

  Defines a person that deserves credit.

  You can call this function as many times as you need. Each entry is appended to a list.

  name - The person's name. It should be marked for translation like this: ki18n("Contributor Name")

  task - What the person has done to deserve the honor. The text can contain newlines. It should be marked for translation like this: ki18n("Task description...") Can be left empty.

  emailAddress - An email address when the person can be reached. Can be left empty.

  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 left empty.

- appName ()

  returns (QString)

  Returns the application's internal name. Returns the internal program name.

- authors ()

  returns (list of KAboutPerson)

  Returns a list of authors. Returns author information (list of persons).

- bugAddress ()

  returns (QString)

  Returns the email address for bugs. Returns the email address where to report bugs.

- catalogName ()

  returns (QString)

  Returns the program's translation catalog name. Returns the catalog name.

- copyrightStatement ()

  returns (QString)

  Returns the copyright statement. Returns the copyright statement. Can be QString() if not set.

- credits ()

  returns (list of KAboutPerson)

  Returns a list of persons who contributed. Returns credit information (list of persons).

- customAuthorPlainText ()

  returns (QString)

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

- customAuthorRichText ()

  returns (QString)

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

- customAuthorTextEnabled ()

  returns (bool)

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

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

- homepage ()

  returns (QString)

  Returns the application homepage. Returns the application homepage URL. Can be QString() if not set.

- internalBugAddress ()

  returns (char)

  Internal Provided for use by KCrash

- internalProgramName ()

  returns (char)

  Internal Provided for use by KCrash

- internalVersion ()

  returns (char)

  Internal Provided for use by KCrash

- license ()

  returns (QString)

  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.

- licenseName (formatName)

  returns (QString)

  Argument | Type | Default
  --- | --- | ---
  formatName | KAboutData.NameFormat |

  Returns the license name.

  Returns The license name as a string.

- organizationDomain ()

  returns (QString)

  Returns the domain name of the organization that wrote this application.

  Used by the automatic registration to DBus done by KApplication and KUniqueApplication.

- otherText ()

  returns (QString)

  Returns a translated, free form text. Returns the free form text (translated). Can be QString() if not set.

- productName ()

  returns (QString)

  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.

- programLogo ()

  returns (QVariant)

  Returns the program logo image.

  Because KAboutData is in kdecore it cannot use QImage directly, so this is a QVariant containing a QImage.

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

- programName ()

  returns (QString)

  Returns the translated program name. Returns the program name (translated).

- setAppName (appName)

  returns (KAboutData)

  Argument | Type | Default
  --- | --- | ---
  appName | QByteArray |

  Defines the program name used internally.

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

- setBugAddress (bugAddress)

  returns (KAboutData)

  Argument | Type | Default
  --- | --- | ---
  bugAddress | QByteArray |

  Defines the address where bug reports should be sent.

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

- setCatalogName (catalogName)

  returns (KAboutData)

  Argument | Type | Default
  --- | --- | ---
  catalogName | QByteArray |

  Defines the translation catalog that the program uses.

  catalogName - The translation catalog name.

- setCopyrightStatement (copyrightStatement)

  returns (KAboutData)

  Argument | Type | Default
  --- | --- | ---
  copyrightStatement | KLocalizedString |

  Defines the copyright statement to show when displaying the license.

  copyrightStatement - A copyright statement, that can look like this: ki18n("(c) 1999-2000, Name"). The string specified here is taken verbatim; the author information from addAuthor is not used.

- setCustomAuthorText (plainText, richText)

  returns (KAboutData)

  Argument | Type | Default
  --- | --- | ---
  plainText | KLocalizedString |
  richText | KLocalizedString |

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

  plainText - The plain text.

  richText - The rich text.

  Setting both to parameters to KLocalizedString() will cause no message to be displayed at all. Call unsetCustomAuthorText() to revert to the default message.

- setHomepage (homepage)

  returns (KAboutData)

  Argument | Type | Default
  --- | --- | ---
  homepage | QByteArray |

  Defines the program homepage.

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

- setLicense (licenseKey)

  returns (KAboutData)

  Argument | Type | Default
  --- | --- | ---
  licenseKey | KAboutData.LicenseKey |

  Defines the license identifier.

  licenseKey - The license identifier.

- setLicenseText (license)

  returns (KAboutData)

  Argument | Type | Default
  --- | --- | ---
  license | KLocalizedString |

  Defines a license text, which is marked for translation.

  Example:

      setLicenseText( ki18n("This is my license") );

  license - The license text.

- setLicenseTextFile (file)

  returns (KAboutData)

  Argument | Type | Default
  --- | --- | ---
  file | QString |

  Defines a license text by pointing to a file where it resides.

  file - File containing the license text.

- setOrganizationDomain (domain)

  returns (KAboutData)

  Argument | Type | Default
  --- | --- | ---
  domain | QByteArray |

  Defines the Internet domain of the organization that wrote this application. The domain is set to kde.org by default, or the domain of the homePageAddress constructor argument, if set.

  Make sure to call setOrganizationDomain if your product is developed out of the kde.org version-control system.

  Used by the automatic registration to DBus done by KApplication and KUniqueApplication.

  IMPORTANT: if the organization domain is set, the .desktop file that describes your application should have an entry like X-DBUS-ServiceName=reversed_domain.kmyapp For instance kwrite passes "http://www.kate-editor.org" as the homePageAddress so it needs X-DBUS-ServiceName=org.kate-editor.kwrite in its kwrite.desktop file.

  domain - the domain name, for instance kde.org, koffice.org, kdevelop.org, etc.

- setOtherText (otherText)

  returns (KAboutData)

  Argument | Type | Default
  --- | --- | ---
  otherText | KLocalizedString |

  Defines the additional text to show in the about dialog.

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

- setProductName (name)

  returns (KAboutData)

  Argument | Type | Default
  --- | --- | ---
  name | QByteArray |

  Defines the product name which 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. in the form 'product/component', such as 'kontact/summary'.

  name - The name of product

- setProgramLogo (image)

  returns (KAboutData)

  Argument | Type | Default
  --- | --- | ---
  image | QVariant |

  Defines the program logo.

  Use this if you need to have an application logo in AboutData other than the application icon.

  Because KAboutData is in kdecore it cannot use QImage directly, so this is a QVariant that should contain a QImage.

  image - logo image.

  See also programLogo()

- setProgramName (programName)

  returns (KAboutData)

  Argument | Type | Default
  --- | --- | ---
  programName | KLocalizedString |

  Defines the displayable program name string.

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

- setShortDescription (shortDescription)

  returns (KAboutData)

  Argument | Type | Default
  --- | --- | ---
  shortDescription | KLocalizedString |

  Defines a short description of what the program does.

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

- setTranslator (name, emailAddress)

  returns (KAboutData)

  Argument | Type | Default
  --- | --- | ---
  name | KLocalizedString |
  emailAddress | KLocalizedString |

  Sets the name(s) of the translator(s) of the GUI.

  Since this depends on the language, just use a dummy text marked for translation.

  The canonical use is:

      setTranslator(ki18nc("NAME OF TRANSLATORS", "Your names"),
      ki18nc("EMAIL OF TRANSLATORS", "Your 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.

  name - the name(s) of the translator(s)

  emailAddress - the email address(es) of the translator(s)

  See also KAboutTranslator

- setVersion (version)

  returns (KAboutData)

  Argument | Type | Default
  --- | --- | ---
  version | QByteArray |

  Defines the program version string.

  version - The program version.

- shortDescription ()

  returns (QString)

  Returns a short, translated description. Returns the short description (translated). Can be QString() if not set.

- translateInternalProgramName ()

  returns nothing

  Internal Provided for use by KCrash

- translators ()

  returns (list of KAboutPerson)

  Returns a list of translators. Returns translators information (list of persons)

- unsetCustomAuthorText ()

  returns (KAboutData)

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

  returns (QString)

  Returns the program's version. Returns the version string.

### enums - detail

- LicenseKey = { License_Custom, License_File, License_Unknown, License_GPL, License_GPL_V2, License_LGPL, License_LGPL_V2, License_BSD, License_Artistic, License_QPL, License_QPL_V1_0 }

  | License_Custom | - |
  | License_File | - |
  | License_Unknown | - |
  | License_GPL | - |
  | License_GPL_V2 | - |
  | License_LGPL | - |
  | License_LGPL_V2 | - |
  | License_BSD | - |
  | License_Artistic | - |
  | License_QPL | - |
  | License_QPL_V1_0 | - |

- NameFormat = { ShortName, FullName }

  | ShortName | - |
  | FullName | - |