Feel++ 0.91.0
|
Holds information needed by the "About" box and other classes. More...
#include <about.hpp>
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 } |
Public Member Functions | |
AboutData (const char *appName, const char *programName, const char *version, const char *shortDescription="", int licenseType=License_Unknown, const char *copyrightStatement="", const char *text="", const char *homePageAddress="", const char *bugsEmailAddress="feel-dev@webmail.polimi.it") | |
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) |
void | setLicenseText (std::string const &license) |
void | setAppName (std::string const &appName) |
void | setProgramName (const char *programName) |
void | setVersion (const char *version) |
void | setShortDescription (std::string const &shortDescription) |
void | setLicense (LicenseKey licenseKey) |
void | setCopyrightStatement (std::string const ©rightStatement) |
void | setOtherText (std::string const &otherText) |
void | setHomepage (std::string const &homepage) |
void | setBugAddress (std::string const &bugAddress) |
void | setProductName (std::string const &name) |
std::string | appName () const |
std::string | productName () const |
std::string | programName () const |
std::string | version () const |
std::string | shortDescription () const |
std::string | homepage () const |
std::string | bugAddress () const |
const std::vector< AboutPerson > & | authors () const |
const std::vector< AboutPerson > & | credits () const |
std::string | otherText () const |
std::string | license () const |
std::string | copyrightStatement () const |
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.
Descibes the license of the software.
Feel::AboutData::AboutData | ( | const char * | appName, |
const char * | programName, | ||
const char * | version, | ||
const char * | shortDescription = "" , |
||
int | licenseType = License_Unknown , |
||
const char * | copyrightStatement = "" , |
||
const char * | text = "" , |
||
const char * | homePageAddress = "" , |
||
const char * | bugsEmailAddress = "feel-dev@webmail.polimi.it" |
||
) |
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 feel-dev@webmail.polimi.it mailing list. |
References appName().
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.
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. |
Referenced by makeAbout().
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.
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 AboutData(), Feel::Application::doOptions(), productName(), and setAppName().
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:
setLicenseText( I18N_NOOP("This is my license"));
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 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'.
name | The name of product |
References productName().
void Feel::AboutData::setProgramName | ( | const char * | 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 | ( | const char * | version | ) |
std::string Feel::AboutData::shortDescription | ( | ) | const |
Returns a short, translated description.
Referenced by setShortDescription().
std::string Feel::AboutData::version | ( | ) | const |