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 ©rightStatement="", 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 ©rightStatement) |
| 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... | |
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.
| 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.
| appName | The program name used internally. Example: "kedit" |
| programName | A displayable program name string. This string should be marked for translation. Example: I18N_NOOP("KEdit") |
| version | The program version string. |
| shortDescription | A short description of what the program does. This string should be marked for translation. Example: I18N_NOOP("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: "(c) 1999-2000, Name". The string specified here is not modified in any manner. 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. |
| bugsEmailAddress | The 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. |
| 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.
| name | The developer's name in UTF-8 encoding. |
| task | What 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. |
| emailAddress | An Email address where the person can be reached. Can be 0. |
| 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 0. |
| 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.
| name | The person's name in UTF-8 encoding. |
| task | What 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. |
| emailAddress | An Email address when the person can be reached. Can be 0. |
| 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 0. |
| std::string Feel::AboutData::appName | ( | ) | const |
Returns the application's internal name.
Referenced by Feel::Simget::name(), Feel::Simget::print(), productName(), setAppName(), and Feel::Environment::~Environment().
| const std::vector< AboutPerson > & Feel::AboutData::authors | ( | ) | const |
Returns a list of authors.
| std::string Feel::AboutData::bugAddress | ( | ) | const |
Returns the email address for bugs.
Referenced by setBugAddress().
| std::string Feel::AboutData::copyrightStatement | ( | ) | const |
Returns the copyright statement.
Referenced by license(), and setCopyrightStatement().
| const std::vector< AboutPerson > & Feel::AboutData::credits | ( | ) | const |
Returns a list of persons who contributed.
| std::string Feel::AboutData::homepage | ( | ) | const |
Returns the application homepage.
Referenced by setHomepage().
| 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.
References copyrightStatement().
| std::string Feel::AboutData::otherText | ( | ) | const |
Returns a translated, free form text.
Referenced by setOtherText().
| 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()
References appName().
Referenced by setProductName().
| std::string Feel::AboutData::programName | ( | ) | const |
Returns the translated program name.
Referenced by setProgramName().
| void Feel::AboutData::setAppName | ( | std::string const & | appName | ) |
Defines the program name used internally.
| appName | The application name. Example: "kate". |
References appName().
| void Feel::AboutData::setBugAddress | ( | std::string const & | bugAddress | ) |
Defines the address where bug reports should be sent.
| bugAddress | The 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.
| copyrightStatement | A 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.
| homepage | The 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.
| licenseKey | The 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:
NOTE: No copy of the text is made.
| license | The license text in utf8 encoding. |
| void Feel::AboutData::setOtherText | ( | std::string const & | otherText | ) |
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. |
References otherText().
| 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'.
| name | The name of product |
References productName().
| void Feel::AboutData::setProgramName | ( | std::string const & | programName | ) |
Defines the displayable program name string.
| programName | The 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.
| shortDescription | The 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 | ( | std::string const & | version | ) |
Defines the program version string.
| version | The program version. |
| std::string Feel::AboutData::shortDescription | ( | ) | const |
Returns a short, translated description.
Referenced by setShortDescription().
| std::string Feel::AboutData::version | ( | ) | const |
Returns the program's version.