#include <tdecmoduleinfo.h>
Public Member Functions | |
TDECModuleInfo (const TQString &desktopFile) | |
TDECModuleInfo (KService::Ptr moduleInfo) | |
TDECModuleInfo (const TDECModuleInfo &rhs) | |
TDECModuleInfo () | |
TDECModuleInfo & | operator= (const TDECModuleInfo &rhs) |
bool | operator== (const TDECModuleInfo &rhs) const |
bool | operator!= (const TDECModuleInfo &rhs) const |
~TDECModuleInfo () | |
TQString | fileName () const |
const TQStringList & | keywords () const |
TQString | factoryName () const |
TQString | moduleName () const |
KService::Ptr | service () const |
TQString | comment () const |
TQString | icon () const |
TQString | docPath () const |
TQString | library () const |
TQString | handle () const |
int | weight () const |
bool | needsRootPrivileges () const |
bool | isHiddenByDefault () const TDE_DEPRECATED |
bool | needsTest () const |
Protected Member Functions | |
void | setKeywords (const TQStringList &keyword) |
void | setName (const TQString &name) |
void | setComment (const TQString &comment) |
void | setIcon (const TQString &icon) |
void | setLibrary (const TQString &lib) |
void | setHandle (const TQString &handle) |
void | setWeight (int weight) |
void | setNeedsTest (bool val) |
void | setNeedsRootPrivileges (bool needsRootPrivileges) |
void | setIsHiddenByDefault (bool isHiddenByDefault) |
void | setDocPath (const TQString &p) |
void | loadAll () |
Detailed Description
A class that provides information about a TDECModule.
TDECModuleInfo provides various technical information, such as icon, library etc. about a TDECModule.n
- Note
- Any values set with the set* functions is not written back with TDECModuleInfo it only reads value from the desktop file.
Definition at line 49 of file tdecmoduleinfo.h.
Constructor & Destructor Documentation
◆ TDECModuleInfo() [1/4]
TDECModuleInfo::TDECModuleInfo | ( | const TQString & | desktopFile | ) |
Constructs a TDECModuleInfo.
- Note
- a TDECModuleInfo 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 tdecmoduleinfo.cpp.
◆ TDECModuleInfo() [2/4]
TDECModuleInfo::TDECModuleInfo | ( | 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 61 of file tdecmoduleinfo.cpp.
◆ TDECModuleInfo() [3/4]
TDECModuleInfo::TDECModuleInfo | ( | const TDECModuleInfo & | rhs | ) |
Same as above but takes a TDECModuleInfo as argument.
- Parameters
-
rhs specifies the module
Definition at line 66 of file tdecmoduleinfo.cpp.
◆ TDECModuleInfo() [4/4]
TDECModuleInfo::TDECModuleInfo | ( | ) |
Same as above but creates an empty TDECModuleInfo.
You should not normally call this.
- Since
- 3.4
Definition at line 48 of file tdecmoduleinfo.cpp.
◆ ~TDECModuleInfo()
TDECModuleInfo::~TDECModuleInfo | ( | ) |
Default destructor.
Definition at line 117 of file tdecmoduleinfo.cpp.
Member Function Documentation
◆ comment()
|
inline |
- Returns
- the module's (translated) comment field
Definition at line 142 of file tdecmoduleinfo.h.
◆ docPath()
TQString TDECModuleInfo::docPath | ( | ) | const |
- Returns
- the path of the module's documentation
Definition at line 183 of file tdecmoduleinfo.cpp.
◆ factoryName()
TQString TDECModuleInfo::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 95 of file tdecmoduleinfo.cpp.
◆ fileName()
|
inline |
- Returns
- the filename of the .desktop file that describes the KCM
Definition at line 113 of file tdecmoduleinfo.h.
◆ handle()
TQString TDECModuleInfo::handle | ( | ) | const |
- Returns
- a handle (usually the contents of the FactoryName field)
Definition at line 192 of file tdecmoduleinfo.cpp.
◆ icon()
|
inline |
- Returns
- the module's icon name
Definition at line 147 of file tdecmoduleinfo.h.
◆ isHiddenByDefault()
bool TDECModuleInfo::isHiddenByDefault | ( | ) | const |
- Returns
- the isHiddenByDefault attribute.
Definition at line 222 of file tdecmoduleinfo.cpp.
◆ keywords()
|
inline |
- Returns
- the keywords associated with this KCM.
Definition at line 118 of file tdecmoduleinfo.h.
◆ library()
|
inline |
- Returns
- the library name
Definition at line 157 of file tdecmoduleinfo.h.
◆ loadAll()
|
protected |
Reads the service entries specific for TDECModule from the desktop file.
The usual desktop entries are read in init.
Definition at line 150 of file tdecmoduleinfo.cpp.
◆ moduleName()
|
inline |
- Returns
- the module\'s (translated) name
Definition at line 131 of file tdecmoduleinfo.h.
◆ needsRootPrivileges()
bool TDECModuleInfo::needsRootPrivileges | ( | ) | const |
- Returns
- whether the module might require root permissions
Definition at line 213 of file tdecmoduleinfo.cpp.
◆ needsTest()
bool TDECModuleInfo::needsTest | ( | ) | const |
- Returns
- true if the module should be conditionally loaded.
- Since
- 3.4
Definition at line 230 of file tdecmoduleinfo.cpp.
◆ operator!=()
bool TDECModuleInfo::operator!= | ( | const TDECModuleInfo & | rhs | ) | const |
- Returns
- true if
rhs
is not equal itself
Definition at line 112 of file tdecmoduleinfo.cpp.
◆ operator=()
TDECModuleInfo & TDECModuleInfo::operator= | ( | const TDECModuleInfo & | rhs | ) |
Assignment operator.
Definition at line 75 of file tdecmoduleinfo.cpp.
◆ operator==()
bool TDECModuleInfo::operator== | ( | const TDECModuleInfo & | rhs | ) | const |
◆ service()
|
inline |
- Returns
- a TDESharedPtr to KService created from the modules .desktop file
Definition at line 137 of file tdecmoduleinfo.h.
◆ setComment()
|
inlineprotected |
Sets the object's name.
- Parameters
-
comment the new comment
Definition at line 208 of file tdecmoduleinfo.h.
◆ setDocPath()
|
inlineprotected |
Sets the object's documentation path.
- Parameters
-
p the new documentation path
Definition at line 262 of file tdecmoduleinfo.h.
◆ setHandle()
|
inlineprotected |
Sets the factory name.
- Parameters
-
handle The new factory name
Definition at line 226 of file tdecmoduleinfo.h.
◆ setIcon()
|
inlineprotected |
Sets the object's icon.
- Parameters
-
icon the name of the new icon
Definition at line 214 of file tdecmoduleinfo.h.
◆ setIsHiddenByDefault()
|
inlineprotected |
Definition at line 255 of file tdecmoduleinfo.h.
◆ setKeywords()
|
inlineprotected |
Sets the object's keywords.
- Parameters
-
keyword the new keywords
Definition at line 196 of file tdecmoduleinfo.h.
◆ setLibrary()
|
inlineprotected |
Set the object's library.
- Parameters
-
lib the name of the new library without any extensions or prefixs.
Definition at line 220 of file tdecmoduleinfo.h.
◆ setName()
|
inlineprotected |
Sets the object's name.
- Parameters
-
name the new name
Definition at line 202 of file tdecmoduleinfo.h.
◆ setNeedsRootPrivileges()
|
inlineprotected |
Toggles whether the represented module needs root privileges.
Use with caution.
- Parameters
-
needsRootPrivileges if module needs root privilges
Definition at line 249 of file tdecmoduleinfo.h.
◆ setNeedsTest()
|
protected |
Sets if the module should be tested for loading.
- Parameters
-
val the value to set
- Since
- 3.4
Definition at line 238 of file tdecmoduleinfo.cpp.
◆ setWeight()
|
inlineprotected |
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 tdecmoduleinfo.h.
◆ weight()
int TDECModuleInfo::weight | ( | ) | const |
- Returns
- the weight of the module which determines the order of the pages in the KCMultiDialog. It's set by the X-TDE-Weight field.
Definition at line 204 of file tdecmoduleinfo.cpp.
The documentation for this class was generated from the following files: