Computer Assisted Medical Intervention Tool Kit  version 6.0
Loading...
Searching...
No Matches
HotPlugExtensionManager.h
Go to the documentation of this file.
1/*****************************************************************************
2 * $CAMITK_LICENCE_BEGIN$
3 *
4 * CamiTK - Computer Assisted Medical Intervention ToolKit
5 * (c) 2001-2025 Univ. Grenoble Alpes, CNRS, Grenoble INP - UGA, TIMC, 38000 Grenoble, France
6 *
7 * Visit http://camitk.imag.fr for more information
8 *
9 * This file is part of CamiTK.
10 *
11 * CamiTK is free software: you can redistribute it and/or modify
12 * it under the terms of the GNU Lesser General Public License version 3
13 * only, as published by the Free Software Foundation.
14 *
15 * CamiTK is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU Lesser General Public License version 3 for more details.
19 *
20 * You should have received a copy of the GNU Lesser General Public License
21 * version 3 along with CamiTK. If not, see <http://www.gnu.org/licenses/>.
22 *
23 * $CAMITK_LICENCE_END$
24 ****************************************************************************/
25
26#ifndef __HOTPLUG_EXTENSION_MANAGER__
27#define __HOTPLUG_EXTENSION_MANAGER__
28
30
31#include <QObject>
32#include <QStringList>
33
34namespace camitk {
35
48class CAMITK_API HotPlugExtensionManager : public QObject {
49
50 Q_OBJECT
51
52public:
54 static const QStringList& getLoadedExtensionFiles();
55
58
60 static const QStringList getRegisteredExtensionFiles();
61
67 static bool registerExtension(const QString& camitkExtensionFilePath);
68
73 static bool unregisterExtension(const QString& camitkExtensionFilePath);
74
77 static bool loadAll();
78
81 static bool unloadAll();
82
86 static HotPlugActionExtension* load(const QString& camitkExtensionFilePath, bool forceRebuild = false, int progressMinimum = 0, int progressMaximum = 100);
87
89 static bool unload(const QString& camitkExtensionFilePath);
90
92 static void setVerifyOrRebuildOption(bool alwaysRebuild);
93
95 static bool getVerifyOrRebuildOption();
96
97private:
98
101 static QMap<QString, HotPlugActionExtension*>& loadedExtensions();
102
103};
104
105} // namespace camitk
106
107#endif // __HOTPLUG_EXTENSION_MANAGER__
#define CAMITK_API
Definition CamiTKAPI.h:66
Definition PersistenceManager.h:30
An ActionExtension that can be created on the fly from a camitk extension file.
Definition HotPlugActionExtension.h:44
Manages all the HotPlug extension.
Definition HotPlugExtensionManager.h:48
static bool unregisterExtension(const QString &camitkExtensionFilePath)
Unregister a camitk file.
Definition HotPlugExtensionManager.cpp:105
static bool getVerifyOrRebuildOption()
get the corresponding settings from persistence
Definition HotPlugExtensionManager.cpp:254
static bool loadAll()
load all the CamiTK extension files registered in the settings
Definition HotPlugExtensionManager.cpp:121
static HotPlugActionExtension * load(const QString &camitkExtensionFilePath, bool forceRebuild=false, int progressMinimum=0, int progressMaximum=100)
load a CamiTK extension file
Definition HotPlugExtensionManager.cpp:151
static const QList< HotPlugActionExtension * > & getLoadedExtensions()
get the list of all loaded ActionExtension*
Definition HotPlugExtensionManager.cpp:56
static bool registerExtension(const QString &camitkExtensionFilePath)
Register an extension described by a CamiTK extension file.
Definition HotPlugExtensionManager.cpp:73
static void setVerifyOrRebuildOption(bool alwaysRebuild)
set the corresponding settings for persistence
Definition HotPlugExtensionManager.cpp:246
static bool unloadAll()
unload all the currently loaded CamiTK extension files (delete from memory and from current loaded li...
Definition HotPlugExtensionManager.cpp:139
static const QStringList getRegisteredExtensionFiles()
get the list of registered camitk extension file (file path)
Definition HotPlugExtensionManager.cpp:47
static bool unload(const QString &camitkExtensionFilePath)
unload a CamiTK extension file
Definition HotPlugExtensionManager.cpp:228
static const QStringList & getLoadedExtensionFiles()
get the list of loaded camitk extension file (file path)
Definition HotPlugExtensionManager.cpp:40
Definition Action.cpp:40