Slicer  5.3
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
qSlicerModuleManager.h
Go to the documentation of this file.
1 /*==============================================================================
2 
3  Program: 3D Slicer
4 
5  Copyright (c) Kitware Inc.
6 
7  See COPYRIGHT.txt
8  or http://www.slicer.org/copyright/copyright.txt for details.
9 
10  Unless required by applicable law or agreed to in writing, software
11  distributed under the License is distributed on an "AS IS" BASIS,
12  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  See the License for the specific language governing permissions and
14  limitations under the License.
15 
16  This file was originally developed by Jean-Christophe Fillion-Robin, Kitware Inc.
17  and was partially funded by NIH grant 3P41RR013218-12S1
18 
19 ==============================================================================*/
20 
21 #ifndef __qSlicerModuleManager_h
22 #define __qSlicerModuleManager_h
23 
24 // Qt includes
25 #include <QStringList>
26 #include <QObject>
27 
28 // CTK includes
29 #include <ctkPimpl.h>
30 
31 #include "qSlicerBaseQTCoreExport.h"
32 
35 
36 class qSlicerModuleManagerPrivate;
37 
38 class Q_SLICER_BASE_QTCORE_EXPORT qSlicerModuleManager : public QObject
39 {
40  Q_OBJECT
41 public:
42  typedef QObject Superclass;
43  qSlicerModuleManager(QObject* newParent = nullptr);
44  ~qSlicerModuleManager() override;
45 
47  virtual void printAdditionalInfo();
48 
50  Q_INVOKABLE qSlicerModuleFactoryManager * factoryManager()const;
51 
53  Q_INVOKABLE QStringList modulesNames()const;
54 
56  Q_INVOKABLE qSlicerAbstractCoreModule* module(const QString& name)const;
57 
58 signals:
59  void moduleLoaded(const QString& module);
60  void moduleAboutToBeUnloaded(const QString& module);
61 
62 protected:
63  QScopedPointer<qSlicerModuleManagerPrivate> d_ptr;
64 
65 private:
66  Q_DECLARE_PRIVATE(qSlicerModuleManager);
67  Q_DISABLE_COPY(qSlicerModuleManager);
68 };
69 
70 #endif
qSlicerAbstractCoreModule is the base class of any module in Slicer.
QScopedPointer< qSlicerModuleManagerPrivate > d_ptr