Slicer  4.10
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
qSlicerSegmentEditorEffectFactory.h
Go to the documentation of this file.
1 /*==============================================================================
2 
3  Program: 3D Slicer
4 
5  Copyright (c) Laboratory for Percutaneous Surgery (PerkLab)
6  Queen's University, Kingston, ON, Canada. All Rights Reserved.
7 
8  See COPYRIGHT.txt
9  or http://www.slicer.org/copyright/copyright.txt for details.
10 
11  Unless required by applicable law or agreed to in writing, software
12  distributed under the License is distributed on an "AS IS" BASIS,
13  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  See the License for the specific language governing permissions and
15  limitations under the License.
16 
17  This file was originally developed by Csaba Pinter, PerkLab, Queen's University
18  and was supported through the Applied Cancer Research Unit program of Cancer Care
19  Ontario with funds provided by the Ontario Ministry of Health and Long-Term Care
20 
21 ==============================================================================*/
22 
23 #ifndef __qSlicerSegmentEditorEffectFactory_h
24 #define __qSlicerSegmentEditorEffectFactory_h
25 
26 // Segmentations Editor Effects includes
27 #include "qSlicerSegmentationsEditorEffectsExport.h"
28 
29 // Qt includes
30 #include <QObject>
31 #include <QList>
32 
34 class qSlicerSegmentEditorEffectFactoryCleanup;
35 
39 class Q_SLICER_SEGMENTATIONS_EFFECTS_EXPORT qSlicerSegmentEditorEffectFactory : public QObject
40 {
41  Q_OBJECT
42 
43 public:
46  Q_INVOKABLE static qSlicerSegmentEditorEffectFactory* instance();
47 
49  static void setInstance(qSlicerSegmentEditorEffectFactory* instance);
50 
51 public:
54  Q_INVOKABLE bool registerEffect(qSlicerSegmentEditorAbstractEffect* effect);
55 
57  Q_INVOKABLE QList<qSlicerSegmentEditorAbstractEffect*> registeredEffects() { return m_RegisteredEffects; };
58 
63 
64 signals:
66  void effectRegistered(QString);
67 
68 protected:
71 
72 public:
75  qSlicerSegmentEditorEffectFactory(QObject* parent=NULL);
76 
79 
80 private:
81  Q_DISABLE_COPY(qSlicerSegmentEditorEffectFactory);
82  friend class qSlicerSegmentEditorEffectFactoryCleanup;
83 
84 private:
86  static qSlicerSegmentEditorEffectFactory* m_Instance;
87 };
88 
89 #endif
Abstract class for segment editor effects.
Q_INVOKABLE QList< qSlicerSegmentEditorAbstractEffect * > registeredEffects()
Get list of registered effects.
Singleton class managing segment editor effect plugins.
QList< qSlicerSegmentEditorAbstractEffect * > m_RegisteredEffects
List of registered effect instances.