libs/libkipi/libkipi
#include <pluginloader.h>
Classes | |
class | Info |
Public Types | |
typedef QList< Info * > | PluginList |
Signals | |
void | plug (KIPI::PluginLoader::Info *) |
void | replug () |
void | unplug (KIPI::PluginLoader::Info *) |
Public Member Functions | |
PluginLoader () | |
PluginLoader (KXmlGuiWindow *const parent) | |
virtual | ~PluginLoader () |
ConfigWidget * | configWidget (QWidget *const parent) const |
QStringList | disabledPluginActions () const |
void | init () |
Interface * | interface () const |
QString | kipiPluginsVersion () const |
void | loadPlugins () |
const PluginList & | pluginList () |
void | setDisabledPluginActions (const QStringList &disabledActions) |
void | setIgnoredPluginsList (const QStringList &ignores) |
void | setInterface (Interface *const interface) |
Static Public Member Functions | |
static PluginLoader * | instance () |
Detailed Description
- Maintainer: Victor Dodon
This is the class that will help host applications to load plugins.
The host application must create an instance of the plugin loader, and call the method loadPlugins() to get the plugins loaded. To ensure that plugins are correctly removed from menus and toolbars when loaded and unloaded after constructions, the application must connect to either the signals plug() / unplug() or the signal replug(). These signals are emitted when a plugin is to be inserted into the menus.
If your application is using KDE XMLGUI, the easiest(nicest) way to get the plugins inserted into the menus is by adding an item in your application XML ui.rc file looking like this:
Then loading plugins into menus could be done with code similar to this implementation:
For a complete implementation used to manage Kipi-plugins in digiKam, look into this class, or you can look the code of the kxmlkipicmd test application in the "test" folder from libkipi.
To configure which plugins should be loaded, simply call PluginLoader::configWidget(), and insert the widget into your normal configuration dialog.
Definition at line 189 of file pluginloader.h.
Member Typedef Documentation
typedef QList<Info*> KIPI::PluginLoader::PluginList |
Definition at line 224 of file pluginloader.h.
Constructor & Destructor Documentation
KIPI::PluginLoader::PluginLoader | ( | ) |
Use this constructor if your application does not use KDE XML GUI technology.
Definition at line 242 of file pluginloader.cpp.
KIPI::PluginLoader::PluginLoader | ( | KXmlGuiWindow *const | parent | ) |
Standard constructor.
You must pass the instance of KDE XML GUI application as argument.
- Parameters
-
parent the pointer to the KXmlGuiWindow of your application
Definition at line 251 of file pluginloader.cpp.
|
virtual |
Standard destructor.
Definition at line 359 of file pluginloader.cpp.
Member Function Documentation
ConfigWidget * KIPI::PluginLoader::configWidget | ( | QWidget *const | parent | ) | const |
Return the config widget with list of plugins to manage.
Definition at line 389 of file pluginloader.cpp.
QStringList KIPI::PluginLoader::disabledPluginActions | ( | ) | const |
Return the list of disabled plugin actions.
Definition at line 283 of file pluginloader.cpp.
void KIPI::PluginLoader::init | ( | ) |
Init plugin loader.
Call this method to parse relevant plugins installed on your system. Before to call this method, you must setup KIPI insterface instance. Optionally, setup list of plugins to ignore, the constraint list, and the disabled plugin actions
Definition at line 288 of file pluginloader.cpp.
|
static |
Returns plugin loader instance.
Definition at line 374 of file pluginloader.cpp.
Interface * KIPI::PluginLoader::interface | ( | ) | const |
Return KIPI host interface instance.
Definition at line 384 of file pluginloader.cpp.
QString KIPI::PluginLoader::kipiPluginsVersion | ( | ) | const |
Return the kipi-plugins version installed on your computer if it's found through kipiplugins.desktop file.
Definition at line 394 of file pluginloader.cpp.
void KIPI::PluginLoader::loadPlugins | ( | ) |
Call this method to load relevant plugins installed on your system to your KIPI host application NOTE: plugins can be loaded through Info item.
Definition at line 364 of file pluginloader.cpp.
|
signal |
const PluginLoader::PluginList & KIPI::PluginLoader::pluginList | ( | ) |
Returns the list of loaded plugins.
Definition at line 369 of file pluginloader.cpp.
|
signal |
void KIPI::PluginLoader::setDisabledPluginActions | ( | const QStringList & | disabledActions | ) |
Set disabled plugin actions that will not be plugged into the gui,.
Definition at line 278 of file pluginloader.cpp.
void KIPI::PluginLoader::setIgnoredPluginsList | ( | const QStringList & | ignores | ) |
Set Plugins ignore list, with name of obsoletes plugins to not load through init().
Definition at line 273 of file pluginloader.cpp.
void KIPI::PluginLoader::setInterface | ( | Interface *const | interface | ) |
Set KIPI interface instance from host application.
Definition at line 267 of file pluginloader.cpp.
|
signal |
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.