Slicer  5.0
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
qSlicerSequencesModule.h
Go to the documentation of this file.
1 /*==============================================================================
2 
3  Program: 3D Slicer
4 
5  Portions (c) Copyright Brigham and Women's Hospital (BWH) All Rights Reserved.
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 ==============================================================================*/
17 
18 #ifndef __qSlicerSequencesModule_h
19 #define __qSlicerSequencesModule_h
20 
21 // CTK includes
22 #include <ctkVTKObject.h>
23 
24 // Slicer includes
25 #include "qSlicerLoadableModule.h"
26 
27 #include "vtkSlicerConfigure.h" // For Slicer_HAVE_QT5
28 
29 #include "qSlicerSequencesModuleExport.h"
30 
32 class vtkMRMLScene;
34 class vtkObject;
35 
36 
37 class qSlicerSequencesModulePrivate;
38 
40 class Q_SLICER_QTMODULES_SEQUENCES_EXPORT
42  : public qSlicerLoadableModule
43 {
44  Q_OBJECT
45  QVTK_OBJECT;
46 #ifdef Slicer_HAVE_QT5
47  Q_PLUGIN_METADATA(IID "org.slicer.modules.loadable.qSlicerLoadableModule/1.0");
48 #endif
49  Q_INTERFACES(qSlicerLoadableModule);
50 
52  Q_PROPERTY(bool toolBarVisible READ isToolBarVisible WRITE setToolBarVisible)
53  Q_PROPERTY(bool autoShowToolBar READ autoShowToolBar WRITE setAutoShowToolBar)
54 
55 public:
56 
58  explicit qSlicerSequencesModule(QObject *parent=0);
59  ~qSlicerSequencesModule() override;
60 
61  qSlicerGetTitleMacro(QTMODULE_TITLE);
62 
63  QString helpText()const override;
64  QString acknowledgementText()const override;
65  QStringList contributors()const override;
66 
67  QIcon icon()const override;
68 
69  QStringList categories()const override;
70  QStringList dependencies() const override;
71 
73  QStringList associatedNodeTypes()const override;
74 
78  Q_INVOKABLE bool autoShowToolBar();
79  Q_INVOKABLE bool isToolBarVisible();
80  Q_INVOKABLE qMRMLSequenceBrowserToolBar* toolBar();
81 
84  Q_INVOKABLE static bool showSequenceBrowser(vtkMRMLSequenceBrowserNode* browserNode);
85 
86 protected:
87 
89  void setup() override;
90 
92  qSlicerAbstractModuleRepresentation * createWidgetRepresentation() override;
93 
95  vtkMRMLAbstractLogic* createLogic() override;
96 
97 public slots:
98  void setMRMLScene(vtkMRMLScene*) override;
99  void setToolBarVisible(bool visible);
101  void setAutoShowToolBar(bool autoShow);
102  void onNodeAddedEvent(vtkObject*, vtkObject*);
103  void onNodeRemovedEvent(vtkObject*, vtkObject*);
104  void updateAllVirtualOutputNodes();
105 
106  void setToolBarActiveBrowserNode(vtkMRMLSequenceBrowserNode* browserNode);
107 
108 protected:
109  QScopedPointer<qSlicerSequencesModulePrivate> d_ptr;
110 
111 private:
112  Q_DECLARE_PRIVATE(qSlicerSequencesModule);
113  Q_DISABLE_COPY(qSlicerSequencesModule);
114 
115 };
116 
117 #endif
Superclass for MRML logic classes.
#define qSlicerGetTitleMacro(_TITLE)
A set of MRML Nodes that supports serialization and undo/redo.
Definition: vtkMRMLScene.h:57