![]() |
digiKam
|
The class that handles digiKam's external plugins. More...
#include <dpluginloader.h>
Classes | |
class | Private |
Public Member Functions | |
QList< DPlugin * > | allPlugins () const |
Returns all available plugins. | |
void | appendPluginToBlackList (const QString &filename) |
appendPluginToBlackList Prevent that a plugin is loaded from the given filename | |
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. | |
bool | canExport (const QString &format) const |
bool | canImport (const QString &format) const |
void | cleanUp () |
QString | configGroupName () const |
DImgLoaderSettings * | exportWidget (const QString &format) 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. | |
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. | |
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. | |
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. | |
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. | |
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 | |
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.
QList< DPlugin * > Digikam::DPluginLoader::allPlugins | ( | ) | const |
Returns all available plugins.
Referenced by Digikam::DPluginLoader::Private::appendPlugin(), Digikam::EditorCore::load(), Digikam::DPluginLoader::Private::loadPlugins(), Digikam::DPluginConfViewDImg::loadPlugins(), Digikam::DPluginConfViewEditor::loadPlugins(), Digikam::DPluginConfViewGeneric::loadPlugins(), Digikam::DPluginConfViewBqm::loadPlugins(), and Digikam::SetupRaw::SetupRaw().
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" |
bool Digikam::DPluginLoader::canExport | ( | const QString & | format | ) | const |
Return true if format is supported by a DPluginDImg to export image.
References Digikam::DPluginDImg::canWrite().
Referenced by Digikam::AdvancedSettings::AdvancedSettings(), and Digikam::SetupVersioning::SetupVersioning().
bool Digikam::DPluginLoader::canImport | ( | const QString & | format | ) | const |
Return true if format is supported by a DPluginDImg to import image.
References Digikam::DPluginDImg::canRead().
void Digikam::DPluginLoader::cleanUp | ( | ) |
Unload all loaded plugins. Call this method before the main instance is closed.
References cleanUp().
Referenced by cleanUp(), 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().
DImgLoaderSettings * Digikam::DPluginLoader::exportWidget | ( | const QString & | format | ) | const |
Return a new widget instance from a DPluginDImg to show settings while exporting image to specified format. Return nullptr if format is not supported or if no settings widget is available for this format.
References Digikam::DPluginDImg::exportWidget().
Referenced by Digikam::FileSaveOptionsBox::FileSaveOptionsBox(), Digikam::QueueSettingsView::QueueSettingsView(), and Digikam::SetupIOFiles::SetupIOFiles().
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::addImportMenu(), Digikam::AdvancedSettings::AdvancedSettings(), Digikam::DPluginLoader::Private::appendPlugin(), Digikam::DPluginConfView::apply(), Digikam::DigikamApp::DigikamApp(), Digikam::FileSaveOptionsBox::FileSaveOptionsBox(), Digikam::EditorCore::load(), Digikam::DPluginLoader::Private::loadPlugins(), Digikam::DPluginConfViewDImg::loadPlugins(), Digikam::DPluginConfViewEditor::loadPlugins(), Digikam::DPluginConfViewGeneric::loadPlugins(), Digikam::DPluginConfViewBqm::loadPlugins(), Digikam::QueueSettingsView::QueueSettingsView(), Digikam::EditorWindow::registerExtraPluginsActions(), Digikam::DXmlGuiWindow::registerPluginsActions(), Digikam::SetupIOFiles::SetupIOFiles(), Digikam::SetupRaw::SetupRaw(), Digikam::EditorWindow::setupSelectToolsAction(), Digikam::EditorWindow::setupStandardActions(), Digikam::SetupVersioning::SetupVersioning(), 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(), and Digikam::DPluginGeneric::actions().
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::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(), and Digikam::DPluginGeneric::actions().
Referenced by Digikam::ContextMenuHelper::addImportMenu(), Digikam::EditorWindow::registerExtraPluginsActions(), Digikam::DXmlGuiWindow::registerPluginsActions(), Digikam::EditorWindow::setupSelectToolsAction(), 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.
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::setup(), and Digikam::DPluginEditor::setVisible().
Referenced by Digikam::EditorWindow::registerExtraPluginsActions().
void Digikam::DPluginLoader::registerGenericPlugins | ( | QObject *const | parent | ) |
Register all Generic plugin actions to parent object.
References Digikam::DPlugin::setup(), and Digikam::DPluginGeneric::setVisible().
Referenced by Digikam::DXmlGuiWindow::registerPluginsActions().
void Digikam::DPluginLoader::registerRawImportPlugins | ( | QObject *const | parent | ) |
Register all Raw Import plugin to parent object.
References Digikam::DPlugin::setup().
Referenced by Digikam::EditorWindow::registerExtraPluginsActions().
|
friend |