org.kde.koala

Class KPluginSelector

public class KPluginSelector extends QWidget

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. See KPluginSelectorSignals for signals emitted by KPluginSelector

Author: Matthias Kretz

UNKNOWN: A widget to select what plugins to load and configure the plugins.

Constructor Summary
protected KPluginSelector(Class dummy)
KPluginSelector(QWidget parent, String name)
Create a new KPluginSelector.
KPluginSelector(QWidget parent)
Method Summary
voidaddPlugins(String instanceName, String catname, String category, KConfig config)
Add a list of KParts plugins If you want to support non-KParts plugins use the following function.
voidaddPlugins(String instanceName, String catname, String category)
voidaddPlugins(String instanceName, String catname)
voidaddPlugins(String instanceName)
voidaddPlugins(KInstanceInterface instance, String catname, String category, KConfig config)
Add a list of KParts plugins.
voidaddPlugins(KInstanceInterface instance, String catname, String category)
voidaddPlugins(KInstanceInterface instance, String catname)
voidaddPlugins(KInstanceInterface instance)
StringclassName()
voiddefaults()
Change to applications defaults
voiddispose()
Delete the wrapped C++ instance ahead of finalize()
protected voidfinalize()
Deletes the wrapped C++ instance
booleanisDisposed()
Has the wrapped C++ instance been deleted?
voidload()
Load the state of the plugins (selected or not) from the KPluginInfo objects.
QMetaObjectmetaObject()
voidsave()
Save the configuration
voidsetShowEmptyConfigPage(boolean arg1)
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.

Constructor Detail

KPluginSelector

protected KPluginSelector(Class dummy)

KPluginSelector

public KPluginSelector(QWidget parent, String name)
Create a new KPluginSelector.

UNKNOWN: Create a new KPluginSelector.

KPluginSelector

public KPluginSelector(QWidget parent)

Method Detail

addPlugins

public void addPlugins(String instanceName, String catname, String category, KConfig config)
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.

Parameters: instanceName The name of the KInstance of the plugin's parent. catname The translated name of the category. This is the name that is shown in the TabWidget if there is more than one category. category When you have different categories of KParts plugins you distinguish between the plugins using the Category key in the .desktop file. Use this parameter to select only those KParts plugins with the Category key == category. If category is not set the Category key is ignored and all plugins are shown. config The KConfig object that holds the state of the plugins being enabled or not. By default it should be instance.config(). It is recommended to always pass a KConfig object if you use KSettings.PluginPage since you never know from where the page will be called (think global config app). For example KViewCanvas passes KSimpleConfig( "kviewcanvas" ).

UNKNOWN: Add a list of KParts plugins

addPlugins

public void addPlugins(String instanceName, String catname, String category)

addPlugins

public void addPlugins(String instanceName, String catname)

addPlugins

public void addPlugins(String instanceName)

addPlugins

public void addPlugins(KInstanceInterface instance, String catname, String category, KConfig config)
Add a list of KParts plugins. Convenience method for the one above. If not set explicitely, config is set to instance.config().

UNKNOWN: Add a list of KParts plugins.

addPlugins

public void addPlugins(KInstanceInterface instance, String catname, String category)

addPlugins

public void addPlugins(KInstanceInterface instance, String catname)

addPlugins

public void addPlugins(KInstanceInterface instance)

className

public String className()

defaults

public void defaults()
Change to applications defaults

UNKNOWN: Change to applications defaults

dispose

public void dispose()
Delete the wrapped C++ instance ahead of finalize()

finalize

protected void finalize()
Deletes the wrapped C++ instance

isDisposed

public boolean isDisposed()
Has the wrapped C++ instance been deleted?

load

public void load()
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.

UNKNOWN: Load the state of the plugins (selected or not) from the KPluginInfo objects.

metaObject

public QMetaObject metaObject()

save

public void save()
Save the configuration

UNKNOWN: Save the configuration

setShowEmptyConfigPage

public void setShowEmptyConfigPage(boolean arg1)
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.

UNKNOWN: 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.