libs/libkipi/libkipi
#include <plugin.h>
Public Member Functions | |
Plugin (const KComponentData &instance, QObject *const parent, const char *name) | |
virtual | ~Plugin () |
QList< KAction * > | actions (QWidget *const widget=0) const |
Category | category (KAction *const action) const |
Interface * | interface () const |
void | rebuild () |
virtual void | setup (QWidget *const widget)=0 |
Protected Member Functions | |
void | addAction (const QString &name, KAction *const action) |
void | addAction (const QString &name, KAction *const action, Category cat) |
Category | defaultCategory () const |
void | setDefaultCategory (Category cat) |
void | setUiBaseName (const char *name) |
void | setupXML () |
QString | uiBaseName () const |
Detailed Description
Base class for the KIPI plugins.
TODO complete the documentation
Constructor & Destructor Documentation
KIPI::Plugin::Plugin | ( | const KComponentData & | instance, |
QObject *const | parent, | ||
const char * | name | ||
) |
Constructs a plugin.
- Parameters
-
instance the KComponentData associated with this plugin parent the parent of this object name the name of the plugin
Definition at line 200 of file plugin.cpp.
|
virtual |
Standard destructor.
All the actions in the actionCollection are deleted before the plugin is deleted
Definition at line 207 of file plugin.cpp.
Member Function Documentation
QList< KAction * > KIPI::Plugin::actions | ( | QWidget *const | widget = 0 | ) | const |
Returns the plugin actions associated with the widget passed as argument, or with the default widget, if widget is null or not provided.
The actions are in the same order as added to the plugin.
Definition at line 213 of file plugin.cpp.
|
protected |
Register an action to the plugin instance and add it to the action collection.
The action is added only if the action name is not in the disabled actions list of the PluginLoader singleton class.
- Parameters
-
name the name by which the action will be added to the action collection action the action to add
- Note
- It just calls addAction with the default category, so the default category must be set using setDefaultCategory before you use this method
Definition at line 226 of file plugin.cpp.
|
protected |
Register action to the plugin instance and add it to the action collection.
The action is added only if the action name is not in the disabled actions list of the PluginLoader singleton class.
- Parameters
-
name the name by which the action will be added to the action collection action the action to add cat the category of the action
Definition at line 247 of file plugin.cpp.
Category KIPI::Plugin::category | ( | KAction *const | action | ) | const |
Returns the category of the specified plugin action, or InvalidCategory if the action is not recognised.
Definition at line 282 of file plugin.cpp.
|
protected |
Returns the default category of the plugin actions.
- See also
- setDefaultCategory()
Definition at line 486 of file plugin.cpp.
Interface * KIPI::Plugin::interface | ( | ) | const |
Returns the KIPI::Interface.
Definition at line 302 of file plugin.cpp.
void KIPI::Plugin::rebuild | ( | ) |
Force the plugin to reread and to reload its xml file.
Definition at line 470 of file plugin.cpp.
|
protected |
Sets the default category of the plugin actions.
- See also
- defaultCategory()
Definition at line 481 of file plugin.cpp.
|
protected |
Sets the name of the xml file associated with this KXMLGUIClient.
You must provide only the filename without slashes.
The default xml file must be installed in the ${DATA_INSTALL_DIR}/kipi, modifications are stored in the local config dir of the KGlobal::mainComponent
- See also
- uiBaseName()
Definition at line 307 of file plugin.cpp.
|
pure virtual |
Virtual method that must be overrided by the non abstract descendants and must be called before any actions are added.
- Parameters
-
widget The widget which holds the plugin. It will be set as the default widget.
Definition at line 275 of file plugin.cpp.
|
protected |
Adapt the xml file of the plugin with the one of the KXmlGuiWindow main window.
It's recommended to call it on every creation of the plugin.
- Note
- the xml file of the plugin must be set using setUiBaseName()
Definition at line 465 of file plugin.cpp.
|
protected |
Return the base name of the xml file associated with this KXMLGUIClient.
- See also
- setUiBaseName()
Definition at line 313 of file plugin.cpp.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:45:21 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.