Slicer  4.11
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 // Slicer 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 = nullptr);
39  ~qSlicerDataModuleWidget() override;
40 
41  void enter() override;
42 
43  enum
44  {
45  TabIndexSubjectHierarchy = 0,
47  TabIndexAllNodes
48  };
49 
50 public slots:
52  void setMRMLScene(vtkMRMLScene* scene) override;
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 protected:
85  void setup() override;
86 
87 protected:
88  QScopedPointer<qSlicerDataModuleWidgetPrivate> d_ptr;
89 
90 private:
91  Q_DECLARE_PRIVATE(qSlicerDataModuleWidget);
92  Q_DISABLE_COPY(qSlicerDataModuleWidget);
93 };
94 
95 #endif
qSlicerAbstractModuleWidget Superclass
QScopedPointer< qSlicerDataModuleWidgetPrivate > d_ptr
void setMRMLScene(vtkMRMLScene *scene) override
A set of MRML Nodes that supports serialization and undo/redo.
Definition: vtkMRMLScene.h:61
Item model for subject hierarchy.
Abstract Superclass for all specific types of MRML nodes.
Definition: vtkMRMLNode.h:167
virtual Q_INVOKABLE void enter()