Slicer
5.0
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
|
#include <Base/QTCore/qSlicerModuleFactoryManager.h>
Public Types | |
typedef qSlicerAbstractModuleFactoryManager | Superclass |
Public Types inherited from qSlicerAbstractModuleFactoryManager | |
typedef ctkAbstractFileBasedFactory< qSlicerAbstractCoreModule > | qSlicerFileBasedModuleFactory |
typedef ctkAbstractFactory< qSlicerAbstractCoreModule > | qSlicerModuleFactory |
typedef QObject | Superclass |
Public Slots | |
void | setMRMLScene (vtkMRMLScene *mrmlScene) |
Set the MRML scene to pass to modules at "load" time. More... | |
Public Slots inherited from qSlicerAbstractModuleFactoryManager | |
bool | isVerbose () const |
void | setIsVerbose (bool flag) |
Signals | |
void | moduleAboutToBeUnloaded (const QString &moduleName) |
void | moduleLoaded (const QString &moduleName) |
void | modulesAboutToBeUnloaded (const QStringList &modulesNames) |
void | modulesLoaded (const QStringList &modulesNames) |
void | modulesUnloaded (const QStringList &modulesNames) |
void | moduleUnloaded (const QString &moduleName) |
void | mrmlSceneChanged (vtkMRMLScene *newScene) |
Signals inherited from qSlicerAbstractModuleFactoryManager | |
void | explicitModulesChanged (const QStringList &moduleNames) |
void | moduleAboutToBeUninstantiated (const QString &moduleName) |
void | moduleIgnored (const QString &moduleName) |
void | moduleInstantiated (const QString &moduleName) |
void | moduleRegistered (const QString &moduleName) |
void | modulesAboutToBeUninstantiated (const QStringList &moduleNames) |
void | modulesInstantiated (const QStringList &moduleNames) |
void | modulesRegistered (const QStringList &moduleNames) |
This signal is emitted when all the modules associated with the registered factories have been loaded. More... | |
void | modulesToIgnoreChanged (const QStringList &moduleNames) |
void | modulesUninstantiated (const QStringList &moduleNames) |
void | moduleUninstantiated (const QString &moduleName) |
Public Member Functions | |
vtkSlicerApplicationLogic * | appLogic () const |
Q_INVOKABLE bool | isLoaded (const QString &name) const |
Return true if module name has been loaded, false otherwise. More... | |
Q_INVOKABLE qSlicerAbstractCoreModule * | loadedModule (const QString &name) const |
Q_INVOKABLE QStringList | loadedModuleNames () const |
Return the list of all the loaded modules. More... | |
bool | loadModule (const QString &name) |
Q_INVOKABLE int | loadModules () |
Q_INVOKABLE bool | loadModules (const QStringList &modules) |
QStringList | modulePaths (const QString &basePath) |
Return all module paths that are direct child of basePath. More... | |
vtkMRMLScene * | mrmlScene () const |
Return the mrml scene passed to loaded modules. More... | |
void | printAdditionalInfo () override |
Print internal state using qDebug() More... | |
qSlicerModuleFactoryManager (QObject *newParent=nullptr) | |
void | setAppLogic (vtkSlicerApplicationLogic *applicationLogic) |
Set the application logic to pass to modules at "load" time. More... | |
Q_INVOKABLE void | unloadModules () |
~qSlicerModuleFactoryManager () override | |
Unloads all the modules previously loaded. More... | |
Public Member Functions inherited from qSlicerAbstractModuleFactoryManager | |
void | addModuleToIgnore (const QString &moduleName) |
void | addSearchPath (const QString &path) |
Utility function that adds a path to the current searchPaths list. More... | |
void | addSearchPaths (const QStringList &paths) |
QStringList | dependentModules (const QString &module) const |
QStringList | explicitModules () const |
QStringList | ignoredModuleNames () const |
Q_INVOKABLE QStringList | instantiatedModuleNames () const |
List of registered and instantiated modules. More... | |
virtual void | instantiateModules () |
Instantiate all previously registered modules. More... | |
Q_INVOKABLE bool | isInstantiated (const QString &name) const |
Return true if a module has been instantiated, false otherwise. More... | |
Q_INVOKABLE bool | isRegistered (const QString &name) const |
Return true if a module has been registered, false otherwise. More... | |
QStringList | moduleDependees (const QString &module) const |
Q_INVOKABLE qSlicerAbstractCoreModule * | moduleInstance (const QString &moduleName) const |
Return the instance of a module if already instantiated, 0 otherwise. More... | |
QStringList | modulesToIgnore () const |
qSlicerAbstractModuleFactoryManager (QObject *newParent=nullptr) | |
Q_INVOKABLE QStringList | registeredModuleNames () const |
Convenient method returning the list of all registered module names. More... | |
void | registerFactory (qSlicerModuleFactory *factory, int priority=0) |
Register a factory The factory will be deleted when unregistered (e.g. in ~qSlicerAbstractModuleFactoryManager()) More... | |
Q_INVOKABLE void | registerModule (const QFileInfo &file) |
void | registerModules () |
void | removeModuleToIgnore (const QString &moduleName) |
void | removeSearchPath (const QString &path) |
Utility function that removes a path from the current searchPaths list. More... | |
void | removeSearchPaths (const QStringList &paths) |
QStringList | searchPaths () const |
void | setExplicitModules (const QStringList &moduleNames) |
void | setModulesToIgnore (const QStringList &modulesNames) |
void | setSearchPaths (const QStringList &searchPaths) |
void | setVerboseModuleDiscovery (bool value) |
Enable/Disable verbose output during module discovery process. More... | |
void | uninstantiateModules () |
Uninstantiate all instantiated modules. More... | |
void | unregisterFactories () |
void | unregisterFactory (qSlicerModuleFactory *factory) |
~qSlicerAbstractModuleFactoryManager () override | |
Protected Member Functions | |
bool | loadModule (const QString &name, const QString &dependee) |
void | uninstantiateModule (const QString &moduleName) override |
Uninstantiate a module given its moduleName. More... | |
virtual void | uninstantiateModules () |
Reimplemented to ensure order. More... | |
void | unloadModule (const QString &name) |
Unload module identified by name. More... | |
Protected Member Functions inherited from qSlicerAbstractModuleFactoryManager | |
qSlicerAbstractCoreModule * | instantiateModule (const QString &name) |
Instantiate a module given its name. More... | |
void | registerModules (const QString &directoryPath) |
Protected Attributes | |
QScopedPointer< qSlicerModuleFactoryManagerPrivate > | d_ptr |
Protected Attributes inherited from qSlicerAbstractModuleFactoryManager | |
QScopedPointer< qSlicerAbstractModuleFactoryManagerPrivate > | d_ptr |
Additional Inherited Members | |
Properties inherited from qSlicerAbstractModuleFactoryManager | |
QStringList | modulesToIgnore |
QStringList | searchPaths |
Definition at line 37 of file qSlicerModuleFactoryManager.h.
Definition at line 42 of file qSlicerModuleFactoryManager.h.
qSlicerModuleFactoryManager::qSlicerModuleFactoryManager | ( | QObject * | newParent = nullptr | ) |
|
override |
Unloads all the modules previously loaded.
vtkSlicerApplicationLogic* qSlicerModuleFactoryManager::appLogic | ( | ) | const |
Q_INVOKABLE bool qSlicerModuleFactoryManager::isLoaded | ( | const QString & | name | ) | const |
Return true if module name has been loaded, false otherwise.
Q_INVOKABLE qSlicerAbstractCoreModule* qSlicerModuleFactoryManager::loadedModule | ( | const QString & | name | ) | const |
Return the loaded module identified by name, 0 if no module has been loaded yet, even if the module has been instantiated.
Q_INVOKABLE QStringList qSlicerModuleFactoryManager::loadedModuleNames | ( | ) | const |
Return the list of all the loaded modules.
bool qSlicerModuleFactoryManager::loadModule | ( | const QString & | name | ) |
Load module identified by name
|
protected |
Q_INVOKABLE int qSlicerModuleFactoryManager::loadModules | ( | ) |
Load all the instantiated modules. To register and initialize modules, please use qSlicerModuleFactoryManager::registerModules(); qSlicerModuleFactoryManager::initializeModules(); Returns the number of loaded modules.
Q_INVOKABLE bool qSlicerModuleFactoryManager::loadModules | ( | const QStringList & | modules | ) |
Load specified modules.
This attempts to load the specified modules, instantiating them first if necessary.
|
signal |
|
signal |
QStringList qSlicerModuleFactoryManager::modulePaths | ( | const QString & | basePath | ) |
Return all module paths that are direct child of basePath.
|
signal |
|
signal |
|
signal |
|
signal |
vtkMRMLScene* qSlicerModuleFactoryManager::mrmlScene | ( | ) | const |
Return the mrml scene passed to loaded modules.
|
signal |
|
overridevirtual |
Print internal state using qDebug()
Reimplemented from qSlicerAbstractModuleFactoryManager.
void qSlicerModuleFactoryManager::setAppLogic | ( | vtkSlicerApplicationLogic * | applicationLogic | ) |
Set the application logic to pass to modules at "load" time.
|
slot |
Set the MRML scene to pass to modules at "load" time.
|
overrideprotectedvirtual |
Uninstantiate a module given its moduleName.
Reimplemented from qSlicerAbstractModuleFactoryManager.
|
protectedvirtual |
Reimplemented to ensure order.
|
protected |
Unload module identified by name.
Q_INVOKABLE void qSlicerModuleFactoryManager::unloadModules | ( | ) |
Unload all the loaded modules. Unloading a module simply uninstantiate it. To respect dependencies, the order is reverse to the order of load.
|
protected |
Definition at line 111 of file qSlicerModuleFactoryManager.h.