• Skip to content
  • Skip to link menu
Trinity API Reference
  • Trinity API Reference
  • tdecore
 

tdecore

Public Types | Public Member Functions | Static Public Member Functions | List of all members
TDEAboutData Class Reference

#include <tdeaboutdata.h>

Public Types

enum  LicenseKey {
  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 , License_MIT = 8
}
 

Public Member Functions

 TDEAboutData (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=0)
 
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 TQString &file)
 
void setAppName (const char *appName)
 
void setProgramName (const char *programName)
 
void setProgramLogo (const TQImage &image)
 
void setVersion (const char *version)
 
void setShortDescription (const char *shortDescription)
 
void setLicense (LicenseKey licenseKey)
 
void setCopyrightStatement (const char *copyrightStatement)
 
void setOtherText (const char *otherText)
 
void setHomepage (const char *homepage)
 
void setBugAddress (const char *bugAddress)
 
void setProductName (const char *name)
 
const char * appName () const
 
const char * productName () const
 
TQString programName () const
 
const char * internalProgramName () const
 
void translateInternalProgramName () const
 
TQImage programLogo () const
 
TQString version () const
 
const char * internalVersion () const
 
TQString shortDescription () const
 
TQString homepage () const
 
TQString bugAddress () const
 
const char * internalBugAddress () const
 
const TQValueList< TDEAboutPerson > authors () const
 
const TQValueList< TDEAboutPerson > credits () const
 
const TQValueList< TDEAboutTranslator > translators () const
 
TQString otherText () const
 
TQString license () const
 
TQString copyrightStatement () const
 
TQString customAuthorPlainText () const
 
TQString customAuthorRichText () const
 
bool customAuthorTextEnabled () const
 
void setCustomAuthorText (const TQString &plainText, const TQString &richText)
 
void unsetCustomAuthorText ()
 

Static Public Member Functions

static TQString aboutTranslationTeam ()
 

Detailed Description

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 TDEAboutPerson), license and copyright information.

Currently, the values set here are shown by the "About" box (see TDEAboutDialog), used by the bug report dialog (see KBugReport), and by the help shown on command line (see TDECmdLineArgs).

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

Author
Espen Sand (espen.nosp@m.@kde.nosp@m..org), David Faure (faure.nosp@m.@kde.nosp@m..org)

Definition at line 182 of file tdeaboutdata.h.

Member Enumeration Documentation

◆ LicenseKey

enum TDEAboutData::LicenseKey

Descibes the license of the software.

Definition at line 188 of file tdeaboutdata.h.

Constructor & Destructor Documentation

◆ TDEAboutData()

TDEAboutData::TDEAboutData ( 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 = 0 
)

Constructor.

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

Definition at line 101 of file tdeaboutdata.cpp.

◆ ~TDEAboutData()

TDEAboutData::~TDEAboutData ( )

Definition at line 133 of file tdeaboutdata.cpp.

Member Function Documentation

◆ aboutTranslationTeam()

TQString TDEAboutData::aboutTranslationTeam ( )
static

Returns a message about the translation team.

Returns
a message about the translation team

Definition at line 385 of file tdeaboutdata.cpp.

◆ addAuthor()

void TDEAboutData::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
nameThe developer's name in UTF-8 encoding.
taskWhat 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.
emailAddressAn Email address where the person can be reached. Can be 0.
webAddressThe person's homepage or a relevant link. Start the address with "http://". "http://some.domain" is correct, "some.domain" is not. Can be 0.

Definition at line 141 of file tdeaboutdata.cpp.

◆ addCredit()

void TDEAboutData::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
nameThe person's name in UTF-8 encoding.
taskWhat 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.
emailAddressAn Email address when the person can be reached. Can be 0.
webAddressThe 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.

Definition at line 148 of file tdeaboutdata.cpp.

◆ appName()

const char * TDEAboutData::appName ( ) const

Returns the application's internal name.

Returns
the internal program name.

Definition at line 237 of file tdeaboutdata.cpp.

◆ authors()

const TQValueList< TDEAboutPerson > TDEAboutData::authors ( ) const

Returns a list of authors.

Returns
author information (list of persons).

Definition at line 324 of file tdeaboutdata.cpp.

◆ bugAddress()

TQString TDEAboutData::bugAddress ( ) const

Returns the email address for bugs.

Returns
the email address where to report bugs.

Definition at line 318 of file tdeaboutdata.cpp.

◆ copyrightStatement()

TQString TDEAboutData::copyrightStatement ( ) const

Returns the copyright statement.

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

Definition at line 483 of file tdeaboutdata.cpp.

◆ credits()

const TQValueList< TDEAboutPerson > TDEAboutData::credits ( ) const

Returns a list of persons who contributed.

Returns
credit information (list of persons).

Definition at line 330 of file tdeaboutdata.cpp.

◆ customAuthorPlainText()

TQString TDEAboutData::customAuthorPlainText ( ) const

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 TQString::null.

Definition at line 492 of file tdeaboutdata.cpp.

◆ customAuthorRichText()

TQString TDEAboutData::customAuthorRichText ( ) const

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 TQString::null.

Definition at line 498 of file tdeaboutdata.cpp.

◆ customAuthorTextEnabled()

bool TDEAboutData::customAuthorTextEnabled ( ) const

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

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

Definition at line 504 of file tdeaboutdata.cpp.

◆ homepage()

TQString TDEAboutData::homepage ( ) const

Returns the application homepage.

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

Definition at line 312 of file tdeaboutdata.cpp.

◆ internalBugAddress()

const char * TDEAboutData::internalBugAddress ( ) const
inline

Definition at line 521 of file tdeaboutdata.h.

◆ internalProgramName()

const char * TDEAboutData::internalProgramName ( ) const

Definition at line 261 of file tdeaboutdata.cpp.

◆ internalVersion()

const char * TDEAboutData::internalVersion ( ) const
inline

Definition at line 496 of file tdeaboutdata.h.

◆ license()

TQString TDEAboutData::license ( ) const

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.

Definition at line 408 of file tdeaboutdata.cpp.

◆ otherText()

TQString TDEAboutData::otherText ( ) const

Returns a translated, free form text.

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

Definition at line 398 of file tdeaboutdata.cpp.

◆ productName()

const char * TDEAboutData::productName ( ) const

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.

Definition at line 243 of file tdeaboutdata.cpp.

◆ programLogo()

TQImage TDEAboutData::programLogo ( ) const

Returns the program logo image.

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

Definition at line 282 of file tdeaboutdata.cpp.

◆ programName()

TQString TDEAboutData::programName ( ) const

Returns the translated program name.

Returns
the program name (translated).

Definition at line 252 of file tdeaboutdata.cpp.

◆ setAppName()

void TDEAboutData::setAppName ( const char *  appName)

Defines the program name used internally.

Parameters
appNameThe application name. Example: "kate".

Definition at line 176 of file tdeaboutdata.cpp.

◆ setBugAddress()

void TDEAboutData::setBugAddress ( const char *  bugAddress)

Defines the address where bug reports should be sent.

Parameters
bugAddressThe bug report email address string. This defaults to the kde.org bug system.

Definition at line 225 of file tdeaboutdata.cpp.

◆ setCopyrightStatement()

void TDEAboutData::setCopyrightStatement ( const char *  copyrightStatement)

Defines the copyright statement to show when displaying the license.

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

Definition at line 207 of file tdeaboutdata.cpp.

◆ setCustomAuthorText()

void TDEAboutData::setCustomAuthorText ( const TQString &  plainText,
const TQString &  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
plainTextThe plain text.
richTextThe rich text.

Both parameters can be TQString::null to not display any message at all. Call unsetCustomAuthorText() to revert to the default mesage.

Definition at line 510 of file tdeaboutdata.cpp.

◆ setHomepage()

void TDEAboutData::setHomepage ( const char *  homepage)

Defines the program homepage.

Parameters
homepageThe program homepage string. Start the address with "http://". "http://kate-editor.org/" is is correct, "kate-editor.org" is not.

Definition at line 219 of file tdeaboutdata.cpp.

◆ setLicense()

void TDEAboutData::setLicense ( LicenseKey  licenseKey)

Defines the license identifier.

Parameters
licenseKeyThe license identifier.

Definition at line 201 of file tdeaboutdata.cpp.

◆ setLicenseText()

void TDEAboutData::setLicenseText ( const char *  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"));
TDEAboutData::setLicenseText
void setLicenseText(const char *license)
Defines a license text.
Definition: tdeaboutdata.cpp:162

NOTE: No copy of the text is made.

Parameters
licenseThe license text in utf8 encoding.

Definition at line 162 of file tdeaboutdata.cpp.

◆ setLicenseTextFile()

void TDEAboutData::setLicenseTextFile ( const TQString &  file)

Defines a license text.

Parameters
fileFile containing the license text.

Definition at line 169 of file tdeaboutdata.cpp.

◆ setOtherText()

void TDEAboutData::setOtherText ( const char *  otherText)

Defines the additional text to show in the about dialog.

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

Definition at line 213 of file tdeaboutdata.cpp.

◆ setProductName()

void TDEAboutData::setProductName ( const char *  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
nameThe name of product

Definition at line 231 of file tdeaboutdata.cpp.

◆ setProgramLogo()

void TDEAboutData::setProgramLogo ( const TQImage &  image)

Defines the program logo.

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

Parameters
imagelogo image.
See also
programLogo()
Since
3.4

Definition at line 288 of file tdeaboutdata.cpp.

◆ setProgramName()

void TDEAboutData::setProgramName ( const char *  programName)

Defines the displayable program name string.

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

Definition at line 182 of file tdeaboutdata.cpp.

◆ setShortDescription()

void TDEAboutData::setShortDescription ( const char *  shortDescription)

Defines a short description of what the program does.

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

Definition at line 195 of file tdeaboutdata.cpp.

◆ setTranslator()

void TDEAboutData::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"));
TDEAboutData::setTranslator
void setTranslator(const char *name, const char *emailAddress)
Sets the name of the translator of the gui.
Definition: tdeaboutdata.cpp:155

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
namethe name of the translator
emailAddressthe email address of the translator
See also
TDEAboutTranslator

Definition at line 155 of file tdeaboutdata.cpp.

◆ setVersion()

void TDEAboutData::setVersion ( const char *  version)

Defines the program version string.

Parameters
versionThe program version.

Definition at line 189 of file tdeaboutdata.cpp.

◆ shortDescription()

TQString TDEAboutData::shortDescription ( ) const

Returns a short, translated description.

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

Definition at line 303 of file tdeaboutdata.cpp.

◆ translateInternalProgramName()

void TDEAboutData::translateInternalProgramName ( ) const

Definition at line 273 of file tdeaboutdata.cpp.

◆ translators()

const TQValueList< TDEAboutTranslator > TDEAboutData::translators ( ) const

Returns a list of translators.

Returns
translators information (list of persons)

Definition at line 336 of file tdeaboutdata.cpp.

◆ unsetCustomAuthorText()

void TDEAboutData::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().

Definition at line 519 of file tdeaboutdata.cpp.

◆ version()

TQString TDEAboutData::version ( ) const

Returns the program's version.

Returns
the version string.

Definition at line 297 of file tdeaboutdata.cpp.


The documentation for this class was generated from the following files:
  • tdeaboutdata.h
  • tdeaboutdata.cpp

tdecore

Skip menu "tdecore"
  • Main Page
  • Modules
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

tdecore

Skip menu "tdecore"
  • arts
  • dcop
  • dnssd
  • interfaces
  •   kspeech
  •     interface
  •     library
  •   tdetexteditor
  • kate
  • kded
  • kdoctools
  • kimgio
  • kjs
  • libtdemid
  • libtdescreensaver
  • tdeabc
  • tdecmshell
  • tdecore
  • tdefx
  • tdehtml
  • tdeinit
  • tdeio
  •   bookmarks
  •   httpfilter
  •   kpasswdserver
  •   kssl
  •   tdefile
  •   tdeio
  •   tdeioexec
  • tdeioslave
  •   http
  • tdemdi
  •   tdemdi
  • tdenewstuff
  • tdeparts
  • tdeprint
  • tderandr
  • tderesources
  • tdespell2
  • tdesu
  • tdeui
  • tdeunittest
  • tdeutils
  • tdewallet
Generated for tdecore by doxygen 1.9.4
This website is maintained by Timothy Pearson.