KPluginSelector Class Reference
A widget to select what plugins to load and configure the plugins. More...
#include <kpluginselector.h>
Inheritance diagram for KPluginSelector:

Signals | |
void | changed (bool) |
void | configCommitted (const QCString &instanceName) |
Public Member Functions | |
KPluginSelector (QWidget *parent, const char *name=0) | |
void | addPlugins (const QString &instanceName, const QString &catname=QString::null, const QString &category=QString::null, KConfig *config=0) |
void | addPlugins (const KInstance *instance, const QString &catname=QString::null, const QString &category=QString::null, KConfig *config=0) |
void | addPlugins (const QValueList< KPluginInfo * > &plugininfos, const QString &catname=QString::null, const QString &category=QString::null, KConfig *config=0) |
void | setShowEmptyConfigPage (bool) |
void | load () |
void | save () |
void | defaults () |
Detailed Description
A widget to select what plugins to load and configure the plugins.It shows the list of available plugins on top (if there's more than one category this is a TabWidget) and the configuration of the selected plugin below that.
Since the user needs a way to know what a specific plugin does every plugin sould install a desktop file containing a name, comment and category field. The category is usefull for applications that can use different kinds of plugins like a playlist, skin or visualization.
The location of these desktop files is the share/apps/<instancename>/<plugindir> directory. But if you need you may use a different directory.
Often a program has more than one kind of plugin. In that case you want to make a visible distinction between those plugins. All you have to do is to create a KPluginSelectionWidget for every category and then add them all to the KPluginSelector.
- Author:
- Matthias Kretz <kretz@kde.org>
- Since:
- 3.2
Definition at line 55 of file kpluginselector.h.
Constructor & Destructor Documentation
|
Create a new KPluginSelector.
Definition at line 544 of file kpluginselector.cpp. |
Member Function Documentation
|
Add a list of KParts plugins. If you want to support non-KParts plugins use the following function. The information about the plugins will be loaded from the share/apps/<instancename>/kpartplugins directory.
Definition at line 596 of file kpluginselector.cpp. References changed(), configCommitted(), k_funcinfo, and kdDebug(). Referenced by addPlugins(). |
|
Add a list of KParts plugins. Convenience method for the one above. Definition at line 623 of file kpluginselector.cpp. References addPlugins(), and KInstance::instanceName(). |
|
Add a list of non-KParts plugins.
Definition at line 629 of file kpluginselector.cpp. References changed(), configCommitted(), k_funcinfo, and kdDebug(). |
|
Set whether the area for showing the KCMs of the plugins should be hidden if the plugin doesn't have a KCM or whether the layout should rather stay static and only an message should be shown. By default the config page is not hidden. Definition at line 676 of file kpluginselector.cpp. |
|
Load the state of the plugins (selected or not) from the KPluginInfo objects. For KParts plugins everything should work automatically. For your own type of plugins you might need to reimplement the KPluginInfo::isPluginEnabled() method. If that doesn't fit your needs you can also reimplement this method. Definition at line 684 of file kpluginselector.cpp. |
|
Save the configuration.
Definition at line 693 of file kpluginselector.cpp. |
|
Change to applications defaults.
Definition at line 702 of file kpluginselector.cpp. References k_funcinfo, and kdDebug(). |
|
Tells you whether the configuration is changed or not.
Referenced by addPlugins(). |
|
Emitted after the config of an embedded KCM has been saved. The argument is the name of the parent component that needs to reload its config Referenced by addPlugins(). |
The documentation for this class was generated from the following files: