pqPluginManager works with vtkSMPluginManager to keep track for plugins loaded/available. More...
#include <pqPluginManager.h>
Inherits QObject.
Public Types | |
enum | LoadStatus { LOADED, NOTLOADED, ALREADYLOADED } |
Signals | |
void | pluginsUpdated () |
notification when plugin has been loaded. More... | |
void | requiredPluginsNotLoaded (pqServer *) |
notification that the plugins on the client and server are mismatched. More... | |
Public Member Functions | |
pqPluginManager (QObject *p=nullptr) | |
~pqPluginManager () override | |
void | loadPluginsFromSettings () |
Called during application initialization to load plugins from settings. More... | |
LoadStatus | loadExtension (pqServer *session, const QString &plugin, QString *errorMsg=nullptr, bool remote=true) |
attempt to load an extension on a server if server is nullptr, extension will be loaded on client side return status on success, if NOTLOADED was returned, the error is reported If errorMsg is non-nullptr, then errors are not reported, but the error message is put in the errorMsg string the plugin arg can be a full path or the name of an existing plugin More... | |
void | loadExtensions (pqServer *) |
attempt to load all available plugins on a server, or client plugins if nullptr More... | |
vtkPVPluginsInformation * | loadedExtensions (pqServer *session, bool remote) |
return all the plugins loaded on a session. More... | |
QStringList | pluginPaths (pqServer *session, bool remote) |
Return all the paths that plugins will be searched for. More... | |
void | addPluginConfigFile (pqServer *session, const QString &config, bool remote=true) |
Load a plugin config file and add all plugin from it to the plugin manager of provided server. More... | |
void | hidePlugin (const QString &lib, bool remote) |
simply adds the plugin to the ignore list, so when this class tries to serialize the plugin information, it skips the indicated plugin. More... | |
bool | isHidden (const QString &lib, bool remote) |
bool | verifyPlugins (pqServer *session) |
ensures that plugins required on client and server are present on both. More... | |
Protected Slots | |
void | loadPluginsFromSettings (pqServer *) |
attempts to load the configuration for plugins for the particular server. More... | |
void | onServerConnected (pqServer *) |
void | onServerDisconnected (pqServer *) |
void | updatePluginLists () |
Protected Member Functions | |
void | initialize (vtkSMPluginManager *) |
pqPluginManager works with vtkSMPluginManager to keep track for plugins loaded/available.
It also ensures that when a new session is created, the default plugin-configuration-xmls are parsed on all processes involved to ensure that auto-load plugins are loaded. It preserves the information about plugins loaded across ParaView sessions in settings so that users can easily load previously loaded plugins.
pqPluginManager can work with multiple sessions. It maintains internal data-structures for different sessions.
Definition at line 28 of file pqPluginManager.h.
Enumerator | |
---|---|
LOADED | |
NOTLOADED | |
ALREADYLOADED |
Definition at line 46 of file pqPluginManager.h.
pqPluginManager::pqPluginManager | ( | QObject * | p = nullptr | ) |
|
override |
void pqPluginManager::loadPluginsFromSettings | ( | ) |
Called during application initialization to load plugins from settings.
This only loads "local" plugins. pqApplicationCore calls this method explicitly after the essential components of the core have been initialized. This ensures that any plugins being loaded during startup of application have the environment setup correctly.
LoadStatus pqPluginManager::loadExtension | ( | pqServer * | session, |
const QString & | plugin, | ||
QString * | errorMsg = nullptr , |
||
bool | remote = true |
||
) |
attempt to load an extension on a server if server is nullptr, extension will be loaded on client side return status on success, if NOTLOADED was returned, the error is reported If errorMsg is non-nullptr, then errors are not reported, but the error message is put in the errorMsg string the plugin arg can be a full path or the name of an existing plugin
void pqPluginManager::loadExtensions | ( | pqServer * | ) |
attempt to load all available plugins on a server, or client plugins if nullptr
vtkPVPluginsInformation* pqPluginManager::loadedExtensions | ( | pqServer * | session, |
bool | remote | ||
) |
return all the plugins loaded on a session.
This will either returns the plugins information for local processes or server-process (for remote sessions) based on the state of remote
.
QStringList pqPluginManager::pluginPaths | ( | pqServer * | session, |
bool | remote | ||
) |
Return all the paths that plugins will be searched for.
void pqPluginManager::addPluginConfigFile | ( | pqServer * | session, |
const QString & | config, | ||
bool | remote = true |
||
) |
Load a plugin config file and add all plugin from it to the plugin manager of provided server.
void pqPluginManager::hidePlugin | ( | const QString & | lib, |
bool | remote | ||
) |
simply adds the plugin to the ignore list, so when this class tries to serialize the plugin information, it skips the indicated plugin.
bool pqPluginManager::isHidden | ( | const QString & | lib, |
bool | remote | ||
) |
bool pqPluginManager::verifyPlugins | ( | pqServer * | session | ) |
ensures that plugins required on client and server are present on both.
Fires requiredPluginsNotLoaded() signal if any mismatch is found. Returns true is all plugin requirements are satisfied, else returns false.
|
signal |
notification when plugin has been loaded.
|
signal |
notification that the plugins on the client and server are mismatched.
|
protected |
|
protectedslot |
attempts to load the configuration for plugins for the particular server.
|
protectedslot |
|
protectedslot |
|
protectedslot |