Search for usage in LXR

KCModuleInfo Class Reference

#include <kcmoduleinfo.h>

Public Member Functions

 KCModuleInfo ()
 KCModuleInfo (const KCModuleInfo &rhs)
 KCModuleInfo (const KPluginInfo &pluginInfo)
 KCModuleInfo (const QString &desktopFile)
 KCModuleInfo (KService::Ptr moduleInfo)
 ~KCModuleInfo ()
QString comment () const
QString docPath () const
QString fileName () const
QString handle () const
QString icon () const
bool isValid () const
QStringList keywords () const
QString library () const
QString moduleName () const
bool operator!= (const KCModuleInfo &rhs) const
KCModuleInfooperator= (const KCModuleInfo &rhs)
bool operator== (const KCModuleInfo &rhs) const
KPluginInfo pluginInfo () const
QVariant property (const QString &key) const
KService::Ptr service () const
int weight () const

Detailed Description

A class that provides information about a KCModule.

KCModuleInfo provides various technical information, such as icon, library etc. about a KCModule.

Any values set with the set* functions are not written back, KCModuleInfo only reads values from the desktop file.
Matthias Hoelzer-Kluepfel [email protected][email protected]de.o[email protected]rg
Matthias Elter elter[email protected]@kde[email protected].org
Daniel Molkentin molke[email protected]ntin[email protected]@kde.[email protected]org

Definition at line 36 of file kcmoduleinfo.h.

Constructor & Destructor Documentation

◆ KCModuleInfo() [1/5]

KCModuleInfo::KCModuleInfo ( const QString desktopFile)

Constructs a KCModuleInfo.

a KCModuleInfo object will have to be manually deleted, it is not done automatically for you.
desktopFilethe desktop file representing the module, or the name of the module.
Since 5.88, use KPluginMetaData API instead

Definition at line 93 of file kcmoduleinfo.cpp.

◆ KCModuleInfo() [2/5]

KCModuleInfo::KCModuleInfo ( const KPluginInfo pluginInfo)

Same as above but takes a KPluginInfo as argument.

This allows to encapsulate both the case of KService (desktop file) and the case of KPluginMetaData (JSon data in .so file) under the same API.

pluginInfospecifies the module
Since 5.88, use KPluginMetaData API instead

Definition at line 103 of file kcmoduleinfo.cpp.

◆ KCModuleInfo() [3/5]

KCModuleInfo::KCModuleInfo ( KService::Ptr  moduleInfo)

Same as above but takes a KService::Ptr as argument.

moduleInfo must be a valid pointer.
moduleInfospecifies the module
Since 5.88, use KPluginMetaData API instead

Definition at line 98 of file kcmoduleinfo.cpp.

◆ KCModuleInfo() [4/5]

KCModuleInfo::KCModuleInfo ( const KCModuleInfo rhs)

Copy constructor.

rhsspecifies the module info to copy
Since 5.88, use KPluginMetaData API instead

Definition at line 108 of file kcmoduleinfo.cpp.

◆ KCModuleInfo() [5/5]

KCModuleInfo::KCModuleInfo ( )

Same as above but creates an empty KCModuleInfo.

You should not normally call this.

Definition at line 88 of file kcmoduleinfo.cpp.

◆ ~KCModuleInfo()

KCModuleInfo::~KCModuleInfo ( )

Default destructor.

Definition at line 130 of file kcmoduleinfo.cpp.

Member Function Documentation

◆ comment()

QString KCModuleInfo::comment ( ) const
the module's (translated) comment field

Definition at line 214 of file kcmoduleinfo.cpp.

◆ docPath()

QString KCModuleInfo::docPath ( ) const
the path of the module's documentation

Definition at line 229 of file kcmoduleinfo.cpp.

◆ fileName()

QString KCModuleInfo::fileName ( ) const
the filename of the .desktop file that describes the KCM

Definition at line 179 of file kcmoduleinfo.cpp.

◆ handle()

QString KCModuleInfo::handle ( ) const
a handle (the contents of the X-KDE-FactoryName field if it exists, else the same as the library name)
Since 5.85, use KPluginMetaData::pluginId or KCModuleInfo::library instead

Definition at line 239 of file kcmoduleinfo.cpp.

◆ icon()

QString KCModuleInfo::icon ( ) const
the module's icon name

Definition at line 219 of file kcmoduleinfo.cpp.

◆ isValid()

bool KCModuleInfo::isValid ( ) const

Returns true if the KCM was found.


Definition at line 135 of file kcmoduleinfo.cpp.

◆ keywords()

QStringList KCModuleInfo::keywords ( ) const
the keywords associated with this KCM.

Definition at line 184 of file kcmoduleinfo.cpp.

◆ library()

QString KCModuleInfo::library ( ) const
the library name

Definition at line 224 of file kcmoduleinfo.cpp.

◆ moduleName()

QString KCModuleInfo::moduleName ( ) const
the module\'s (translated) name

Definition at line 189 of file kcmoduleinfo.cpp.

◆ operator!=()

bool KCModuleInfo::operator!= ( const KCModuleInfo rhs) const
true if rhs is not the same KCModule as this object.

Definition at line 125 of file kcmoduleinfo.cpp.

◆ operator=()

KCModuleInfo & KCModuleInfo::operator= ( const KCModuleInfo rhs)

Assignment operator.

Definition at line 114 of file kcmoduleinfo.cpp.

◆ operator==()

bool KCModuleInfo::operator== ( const KCModuleInfo rhs) const

Returns true if rhs describes the same KCModule as this object.

Definition at line 120 of file kcmoduleinfo.cpp.

◆ pluginInfo()

KPluginInfo KCModuleInfo::pluginInfo ( ) const
the KPluginInfo containing more information about this module

Definition at line 209 of file kcmoduleinfo.cpp.

◆ property()

QVariant KCModuleInfo::property ( const QString key) const
The value associated to the key. You can use it if you want to read custom values. To do this you need to define your own servicetype and add it to the ServiceTypes keys.

Definition at line 258 of file kcmoduleinfo.cpp.

◆ service()

KService::Ptr KCModuleInfo::service ( ) const
a QExplicitlySharedDataPointer to KService created from the modules .desktop file
This will be null if this KCModuleInfo was created from a KPluginInfo coming from KPluginMetaData. Prefer using pluginInfo() instead, which works for both kinds.

Definition at line 194 of file kcmoduleinfo.cpp.

◆ weight()

int KCModuleInfo::weight ( ) const
the weight of the module which determines the order of the pages in the KCMultiDialog. It's set by the X-KDE-Weight field.
Since 5.88, read X-KDE-Weight from KPluginMetaData instance instead

Definition at line 249 of file kcmoduleinfo.cpp.

The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2022 The KDE developers.
Generated on Tue Jun 28 2022 04:06:00 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.