Slicer  4.8
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
qSlicerDataModuleWidget.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 Julien Finet, Kitware Inc.
17  and was partially funded by NIH grant 3P41RR013218-12S1
18 
19 ==============================================================================*/
20 
21 #ifndef __qSlicerDataModuleWidget_h
22 #define __qSlicerDataModuleWidget_h
23 
24 // SlicerQt includes
26 #include "qSlicerDataModuleExport.h"
27 
28 class vtkMRMLNode;
29 class qSlicerDataModuleWidgetPrivate;
31 
32 class Q_SLICER_QTMODULES_DATA_EXPORT qSlicerDataModuleWidget :
34 {
35  Q_OBJECT
36 public:
38  qSlicerDataModuleWidget(QWidget *parentWidget = 0);
39  virtual ~qSlicerDataModuleWidget();
40 
41  virtual void enter();
42 
43  enum
44  {
45  TabIndexSubjectHierarchy = 0,
47  TabIndexAllNodes
48  };
49 
50 public slots:
52  virtual void setMRMLScene(vtkMRMLScene* scene);
53 
55  void setMRMLIDsVisible(bool visible);
56 
58  void setTransformsVisible(bool visible);
59 
61  void setDataNodeFromSubjectHierarchyItem(vtkIdType itemID);
63  void setInfoLabelFromSubjectHierarchyItem(vtkIdType itemID);
65  void onSubjectHierarchyItemModified(vtkIdType itemID);
66 
68  void insertTransformNode();
70  void hardenTransformOnCurrentNode();
71 
72 public:
74  Q_INVOKABLE qMRMLSubjectHierarchyModel* subjectHierarchySceneModel()const;
75 
76 protected:
77  static void onSubjectHierarchyItemEvent(vtkObject* caller, unsigned long event, void* clientData, void* callData);
78 
79 protected slots:
80  void onCurrentNodeChanged(vtkMRMLNode* newCurrentNode);
81  void onCurrentTabChanged(int tabIndex);
82  void onHelpButtonClicked();
83 
84  void showContextMenuHint();
85 
86 protected:
87  virtual void setup();
88 
89 protected:
90  QScopedPointer<qSlicerDataModuleWidgetPrivate> d_ptr;
91 
92 private:
93  Q_DECLARE_PRIVATE(qSlicerDataModuleWidget);
94  Q_DISABLE_COPY(qSlicerDataModuleWidget);
95 };
96 
97 #endif
qSlicerAbstractModuleWidget Superclass
virtual void setMRMLScene(vtkMRMLScene *scene)
QScopedPointer< qSlicerDataModuleWidgetPrivate > d_ptr
A set of MRML Nodes that supports serialization and undo/redo.
Definition: vtkMRMLScene.h:54
Item model for subject hierarchy.
Abstract Superclass for all specific types of MRML nodes.
Definition: vtkMRMLNode.h:135
virtual Q_INVOKABLE void enter()