# class KAboutData

###

Module | kdecore
Namespace |
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). They are also used for the icon and the name of the program's windows.

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 usually 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, License_GPL_V3, License_LGPL_V3 }
- 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 ctor

  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 or setLicenseTextFile 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 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 ctor

  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.

- addLicense (licenseKey)

  returns KAboutData
  KDE 4.1.0 and later only

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

  Adds a license identifier.

  If there is only one unknown license set, e.g. by using the default parameter in the constructor, that one is replaced.

  licenseKey - The license identifier.

  See also setLicenseText, addLicenseText, addLicenseTextFile @since 4.1

- addLicenseText (license)

  returns KAboutData
  KDE 4.1.0 and later only

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

  Adds a license text, which is marked for translation.

  If there is only one unknown license set, e.g. by using the default parameter in the constructor, that one is replaced.

  Example:

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

  license - The license text.

  See also setLicenseText, addLicense, addLicenseTextFile @since 4.1

- addLicenseTextFile (file)

  returns KAboutData
  KDE 4.1.0 and later only

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

  Adds a license text by pointing to a file where it resides. The file format has to be plain text in an encoding compatible to the locale.

  If there is only one unknown license set, e.g. by using the default parameter in the constructor, that one is replaced.

  file - Path to the file in the local filesystem containing the license text.

  See also addLicenseText, addLicense, setLicenseTextFile @since 4.1

- appName ( )

  returns QString

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

- authors ( )

  returns QList<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 QList<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.

  Deprecated There could be multiple licenses, use licenses() instead.

- licenseName (formatName)

  returns QString

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

  Returns the license name.

  Returns The license name as a string.

  Deprecated There could be multiple licenses, use licenses() instead.

- licenses ( )

  returns QList<KAboutLicense>
  KDE 4.1.0 and later only

  Returns a list of licenses.

  Returns licenses information (list of licenses) @since 4.1

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

- programIconName ( )

  returns QString
  KDE 4.1.0 and later only

  Returns the program's icon name.

  The default value is appName . Use setProgramIconName if you need to have an icon whose name is different from the internal application name.

  Returns the program's icon name.

  See also setProgramIconName() @since 4.1

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

  See also addLicenseText, setLicenseText, setLicenseTextFile

- 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. The file format has to be plain text in an encoding compatible to the locale.

  file - Path to the file in the local filesystem 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

- setProgramIconName (iconName)

  returns KAboutData
  KDE 4.1.0 and later only

  Argument | Type | Default
  --- | --- | ---
  iconName | QString |

  Defines the program icon.

  Use this if you need to have an application icon whose name is different than the application name.

  iconName - name of the icon. Example: "accessories-text-editor"

  See also programIconName() @since 4.1

- 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 QList<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_GPL_V3, License_LGPL_V3 }

  Describes the license of the software.

  | 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 | - |
  | License_GPL_V3 | - 6 | - |
  | License_LGPL_V3 | - 7 | - |

- 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 }

  Format of the license name.

  | ShortName | - | - |
  | FullName | - | - |