digiKam Developer Documentation
Professional Photo Management with the Power of Open Source
Loading...
Searching...
No Matches
Digikam::DPluginLoader Class Reference

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

+ Inheritance diagram for Digikam::DPluginLoader:

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.
 
bool canExport (const QString &format) const
 Return true if format is supported by a DPluginDImg to export image.
 
bool canImport (const QString &format) const
 Return true if format is supported by a DPluginDImg to import image.
 
void cleanUp ()
 Unload all loaded plugins.
 
QString configGroupName () const
 Return the config group name used to store the list of plugins to load at startup.
 
DImgLoaderSettingsexportWidget (const QString &format) const
 Return a new widget instance from a DPluginDImg to show settings while exporting image to specified format.
 
void init ()
 Init plugin loader.
 
DPluginActionpluginAction (const QString &actionName, QObject *const parent) const
 Returns the plugin action corresponding to a action name for a given parent.
 
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.
 
QList< DPluginAction * > pluginsActions (DPluginAction::ActionCategory cat, QObject *const parent) const
 Returns a list of plugin actions set as category for a given parent.
 
QList< DPluginAction * > pluginsActions (DPluginAction::ActionType type, QObject *const parent) const
 Returns a list of plugin actions set as type for a given parent.
 
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)
 Register all Editor plugin actions to parent object.
 
void registerGenericPlugins (QObject *const parent)
 Register all Generic plugin actions to parent object.
 
void registerRawImportPlugins (QObject *const parent)
 Register all Raw Import plugin to parent object.
 

Static Public Member Functions

static DPluginLoaderinstance ()
 instance: returns the singleton of plugin loader
 

Friends

class DPluginLoaderCreator
 

Detailed Description

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

◆ appendPluginToBlackList()

void Digikam::DPluginLoader::appendPluginToBlackList ( const QString &  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)

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

Call this method before the main instance is closed.

◆ exportWidget()

DImgLoaderSettings * Digikam::DPluginLoader::exportWidget ( const QString &  format) const

Return nullptr if format is not supported or if no settings widget is available for this format.

◆ init()

void Digikam::DPluginLoader::init ( )

Call this method to parse and load relevant plugins installed on your system.

◆ instance()

DPluginLoader * Digikam::DPluginLoader::instance ( )
static
Returns
DPluginLoader global instance

◆ pluginAction()

DPluginAction * Digikam::DPluginLoader::pluginAction ( const QString &  actionName,
QObject *const  parent 
) const

If not found, this returns a null pointer.

◆ pluginActions()

QList< DPluginAction * > Digikam::DPluginLoader::pluginActions ( const QString &  pluginIID,
QObject *const  parent 
) const

If not found, this returns an empty list.

◆ pluginsActions() [1/2]

QList< DPluginAction * > Digikam::DPluginLoader::pluginsActions ( DPluginAction::ActionCategory  cat,
QObject *const  parent 
) const

If no plugin have found in this category, this returns an empty list.

◆ pluginsActions() [2/2]

QList< DPluginAction * > Digikam::DPluginLoader::pluginsActions ( DPluginAction::ActionType  type,
QObject *const  parent 
) const

If no plugin have found in this category, this returns an empty list.