Feel++ 0.111.0-preview.14
Finite Element Embedded Library in C++
Feel::AboutData Class Reference

This class is used to store information about a program. More...

+ Collaboration diagram for Feel::AboutData:

Public Types

enum  LicenseKey {
  License_Custom = -2 , License_File = -1 , License_Unknown = 0 , License_GPL = 1 ,
  License_GPL_V2 = 1 , License_GPL_V3 = 1 , License_LGPL = 2 , License_LGPL_V2 = 2 ,
  License_LGPL_V3 = 2 , License_BSD = 3 , License_Artistic = 4 , License_QPL = 5 ,
  License_QPL_V1_0 = 5
}
 Descibes the license of the software.
 

Public Member Functions

 AboutData (AboutData const &ad)
 
 AboutData (std::string const &appName="feel++", std::string const &programName="feel++", std::string const &version=Info::versionString(), std::string const &shortDescription="", int licenseType=License_GPL_V3, std::string const &copyrightStatement="", std::string const &text="", std::string const &homePageAddress="", std::string const &bugsEmailAddress="feelpp-devel@feelpp.org")
 Constructor. More...
 
void addAuthor (std::string const &name, std::string const &task="", std::string const &emailAddress="", std::string const &webAddress="")
 Defines an author. More...
 
void addCredit (std::string const &name, std::string const &task="", std::string const &emailAddress="", std::string const &webAddress="")
 Defines a person that deserves credit. More...
 
std::string appName () const
 Returns the application's internal name. More...
 
const std::vector< AboutPerson > & authors () const
 Returns a list of authors. More...
 
std::string bugAddress () const
 Returns the email address for bugs. More...
 
std::string copyrightStatement () const
 Returns the copyright statement. More...
 
const std::vector< AboutPerson > & credits () const
 Returns a list of persons who contributed. More...
 
std::string homepage () const
 Returns the application homepage. More...
 
std::string license () const
 Returns the license. More...
 
std::string otherText () const
 Returns a translated, free form text. More...
 
std::string productName () const
 Returns the application's product name, which will be used in KBugReport dialog. More...
 
std::string programName () const
 Returns the translated program name. More...
 
void setAppName (std::string const &appName)
 Defines the program name used internally. More...
 
void setBugAddress (std::string const &bugAddress)
 Defines the address where bug reports should be sent. More...
 
void setCopyrightStatement (std::string const &copyrightStatement)
 Defines the copyright statement to show when displaying the license. More...
 
void setHomepage (std::string const &homepage)
 Defines the program homepage. More...
 
void setLicense (LicenseKey licenseKey)
 Defines the license identifier. More...
 
void setLicenseText (std::string const &license)
 Defines a license text. More...
 
void setOtherText (std::string const &otherText)
 Defines the additional text to show in the about dialog. More...
 
void setProductName (std::string const &name)
 Defines the product name which will be used in the KBugReport dialog. More...
 
void setProgramName (std::string const &programName)
 Defines the displayable program name string. More...
 
void setShortDescription (std::string const &shortDescription)
 Defines a short description of what the program does. More...
 
void setVersion (std::string const &version)
 Defines the program version string. More...
 
std::string shortDescription () const
 Returns a short, translated description. More...
 
std::string version () const
 Returns the program's version. More...
 

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

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

Author
Christophe Prud'homme chris.nosp@m.toph.nosp@m.e.pru.nosp@m.dhom.nosp@m.me@fe.nosp@m.elpp.nosp@m..org

Constructor & Destructor Documentation

◆ AboutData()

Feel::AboutData::AboutData ( std::string const &  appName = "feel++",
std::string const &  programName = "feel++",
std::string const &  version = Info::versionString(),
std::string const &  shortDescription = "",
int  licenseType = License_GPL_V3,
std::string const &  copyrightStatement = "",
std::string const &  text = "",
std::string const &  homePageAddress = "",
std::string const &  bugsEmailAddress = "feelpp-devel@feelpp.org" 
)

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 feelp.nosp@m.p-de.nosp@m.v@fee.nosp@m.lpp..nosp@m.org mailing list.

Member Function Documentation

◆ addAuthor()

void Feel::AboutData::addAuthor ( std::string const &  name,
std::string const &  task = "",
std::string const &  emailAddress = "",
std::string const &  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
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 is correct, "some.domain" is not. Can be 0.

◆ addCredit()

void Feel::AboutData::addCredit ( std::string const &  name,
std::string const &  task = "",
std::string const &  emailAddress = "",
std::string const &  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
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.

◆ appName()

std::string Feel::AboutData::appName ( ) const

Returns the application's internal name.

Returns
the internal program name.

Referenced by Feel::Simget::name(), Feel::Simget::print(), productName(), setAppName(), and Feel::Environment::~Environment().

◆ authors()

const std::vector< AboutPerson > & Feel::AboutData::authors ( ) const

Returns a list of authors.

Returns
author information (list of persons).

◆ bugAddress()

std::string Feel::AboutData::bugAddress ( ) const

Returns the email address for bugs.

Returns
the email address where to report bugs.

Referenced by setBugAddress().

◆ copyrightStatement()

std::string Feel::AboutData::copyrightStatement ( ) const

Returns the copyright statement.

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

Referenced by license(), and setCopyrightStatement().

◆ credits()

const std::vector< AboutPerson > & Feel::AboutData::credits ( ) const

Returns a list of persons who contributed.

Returns
credit information (list of persons).

◆ homepage()

std::string Feel::AboutData::homepage ( ) const

Returns the application homepage.

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

Referenced by setHomepage().

◆ license()

std::string Feel::AboutData::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.

References copyrightStatement().

◆ otherText()

std::string Feel::AboutData::otherText ( ) const

Returns a translated, free form text.

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

Referenced by setOtherText().

◆ productName()

std::string Feel::AboutData::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.

References appName().

Referenced by setProductName().

◆ programName()

std::string Feel::AboutData::programName ( ) const

Returns the translated program name.

Returns
the program name (translated).

Referenced by setProgramName().

◆ setAppName()

void Feel::AboutData::setAppName ( std::string const &  appName)

Defines the program name used internally.

Parameters
appNameThe application name. Example: "kate".

References appName().

◆ setBugAddress()

void Feel::AboutData::setBugAddress ( std::string const &  bugAddress)

Defines the address where bug reports should be sent.

Parameters
bugAddressThe bug report email address string. This defaults to the feel-dev@ mailing list.

References bugAddress().

◆ setCopyrightStatement()

void Feel::AboutData::setCopyrightStatement ( std::string const &  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.

References copyrightStatement().

◆ setHomepage()

void Feel::AboutData::setHomepage ( std::string const &  homepage)

Defines the program homepage.

Parameters
homepageThe program homepage string. Start the address with "http://". "http://www.feel.org" is is correct, "www.feel.org" is not.

References homepage().

◆ setLicense()

void Feel::AboutData::setLicense ( LicenseKey  licenseKey)

Defines the license identifier.

Parameters
licenseKeyThe license identifier.

◆ setLicenseText()

void Feel::AboutData::setLicenseText ( std::string const &  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"));
void setLicenseText(std::string const &license)
Defines a license text.
Definition: about.cpp:155

NOTE: No copy of the text is made.

Parameters
licenseThe license text in utf8 encoding.

◆ setOtherText()

void Feel::AboutData::setOtherText ( std::string const &  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.

References otherText().

◆ setProductName()

void Feel::AboutData::setProductName ( std::string const &  name)

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. 'product/component' like 'kontact/summary'.

Parameters
nameThe name of product

References productName().

◆ setProgramName()

void Feel::AboutData::setProgramName ( std::string const &  programName)

Defines the displayable program name string.

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

References programName().

◆ setShortDescription()

void Feel::AboutData::setShortDescription ( std::string const &  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.").

References shortDescription().

◆ setVersion()

void Feel::AboutData::setVersion ( std::string const &  version)

Defines the program version string.

Parameters
versionThe program version.

◆ shortDescription()

std::string Feel::AboutData::shortDescription ( ) const

Returns a short, translated description.

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

Referenced by setShortDescription().

◆ version()

std::string Feel::AboutData::version ( ) const

Returns the program's version.

Returns
the version string.