Logo  0.95.0-final
Finite Element Embedded Library and Language in C++
Feel++ Feel++ on Github Feel++ community
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Feel::AboutData Class Reference

#include <about.hpp>

Detailed Description

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

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.

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

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
}
 

Public Member Functions

 AboutData (const char *appName="feel++", const char *programName="feel++", const char *version=Info::versionString(), const char *shortDescription="", int licenseType=License_GPL_V3, const char *copyrightStatement="", const char *text="", const char *homePageAddress="", const char *bugsEmailAddress="feelpp-devel@feelpp.org")
 
 AboutData (AboutData const &ad)
 
void addAuthor (std::string const &name, std::string const &task=0, std::string const &emailAddress=0, std::string const &webAddress=0)
 
void addCredit (std::string const &name, std::string const &task=0, std::string const &emailAddress=0, std::string const &webAddress=0)
 
std::string appName () const
 
const std::vector< AboutPerson > & authors () const
 
std::string bugAddress () const
 
std::string copyrightStatement () const
 
const std::vector< AboutPerson > & credits () const
 
std::string homepage () const
 
std::string license () const
 
std::string otherText () const
 
std::string productName () const
 
std::string programName () const
 
void setAppName (std::string const &appName)
 
void setBugAddress (std::string const &bugAddress)
 
void setCopyrightStatement (std::string const &copyrightStatement)
 
void setHomepage (std::string const &homepage)
 
void setLicense (LicenseKey licenseKey)
 
void setLicenseText (std::string const &license)
 
void setOtherText (std::string const &otherText)
 
void setProductName (std::string const &name)
 
void setProgramName (const char *programName)
 
void setShortDescription (std::string const &shortDescription)
 
void setVersion (const char *version)
 
std::string shortDescription () const
 
std::string version () const
 

Member Enumeration Documentation

Descibes the license of the software.

Constructor & Destructor Documentation

Feel::AboutData::AboutData ( const char *  appName = "feel++",
const char *  programName = "feel++",
const char *  version = Info::versionString(),
const char *  shortDescription = "",
int  licenseType = License_GPL_V3,
const char *  copyrightStatement = "",
const char *  text = "",
const char *  homePageAddress = "",
const char *  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.

References appName().

Member Function Documentation

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

Returns the application's internal name.

Returns
the internal program name.
const std::vector< AboutPerson > & Feel::AboutData::authors ( ) const

Returns a list of authors.

Returns
author information (list of persons).
std::string Feel::AboutData::bugAddress ( ) const

Returns the email address for bugs.

Returns
the email address where to report bugs.
std::string Feel::AboutData::copyrightStatement ( ) const

Returns the copyright statement.

Returns
the copyright statement. Can be std::string::null if not set.
const std::vector< AboutPerson > & Feel::AboutData::credits ( ) const

Returns a list of persons who contributed.

Returns
credit information (list of persons).
std::string Feel::AboutData::homepage ( ) const

Returns the application homepage.

Returns
the application homepage URL. Can be std::string::null if not set.
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().

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

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

Returns the translated program name.

Returns
the program name (translated).
void Feel::AboutData::setAppName ( std::string const &  appName)

Defines the program name used internally.

Parameters
appNameThe application name. Example: "kate".

References appName().

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

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

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

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

Defines the license identifier.

Parameters
licenseKeyThe license identifier.
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"));
*

NOTE: No copy of the text is made.

Parameters
licenseThe license text in utf8 encoding.
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().

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

References productName().

void Feel::AboutData::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").

References programName().

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

void Feel::AboutData::setVersion ( const char *  version)

Defines the program version string.

Parameters
versionThe program version.

References version().

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

Returns a short, translated description.

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

Returns the program's version.

Returns
the version string.

The documentation for this class was generated from the following files:

Generated on Sun Dec 22 2013 13:11:16 for Feel++ by doxygen 1.8.5