KCoreAddons

kaboutdata.h
1/*
2 This file is part of the KDE Libraries
3
4 SPDX-FileCopyrightText: 2000 Espen Sand <espen@kde.org>
5 SPDX-FileCopyrightText: 2008 Friedrich W. H. Kossebau <kossebau@kde.org>
6 SPDX-FileCopyrightText: 2010 Teo Mrnjavac <teo@kde.org>
7 SPDX-FileCopyrightText: 2013 David Faure <faure+bluesystems@kde.org>
8 SPDX-FileCopyrightText: 2017 Harald Sitter <sitter@kde.org>
9 SPDX-FileCopyrightText: 2021 Julius Künzel <jk.kdedev@smartlab.uber.space>
10
11 SPDX-License-Identifier: LGPL-2.0-or-later
12*/
13
14#ifndef KABOUTDATA_H
15#define KABOUTDATA_H
16
17#include <QSharedDataPointer>
18#include <QString>
19#include <QUrl>
20#include <QVariant>
21#include <kcoreaddons_export.h>
22#include <memory>
23#include <qcontainerfwd.h>
24
26class QJsonObject;
27class KAboutData;
28namespace KCrash
29{
30#ifdef KCOREADDONS_STATIC
31void defaultCrashHandler(int sig);
32#else
33Q_DECL_IMPORT void defaultCrashHandler(int sig);
34#endif
35}
36
37/**
38 * @class KAboutPerson kaboutdata.h KAboutPerson
39 *
40 * This class is used to store information about a person or developer.
41 * It can store the person's name, a task, an email address and a
42 * link to a home page. This class is intended for use in the
43 * KAboutData class, but it can be used elsewhere as well.
44 * Normally you should at least define the person's name.
45 * Creating a KAboutPerson object by yourself is relatively useless,
46 * but the KAboutData methods KAboutData::authors() and KAboutData::credits()
47 * return lists of KAboutPerson data objects which you can examine.
48 *
49 * Example usage within a main(), retrieving the list of people involved
50 * with a program and re-using data from one of them:
51 *
52 * @code
53 * KAboutData about("khello", i18n("KHello"), "0.1",
54 * i18n("A KDE version of Hello, world!"),
55 * KAboutLicense::LGPL,
56 * i18n("Copyright (C) 2014 Developer"));
57 *
58 * about.addAuthor(i18n("Joe Developer"), i18n("developer"), "joe@host.com", 0);
59 * QList<KAboutPerson> people = about.authors();
60 * about.addCredit(people[0].name(), people[0].task());
61 * @endcode
62 */
63class KCOREADDONS_EXPORT KAboutPerson
64{
65 Q_GADGET
66 Q_PROPERTY(QString name READ name CONSTANT)
67 Q_PROPERTY(QString task READ task CONSTANT)
68 Q_PROPERTY(QString emailAddress READ emailAddress CONSTANT)
69 Q_PROPERTY(QString webAddress READ webAddress CONSTANT)
70 Q_PROPERTY(QUrl avatarUrl READ avatarUrl CONSTANT)
71 friend class KAboutData;
72 friend class KAboutDataPrivate;
73
74public:
75 /**
76 * Convenience constructor
77 *
78 * @param name The name of the person.
79 *
80 * @param task The task of this person.
81 *
82 * @param emailAddress The email address of the person.
83 *
84 * @param webAddress Home page of the person.
85 *
86 * @param avatarUrl URL to the avatar of the person, since 6.0
87 *
88 * @p name default argument @since 5.53
89 */
90 explicit KAboutPerson(const QString &name = QString(),
91 const QString &task = QString(),
92 const QString &emailAddress = QString(),
93 const QString &webAddress = QString(),
94 const QUrl &avatarUrl = QUrl());
95
96 /**
97 * Copy constructor. Performs a deep copy.
98 * @param other object to copy
99 */
101
103
104 /**
105 * Assignment operator. Performs a deep copy.
106 * @param other object to copy
107 */
109
110 /**
111 * The person's name
112 * @return the person's name (can be QString(), if it has been
113 * constructed with an empty name)
114 */
115 QString name() const;
116
117 /**
118 * The person's task
119 * @return the person's task (can be QString(), if it has been
120 * constructed with an empty task)
121 */
122 QString task() const;
123
124 /**
125 * The person's email address
126 * @return the person's email address (can be QString(), if it has been
127 * constructed with an empty email)
128 */
129 QString emailAddress() const;
130
131 /**
132 * The home page or a relevant link
133 * @return the persons home page (can be QString(), if it has been
134 * constructed with an empty home page)
135 */
136 QString webAddress() const;
137
138 /**
139 * @return an URL pointing to the user's avatar
140 * @since 6.0
141 */
142 QUrl avatarUrl() const;
143
144 /**
145 * Creates a @c KAboutPerson from a JSON object with the following structure:
146 *
147 * Key | Accessor
148 * -----------| ----------------------------
149 * Name | name()
150 * Email | emailAddress()
151 * Task | task()
152 * Website | webAddress()
153 * AvatarUrl | avatarUrl()
154 *
155 * The @c Name and @c Task key are translatable (by using e.g. a "Task[de_DE]" key)
156 * The AvatarUrl exists since version 6.0
157 *
158 * @since 5.18
159 */
160 static KAboutPerson fromJSON(const QJsonObject &obj);
161
162private:
163 /**
164 * @internal Used by KAboutData to construct translator data.
165 */
166 KCOREADDONS_NO_EXPORT explicit KAboutPerson(const QString &name, const QString &email, bool disambiguation);
167
168private:
170};
171
172Q_DECLARE_TYPEINFO(KAboutPerson, Q_RELOCATABLE_TYPE);
173
174/**
175 * @class KAboutLicense kaboutdata.h KAboutLicense
176 *
177 * This class is used to store information about a license.
178 * The license can be one of some predefined, one given as text or one
179 * that can be loaded from a file. This class is used in the KAboutData class.
180 * Explicitly creating a KAboutLicense object is not possible.
181 * If the license is wanted for a KDE component having KAboutData object,
182 * use KAboutData::licenses() to get the licenses for that component.
183 * If the license is for a non-code resource and given by a keyword
184 * (e.g. in .desktop files), try using KAboutLicense::byKeyword().
185 */
186class KCOREADDONS_EXPORT KAboutLicense
187{
188 Q_GADGET
189 Q_PROPERTY(QString name READ name CONSTANT)
190 Q_PROPERTY(QString text READ text CONSTANT)
191 Q_PROPERTY(KAboutLicense::LicenseKey key READ key CONSTANT)
192 Q_PROPERTY(QString spdx READ spdx CONSTANT)
193 friend class KAboutData;
194 friend class KAboutComponent;
195
196public:
197 /**
198 * Describes the license of the software; for more information see: https://spdx.org/licenses/
199 */
201 Custom = -2, ///< Custom license
202 File = -1, ///< License set from text file, see setLicenseFromPath()
203 Unknown = 0, ///< Unknown license
204 GPL = 1, ///< GPL
205 GPL_V2 = GPL, ///< GPL_V2, this has the same value as LicenseKey::GPL, see https://spdx.org/licenses/GPL-2.0.html
206 LGPL = 2, ///< LGPL
207 LGPL_V2 = LGPL, ///< LGPL_V2, this has the same value as LicenseKey::LGPL, see https://spdx.org/licenses/LGPL-2.0-only.html
208#if KCOREADDONS_ENABLE_DEPRECATED_SINCE(6, 9)
209 BSDL KCOREADDONS_ENUMERATOR_DEPRECATED_VERSION(6, 9, "Use BSD_2_Clause") = 3, ///< BSDL, see https://spdx.org/licenses/BSD-2-Clause.html
210#endif
211 BSD_2_Clause = 3, ///< BSD_2_CLAUSE, see https://spdx.org/licenses/BSD-2-Clause.html
212 Artistic = 4, ///< Artistic, see https://spdx.org/licenses/Artistic-2.0.html
213 GPL_V3 = 5, ///< GPL_V3, see https://spdx.org/licenses/GPL-3.0.html
214 LGPL_V3 = 6, ///< LGPL_V3, see https://spdx.org/licenses/LGPL-3.0-only.html
215 LGPL_V2_1 = 7, ///< LGPL_V2_1 @since 5.25, see https://spdx.org/licenses/LGPL-2.1-only.html
216 MIT = 8, ///< MIT @since 6.0, see https://spdx.org/licenses/MIT.html
217 ODbL_V1 = 9, ///< ODbL_V1 @since 6.9, see https://spdx.org/licenses/ODbL-1.0.html
218 Apache_V2 = 10, ///< Apache_V2 @since 6.9, see https://spdx.org/licenses/Apache-2.0.html
219 FTL = 11, ///< FTL @since 6.9, see https://spdx.org/licenses/FTL.html
220 BSL_V1 = 12, ///< BSL_V1 @since 6.9, see https://spdx.org/licenses/BSL-1.0.html
221 BSD_3_Clause = 13, ///< BSD_3_CLAUSE @since 6.9, see https://spdx.org/licenses/BSD-3-Clause.html
222 CC0_V1 = 14, ///< CC0_V1 @since 6.9, see https://spdx.org/licenses/CC0-1.0.html
223 MPL_V2 = 15, ///< MPL_V2 @since 6.11, see https://spdx.org/licenses/MPL-2.0.html
224 };
225 Q_ENUM(LicenseKey)
226
227 /**
228 * Format of the license name.
229 */
231 ShortName,
232 FullName,
233 };
234 Q_ENUM(NameFormat)
235
236 /**
237 * Whether later versions of the license are allowed.
238 */
240 OnlyThisVersion,
241 OrLaterVersions,
242 };
243 Q_ENUM(VersionRestriction)
244
245 /**
246 * @since 5.53
247 */
248 explicit KAboutLicense();
249
250 /**
251 * Copy constructor. Performs a deep copy.
252 * @param other object to copy
253 */
254 KAboutLicense(const KAboutLicense &other);
255
257
258 /**
259 * Assignment operator. Performs a deep copy.
260 * @param other object to copy
261 */
262 KAboutLicense &operator=(const KAboutLicense &other);
263
264 /**
265 * Returns the full license text. If the licenseType argument of the
266 * constructor has been used, any text defined by setLicenseText is ignored,
267 * and the standard text for the chosen license will be returned.
268 *
269 * @return The license text.
270 */
271 QString text() const;
272
273 /**
274 * Returns the license name.
275 *
276 * Default argument @since 5.53
277 *
278 * @return The license name as a string.
279 */
280 QString name(KAboutLicense::NameFormat formatName = ShortName) const;
281
282 /**
283 * Returns the license key.
284 *
285 * @return The license key as element of KAboutLicense::LicenseKey enum.
286 */
287 KAboutLicense::LicenseKey key() const;
288
289 /**
290 * Returns the SPDX license expression of this license.
291 * If the underlying license cannot be expressed as a SPDX expression a null string is returned.
292 *
293 * @note SPDX expression are expansive constructs. If you parse the return value, do it in a
294 * SPDX specification compliant manner by splitting on whitespaces to discard unwanted
295 * information or by using a complete SPDX license expression parser.
296 * @note SPDX identifiers are case-insensitive. Do not use case-sensitive checks on the return
297 * value.
298 * @see https://spdx.org/licenses
299 * @return SPDX license expression or QString() if the license has no identifier. Compliant
300 * with SPDX 2.1.
301 *
302 * @since 5.37
303 */
304 QString spdx() const;
305
306 /**
307 * Fetch a known license by a keyword/spdx ID
308 *
309 * Frequently the license data is provided by a terse keyword-like string,
310 * e.g. by a field in a .desktop file. Using this method, an application
311 * can get hold of a proper KAboutLicense object, providing that the
312 * license is one of the several known to KDE, and use it to present
313 * more human-readable information to the user.
314 *
315 * Keywords are matched by stripping all whitespace and lowercasing.
316 * The known keywords correspond to the KAboutLicense::LicenseKey enumeration,
317 * e.g. any of "LGPLV3", "LGPLv3", "LGPL v3" would match KAboutLicense::LGPL_V3.
318 * If there is no match for the keyword, a valid license object is still
319 * returned, with its name and text informing about a custom license,
320 * and its key equal to KAboutLicense::Custom.
321 *
322 * @param keyword The license keyword.
323 * @return The license object.
324 *
325 * @see KAboutLicense::LicenseKey
326 */
327 static KAboutLicense byKeyword(const QString &keyword);
328
329private:
330 /**
331 * @internal Used by KAboutData to construct a predefined license.
332 */
333 KCOREADDONS_NO_EXPORT explicit KAboutLicense(enum KAboutLicense::LicenseKey licenseType,
334 enum KAboutLicense::VersionRestriction versionRestriction,
335 const KAboutData *aboutData);
336 /**
337 * @internal Used by KAboutData to construct a predefined license.
338 */
339 KCOREADDONS_NO_EXPORT explicit KAboutLicense(enum KAboutLicense::LicenseKey licenseType, const KAboutData *aboutData);
340 /**
341 * @internal Used by KAboutData to construct a KAboutLicense
342 */
343 KCOREADDONS_NO_EXPORT explicit KAboutLicense(const KAboutData *aboutData);
344 /**
345 * @internal Used by KAboutData to construct license by given text
346 */
347 KCOREADDONS_NO_EXPORT void setLicenseFromPath(const QString &pathToFile);
348 /**
349 * @internal Used by KAboutData to construct license by given text
350 */
351 KCOREADDONS_NO_EXPORT void setLicenseFromText(const QString &licenseText);
352
353private:
355};
356
357Q_DECLARE_TYPEINFO(KAboutLicense, Q_RELOCATABLE_TYPE);
358
359/**
360 * @class KAboutComponent kaboutdata.h KAboutComponent
361 *
362 * This class is used to store information about a third party component.
363 * It can store the component's name, a description, a link to a website
364 * and the license of the libary. This class is intended for use in the
365 * KAboutData class, but it can be used elsewhere as well.
366 * Normally you should at least define the libary's name.
367 * Creating a KAboutComponent object by yourself is relatively useless,
368 * but the KAboutData method KAboutData::libaries() return lists of
369 * KAboutComponent data objects which you can examine.
370 *
371 * Example usage within a main(), retrieving the list of components used
372 * by a program and re-using data from one of them:
373 *
374 * @code
375 * KAboutData about("khello", i18n("KHello"), "0.1",
376 * i18n("A KDE version of Hello, world!"),
377 * KAboutLicense::LGPL,
378 * i18n("Copyright (C) 2014 Developer"));
379 *
380 * about.addComponent(i18n("Awsom Lib"),
381 * i18n("Does awesom stuff. Copyright (C) 2014"),
382 * i18n("1.02.3"),
383 * "http://example.com",
384 * KAboutLicense::LGPL);
385 * QList<KAboutComponent> components = about.components();
386 * @endcode
387 *
388 * @since 5.84
389 */
390class KCOREADDONS_EXPORT KAboutComponent
391{
392 Q_GADGET
393 Q_PROPERTY(QString name READ name CONSTANT)
394 Q_PROPERTY(QString description READ description CONSTANT)
395 Q_PROPERTY(QString webAddress READ webAddress CONSTANT)
396 Q_PROPERTY(KAboutLicense licenses READ license CONSTANT)
397 Q_PROPERTY(QString version READ version CONSTANT)
398 friend class KAboutData;
399 friend class KAboutDataPrivate;
400
401public:
402 /**
403 * Convenience constructor
404 *
405 * @param name The name of the component.
406 *
407 * @param description The description of this component.
408 *
409 * @param version The version of this component.
410 *
411 * @param webAddress Website of the component.
412 *
413 * @param licenseType The license identifier of the component.
414 *
415 * @p name default argument
416 */
417 explicit KAboutComponent(const QString &name = QString(),
418 const QString &description = QString(),
419 const QString &version = QString(),
420 const QString &webAddress = QString(),
422
423 /**
424 * Convenience constructor
425 *
426 * @param name The name of the component.
427 *
428 * @param description The description of this component.
429 *
430 * @param version The version of this component.
431 *
432 * @param webAddress Website of the component.
433 *
434 * @param pathToLicenseFile Path to the file in the local filesystem containing the license text.
435 * The file format has to be plain text in an encoding compatible to the local.
436 *
437 * @p name default argument
438 */
439 explicit KAboutComponent(const QString &name,
440 const QString &description,
441 const QString &version,
442 const QString &webAddress,
443 const QString &pathToLicenseFile);
444
445 /**
446 * Copy constructor. Performs a deep copy.
447 * @param other object to copy
448 */
450
452
453 /**
454 * Assignment operator. Performs a deep copy.
455 * @param other object to copy
456 */
458
459 /**
460 * The component's name
461 * @return the component's name (can be QString(), if it has been
462 * constructed with an empty name)
463 */
464 QString name() const;
465
466 /**
467 * The component's description
468 * @return the component's description (can be empty)
469 */
470 QString description() const;
471
472 /**
473 * The component's version
474 * @return the component's task (can be empty)
475 */
476 QString version() const;
477
478 /**
479 * The website or a relevant link
480 * @return the component's website (can be empty)
481 */
482 QString webAddress() const;
483
484 /**
485 * The component's license
486 * @return the component's KAboutLicense
487 */
488 KAboutLicense license() const;
489
490private:
492};
493
494Q_DECLARE_TYPEINFO(KAboutComponent, Q_RELOCATABLE_TYPE);
495
496/**
497 * @class KAboutData kaboutdata.h KAboutData
498 *
499 * This class is used to store information about a program or plugin.
500 * It can store such values as version number, program name, home page, address
501 * for bug reporting, multiple authors and contributors
502 * (using KAboutPerson), license and copyright information.
503 *
504 * Currently, the values set here are shown by the "About" box
505 * (see KAboutApplicationDialog), used by the bug report dialog (see KBugReport),
506 * and by the help shown on command line (see KAboutData::setupCommandLine()).
507 *
508 * Porting Notes: Since KDE Frameworks 5.0, the translation catalog mechanism
509 * must be provided by your translation framework to load the correct catalog
510 * instead (eg: KLocalizedString::setApplicationDomain() for KI18n, or
511 * QCoreApplication::installTranslator() for Qt's translation system). This
512 * applies to the old setCatalogName() and catalogName() members. But see also
513 * K4AboutData in kde4support as a compatibility class.
514 *
515 * Example:
516 * Setting the metadata of an application using KAboutData in code also relying
517 * on the KDE Framework modules KI18n and KDBusAddons:
518 * @code
519 * // create QApplication instance
520 * QApplication app(argc, argv);
521 * // setup translation string domain for the i18n calls
522 * KLocalizedString::setApplicationDomain("foo");
523 * // create a KAboutData object to use for setting the application metadata
524 * KAboutData aboutData("foo", i18n("Foo"), "0.1",
525 * i18n("To Foo or not To Foo"),
526 * KAboutLicense::LGPL,
527 * i18n("Copyright 2017 Bar Foundation"), QString(),
528 * "https://www.foo-the-app.net");
529 * // overwrite default-generated values of organizationDomain & desktopFileName
530 * aboutData.setOrganizationDomain("barfoundation.org");
531 * aboutData.setDesktopFileName("org.barfoundation.foo");
532 *
533 * // set the application metadata
534 * KAboutData::setApplicationData(aboutData);
535 * // in GUI apps set the window icon manually, not covered by KAboutData
536 * // needed for environments where the icon name is not extracted from
537 * // the information in the application's desktop file
538 * QApplication::setWindowIcon(QIcon::fromTheme(QStringLiteral("foo")));
539 *
540 * // integrate with commandline argument handling
541 * QCommandLineParser parser;
542 * aboutData.setupCommandLine(&parser);
543 * // setup of app specific commandline args
544 * [...]
545 * parser.process(app);
546 * aboutData.processCommandLine(&parser);
547 *
548 * // with the application metadata set, register to the D-Bus session
549 * KDBusService programDBusService(KDBusService::Multiple | KDBusService::NoExitOnFailure);
550 * @endcode
551 *
552 * @short Holds information needed by the "About" box and other
553 * classes.
554 * @author Espen Sand (espen@kde.org), David Faure (faure@kde.org)
555 *
556 */
557class KCOREADDONS_EXPORT KAboutData
558{
559 Q_GADGET
560 Q_PROPERTY(QString displayName READ displayName CONSTANT)
561 Q_PROPERTY(QString productName READ productName CONSTANT)
562 Q_PROPERTY(QString componentName READ componentName CONSTANT)
563 Q_PROPERTY(QVariant programLogo READ programLogo CONSTANT)
564 Q_PROPERTY(QString shortDescription READ shortDescription CONSTANT)
565 Q_PROPERTY(QString homepage READ homepage CONSTANT)
566 Q_PROPERTY(QString bugAddress READ bugAddress CONSTANT)
567 Q_PROPERTY(QString version READ version CONSTANT)
568 Q_PROPERTY(QString otherText READ otherText CONSTANT)
569 Q_PROPERTY(QList<KAboutPerson> authors READ authors CONSTANT) // constant in practice as addAuthor is not exposed to Q_GADGET
570 Q_PROPERTY(QList<KAboutPerson> credits READ credits CONSTANT)
571 Q_PROPERTY(QList<KAboutPerson> translators READ translators CONSTANT)
572 Q_PROPERTY(QList<KAboutComponent> components READ components CONSTANT)
573 Q_PROPERTY(QList<KAboutLicense> licenses READ licenses CONSTANT)
574 Q_PROPERTY(QString copyrightStatement READ copyrightStatement CONSTANT)
575 Q_PROPERTY(QString desktopFileName READ desktopFileName CONSTANT)
576public:
577 /**
578 * Returns the KAboutData for the application.
579 *
580 * This contains information such as authors, license, etc.,
581 * provided that setApplicationData has been called before.
582 * If not called before, the returned KAboutData will be initialized from the
583 * equivalent properties of QCoreApplication (and its subclasses),
584 * if an instance of that already exists.
585 * For the list of such properties see setApplicationData
586 * (before 5.22: limited to QCoreApplication::applicationName).
587 * @see setApplicationData
588 */
590
591 /**
592 * Sets the application data for this application.
593 *
594 * In addition to changing the result of applicationData(), this initializes
595 * the equivalent properties of QCoreApplication (and its subclasses) with
596 * information from @p aboutData, if an instance of that already exists.
597 * Those properties are:
598 <ul>
599 <li>QCoreApplication::applicationName</li>
600 <li>QCoreApplication::applicationVersion</li>
601 <li>QCoreApplication::organizationDomain</li>
602 <li>QGuiApplication::applicationDisplayName</li>
603 <li>QGuiApplication::desktopFileName (since 5.16)</li>
604 </ul>
605 * @see applicationData
606 */
607 static void setApplicationData(const KAboutData &aboutData);
608
609public:
610 /**
611 * Constructor.
612 *
613 * Porting Note: The @p catalogName parameter present in KDE4 was
614 * deprecated and removed. See also K4AboutData
615 * in kde4support if this feature is needed for compatibility purposes, or
616 * consider using componentName() instead.
617 *
618 * @param componentName The program name or plugin name used internally.
619 * Example: QStringLiteral("kwrite"). This should never be translated.
620 *
621 * @param displayName A displayable name for the program or plugin. This string
622 * should be translated. Example: i18n("KWrite")
623 *
624 * @param version The component version string. Example: QStringLiteral("1.0").
625 *
626 * @param shortDescription A short description of what the component does.
627 * This string should be translated.
628 * Example: i18n("A simple text editor.")
629 *
630 * @param licenseType The license identifier. Use setLicenseText or
631 setLicenseTextFile if you use a license not predefined here.
632 *
633 * @param copyrightStatement A copyright statement, that can look like this:
634 * i18n("Copyright (C) 1999-2000 Name"). The string specified here is
635 * taken verbatim; the author information from addAuthor is not used.
636 *
637 * @param otherText Some free form text, that can contain any kind of
638 * information. The text can contain newlines. This string
639 * should be translated.
640 *
641 * @param homePageAddress The URL to the component's homepage, including
642 * URL scheme. "http://some.domain" is correct, "some.domain" is
643 * not. Since KDE Frameworks 5.17, https and other valid URL schemes
644 * are also valid. See also the note below.
645 *
646 * @param bugAddress The bug report address string, an email address or a URL.
647 * This defaults to the kde.org bug system.
648 *
649 * @note The @p homePageAddress argument is used to derive a default organization
650 * domain for the application (which is used to register on the session D-Bus,
651 * locate the appropriate desktop file, etc.), by taking the host name and dropping
652 * the first component, unless there are less than three (e.g. "www.kde.org" -> "kde.org").
653 * Use both setOrganizationDomain(const QByteArray&) and setDesktopFileName() if their default values
654 * do not have proper values.
655 *
656 * @see setOrganizationDomain(const QByteArray&), setDesktopFileName(const QString&)
657 */
658 // KF6: remove constructor that includes catalogName, and put default
659 // values back in for shortDescription and licenseType
660 KAboutData(const QString &componentName,
661 const QString &displayName,
662 const QString &version,
663 const QString &shortDescription,
664 enum KAboutLicense::LicenseKey licenseType,
665 const QString &copyrightStatement = QString(),
666 const QString &otherText = QString(),
667 const QString &homePageAddress = QString(),
668 const QString &bugAddress = QStringLiteral("submit@bugs.kde.org"));
669
670 /**
671 * Constructor.
672 *
673 * @param componentName The program name or plugin name used internally.
674 * Example: "kwrite".
675 *
676 * @param displayName A displayable name for the program or plugin. This string
677 * should be translated. Example: i18n("KWrite")
678 *
679 * @param version The component version string.
680 *
681 * Sets the property desktopFileName to "org.kde."+componentName and
682 * the property organizationDomain to "kde.org".
683 *
684 * Default arguments @since 5.53
685 *
686 * @see setOrganizationDomain(const QByteArray&), setDesktopFileName(const QString&)
687 */
688 explicit KAboutData(const QString &componentName = {}, const QString &displayName = {}, const QString &version = {});
689
690 /**
691 * Copy constructor. Performs a deep copy.
692 * @param other object to copy
693 */
694 KAboutData(const KAboutData &other);
695
696 /**
697 * Assignment operator. Performs a deep copy.
698 * @param other object to copy
699 */
700 KAboutData &operator=(const KAboutData &other);
701
702 ~KAboutData();
703
704 /**
705 * Add an author.
706 *
707 * You can call this function as many times as you need. Each entry
708 * is appended to a list.
709 *
710 * @param author The author.
711 * @since 6.9
712 */
713 KAboutData &addAuthor(const KAboutPerson &author);
714
715 /**
716 * Defines an author.
717 *
718 * You can call this function as many times as you need. Each entry is
719 * appended to a list. The person in the first entry is assumed to be
720 * the leader of the project.
721 *
722 * @param name The developer's name. It should be translated.
723 *
724 * @param task What the person is responsible for. This text can contain
725 * newlines. It should be translated.
726 * Can be left empty.
727 *
728 * @param emailAddress An Email address where the person can be reached.
729 * Can be left empty.
730 *
731 * @param webAddress The person's homepage or a relevant link.
732 * Start the address with "http://". "http://some.domain" is
733 * correct, "some.domain" is not. Can be left empty.
734 *
735 * @param avatarUrl URL to the avatar of the person
736 */
737 KAboutData &addAuthor(const QString &name,
738 const QString &task = QString(),
739 const QString &emailAddress = QString(),
740 const QString &webAddress = QString(),
741 const QUrl &avatarUrl = QUrl());
742
743 /**
744 * @overload
745 * @since 6.0
746 */
747 KAboutData &addAuthor(const QString &name, const QString &task, const QString &emailAddress, const QString &webAddress, const QString &kdeStoreUsername)
748 {
749 return addAuthor(name, task, emailAddress, webAddress, QUrl(QStringLiteral("https://store.kde.org/avatar/") + kdeStoreUsername));
750 }
751
752 /**
753 * Add a person that deserves credit.
754 *
755 * You can call this function as many times as you need. Each entry
756 * is appended to a list.
757 *
758 * @param person The person.
759 * @since 6.9
760 */
761 KAboutData &addCredit(const KAboutPerson &person);
762
763 /**
764 * Defines a person that deserves credit.
765 *
766 * You can call this function as many times as you need. Each entry
767 * is appended to a list.
768 *
769 * @param name The person's name. It should be translated.
770 *
771 * @param task What the person has done to deserve the honor. The
772 * text can contain newlines. It should be translated.
773 * Can be left empty.
774 *
775 * @param emailAddress An email address when the person can be reached.
776 * Can be left empty.
777 *
778 * @param webAddress The person's homepage or a relevant link.
779 * Start the address with "http://". "http://some.domain" is
780 * is correct, "some.domain" is not. Can be left empty.
781 *
782 * @param avatarUrl URL to the avatar of the person
783 */
784 KAboutData &addCredit(const QString &name,
785 const QString &task = QString(),
786 const QString &emailAddress = QString(),
787 const QString &webAddress = QString(),
788 const QUrl &avatarUrl = QUrl());
789
790 /**
791 * @overload
792 * @since 6.0
793 */
794 KAboutData &addCredit(const QString &name, const QString &task, const QString &emailAddress, const QString &webAddress, const QString &kdeStoreUsername)
795 {
796 return addCredit(name, task, emailAddress, webAddress, QUrl(QStringLiteral("https://store.kde.org/avatar/") + kdeStoreUsername));
797 }
798
799 /**
800 * @brief Sets the name(s) of the translator(s) of the GUI.
801 *
802 * The canonical use with the ki18n framework is:
803 *
804 * \code
805 * setTranslator(i18nc("NAME OF TRANSLATORS", "Your names"),
806 * i18nc("EMAIL OF TRANSLATORS", "Your emails"));
807 * \endcode
808 *
809 * If you are using a KMainWindow this is done for you automatically.
810 *
811 * The name and emailAddress are treated as lists separated with ",".
812 *
813 * If the strings are empty or "Your names"/"Your emails"
814 * respectively they will be ignored.
815 *
816 * @param name the name(s) of the translator(s)
817 * @param emailAddress the email address(es) of the translator(s)
818 * @see KAboutTranslator
819 */
820 KAboutData &setTranslator(const QString &name, const QString &emailAddress);
821
822 /**
823 * Add a component that is used by the application.
824 *
825 * You can call this function as many times as you need. Each entry is
826 * appended to a list.
827 *
828 * @param component The component
829 *
830 * @since 6.9
831 */
832 KAboutData &addComponent(const KAboutComponent &component);
833
834 /**
835 * Defines a component that is used by the application.
836 *
837 * You can call this function as many times as you need. Each entry is
838 * appended to a list.
839 *
840 * @param name The component's name. It should be translated.
841 *
842 * @param description Short description of the component and maybe
843 * copyright info. This text can contain newlines. It should
844 * be translated. Can be left empty.
845 *
846 * @param version The version of the component. Can be left empty.
847 *
848 * @param webAddress The component's homepage or a relevant link.
849 * Start the address with "http://". "http://some.domain" is
850 * correct, "some.domain" is not. Can be left empty.
851 *
852 * @param licenseKey The component's license identifier. Can be left empty (i.e. KAboutLicense::Unknown)
853 *
854 * @since 5.84
855 */
856 KAboutData &addComponent(const QString &name,
857 const QString &description = QString(),
858 const QString &version = QString(),
859 const QString &webAddress = QString(),
861
862 /**
863 * Defines a component that is used by the application with a custom license text file.
864 *
865 * You can call this function as many times as you need. Each entry is
866 * appended to a list.
867 *
868 * @param name The component's name. It should be translated.
869 *
870 * @param description Short description of the component and maybe
871 * copyright info. This text can contain newlines. It should
872 * be translated. Can be left empty.
873 *
874 * @param version The version of the component. Can be left empty.
875 *
876 * @param webAddress The component's homepage or a relevant link.
877 * Start the address with "http://". "http://some.domain" is
878 * correct, "some.domain" is not. Can be left empty.
879 *
880 * @param pathToLicenseFile Path to the file in the local filesystem containing the license text.
881 * The file format has to be plain text in an encoding compatible to the local.
882 *
883 * @since 5.84
884 */
885 KAboutData &
886 addComponent(const QString &name, const QString &description, const QString &version, const QString &webAddress, const QString &pathToLicenseFile);
887
888 /**
889 * Defines a license text, which is translated.
890 *
891 * Example:
892 * \code
893 * setLicenseText( i18n("This is my license") );
894 * \endcode
895 *
896 * @param license The license text.
897 */
898 KAboutData &setLicenseText(const QString &license);
899
900 /**
901 * Adds a license text, which is translated.
902 *
903 * If there is only one unknown license set, e.g. by using the default
904 * parameter in the constructor, that one is replaced.
905 *
906 * Example:
907 * \code
908 * addLicenseText( i18n("This is my license") );
909 * \endcode
910 *
911 * @param license The license text.
912 * @see setLicenseText, addLicense, addLicenseTextFile
913 */
914 KAboutData &addLicenseText(const QString &license);
915
916 /**
917 * Defines a license text by pointing to a file where it resides.
918 * The file format has to be plain text in an encoding compatible to the locale.
919 *
920 * @param file Path to the file in the local filesystem containing the license text.
921 */
922 KAboutData &setLicenseTextFile(const QString &file);
923
924 /**
925 * Adds a license text by pointing to a file where it resides.
926 * The file format has to be plain text in an encoding compatible to the locale.
927 *
928 * If there is only one unknown license set, e.g. by using the default
929 * parameter in the constructor, that one is replaced.
930 *
931 * @param file Path to the file in the local filesystem containing the license text.
932 * @see addLicenseText, addLicense, setLicenseTextFile
933 */
934 KAboutData &addLicenseTextFile(const QString &file);
935
936 /**
937 * Defines the component name used internally.
938 *
939 * @param componentName The application or plugin name. Example: "kate".
940 */
941 KAboutData &setComponentName(const QString &componentName);
942
943 /**
944 * Defines the displayable component name string.
945 *
946 * @param displayName The display name. This string should be
947 * translated.
948 * Example: i18n("Advanced Text Editor").
949 */
950 KAboutData &setDisplayName(const QString &displayName);
951
952 /**
953 * Defines the program logo.
954 *
955 * Use this if you need to have an application logo
956 * in AboutData other than the application icon.
957 *
958 * Because KAboutData is a core class it cannot use QImage/QPixmap/QIcon directly,
959 * so this is a QVariant that should contain a QImage/QPixmap/QIcon.
960 *
961 * QIcon should be preferred, to be able to properly handle HiDPI scaling.
962 * If a QIcon is provided, it will be used at a typical size of 48x48.
963 *
964 * @param image logo image.
965 * @see programLogo()
966 */
967 KAboutData &setProgramLogo(const QVariant &image);
968
969 /**
970 * Defines the program version string.
971 *
972 * @param version The program version.
973 */
974 KAboutData &setVersion(const QByteArray &version);
975
976 /**
977 * Defines a short description of what the program does.
978 *
979 * @param shortDescription The program description. This string should
980 * be translated. Example: i18n("An advanced text
981 * editor with syntax highlighting support.").
982 */
983 KAboutData &setShortDescription(const QString &shortDescription);
984
985 /**
986 * Defines the license identifier.
987 *
988 * @param licenseKey The license identifier.
989 * @see addLicenseText, setLicenseText, setLicenseTextFile
990 */
991 KAboutData &setLicense(KAboutLicense::LicenseKey licenseKey);
992
993 /**
994 * Defines the license identifier.
995 *
996 * @param licenseKey The license identifier.
997 * @param versionRestriction Whether later versions of the license are also allowed.
998 * e.g. licensed under "GPL 2.0 or at your option later versions" would be OrLaterVersions.
999 * @see addLicenseText, setLicenseText, setLicenseTextFile
1000 *
1001 * @since 5.37
1002 */
1003 KAboutData &setLicense(KAboutLicense::LicenseKey licenseKey, KAboutLicense::VersionRestriction versionRestriction);
1004
1005 /**
1006 * Adds a license identifier.
1007 *
1008 * If there is only one unknown license set, e.g. by using the default
1009 * parameter in the constructor, that one is replaced.
1010 *
1011 * @param licenseKey The license identifier.
1012 * @see setLicenseText, addLicenseText, addLicenseTextFile
1013 */
1014 KAboutData &addLicense(KAboutLicense::LicenseKey licenseKey);
1015
1016 /**
1017 * Adds a license identifier.
1018 *
1019 * If there is only one unknown license set, e.g. by using the default
1020 * parameter in the constructor, that one is replaced.
1021 *
1022 * @param licenseKey The license identifier.
1023 * @param versionRestriction Whether later versions of the license are also allowed.
1024 * e.g. licensed under "GPL 2.0 or at your option later versions" would be OrLaterVersions.
1025 * @see setLicenseText, addLicenseText, addLicenseTextFile
1026 *
1027 * @since 5.37
1028 */
1029 KAboutData &addLicense(KAboutLicense::LicenseKey licenseKey, KAboutLicense::VersionRestriction versionRestriction);
1030
1031 /**
1032 * Defines the copyright statement to show when displaying the license.
1033 *
1034 * @param copyrightStatement A copyright statement, that can look like
1035 * this: i18n("Copyright (C) 1999-2000 Name"). The string specified here is
1036 * taken verbatim; the author information from addAuthor is not used.
1037 */
1038 KAboutData &setCopyrightStatement(const QString &copyrightStatement);
1039
1040 /**
1041 * Defines the additional text to show in the about dialog.
1042 *
1043 * @param otherText Some free form text, that can contain any kind of
1044 * information. The text can contain newlines. This string
1045 * should be translated.
1046 */
1047 KAboutData &setOtherText(const QString &otherText);
1048
1049 /**
1050 * Defines the program homepage.
1051 *
1052 * @param homepage The program homepage string.
1053 * Start the address with "http://". "http://kate.kde.org"
1054 * is correct but "kate.kde.org" is not.
1055 */
1056 KAboutData &setHomepage(const QString &homepage);
1057
1058 /**
1059 * Defines the address where bug reports should be sent.
1060 *
1061 * @param bugAddress The bug report email address or URL.
1062 * This defaults to the kde.org bug system.
1063 */
1064 KAboutData &setBugAddress(const QByteArray &bugAddress);
1065
1066 /**
1067 * Defines the domain of the organization that wrote this application.
1068 * The domain is set to kde.org by default, or the domain of the homePageAddress constructor argument,
1069 * if set.
1070 *
1071 * Make sure to call setOrganizationDomain(const QByteArray&) if your product
1072 * is not developed inside the KDE community.
1073 *
1074 * Used e.g. for the registration to D-Bus done by KDBusService
1075 * from the KDE Frameworks KDBusAddons module.
1076 *
1077 * Calling this method has no effect on the value of the desktopFileName property.
1078 *
1079 * @note If your program should work as a D-Bus activatable service, the base name
1080 * of the D-Bus service description file or of the desktop file you install must match
1081 * the D-Bus "well-known name" for which the program will register.
1082 * For example, KDBusService will use a name created from the reversed organization domain
1083 * with the component name attached, so for an organization domain "bar.org" and a
1084 * component name "foo" the name of an installed D-Bus service file needs to be
1085 * "org.bar.foo.service" or the name of the installed desktop file "org.bar.foo.desktop"
1086 * (and the desktopFileName property accordingly set to "org.bar.foo").
1087 *
1088 * @param domain the domain name, for instance kde.org, koffice.org, etc.
1089 *
1090 * @see setDesktopFileName(const QString&)
1091 */
1092 KAboutData &setOrganizationDomain(const QByteArray &domain);
1093
1094 /**
1095 * Defines the product name which will be used in the KBugReport dialog.
1096 * By default it's the componentName, but you can overwrite it here to provide
1097 * support for special components e.g. in the form 'product/component',
1098 * such as 'kontact/summary'.
1099 *
1100 * @param name The name of product
1101 */
1102 KAboutData &setProductName(const QByteArray &name);
1103
1104 /**
1105 * Returns the application's internal name.
1106 * @return the internal program name.
1107 */
1108 QString componentName() const;
1109
1110 /**
1111 * Returns the application's product name, which will be used in KBugReport
1112 * dialog. By default it returns componentName(), otherwise the one which is set
1113 * with setProductName()
1114 *
1115 * @return the product name.
1116 */
1117 QString productName() const;
1118
1119 /**
1120 * @internal
1121 * Provided for use by KCrash
1122 */
1123 const char *internalProductName() const;
1124
1125 /**
1126 * Returns the translated program name.
1127 * @return the program name (translated).
1128 */
1129 QString displayName() const;
1130
1131 /**
1132 * Returns the domain name of the organization that wrote this application.
1133 *
1134 * @see setOrganizationDomain(const QByteArray&)
1135 */
1136 QString organizationDomain() const;
1137
1138 /**
1139 * @internal
1140 * Provided for use by KCrash
1141 */
1142 const char *internalProgramName() const;
1143
1144 /**
1145 * Returns the program logo image.
1146 *
1147 * Because KAboutData is a core class it cannot use QImage/QPixmap/QIcon directly,
1148 * so this is a QVariant containing a QImage/QPixmap/QIcon.
1149 *
1150 * @return the program logo data, or a null image if there is
1151 * no custom application logo defined.
1152 */
1153 QVariant programLogo() const;
1154
1155 /**
1156 * Returns the program's version.
1157 * @return the version string.
1158 */
1159 QString version() const;
1160
1161 /**
1162 * @internal
1163 * Provided for use by KCrash
1164 */
1165 const char *internalVersion() const;
1166
1167 /**
1168 * Returns a short, translated description.
1169 * @return the short description (translated). Can be
1170 * QString() if not set.
1171 */
1172 QString shortDescription() const;
1173
1174 /**
1175 * Returns the application homepage.
1176 * @return the application homepage URL. Can be QString() if
1177 * not set.
1178 */
1179 QString homepage() const;
1180
1181 /**
1182 * Returns the email address or URL for bugs.
1183 * @return the address where to report bugs.
1184 */
1185 QString bugAddress() const;
1186
1187 /**
1188 * @internal
1189 * Provided for use by KCrash
1190 */
1191 const char *internalBugAddress() const;
1192
1193 /**
1194 * Returns a list of authors.
1195 * @return author information (list of persons).
1196 */
1197 QList<KAboutPerson> authors() const;
1198
1199 /**
1200 * Returns a list of persons who contributed.
1201 * @return credit information (list of persons).
1202 */
1203 QList<KAboutPerson> credits() const;
1204
1205 /**
1206 * Returns a list of translators.
1207 * @return translators information (list of persons)
1208 */
1209 QList<KAboutPerson> translators() const;
1210
1211 /**
1212 * Returns a message about the translation team.
1213 * @return a message about the translation team
1214 */
1215 static QString aboutTranslationTeam();
1216
1217 /**
1218 * Returns a list of components.
1219 * @return component information (list of components).
1220 * @since 5.84
1221 */
1222 QList<KAboutComponent> components() const;
1223
1224 /**
1225 * Returns a translated, free form text.
1226 * @return the free form text (translated). Can be QString() if not set.
1227 */
1228 QString otherText() const;
1229
1230 /**
1231 * Returns a list of licenses.
1232 *
1233 * @return licenses information (list of licenses)
1234 */
1235 QList<KAboutLicense> licenses() const;
1236
1237 /**
1238 * Returns the copyright statement.
1239 * @return the copyright statement. Can be QString() if not set.
1240 */
1241 QString copyrightStatement() const;
1242
1243 /**
1244 * Returns the plain text displayed around the list of authors instead
1245 * of the default message telling users to send bug reports to bugAddress().
1246 *
1247 * @return the plain text displayed around the list of authors instead
1248 * of the default message. Can be QString().
1249 */
1250 QString customAuthorPlainText() const;
1251
1252 /**
1253 * Returns the rich text displayed around the list of authors instead
1254 * of the default message telling users to send bug reports to bugAddress().
1255 *
1256 * @return the rich text displayed around the list of authors instead
1257 * of the default message. Can be QString().
1258 */
1259 QString customAuthorRichText() const;
1260
1261 /**
1262 * Returns whether custom text should be displayed around the list of
1263 * authors.
1264 *
1265 * @return whether custom text should be displayed around the list of
1266 * authors.
1267 */
1268 bool customAuthorTextEnabled() const;
1269
1270 /**
1271 * Sets the custom text displayed around the list of authors instead
1272 * of the default message telling users to send bug reports to bugAddress().
1273 *
1274 * @param plainText The plain text.
1275 * @param richText The rich text.
1276 *
1277 * Setting both to parameters to QString() will cause no message to be
1278 * displayed at all. Call unsetCustomAuthorText() to revert to the default
1279 * message.
1280 */
1281 KAboutData &setCustomAuthorText(const QString &plainText, const QString &richText);
1282
1283 /**
1284 * Clears any custom text displayed around the list of authors and falls
1285 * back to the default message telling users to send bug reports to
1286 * bugAddress().
1287 */
1288 KAboutData &unsetCustomAuthorText();
1289
1290 /**
1291 * Configures the @p parser command line parser to provide an authors entry with
1292 * information about the developers of the application and an entry specifying the license.
1293 *
1294 * Additionally, it will set the description to the command line parser, will add the help
1295 * option and if the QApplication has a version set (e.g. via KAboutData::setApplicationData)
1296 * it will also add the version option.
1297 *
1298 * Since 5.16 it also adds an option to set the desktop file name.
1299 *
1300 * @returns true if adding the options was successful; otherwise returns false.
1301 *
1302 * @sa processCommandLine()
1303 */
1304 bool setupCommandLine(QCommandLineParser *parser);
1305
1306 /**
1307 * Reads the processed @p parser and sees if any of the arguments are the ones set
1308 * up from setupCommandLine().
1309 *
1310 * @sa setupCommandLine()
1311 */
1312 void processCommandLine(QCommandLineParser *parser);
1313
1314 /**
1315 * Sets the base name of the desktop entry for this application.
1316 *
1317 * This is the file name, without the full path and without extension,
1318 * of the desktop entry that represents this application according to
1319 * the freedesktop desktop entry specification (e.g. "org.kde.foo").
1320 *
1321 * A default desktop file name is constructed when the KAboutData
1322 * object is created, using the reverse domain name of the
1323 * organizationDomain() and the componentName() as they are at the time
1324 * of the KAboutData object creation.
1325 * Call this method to override that default name. Typically this is
1326 * done when also setOrganizationDomain(const QByteArray&) or setComponentName(const QString&)
1327 * need to be called to override the initial values.
1328 *
1329 * The desktop file name can also be passed to the application at runtime through
1330 * the @c desktopfile command line option which is added by setupCommandLine(QCommandLineParser*).
1331 * This is useful if an application supports multiple desktop files with different runtime
1332 * settings.
1333 *
1334 * @param desktopFileName The desktop file name of this application
1335 *
1336 * @sa desktopFileName()
1337 * @sa organizationDomain()
1338 * @sa componentName()
1339 * @sa setupCommandLine(QCommandLineParser*)
1340 * @since 5.16
1341 **/
1342 KAboutData &setDesktopFileName(const QString &desktopFileName);
1343
1344 /**
1345 * @returns The desktop file name of this application (e.g. "org.kde.foo")
1346 * @sa setDesktopFileName(const QString&)
1347 * @since 5.16
1348 **/
1349 QString desktopFileName() const;
1350
1351private:
1352 friend void KCrash::defaultCrashHandler(int sig);
1353 // exported for KCrash, no other users intended
1354 static const KAboutData *applicationDataPointer();
1355
1356private:
1357 std::unique_ptr<class KAboutDataPrivate> const d;
1358};
1359
1360#endif
This class is used to store information about a third party component.
Definition kaboutdata.h:391
KAboutComponent(const KAboutComponent &other)
Copy constructor.
KAboutLicense license() const
The component's license.
KAboutComponent & operator=(const KAboutComponent &other)
Assignment operator.
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.
This class is used to store information about a program or plugin.
Definition kaboutdata.h:558
KAboutData & addAuthor(const QString &name, const QString &task, const QString &emailAddress, const QString &webAddress, const QString &kdeStoreUsername)
This is an overloaded member function, provided for convenience. It differs from the above function o...
Definition kaboutdata.h:747
KAboutData & addAuthor(const KAboutPerson &author)
Add an author.
KAboutData & addCredit(const QString &name, const QString &task, const QString &emailAddress, const QString &webAddress, const QString &kdeStoreUsername)
This is an overloaded member function, provided for convenience. It differs from the above function o...
Definition kaboutdata.h:794
KAboutData & operator=(const KAboutData &other)
Assignment operator.
KAboutData & addCredit(const KAboutPerson &person)
Add a person that deserves credit.
static void setApplicationData(const KAboutData &aboutData)
Sets the application data for this application.
KAboutData(const QString &componentName, const QString &displayName, const QString &version, const QString &shortDescription, enum KAboutLicense::LicenseKey licenseType, const QString &copyrightStatement=QString(), const QString &otherText=QString(), const QString &homePageAddress=QString(), const QString &bugAddress=QStringLiteral("submit@bugs.kde.org"))
Constructor.
static KAboutData applicationData()
Returns the KAboutData for the application.
This class is used to store information about a license.
Definition kaboutdata.h:187
LicenseKey
Describes the license of the software; for more information see: https://spdx.org/licenses/.
Definition kaboutdata.h:200
@ GPL_V3
GPL_V3, see https://spdx.org/licenses/GPL-3.0.html.
Definition kaboutdata.h:213
@ BSL_V1
BSL_V1.
Definition kaboutdata.h:220
@ CC0_V1
CC0_V1.
Definition kaboutdata.h:222
@ KCOREADDONS_ENUMERATOR_DEPRECATED_VERSION
BSDL, see https://spdx.org/licenses/BSD-2-Clause.html.
Definition kaboutdata.h:209
@ ODbL_V1
ODbL_V1.
Definition kaboutdata.h:217
@ Artistic
Artistic, see https://spdx.org/licenses/Artistic-2.0.html.
Definition kaboutdata.h:212
@ BSD_2_Clause
BSD_2_CLAUSE, see https://spdx.org/licenses/BSD-2-Clause.html.
Definition kaboutdata.h:211
@ LGPL_V2_1
LGPL_V2_1.
Definition kaboutdata.h:215
@ Unknown
Unknown license.
Definition kaboutdata.h:203
@ BSD_3_Clause
BSD_3_CLAUSE.
Definition kaboutdata.h:221
@ MPL_V2
MPL_V2.
Definition kaboutdata.h:223
@ Custom
Custom license.
Definition kaboutdata.h:201
@ LGPL_V2
LGPL_V2, this has the same value as LicenseKey::LGPL, see https://spdx.org/licenses/LGPL-2....
Definition kaboutdata.h:207
@ GPL_V2
GPL_V2, this has the same value as LicenseKey::GPL, see https://spdx.org/licenses/GPL-2....
Definition kaboutdata.h:205
@ File
License set from text file, see setLicenseFromPath()
Definition kaboutdata.h:202
@ LGPL_V3
LGPL_V3, see https://spdx.org/licenses/LGPL-3.0-only.html.
Definition kaboutdata.h:214
@ Apache_V2
Apache_V2.
Definition kaboutdata.h:218
VersionRestriction
Whether later versions of the license are allowed.
Definition kaboutdata.h:239
NameFormat
Format of the license name.
Definition kaboutdata.h:230
This class is used to store information about a person or developer.
Definition kaboutdata.h:64
static KAboutPerson fromJSON(const QJsonObject &obj)
Creates a KAboutPerson from a JSON object with the following structure:
KAboutPerson(const QString &name=QString(), const QString &task=QString(), const QString &emailAddress=QString(), const QString &webAddress=QString(), const QUrl &avatarUrl=QUrl())
Convenience constructor.
KAboutPerson(const KAboutPerson &other)
Copy constructor.
KAboutPerson & operator=(const KAboutPerson &other)
Assignment operator.
KCRASH_EXPORT void defaultCrashHandler(int signal)
This file is part of the KDE documentation.
Documentation copyright © 1996-2025 The KDE developers.
Generated on Fri Jan 24 2025 11:55:52 by doxygen 1.13.2 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.