KUtils
KCModuleInfo Class Reference
[KControl module classes]
A class that provides information about a KCModule.
More...
#include <kcmoduleinfo.h>
Detailed Description
A class that provides information about a KCModule.KCModuleInfo provides various technical information, such as icon, library etc. about a KCModule.n
- Note:
- Any values set with the set* functions is not written back with KCModuleInfo it only reads value from the desktop file.
For internal use only.
- Since:
- 3.2
Definition at line 49 of file kcmoduleinfo.h.
Constructor & Destructor Documentation
KCModuleInfo::KCModuleInfo | ( | const QString & | desktopFile | ) |
Constructs a KCModuleInfo.
- Note:
- a KCModuleInfo object will have to be manually deleted, it is not done automatically for you.
- Parameters:
-
desktopFile the desktop file representing the module, or the name of the module.
Definition at line 54 of file kcmoduleinfo.cpp.
KCModuleInfo::KCModuleInfo | ( | KService::Ptr | moduleInfo | ) |
Same as above but takes a KService::Ptr as argument.
- Note:
moduleInfo
must be a valid pointer.
- Parameters:
-
moduleInfo specifies the module
Definition at line 59 of file kcmoduleinfo.cpp.
KCModuleInfo::KCModuleInfo | ( | const KCModuleInfo & | rhs | ) |
Same as above but takes a KCModuleInfo as argument.
- Parameters:
-
rhs specifies the module
Definition at line 64 of file kcmoduleinfo.cpp.
KCModuleInfo::KCModuleInfo | ( | ) |
Same as above but creates an empty KCModuleInfo.
You should not normally call this.
- Since:
- 3.4
Definition at line 48 of file kcmoduleinfo.cpp.
KCModuleInfo::~KCModuleInfo | ( | ) |
Member Function Documentation
QString KCModuleInfo::comment | ( | ) | const [inline] |
QString KCModuleInfo::docPath | ( | ) | const |
QString KCModuleInfo::factoryName | ( | ) | const |
Returns the module's factory name, if it's set.
If not, the library name is returned.
- Returns:
- the module's factory name
- Since:
- 3.4
Definition at line 93 of file kcmoduleinfo.cpp.
QString KCModuleInfo::fileName | ( | ) | const [inline] |
- Returns:
- the filename of the .desktop file that describes the KCM
Definition at line 113 of file kcmoduleinfo.h.
QString KCModuleInfo::handle | ( | ) | const |
- Returns:
- a handle (usually the contents of the FactoryName field)
Definition at line 190 of file kcmoduleinfo.cpp.
QString KCModuleInfo::icon | ( | ) | const [inline] |
bool KCModuleInfo::isHiddenByDefault | ( | ) | const |
const QStringList& KCModuleInfo::keywords | ( | ) | const [inline] |
QString KCModuleInfo::library | ( | ) | const [inline] |
void KCModuleInfo::loadAll | ( | ) | [protected] |
Reads the service entries specific for KCModule from the desktop file.
The usual desktop entries are read in init.
Definition at line 148 of file kcmoduleinfo.cpp.
QString KCModuleInfo::moduleName | ( | ) | const [inline] |
bool KCModuleInfo::needsRootPrivileges | ( | ) | const |
- Returns:
- whether the module might require root permissions
Definition at line 211 of file kcmoduleinfo.cpp.
bool KCModuleInfo::needsTest | ( | ) | const |
- Returns:
- true if the module should be conditionally loaded.
- Since:
- 3.4
Definition at line 228 of file kcmoduleinfo.cpp.
bool KCModuleInfo::operator!= | ( | const KCModuleInfo & | rhs | ) | const |
KCModuleInfo & KCModuleInfo::operator= | ( | const KCModuleInfo & | rhs | ) |
bool KCModuleInfo::operator== | ( | const KCModuleInfo & | rhs | ) | const |
KService::Ptr KCModuleInfo::service | ( | ) | const [inline] |
- Returns:
- a KSharedPtr to KService created from the modules .desktop file
Definition at line 137 of file kcmoduleinfo.h.
void KCModuleInfo::setComment | ( | const QString & | comment | ) | [inline, protected] |
Sets the object's name.
- Parameters:
-
comment the new comment
Definition at line 208 of file kcmoduleinfo.h.
void KCModuleInfo::setDocPath | ( | const QString & | p | ) | [inline, protected] |
Sets the object's documentation path.
- Parameters:
-
p the new documentation path
Definition at line 262 of file kcmoduleinfo.h.
void KCModuleInfo::setHandle | ( | const QString & | handle | ) | [inline, protected] |
Sets the factory name.
- Parameters:
-
handle The new factory name
Definition at line 226 of file kcmoduleinfo.h.
void KCModuleInfo::setIcon | ( | const QString & | icon | ) | [inline, protected] |
Sets the object's icon.
- Parameters:
-
icon the name of the new icon
Definition at line 214 of file kcmoduleinfo.h.
void KCModuleInfo::setIsHiddenByDefault | ( | bool | isHiddenByDefault | ) | [inline, protected] |
void KCModuleInfo::setKeywords | ( | const QStringList & | keyword | ) | [inline, protected] |
Sets the object's keywords.
- Parameters:
-
keyword the new keywords
Definition at line 196 of file kcmoduleinfo.h.
void KCModuleInfo::setLibrary | ( | const QString & | lib | ) | [inline, protected] |
Set the object's library.
- Parameters:
-
lib the name of the new library without any extensions or prefixs.
Definition at line 220 of file kcmoduleinfo.h.
void KCModuleInfo::setName | ( | const QString & | name | ) | [inline, protected] |
Sets the object's name.
- Parameters:
-
name the new name
Definition at line 202 of file kcmoduleinfo.h.
void KCModuleInfo::setNeedsRootPrivileges | ( | bool | needsRootPrivileges | ) | [inline, protected] |
Toggles whether the represented module needs root privileges.
Use with caution.
- Parameters:
-
needsRootPrivileges if module needs root privilges
Definition at line 249 of file kcmoduleinfo.h.
void KCModuleInfo::setNeedsTest | ( | bool | val | ) | [protected] |
Sets if the module should be tested for loading.
- Parameters:
-
val the value to set
- Since:
- 3.4
Definition at line 233 of file kcmoduleinfo.cpp.
void KCModuleInfo::setWeight | ( | int | weight | ) | [inline, protected] |
Sets the object's weight property which determines in what order modules will be displayed.
Default is 100.
- Parameters:
-
weight the new weight
Definition at line 234 of file kcmoduleinfo.h.
int KCModuleInfo::weight | ( | ) | const |
- Returns:
- the weight of the module which determines the order of the pages in the KCMultiDialog. It's set by the X-KDE-Weight field.
Definition at line 202 of file kcmoduleinfo.cpp.
The documentation for this class was generated from the following files: