digiKam
Digikam::DPluginLoader Class Reference

The class that handles digiKam's external plugins. More...

+ Inheritance diagram for Digikam::DPluginLoader:

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 ()
 
DPluginActionpluginAction (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 DPluginLoaderinstance ()
 instance: returns the singleton of plugin loader More...
 

Friends

class DPluginLoaderCreator
 

Detailed Description

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.

Member Function Documentation

◆ allPlugins()

◆ appendPluginToBlackList()

void Digikam::DPluginLoader::appendPluginToBlackList ( const QString &  filename)

appendPluginToBlackList Prevent that a plugin is loaded from the given filename

Parameters
filenameThe name of the file excluding file extension to blacklist. E.g. to ignore "HtmlGalleryPlugin.so" on Linux and "HtmlGalleryPlugin.dll" on Windows, pass "HtmlGalleryPlugin"

◆ appendPluginToWhiteList()

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.

Parameters
filenameThe 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"

◆ cleanUp()

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().

◆ configGroupName()

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().

◆ init()

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().

◆ instance()

◆ pluginAction()

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().

◆ pluginActions()

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().

◆ pluginsActions() [1/2]

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().

◆ pluginsActions() [2/2]

◆ pluginXmlSections()

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().

◆ registerEditorPlugins()

void Digikam::DPluginLoader::registerEditorPlugins ( QObject *const  parent)

◆ registerGenericPlugins()

void Digikam::DPluginLoader::registerGenericPlugins ( QObject *const  parent)

◆ registerRawImportPlugins()

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().

Friends And Related Function Documentation

◆ DPluginLoaderCreator

friend class DPluginLoaderCreator
friend

The documentation for this class was generated from the following files: