KControl module classes

## Classes

class | KCModuleContainer
class | KCModuleInfo
class | KCModuleLoader
class | KCModuleProxy
class | KCModuleProxyIface
class | KCModuleProxyRootDispatcher
class | KCMultiDialog

## Macros

#define | KCMODULECONTAINER(modules, factoryName)

## Detailed Description

Thwse classes provide the KControl module API.

## Macro Definition Documentation

#define KCMODULECONTAINER | ( |  | modules,
|  |  | factoryName
| ) |  |

Value:
extern "C" \
{ \
KCModule *create_## factoryName(QWidget *parent, const char *name) \
{ \
return new KCModuleContainer( parent, name, QString( modules ) ); \
} \
\
bool test_## factoryName() \
{ \
QStringList modList = QStringList::split( ",", QString(modules).remove( " " )); \
for ( QStringList::Iterator it = modList.begin(); it != modList.end(); ++it ) \
if ( KCModuleLoader::testModule( *it ) ) \
return true; \
return false; \
} \
}
KCModuleContainer
KCModuleContainer is a convenience class encapsulating several KCModules.
Definition: kcmodulecontainer.h:53
KCModuleLoader::testModule
static bool testModule(const QString &module)
Checks whether an KCModule should be shown by running its test function.
Definition: kcmoduleloader.cpp:216

This macro creates an factory declaration which when run creates an KCModule with specified modules.

For example:

KCMODULECONTAINER( "kcm_fonts, kcm_keyboard,kcm_fonts", misc_modules)

would create a KCModule with three tabs, each containing one of the specified KCMs. Each use of the macro must be accompanied by a desktop file where the factory name equals the second argument in the macro(in this example, misc_modules).
The module container takes care of testing the contained modules when being shown, as well as when the module itself is asked whether it should be shown.

Parameters

  modules | the modules to put in the container
  factoryName | what factory name the module should have

Definition at line 188 of file kcmodulecontainer.h.

KDE Home | KDE Accessibility Home | Description of Access Keys