KUtils
#include <QtCore/QString>#include <QtCore/QStringList>#include <kcmodule.h>#include <kcmoduleloader.h>#include <QtCore/QList>Go to the source code of this file.
Classes | |
| class | KCModuleContainer |
Macros | |
| #define | KCMODULECONTAINER(modules, factoryName) |
Macro Definition Documentation
◆ KCMODULECONTAINER
| #define KCMODULECONTAINER | ( | modules, | |
| factoryName | |||
| ) |
Value:
{ \
public: \
KCModuleContainer##factoryName(QWidget *parent, const QVariantList &) \
: KCModuleContainer(parent, QLatin1String(modules)) \
{ \
} \
}; \
K_PLUGIN_FACTORY(KCModuleContainer##factoryName##Factory, \
registerPlugin<KCModuleContainer#factoryName>(); \
) \
K_EXPORT_PLUGIN(KCModuleContainer##factoryName##Factory)
This macro creates an factory declaration which when run creates an KCModule with specified modules.
For example:
KCMODULECONTAINER("kcm_fonts,kcm_keyboard,kcm_foo", 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 162 of file kcmodulecontainer.h.
KCModuleContainer is a convenience class encapsulating several KCModules.
Definition: kcmodulecontainer.h:50
#define KCMODULECONTAINER(modules, factoryName)
This macro creates an factory declaration which when run creates an KCModule with specified modules.
Definition: kcmodulecontainer.h:162
KCModuleContainer(QWidget *parent, const QStringList &mods)
Creates a KCModuleContainer with tabs, each one containing one of the specified modules in mods.
Definition: kcmodulecontainer.cpp:74
#define K_EXPORT_PLUGIN(factory)
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Thu Aug 27 2020 00:00:00 by doxygen 1.8.20 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2020 The KDE developers.
Generated on Thu Aug 27 2020 00:00:00 by doxygen 1.8.20 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.