digiKam
|
The class that handles digiKam's external plugins. More...
Classes | |
class | Private |
Public Member Functions | |
QList< DPlugin * > | allPlugins () const |
Returns all available plugins. More... | |
void | appendPluginToBlackList (const QString &filename) |
appendPluginToBlackList Prevent that a plugin is loaded from the given filename More... | |
void | appendPluginToWhiteList (const QString &filename) |
appendPluginToWhiteList Add a plugin to the whitelist of tools. If the whitelist is not empty, only whitelisted tools are loaded. If a tool is both whitelisted and blacklisted, it will not be loaded. More... | |
void | cleanUp () |
QString | configGroupName () const |
void | init () |
DPluginAction * | pluginAction (const QString &actionName, QObject *const parent) const |
Returns the plugin action corresponding to a action name for a given parent. If not found, this returns a null pointer. More... | |
QList< DPluginAction * > | pluginActions (const QString &pluginIID, QObject *const parent) const |
Returns the plugin actions corresponding to a plugin internal ID string for a given parent. If not found, this returns an empty list. More... | |
QList< DPluginAction * > | pluginsActions (DPluginAction::ActionCategory cat, QObject *const parent) const |
Returns a list of plugin actions set as category for a given parent. If no plugin have found in this category, this returns an empty list. More... | |
QList< DPluginAction * > | pluginsActions (DPluginAction::ActionType type, QObject *const parent) const |
Returns a list of plugin actions set as type for a given parent. If no plugin have found in this category, this returns an empty list. More... | |
QString | pluginXmlSections (DPluginAction::ActionCategory cat, QObject *const parent) const |
Returns all xml sections as string of plugin actions set with a kind of category for a given parent. More... | |
void | registerEditorPlugins (QObject *const parent) |
void | registerGenericPlugins (QObject *const parent) |
void | registerRawImportPlugins (QObject *const parent) |
Static Public Member Functions | |
static DPluginLoader * | instance () |
instance: returns the singleton of plugin loader More... | |
Friends | |
class | DPluginLoaderCreator |
The class that handles digiKam's external plugins.
Ownership policy for plugins:
The DPluginLoader creates new objects and transfer ownership. In order to create the objects, the DPluginLoader internally has a list of the tools which are owned by the DPluginLoader and destroyed by it.
Returns all available plugins.
Referenced by Digikam::DPluginLoader::Private::appendPlugin(), Digikam::DPluginLoader::Private::loadPlugins(), Digikam::DPluginConfViewDImg::loadPlugins(), Digikam::DPluginConfViewEditor::loadPlugins(), Digikam::DPluginConfViewGeneric::loadPlugins(), and Digikam::DPluginConfViewBqm::loadPlugins().
void Digikam::DPluginLoader::appendPluginToBlackList | ( | const QString & | filename | ) |
appendPluginToBlackList Prevent that a plugin is loaded from the given filename
filename | The name of the file excluding file extension to blacklist. E.g. to ignore "HtmlGalleryPlugin.so" on Linux and "HtmlGalleryPlugin.dll" on Windows, pass "HtmlGalleryPlugin" |
void Digikam::DPluginLoader::appendPluginToWhiteList | ( | const QString & | filename | ) |
appendPluginToWhiteList Add a plugin to the whitelist of tools. If the whitelist is not empty, only whitelisted tools are loaded. If a tool is both whitelisted and blacklisted, it will not be loaded.
filename | The name of the file excluding file extension to whitelist. E.g. to not ignore "HtmlGalleryPlugin.so" on Linux and "HtmlGalleryPlugin.dll" on Windows, pass "HtmlGalleryPlugin" |
void Digikam::DPluginLoader::cleanUp | ( | ) |
Unload all loaded plugins. Call this method before the main instance is closed.
References Digikam::DPlugin::cleanUp().
Referenced by Digikam::DigikamApp::~DigikamApp(), and ShowFoto::Showfoto::~Showfoto().
QString Digikam::DPluginLoader::configGroupName | ( | ) | const |
Return the config group name used to store the list of plugins to load at startup.
Referenced by Digikam::DPluginLoader::Private::appendPlugin(), and Digikam::DPluginConfView::apply().
void Digikam::DPluginLoader::init | ( | ) |
Init plugin loader. Call this method to parse and load relevant plugins installed on your system.
Referenced by Digikam::DigikamApp::DigikamApp(), and ShowFoto::Showfoto::Showfoto().
|
static |
instance: returns the singleton of plugin loader
Referenced by Digikam::ContextMenuHelper::addExportMenu(), Digikam::ContextMenuHelper::addImportMenu(), Digikam::DPluginLoader::Private::appendPlugin(), Digikam::DPluginConfView::apply(), Digikam::DigikamApp::DigikamApp(), Digikam::EditorCore::load(), Digikam::DPluginLoader::Private::loadPlugins(), Digikam::DPluginConfViewDImg::loadPlugins(), Digikam::DPluginConfViewEditor::loadPlugins(), Digikam::DPluginConfViewGeneric::loadPlugins(), Digikam::DPluginConfViewBqm::loadPlugins(), Digikam::DImgStaticPriv::pluginForFile(), Digikam::DImgStaticPriv::pluginForFormat(), Digikam::EditorWindow::registerExtraPluginsActions(), Digikam::DXmlGuiWindow::registerPluginsActions(), Digikam::SetupRaw::SetupRaw(), Digikam::EditorWindow::setupSelectToolsAction(), Digikam::EditorWindow::setupStandardActions(), ShowFoto::Showfoto::Showfoto(), Digikam::EditorWindow::toggleStandardActions(), Digikam::DigikamApp::~DigikamApp(), and ShowFoto::Showfoto::~Showfoto().
DPluginAction * Digikam::DPluginLoader::pluginAction | ( | const QString & | actionName, |
QObject *const | parent | ||
) | const |
Returns the plugin action corresponding to a action name for a given parent. If not found, this returns a null pointer.
References Digikam::DPluginEditor::actions(), and Digikam::DPluginGeneric::actions().
QList< DPluginAction * > Digikam::DPluginLoader::pluginActions | ( | const QString & | pluginIID, |
QObject *const | parent | ||
) | const |
Returns the plugin actions corresponding to a plugin internal ID string for a given parent. If not found, this returns an empty list.
References Digikam::DPluginEditor::actions(), Digikam::DPluginGeneric::actions(), and Digikam::DPlugin::iid().
QList< DPluginAction * > Digikam::DPluginLoader::pluginsActions | ( | DPluginAction::ActionCategory | cat, |
QObject *const | parent | ||
) | const |
Returns a list of plugin actions set as category for a given parent. If no plugin have found in this category, this returns an empty list.
References Digikam::DPluginAction::actionCategory(), Digikam::DPluginEditor::actions(), and Digikam::DPluginGeneric::actions().
QList< DPluginAction * > Digikam::DPluginLoader::pluginsActions | ( | DPluginAction::ActionType | type, |
QObject *const | parent | ||
) | const |
Returns a list of plugin actions set as type for a given parent. If no plugin have found in this category, this returns an empty list.
References Digikam::DPluginEditor::actions(), Digikam::DPluginGeneric::actions(), and Digikam::DPluginAction::actionType().
Referenced by Digikam::ContextMenuHelper::addExportMenu(), Digikam::ContextMenuHelper::addImportMenu(), Digikam::EditorWindow::registerExtraPluginsActions(), Digikam::DXmlGuiWindow::registerPluginsActions(), Digikam::EditorWindow::setupStandardActions(), ShowFoto::Showfoto::Showfoto(), and Digikam::EditorWindow::toggleStandardActions().
QString Digikam::DPluginLoader::pluginXmlSections | ( | DPluginAction::ActionCategory | cat, |
QObject *const | parent | ||
) | const |
Returns all xml sections as string of plugin actions set with a kind of category for a given parent.
References Digikam::DPluginAction::xmlSection().
Referenced by Digikam::EditorWindow::registerExtraPluginsActions(), and Digikam::DXmlGuiWindow::registerPluginsActions().
void Digikam::DPluginLoader::registerEditorPlugins | ( | QObject *const | parent | ) |
Register all Editor plugin actions to parent object.
References Digikam::DPlugin::name(), Digikam::DPlugin::setup(), Digikam::DPluginEditor::setVisible(), and Digikam::DPlugin::shouldLoaded().
Referenced by Digikam::EditorWindow::registerExtraPluginsActions().
void Digikam::DPluginLoader::registerGenericPlugins | ( | QObject *const | parent | ) |
Register all Generic plugin actions to parent object.
References Digikam::DPlugin::name(), Digikam::DPlugin::setup(), Digikam::DPluginGeneric::setVisible(), and Digikam::DPlugin::shouldLoaded().
Referenced by Digikam::DXmlGuiWindow::registerPluginsActions().
void Digikam::DPluginLoader::registerRawImportPlugins | ( | QObject *const | parent | ) |
Register all Raw Import plugin to parent object.
References Digikam::DPlugin::name(), and Digikam::DPlugin::setup().
Referenced by Digikam::EditorWindow::registerExtraPluginsActions().
|
friend |