Slicer  4.8
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
qSlicerModelsModuleWidget.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 __qSlicerModelsModuleWidget_h
22 #define __qSlicerModelsModuleWidget_h
23 
24 // SlicerQt includes
26 
27 #include "qSlicerModelsModuleExport.h"
28 
29 class qSlicerModelsModuleWidgetPrivate;
30 class vtkMRMLNode;
31 class QModelIndex;
33 
35 class Q_SLICER_QTMODULES_MODELS_EXPORT qSlicerModelsModuleWidget
37 {
38  Q_OBJECT
39 
40 public:
41 
43  qSlicerModelsModuleWidget(QWidget *parent=0);
44  virtual ~qSlicerModelsModuleWidget();
45 
46  vtkMRMLSelectionNode* getSelectionNode();
47 
48  virtual bool setEditedNode(vtkMRMLNode* node, QString role = QString(), QString context = QString());
49 
50 public slots:
51  virtual void setMRMLScene(vtkMRMLScene* scene);
52 
53  void insertHierarchyNode();
54  void deleteMultipleModels();
55  void renameMultipleModels();
56  void onCurrentNodeChanged(vtkMRMLNode* newCurrentNode);
57  void includeFiberBundles(bool include);
58  void onDisplayClassChanged(int index);
59 
60  static void onMRMLSceneEvent(vtkObject* vtk_obj, unsigned long event,
61  void* client_data, void* call_data);
62 
64  void hideAllModels();
65  void showAllModels();
66 
67 protected:
68  QScopedPointer<qSlicerModelsModuleWidgetPrivate> d_ptr;
69 
70  virtual void setup();
71 
72  void updateWidgetFromSelectionNode();
73 
74  void updateTreeViewModel();
75 
76 private:
77  Q_DECLARE_PRIVATE(qSlicerModelsModuleWidget);
78  Q_DISABLE_COPY(qSlicerModelsModuleWidget);
79 };
80 
81 #endif
virtual Q_INVOKABLE bool setEditedNode(vtkMRMLNode *node, QString role=QString(), QString context=QString())
Node editing.
virtual void setMRMLScene(vtkMRMLScene *scene)
QScopedPointer< qSlicerModelsModuleWidgetPrivate > d_ptr
A set of MRML Nodes that supports serialization and undo/redo.
Definition: vtkMRMLScene.h:54
qSlicerAbstractModuleWidget Superclass
Abstract Superclass for all specific types of MRML nodes.
Definition: vtkMRMLNode.h:135
MRML node for storing information about the active nodes in the scene.