KAboutComponent

Search for usage in LXR

KAboutComponent Class Reference

#include <kaboutdata.h>

Properties

QString description
 
KAboutLicense licenses
 
QString name
 
QString version
 
QString webAddress
 

Public Member Functions

 KAboutComponent (const QString &name=QString(), const QString &description=QString(), const QString &version=QString(), const QString &webAddress=QString(), enum KAboutLicense::LicenseKey licenseType=KAboutLicense::Unknown)
 
 KAboutComponent (const QString &name, const QString &description, const QString &version, const QString &webAddress, const QString &pathToLicenseFile)
 
 KAboutComponent (const KAboutComponent &other)
 
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!"),
KAboutLicense::LGPL,
i18n("Copyright (C) 2014 Developer"));
about.addComponent(i18n("Awsom Lib"),
i18n("Does awesom stuff. Copyright (C) 2014"),
i18n("1.02.3"),
"http://example.com",
KAboutLicense::LGPL);
QList<KAboutComponent> components = about.components();
Since
5.84

Definition at line 369 of file kaboutdata.h.

Constructor & Destructor Documentation

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 416 of file kaboutdata.cpp.

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 426 of file kaboutdata.cpp.

KAboutComponent::KAboutComponent ( const KAboutComponent other)
default

Copy constructor.

Performs a deep copy.

Parameters
otherobject to copy

Member Function Documentation

QString KAboutComponent::description ( ) const

The component's description.

Returns
the component's description (can be empty)
KAboutLicense KAboutComponent::license ( ) const

The component's license.

Returns
the component's KAboutLicense

Definition at line 461 of file kaboutdata.cpp.

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)
KAboutComponent & KAboutComponent::operator= ( const KAboutComponent other)
default

Assignment operator.

Performs a deep copy.

Parameters
otherobject to copy
QString KAboutComponent::version ( ) const

The component's version.

Returns
the component's task (can be empty)
QString KAboutComponent::webAddress ( ) const

The website or a relevant link.

Returns
the component's website (can be empty)

The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Mon Dec 6 2021 22:53:57 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.