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) |
Public Member Functions inherited from QObject | |
QObject (QObject *parent) | |
QObject (QObject *parent, const char *name) | |
virtual | ~QObject () |
bool | blockSignals (bool block) |
QObject * | child (const char *objName, const char *inheritsClass, bool recursiveSearch) const |
const QObjectList & | children () const |
const char * | className () const |
bool | connect (const QObject *sender, const char *signal, const char *method, Qt::ConnectionType type) const |
void | deleteLater () |
void | destroyed (QObject *obj) |
bool | disconnect (const QObject *receiver, const char *method) |
bool | disconnect (const char *signal, const QObject *receiver, const char *method) |
void | dumpObjectInfo () |
void | dumpObjectTree () |
QList< QByteArray > | dynamicPropertyNames () const |
virtual bool | event (QEvent *e) |
virtual bool | eventFilter (QObject *watched, QEvent *event) |
T | findChild (const QString &name) const |
QList< T > | findChildren (const QRegExp ®Exp) const |
QList< T > | findChildren (const QString &name) const |
bool | inherits (const char *className) const |
void | insertChild (QObject *object) |
void | installEventFilter (QObject *filterObj) |
bool | isA (const char *className) const |
bool | isWidgetType () const |
void | killTimer (int id) |
virtual const QMetaObject * | metaObject () const |
void | moveToThread (QThread *targetThread) |
const char * | name () const |
const char * | name (const char *defaultName) const |
QString | objectName () const |
QObject * | parent () const |
QVariant | property (const char *name) const |
void | removeChild (QObject *object) |
void | removeEventFilter (QObject *obj) |
void | setName (const char *name) |
void | setObjectName (const QString &name) |
void | setParent (QObject *parent) |
bool | setProperty (const char *name, const QVariant &value) |
bool | signalsBlocked () const |
int | startTimer (int interval) |
QThread * | thread () const |
Static Public Member Functions | |
static PluginLoader * | instance () |
Static Public Member Functions inherited from QObject | |
bool | connect (const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type) |
bool | connect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method, Qt::ConnectionType type) |
bool | disconnect (const QObject *sender, const char *signal, const QObject *receiver, const char *method) |
bool | disconnect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method) |
QString | tr (const char *sourceText, const char *disambiguation, int n) |
QString | trUtf8 (const char *sourceText, const char *disambiguation, int n) |
Additional Inherited Members | |
Protected Member Functions inherited from QObject | |
bool | checkConnectArgs (const char *signal, const QObject *object, const char *method) |
virtual void | childEvent (QChildEvent *event) |
virtual void | connectNotify (const char *signal) |
virtual void | customEvent (QEvent *event) |
virtual void | disconnectNotify (const char *signal) |
int | receivers (const char *signal) const |
QObject * | sender () const |
int | senderSignalIndex () const |
virtual void | timerEvent (QTimerEvent *event) |
Static Protected Member Functions inherited from QObject | |
QByteArray | normalizeSignalSlot (const char *signalSlot) |
Properties inherited from QObject | |
objectName | |
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-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:19:43 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.