KAboutComponent

Search for usage in LXR

KAboutComponent Class Reference

#include <KAboutComponent>

Properties

QString description
 
KAboutLicense licenses
 
QString name
 
QString version
 
QString webAddress
 

Public Member Functions

 KAboutComponent (const KAboutComponent &other)
 
 KAboutComponent (const QString &name, const QString &description, const QString &version, const QString &webAddress, const QString &pathToLicenseFile)
 
 KAboutComponent (const QString &name=QString(), const QString &description=QString(), const QString &version=QString(), const QString &webAddress=QString(), enum KAboutLicense::LicenseKey licenseType=KAboutLicense::Unknown)
 
QString description () const
 
KAboutLicense license () const
 
QString name () const
 
KAboutComponentoperator= (const KAboutComponent &other)
 
QString version () const
 
QString webAddress () const
 

Detailed Description

This class is used to store information about a third party component.

It can store the component's name, a description, a link to a website and the license of the libary. This class is intended for use in the KAboutData class, but it can be used elsewhere as well. Normally you should at least define the libary's name. Creating a KAboutComponent object by yourself is relatively useless, but the KAboutData method KAboutData::libaries() return lists of KAboutComponent data objects which you can examine.

Example usage within a main(), retrieving the list of components used by a program and re-using data from one of them:

KAboutData about("khello", i18n("KHello"), "0.1",
i18n("A KDE version of Hello, world!"),
i18n("Copyright (C) 2014 Developer"));
about.addComponent(i18n("Awsom Lib"),
i18n("Does awesom stuff. Copyright (C) 2014"),
i18n("1.02.3"),
"http://example.com",
QList<KAboutComponent> components = about.components();
This class is used to store information about a program or plugin.
Definition kaboutdata.h:548
QString i18n(const char *text, const TYPE &arg...)
Since
5.84

Definition at line 380 of file kaboutdata.h.

Property Documentation

◆ description

QString KAboutComponent::description
read

Definition at line 384 of file kaboutdata.h.

◆ licenses

KAboutLicense KAboutComponent::licenses
read

Definition at line 386 of file kaboutdata.h.

◆ name

QString KAboutComponent::name
read

Definition at line 383 of file kaboutdata.h.

◆ version

QString KAboutComponent::version
read

Definition at line 387 of file kaboutdata.h.

◆ webAddress

QString KAboutComponent::webAddress
read

Definition at line 385 of file kaboutdata.h.

Constructor & Destructor Documentation

◆ KAboutComponent() [1/3]

KAboutComponent::KAboutComponent ( const QString & name = QString(),
const QString & description = QString(),
const QString & version = QString(),
const QString & webAddress = QString(),
enum KAboutLicense::LicenseKey licenseType = KAboutLicense::Unknown )
explicit

Convenience constructor.

Parameters
nameThe name of the component.
descriptionThe description of this component.
versionThe version of this component.
webAddressWebsite of the component.
licenseTypeThe license identifier of the component.

name default argument

Definition at line 415 of file kaboutdata.cpp.

◆ KAboutComponent() [2/3]

KAboutComponent::KAboutComponent ( const QString & name,
const QString & description,
const QString & version,
const QString & webAddress,
const QString & pathToLicenseFile )
explicit

Convenience constructor.

Parameters
nameThe name of the component.
descriptionThe description of this component.
versionThe version of this component.
webAddressWebsite of the component.
pathToLicenseFilePath to the file in the local filesystem containing the license text. The file format has to be plain text in an encoding compatible to the local.

name default argument

Definition at line 429 of file kaboutdata.cpp.

◆ KAboutComponent() [3/3]

KAboutComponent::KAboutComponent ( const KAboutComponent & other)
default

Copy constructor.

Performs a deep copy.

Parameters
otherobject to copy

Member Function Documentation

◆ description()

QString KAboutComponent::description ( ) const

The component's description.

Returns
the component's description (can be empty)

Definition at line 453 of file kaboutdata.cpp.

◆ license()

KAboutLicense KAboutComponent::license ( ) const

The component's license.

Returns
the component's KAboutLicense

Definition at line 468 of file kaboutdata.cpp.

◆ name()

QString KAboutComponent::name ( ) const

The component's name.

Returns
the component's name (can be QString(), if it has been constructed with an empty name)

Definition at line 448 of file kaboutdata.cpp.

◆ operator=()

KAboutComponent & KAboutComponent::operator= ( const KAboutComponent & other)
default

Assignment operator.

Performs a deep copy.

Parameters
otherobject to copy

◆ version()

QString KAboutComponent::version ( ) const

The component's version.

Returns
the component's task (can be empty)

Definition at line 458 of file kaboutdata.cpp.

◆ webAddress()

QString KAboutComponent::webAddress ( ) const

The website or a relevant link.

Returns
the component's website (can be empty)

Definition at line 463 of file kaboutdata.cpp.


The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Oct 4 2024 12:03:29 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.