Slicer  5.0
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
qSlicerViewControllersModule.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 __qSlicerViewControllersModule_h
22 #define __qSlicerViewControllersModule_h
23 
24 // Slicer includes
25 #include "qSlicerLoadableModule.h"
26 
27 #include "qSlicerViewControllersModuleExport.h"
28 
29 class QSettings;
30 
31 class qSlicerViewControllersModulePrivate;
34 class vtkMRMLSliceNode;
35 class vtkMRMLViewNode;
36 
37 class Q_SLICER_QTMODULES_VIEWCONTROLLERS_EXPORT qSlicerViewControllersModule
38  : public qSlicerLoadableModule
39 {
40  Q_OBJECT
41  Q_PLUGIN_METADATA(IID "org.slicer.modules.loadable.qSlicerLoadableModule/1.0");
42  Q_INTERFACES(qSlicerLoadableModule);
43 
44 public:
45 
47  qSlicerViewControllersModule(QObject *parent=nullptr);
48  ~qSlicerViewControllersModule() override;
49 
50  qSlicerGetTitleMacro(QTMODULE_TITLE);
51 
52  QStringList categories()const override;
53  QIcon icon()const override;
54  QString helpText()const override;
55  QString acknowledgementText()const override;
56  QStringList contributors()const override;
57 
60  void readDefaultSliceViewSettings(vtkMRMLSliceNode* defaultViewNode);
61 
64  static void writeDefaultSliceViewSettings(vtkMRMLSliceNode* defaultViewNode);
65 
68  static void readDefaultThreeDViewSettings(vtkMRMLViewNode* defaultViewNode);
69 
72  static void writeDefaultThreeDViewSettings(vtkMRMLViewNode* defaultViewNode);
73 
76  void readDefaultPlotViewSettings(vtkMRMLPlotViewNode *defaultViewNode);
77 
80  void writeDefaultPlotViewSettings(vtkMRMLPlotViewNode *defaultViewNode);
81 
84  void setMRMLScene(vtkMRMLScene* scene) override;
85 
86 protected:
88  void setup() override;
89 
92 
95 
97  static void readCommonViewSettings(vtkMRMLAbstractViewNode* defaultViewNode, QSettings& settings);
98  static void writeCommonViewSettings(vtkMRMLAbstractViewNode* defaultViewNode, QSettings& settings);
99 
100 protected:
101  QScopedPointer<qSlicerViewControllersModulePrivate> d_ptr;
102 
103 private:
104  Q_DECLARE_PRIVATE(qSlicerViewControllersModule);
105  Q_DISABLE_COPY(qSlicerViewControllersModule);
106 };
107 
108 #endif
virtual void setMRMLScene(vtkMRMLScene *)
virtual QStringList contributors() const
Return the contributors of the module.
Superclass for MRML logic classes.
virtual QIcon icon() const
MRML node to represent Plot view parameters.
virtual qSlicerAbstractModuleRepresentation * createWidgetRepresentation()=0
Create and return a widget representation for the module.
QScopedPointer< qSlicerViewControllersModulePrivate > d_ptr
MRML node for storing a slice through RAS space.
#define qSlicerGetTitleMacro(_TITLE)
QString acknowledgementText() const override
virtual vtkMRMLAbstractLogic * createLogic()=0
void setup() override
All initialization code should be done in the setup.
Abstract MRML node to represent a view. The class holds the properties common to any view type (3D...
A set of MRML Nodes that supports serialization and undo/redo.
Definition: vtkMRMLScene.h:57
QString helpText() const override
Return help/acknowledgement text.
virtual QStringList categories() const
MRML node to represent a 3D view.