KCoreAddons
kaboutdata.cpp
47 KAboutPerson::KAboutPerson(const QString &_name, const QString &_task, const QString &_emailAddress, const QString &_webAddress, const QString &_ocsUsername)
108 KAboutLicensePrivate(KAboutLicense::LicenseKey licenseType, KAboutLicense::VersionRestriction versionRestriction, const KAboutData *aboutData);
173 KAboutLicense::KAboutLicense(LicenseKey licenseType, VersionRestriction versionRestriction, const KAboutData *aboutData)
272 pathToFile = QStandardPaths::locate(QStandardPaths::GenericDataLocation, QStringLiteral("kf" QT_STRINGIFY(QT_VERSION_MAJOR) "/licenses/") + pathToFile);
273 result += QCoreApplication::translate("KAboutLicense", "This program is distributed under the terms of the %1.").arg(name(KAboutLicense::ShortName));
297 // Expressions can in theory also contain AND, OR and () to build constructs involving more than
317 licenseShort = QCoreApplication::translate("KAboutLicense", "GPL v2", "@item license (short name)");
318 licenseFull = QCoreApplication::translate("KAboutLicense", "GNU General Public License Version 2", "@item license");
321 licenseShort = QCoreApplication::translate("KAboutLicense", "LGPL v2", "@item license (short name)");
322 licenseFull = QCoreApplication::translate("KAboutLicense", "GNU Lesser General Public License Version 2", "@item license");
325 licenseShort = QCoreApplication::translate("KAboutLicense", "BSD License", "@item license (short name)");
329 licenseShort = QCoreApplication::translate("KAboutLicense", "Artistic License", "@item license (short name)");
330 licenseFull = QCoreApplication::translate("KAboutLicense", "Artistic License", "@item license");
333 licenseShort = QCoreApplication::translate("KAboutLicense", "QPL v1.0", "@item license (short name)");
334 licenseFull = QCoreApplication::translate("KAboutLicense", "Q Public License", "@item license");
337 licenseShort = QCoreApplication::translate("KAboutLicense", "GPL v3", "@item license (short name)");
338 licenseFull = QCoreApplication::translate("KAboutLicense", "GNU General Public License Version 3", "@item license");
341 licenseShort = QCoreApplication::translate("KAboutLicense", "LGPL v3", "@item license (short name)");
342 licenseFull = QCoreApplication::translate("KAboutLicense", "GNU Lesser General Public License Version 3", "@item license");
345 licenseShort = QCoreApplication::translate("KAboutLicense", "LGPL v2.1", "@item license (short name)");
346 licenseFull = QCoreApplication::translate("KAboutLicense", "GNU Lesser General Public License Version 2.1", "@item license");
350 licenseShort = licenseFull = QCoreApplication::translate("KAboutLicense", "Custom", "@item license");
353 licenseShort = licenseFull = QCoreApplication::translate("KAboutLicense", "Not specified", "@item license");
356 const QString result = (formatName == KAboutLicense::ShortName) ? licenseShort : (formatName == KAboutLicense::FullName) ? licenseFull : QString();
512 static QList<KAboutPerson> parseTranslators(const QString &translatorName, const QString &translatorEmail);
560 // KF6: do not set a default desktopFileName value here, but remove this code and leave it empty
570 KAboutData::KAboutData(const QString &_componentName, const QString &_displayName, const QString &_version)
589 // KF6: do not set a default desktopFileName value here, but remove this code and leave it empty
639 KAboutData &KAboutData::addAuthor(const QString &name, const QString &task, const QString &emailAddress, const QString &webAddress, const QString &ocsUsername)
645 KAboutData &KAboutData::addCredit(const QString &name, const QString &task, const QString &emailAddress, const QString &webAddress, const QString &ocsUsername)
668 KAboutData::addComponent(const QString &name, const QString &description, const QString &version, const QString &webAddress, const QString &pathToLicenseFile)
670 d->_componentList.append(KAboutComponent(name, description, version, webAddress, pathToLicenseFile));
753 KAboutData &KAboutData::setLicense(KAboutLicense::LicenseKey licenseKey, KAboutLicense::VersionRestriction versionRestriction)
764 KAboutData &KAboutData::addLicense(KAboutLicense::LicenseKey licenseKey, KAboutLicense::VersionRestriction versionRestriction)
929 QList<KAboutPerson> KAboutDataPrivate::parseTranslators(const QString &translatorName, const QString &translatorEmail)
1086 void warnIfOutOfSync(const char *aboutDataString, const QString &aboutDataValue, const char *appDataString, const QString &appDataValue)
1089 qCWarning(KABOUTDATA) << appDataString << appDataValue << "is out-of-sync with" << aboutDataString << aboutDataValue;
1115 qCWarning(KABOUTDATA) << "Could not initialize the properties of KAboutData::applicationData by the equivalent properties from Q*Application: no "
1170 qCWarning(KABOUTDATA) << "Could not initialize the equivalent properties of Q*Application: no instance (yet) existing.";
1173 // KF6: Rethink the current relation between KAboutData::applicationData and the Q*Application metadata
1225 return parser->addOption(QCommandLineOption(QStringLiteral("author"), QCoreApplication::translate("KAboutData CLI", "Show author information.")))
1226 && parser->addOption(QCommandLineOption(QStringLiteral("license"), QCoreApplication::translate("KAboutData CLI", "Show license information.")))
1228 QCoreApplication::translate("KAboutData CLI", "The base file name of the desktop entry for this application."),
1239 qPrintable(QCoreApplication::translate("KAboutData CLI", "This application was written by somebody who wants to remain anonymous.")));
1241 printf("%s\n", qPrintable(QCoreApplication::translate("KAboutData CLI", "%1 was written by:").arg(qAppName())));
1252 printf("%s\n", qPrintable(QCoreApplication::translate("KAboutData CLI", "Please use https://bugs.kde.org to report bugs.")));
1254 printf("%s\n", qPrintable(QCoreApplication::translate("KAboutData CLI", "Please report bugs to %1.").arg(bugAddress())));
void append(const T &value)
QString organizationDomain() const
Returns the domain name of the organization that wrote this application.
Definition: kaboutdata.cpp:903
bool endsWith(const QString &s, Qt::CaseSensitivity cs) const const
KAboutComponent & operator=(const KAboutComponent &other)
Assignment operator.
ReadOnly
QString fromUtf8(const char *str, int size)
KAboutData & setLicenseTextFile(const QString &file)
Defines a license text by pointing to a file where it resides.
Definition: kaboutdata.cpp:696
KAboutData & addLicense(KAboutLicense::LicenseKey licenseKey)
Adds a license identifier.
Definition: kaboutdata.cpp:759
QVariant fromValue(const T &value)
void setApplicationDescription(const QString &description)
QString translate(const char *context, const char *sourceText, const char *disambiguation, int n)
KAboutData & addLicenseText(const QString &license)
Adds a license text, which is translated.
Definition: kaboutdata.cpp:681
QString scheme() const const
static void setApplicationData(const KAboutData &aboutData)
Sets the application data for this application.
Definition: kaboutdata.cpp:1150
QStringList split(const QString &sep, QString::SplitBehavior behavior, Qt::CaseSensitivity cs) const const
QString ocsProviderUrl() const
Returns the chosen Open Collaboration Services provider URL.
Definition: kaboutdata.cpp:870
KAboutData & unsetCustomAuthorText()
Clears any custom text displayed around the list of authors and falls back to the default message tel...
Definition: kaboutdata.cpp:1020
QString trimmed() const const
KAboutData(const QString &componentName, const QString &displayName, const QString &version, const QString &shortDescription, enum KAboutLicense::LicenseKey licenseType, const QString ©rightStatement=QString(), const QString &otherText=QString(), const QString &homePageAddress=QString(), const QString &bugAddress=QStringLiteral("[email protected]"))
Constructor.
Definition: kaboutdata.cpp:515
LicenseKey
Describes the license of the software; for more information see: https://spdx.org/licenses/.
Definition: kaboutdata.h:194
applicationVersion
QByteArray toLatin1() const const
QList::const_iterator constBegin() const const
static KAboutLicense byKeyword(const QString &keyword)
Fetch a known license by a keyword/spdx ID.
Definition: kaboutdata.cpp:372
bool setupCommandLine(QCommandLineParser *parser)
Configures the parser command line parser to provide an authors entry with information about the deve...
Definition: kaboutdata.cpp:1212
KAboutData & setOrganizationDomain(const QByteArray &domain)
Defines the domain of the organization that wrote this application.
Definition: kaboutdata.cpp:800
const char * internalProgramName() const
Definition: kaboutdata.cpp:841
QString locate(QStandardPaths::StandardLocation type, const QString &fileName, QStandardPaths::LocateOptions options)
bool customAuthorTextEnabled() const
Returns whether custom text should be displayed around the list of authors.
Definition: kaboutdata.cpp:1005
QString customAuthorPlainText() const
Returns the plain text displayed around the list of authors instead of the default message telling us...
Definition: kaboutdata.cpp:995
organizationDomain
static QString aboutTranslationTeam()
Returns a message about the translation team.
Definition: kaboutdata.cpp:965
Q_GLOBAL_STATIC(Internal::StaticControl, s_instance) class ControlPrivate
void reserve(int alloc)
bool isValid() const const
KAboutData & setProgramLogo(const QVariant &image)
Defines the program logo.
Definition: kaboutdata.cpp:864
KAboutData & setProgramIconName(const QString &iconName)
Obsolete method.
Definition: kaboutdata.cpp:852
This class is used to store information about a third party component.
Definition: kaboutdata.h:369
QString customAuthorRichText() const
Returns the rich text displayed around the list of authors instead of the default message telling use...
Definition: kaboutdata.cpp:1000
int size() const const
KAboutData & setComponentName(const QString &componentName)
Defines the component name used internally.
Definition: kaboutdata.cpp:717
const char * internalProductName() const
Definition: kaboutdata.cpp:825
void processCommandLine(QCommandLineParser *parser)
Reads the processed parser and sees if any of the arguments are the ones set up from setupCommandLine...
Definition: kaboutdata.cpp:1232
QCommandLineOption addVersionOption()
KeepEmptyParts
bool isEmpty() const const
void removeFirst()
QByteArray toUtf8() const const
KAboutData & setBugAddress(const QByteArray &bugAddress)
Defines the address where bug reports should be sent.
Definition: kaboutdata.cpp:794
QCoreApplication * instance()
QString value(const QString &optionName) const const
KAboutData & setTranslator(const QString &name, const QString &emailAddress)
Sets the name(s) of the translator(s) of the GUI.
Definition: kaboutdata.cpp:651
static KAboutData applicationData()
Returns the KAboutData for the application.
Definition: kaboutdata.cpp:1095
KAboutData & setDesktopFileName(const QString &desktopFileName)
Sets the base name of the desktop entry for this application.
Definition: kaboutdata.cpp:1030
KAboutPerson(const QString &name=QString(), const QString &task=QString(), const QString &emailAddress=QString(), const QString &webAddress=QString(), const QString &ocsUsername=QString())
Convenience constructor.
Definition: kaboutdata.cpp:47
KAboutData & setHomepage(const QString &homepage)
Defines the program homepage.
Definition: kaboutdata.cpp:788
QString join(const QString &separator) const const
applicationName
bool isSet(const QString &name) const const
This class is used to store information about a person or developer.
Definition: kaboutdata.h:61
@ QPL_V1_0
QPL_V1_0, this has the same value as LicenseKey::QPL, see https://spdx.org/licenses/QPL-1....
Definition: kaboutdata.h:205
QString & remove(int position, int n)
KAboutData & setCopyrightStatement(const QString ©rightStatement)
Defines the copyright statement to show when displaying the license.
Definition: kaboutdata.cpp:776
KAboutData & setDisplayName(const QString &displayName)
Defines the displayable component name string.
Definition: kaboutdata.cpp:723
KAboutData & setLicense(KAboutLicense::LicenseKey licenseKey)
Defines the license identifier.
Definition: kaboutdata.cpp:748
bool setProperty(const char *name, const QVariant &value)
QString toLower() const const
QString host(QUrl::ComponentFormattingOptions options) const const
GenericDataLocation
@ GPL_V2
GPL_V2, this has the same value as LicenseKey::GPL, see https://spdx.org/licenses/GPL-2....
Definition: kaboutdata.h:199
static void registerPluginData(const KAboutData &aboutData)
Register the KAboutData information for a plugin.
Definition: kaboutdata.cpp:1183
void setUrl(const QString &url, QUrl::ParsingMode parsingMode)
QList::const_iterator constEnd() const const
QString arg(qlonglong a, int fieldWidth, int base, QChar fillChar) const const
unsigned int version()
Returns a numerical version number of KCoreAddons at run-time in the form 0xMMNNPP (MM = major,...
Definition: kcoreaddons.cpp:18
KAboutLicense & operator=(const KAboutLicense &other)
Assignment operator.
Definition: kaboutdata.cpp:361
static KAboutData * pluginData(const QString &componentName)
Return the KAboutData for the given plugin identified by componentName.
Definition: kaboutdata.cpp:1196
QString fromLatin1(const char *str, int size)
QString name(StandardShortcut id)
KAboutData & addCredit(const QString &name, const QString &task=QString(), const QString &emailAddress=QString(), const QString &webAddress=QString(), const QString &ocsUsername=QString())
Defines a person that deserves credit.
Definition: kaboutdata.cpp:645
@ LGPL_V2
LGPL_V2, this has the same value as LicenseKey::LGPL, see https://spdx.org/licenses/LGPL-2....
Definition: kaboutdata.h:201
KAboutData & addAuthor(const QString &name, const QString &task=QString(), const QString &emailAddress=QString(), const QString &webAddress=QString(), const QString &ocsUsername=QString())
Defines an author.
Definition: kaboutdata.cpp:639
Unknown
KAboutData & addComponent(const QString &name, const QString &description=QString(), const QString &version=QString(), const QString &webAddress=QString(), KAboutLicense::LicenseKey licenseKey=KAboutLicense::Unknown)
Defines a component that is used by the application.
Definition: kaboutdata.cpp:657
QList::iterator begin()
KAboutComponent(const QString &name=QString(), const QString &description=QString(), const QString &version=QString(), const QString &webAddress=QString(), enum KAboutLicense::LicenseKey licenseType=KAboutLicense::Unknown)
Convenience constructor.
Definition: kaboutdata.cpp:416
KAboutData & setOtherText(const QString &otherText)
Defines the additional text to show in the about dialog.
Definition: kaboutdata.cpp:782
bool addOption(const QCommandLineOption &option)
static KAboutPerson fromJSON(const QJsonObject &obj)
Creates a KAboutPerson from a JSON object with the following structure:
Definition: kaboutdata.cpp:95
KAboutData & setVersion(const QByteArray &version)
Defines the program version string.
Definition: kaboutdata.cpp:736
QList::iterator end()
KAboutData & setProductName(const QByteArray &name)
Defines the product name which will be used in the KBugReport dialog.
Definition: kaboutdata.cpp:806
Definition: kmacroexpander.h:20
QCommandLineOption addHelpOption()
Definition: kpluginmetadata.h:86
KAboutData & setShortDescription(const QString &shortDescription)
Defines a short description of what the program does.
Definition: kaboutdata.cpp:742
QVector< V > values(const QMultiHash< K, V > &c)
QString & append(QChar ch)
Holds information needed by the "About" box and other classes.
Definition: kaboutdata.h:534
KAboutData & addLicenseTextFile(const QString &file)
Adds a license text by pointing to a file where it resides.
Definition: kaboutdata.cpp:703
char * data()
QString toString() const const
QVariant property(const char *name) const const
KAboutData & setCustomAuthorText(const QString &plainText, const QString &richText)
Sets the custom text displayed around the list of authors instead of the default message telling user...
Definition: kaboutdata.cpp:1010
KAboutData & setLicenseText(const QString &license)
Defines a license text, which is translated.
Definition: kaboutdata.cpp:674
KAboutData & setOcsProvider(const QString &providerUrl)
Specifies an Open Collaboration Services provider by URL.
Definition: kaboutdata.cpp:730
static KAboutData fromPluginMetaData(const KPluginMetaData &plugin)
Creates a KAboutData from the given plugin metadata.
Definition: kaboutdata.cpp:619
This file is part of the KDE documentation.
Documentation copyright © 1996-2022 The KDE developers.
Generated on Fri Aug 19 2022 04:05:20 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2022 The KDE developers.
Generated on Fri Aug 19 2022 04:05:20 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.