Computer Assisted Medical Intervention Tool Kit version 6.0
 
Loading...
Searching...
No Matches
camitk::HotPlugExtensionManager Class Reference

Manages all the HotPlug extension. More...

#include <HotPlugExtensionManager.h>

+ Inheritance diagram for camitk::HotPlugExtensionManager:
+ Collaboration diagram for camitk::HotPlugExtensionManager:

Static Public Member Functions

static const QStringList & getLoadedExtensionFiles ()
 get the list of loaded camitk extension file (file path)
 
static const QList< HotPlugActionExtension * > & getLoadedExtensions ()
 get the list of all loaded ActionExtension*
 
static const QStringList getRegisteredExtensionFiles ()
 get the list of registered camitk extension file (file path)
 
static bool getVerifyOrRebuildOption ()
 get the corresponding settings from persistence
 
static HotPlugActionExtensionload (const QString &camitkExtensionFilePath, bool forceRebuild=false, int progressMinimum=0, int progressMaximum=100)
 load a CamiTK extension file
 
static bool loadAll ()
 load all the CamiTK extension files registered in the settings
 
static bool registerExtension (const QString &camitkExtensionFilePath)
 Register an extension described by a CamiTK extension file.
 
static void setVerifyOrRebuildOption (bool alwaysRebuild)
 set the corresponding settings for persistence
 
static bool unload (const QString &camitkExtensionFilePath)
 unload a CamiTK extension file
 
static bool unloadAll ()
 unload all the currently loaded CamiTK extension files (delete from memory and from current loaded list)
 
static bool unregisterExtension (const QString &camitkExtensionFilePath)
 Unregister a camitk file.
 

Detailed Description

Manages all the HotPlug extension.

HotPlug extension consists of

  • a CamiTK extension path
  • user (developer) source code

HotPlug extension are registered in a CamiTK application using their CamiTK extension files. Registered extensions are loaded during application starts by instantiating a HotPlugActionExtension and corresponding HotPlugAction.

Member Function Documentation

◆ getLoadedExtensionFiles()

const QStringList & camitk::HotPlugExtensionManager::getLoadedExtensionFiles ( )
static

get the list of loaded camitk extension file (file path)

◆ getLoadedExtensions()

const QList< HotPlugActionExtension * > & camitk::HotPlugExtensionManager::getLoadedExtensions ( )
static

get the list of all loaded ActionExtension*

◆ getRegisteredExtensionFiles()

const QStringList camitk::HotPlugExtensionManager::getRegisteredExtensionFiles ( )
static

get the list of registered camitk extension file (file path)

References camitk::Application::getName(), and camitk::Application::getSettings().

Referenced by load(), and loadAll().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getVerifyOrRebuildOption()

bool camitk::HotPlugExtensionManager::getVerifyOrRebuildOption ( )
static

get the corresponding settings from persistence

References camitk::Application::getName(), and camitk::Application::getSettings().

Referenced by camitk::CppHotPlugActionExtension::CppHotPlugActionExtension().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ load()

HotPlugActionExtension * camitk::HotPlugExtensionManager::load ( const QString &  camitkExtensionFilePath,
bool  forceRebuild = false,
int  progressMinimum = 0,
int  progressMaximum = 100 
)
static

load a CamiTK extension file

Parameters
progressMinimumis the current initial progress value
progressMaximumis the maximum progress bar value to use when loading is finished

References CAMITK_WARNING_ALT, camitk::HotPlugActionExtension::declaredActionCount(), camitk::ActionExtension::getActions(), getRegisteredExtensionFiles(), camitk::HotPlugActionExtension::initActions(), camitk::HotPlugActionExtension::newHotPlugActionExtension(), camitk::Application::registerAllActions(), camitk::Application::resetProgressBar(), camitk::Application::setProgressBarValue(), camitk::Application::showStatusBarMessage(), and unregisterExtension().

Referenced by loadAll(), main(), and registerExtension().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ loadAll()

bool camitk::HotPlugExtensionManager::loadAll ( )
static

load all the CamiTK extension files registered in the settings

Returns
false if at least one registered extension could not be loaded

References getRegisteredExtensionFiles(), load(), and camitk::Application::setProgressBarValue().

+ Here is the call graph for this function:

◆ registerExtension()

bool camitk::HotPlugExtensionManager::registerExtension ( const QString &  camitkExtensionFilePath)
static

Register an extension described by a CamiTK extension file.

Registering will load all the action created by this extension.

Returns
false if the path is not a valid CamiTK extension file of something went wrong during registration and true if extension is already registered or if it was loaded + registered

References CAMITK_WARNING_ALT, CamiTKExtensionModel::getModel(), camitk::Application::getName(), camitk::Application::getSettings(), and load().

+ Here is the call graph for this function:

◆ setVerifyOrRebuildOption()

void camitk::HotPlugExtensionManager::setVerifyOrRebuildOption ( bool  alwaysRebuild)
static

set the corresponding settings for persistence

References camitk::Application::getName(), and camitk::Application::getSettings().

+ Here is the call graph for this function:

◆ unload()

bool camitk::HotPlugExtensionManager::unload ( const QString &  camitkExtensionFilePath)
static

unload a CamiTK extension file

References camitk::Application::unregisterAllActions().

Referenced by unloadAll(), and unregisterExtension().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ unloadAll()

bool camitk::HotPlugExtensionManager::unloadAll ( )
static

unload all the currently loaded CamiTK extension files (delete from memory and from current loaded list)

Returns
false if at least one registered extension could not be unloaded

References unload().

+ Here is the call graph for this function:

◆ unregisterExtension()

bool camitk::HotPlugExtensionManager::unregisterExtension ( const QString &  camitkExtensionFilePath)
static

Unregister a camitk file.

Unregistering will also remove the provided actions from the application.

Returns
false if the path was not registered or something went wrong during unregistration

References camitk::Application::getName(), camitk::Application::getSettings(), and unload().

Referenced by load().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

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