kutils Library API Documentation

KPluginSelectionWidget Class Reference

This is a widget to configure what Plugins should be loaded. More...

#include <kpluginselector_p.h>

Inheritance diagram for KPluginSelectionWidget:

Inheritance graph
[legend]
Collaboration diagram for KPluginSelectionWidget:

Collaboration graph
[legend]
List of all members.

Signals

void changed (bool)
void configCommitted (const QCString &instanceName)

Public Member Functions

 KPluginSelectionWidget (const QString &instanceName, KPluginSelector *kps, QWidget *parent, const QString &catname, const QString &category, KConfigGroup *config=0, const char *name=0)
 KPluginSelectionWidget (const QValueList< KPluginInfo * > &plugininfos, KPluginSelector *kps, QWidget *parent, const QString &catname, const QString &category, KConfigGroup *config=0, const char *name=0)
QString catName () const
virtual void load ()
virtual void save ()
bool pluginChecked (const QString &pluginName) const

Protected Member Functions

virtual bool pluginIsLoaded (const QString &pluginName) const

Detailed Description

This is a widget to configure what Plugins should be loaded.

This widget is used by KPluginSelector and has no direct use.

Definition at line 40 of file kpluginselector_p.h.


Constructor & Destructor Documentation

KPluginSelectionWidget::KPluginSelectionWidget const QString instanceName,
KPluginSelector kps,
QWidget parent,
const QString catname,
const QString category,
KConfigGroup config = 0,
const char *  name = 0
 

Create a new Plugin Selector widget for KParts plugins.

If you want to support different types of plugins use the following constructor. Using this constructor the Type field will be ignored.

The information about the plugins will be loaded from the share/apps/<instancename>/kpartplugins directory.

Parameters:
instanceName The name of the plugin's parent.
kps A KPluginSelector object.
parent The parent widget.
catname The translated name of the category.
category The unstranslated category key name.
config Set the KConfigGroup object that holds the state of the plugins being enabled or not.
name The name of the widget (passed to QWidget)

Definition at line 167 of file kpluginselector.cpp.

References KStdAccel::name().

KPluginSelectionWidget::KPluginSelectionWidget const QValueList< KPluginInfo * > &  plugininfos,
KPluginSelector kps,
QWidget parent,
const QString catname,
const QString category,
KConfigGroup config = 0,
const char *  name = 0
 

Create a new Plugin Selector widget for non-KParts plugins.

If you want to support different types of plugins use the following constructor. Using this constructor the Type field will be ignored.

Parameters:
plugininfos A list of KPluginInfo objects containing the necessary information for the plugins you want to add the selector's list.
kps A KPluginSelector object.
parent The parent widget.
catname The translated name of the category.
category The unstranslated category key name.
config Set the KConfigGroup object that holds the state of the plugins being enabled or not.
name The name of the widget (passed to QWidget)

Definition at line 176 of file kpluginselector.cpp.

References KStdAccel::name().


Member Function Documentation

QString KPluginSelectionWidget::catName  )  const [inline]
 

Returns the translated category name.

Definition at line 186 of file kpluginselector.cpp.

void KPluginSelectionWidget::load  )  [virtual]
 

Tell the KPluginInfo objects to load their state (enabled/disabled).

Definition at line 445 of file kpluginselector.cpp.

References endl(), KPluginInfo::isPluginEnabled(), k_funcinfo, kdDebug(), and KPluginInfo::load().

void KPluginSelectionWidget::save  )  [virtual]
 

It tells the KPluginInfo objects to save their current state (enabled/disabled).

Definition at line 468 of file kpluginselector.cpp.

References changed(), configCommitted(), endl(), k_funcinfo, kdDebug(), KPluginInfo::save(), and KPluginInfo::setPluginEnabled().

bool KPluginSelectionWidget::pluginChecked const QString pluginName  )  const
 

Returns:
whether the plugin is enabled in the ListView or not.

void KPluginSelectionWidget::changed bool   )  [signal]
 

Emits true when at least one embedded KCM is changed, or the plugin selection was changed.

Emits false when the configuration is back to what it was.

Referenced by save().

void KPluginSelectionWidget::configCommitted const QCString instanceName  )  [signal]
 

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 save().

bool KPluginSelectionWidget::pluginIsLoaded const QString pluginName  )  const [protected, virtual]
 

Reimplement in your subclass if you have special needs: The standard implementation looks at the KPluginInfo objects to find the needed information.

But if, for some reason, your program doesn't work with that here's your chance to get it working.

Returns:
Whether the plugin is loaded.

Definition at line 254 of file kpluginselector.cpp.


The documentation for this class was generated from the following files:
KDE Logo
This file is part of the documentation for kutils Library Version 3.2.3.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Thu Sep 30 05:20:15 2004 by doxygen 1.3.4 written by Dimitri van Heesch, © 1997-2003