KCModuleContainer Class Reference
KCModuleContainer is a convenience class encapsulating several KCModules. More...
#include <kcmodulecontainer.h>
Inheritance diagram for KCModuleContainer:


Public Member Functions | |
KCModuleContainer (QWidget *parent, const char *name, const QStringList &mods) | |
KCModuleContainer (QWidget *parent, const char *name, const QString &mods=QString()) | |
void | addModule (const QString &module) |
virtual | ~KCModuleContainer () |
void | save () |
void | load () |
void | defaults () |
Protected Types | |
typedef QValueList< KCModuleProxy * > | ModuleList |
Protected Member Functions | |
void | finalize () |
Protected Attributes | |
ModuleList | changedModules |
ModuleList | allModules |
Detailed Description
KCModuleContainer is a convenience class encapsulating several KCModules.
The KCModuleContainer class is a convenience class for organizing a multiple set of KCModule. KCModuleContainer is a sub class of KCModule and builds an interface mainly consisting of a tab widget where each tab contains one of the modules specified via one of the constructors. KCModuleContainer can handle modules which requires root permissions. What you most likely want is the KCMODULECONTAINER macro.
Sometimes it is of interest to detect in runtime whether a module should be loaded or not. This can be achieved by sub classing KCModuleContainer, doing the probing/testing checks and then manually call addModule for each module which should be displayed. When all calls to addModule is done, call finalize() which performs some necessary final steps.
- Author:
- Frans Englich <frans.englich@telia.com>
- Since:
- 3.4
Definition at line 52 of file kcmodulecontainer.h.
Constructor & Destructor Documentation
|
Creates a KCModuleContainer with tabs, each one containing one of the specified modules in
Definition at line 81 of file kcmodulecontainer.cpp. |
|
This is a convenience function, instead of building a QStringList you can specify the modules in a comma separated QString. For example; KCModuleContainer* cont = KCModuleContainer( this, "kcm_misc", QString("kcm_energy, kcm_keyboard ,kcm_useraccount, kcm_mouse") ); What you probably want is the KCMODULECONTAINER macro which builds an KCModule for you, taking the modules you want as argument.
Definition at line 73 of file kcmodulecontainer.cpp. |
|
Default destructor.
Definition at line 247 of file kcmodulecontainer.cpp. |
Member Function Documentation
|
Adds the specified module to the tab widget. Setting the tab icon, text, tool tip, connecting the signals is what it does.
Definition at line 123 of file kcmodulecontainer.cpp. References KCModule::buttons(), KCModule::changed(), KCModuleInfo::comment(), KCModuleInfo::icon(), kdDebug(), KCModuleProxy::moduleInfo(), KCModuleInfo::moduleName(), KCModuleInfo::needsRootPrivileges(), KCModuleProxy::realModule(), and KService::serviceByDesktopName(). |
|
Reimplemented for internal purposes.
Reimplemented from KCModule. Definition at line 199 of file kcmodulecontainer.cpp. References KCModule::changed(). |
|
Reimplemented for internal purposes.
Reimplemented from KCModule. Definition at line 212 of file kcmodulecontainer.cpp. References KCModule::changed(). |
|
Reimplemented for internal purposes.
Reimplemented from KCModule. Definition at line 225 of file kcmodulecontainer.cpp. References KCModule::changed(). |
|
Sets this KCM's buttons and adds a AdminMode button if necessary. If KCModuleContainer is subclassed finalize() should be called in the constructor after all calls to addModule have been done. Call it once. Definition at line 106 of file kcmodulecontainer.cpp. References KCModule::setButtons(). |
Member Data Documentation
|
A list containing KCModuleProxy objects which have changed and must be saved.
Definition at line 131 of file kcmodulecontainer.h. |
|
A list of all modules which are encapsulated.
Definition at line 136 of file kcmodulecontainer.h. |
The documentation for this class was generated from the following files: