Slicer  4.8
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 // SlicerQt 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 #ifdef Slicer_HAVE_QT5
42  Q_PLUGIN_METADATA(IID "org.slicer.modules.loadable.qSlicerLoadableModule/1.0");
43 #endif
44  Q_INTERFACES(qSlicerLoadableModule);
45 
46 public:
47 
49  qSlicerViewControllersModule(QObject *parent=0);
51 
52  qSlicerGetTitleMacro(QTMODULE_TITLE);
53 
54  virtual QStringList categories()const;
55  virtual QIcon icon()const;
56 
57  virtual QString acknowledgementText()const;
58  virtual QStringList contributors()const;
59 
62  static void readDefaultSliceViewSettings(vtkMRMLSliceNode* defaultViewNode);
63 
66  static void writeDefaultSliceViewSettings(vtkMRMLSliceNode* defaultViewNode);
67 
70  static void readDefaultThreeDViewSettings(vtkMRMLViewNode* defaultViewNode);
71 
74  static void writeDefaultThreeDViewSettings(vtkMRMLViewNode* defaultViewNode);
75 
78  void readDefaultPlotViewSettings(vtkMRMLPlotViewNode *defaultViewNode);
79 
82  void writeDefaultPlotViewSettings(vtkMRMLPlotViewNode *defaultViewNode);
83 
86  virtual void setMRMLScene(vtkMRMLScene* scene);
87 
88 protected:
90  virtual void setup();
91 
94 
97 
99  static void readCommonViewSettings(vtkMRMLAbstractViewNode* defaultViewNode, QSettings& settings);
100  static void writeCommonViewSettings(vtkMRMLAbstractViewNode* defaultViewNode, QSettings& settings);
101 
102 protected:
103  QScopedPointer<qSlicerViewControllersModulePrivate> d_ptr;
104 
105 private:
106  Q_DECLARE_PRIVATE(qSlicerViewControllersModule);
107  Q_DISABLE_COPY(qSlicerViewControllersModule);
108 };
109 
110 #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)
virtual void setup()
All initialization code should be done in the setup.
virtual vtkMRMLAbstractLogic * createLogic()=0
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:54
virtual QString acknowledgementText() const
virtual QStringList categories() const
MRML node to represent a 3D view.