Slicer  4.10
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  void onClippingConfigurationButtonClicked();
60  void onDisplayNodeChanged();
61  void onClipSelectedModelToggled(bool);
62 
63  static void onMRMLSceneEvent(vtkObject* vtk_obj, unsigned long event,
64  void* client_data, void* call_data);
65 
67  void hideAllModels();
68  void showAllModels();
69 
70 protected:
71  QScopedPointer<qSlicerModelsModuleWidgetPrivate> d_ptr;
72 
73  virtual void setup();
74 
75  void updateWidgetFromSelectionNode();
76 
77  void updateTreeViewModel();
78 
79 private:
80  Q_DECLARE_PRIVATE(qSlicerModelsModuleWidget);
81  Q_DISABLE_COPY(qSlicerModelsModuleWidget);
82 };
83 
84 #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:138
MRML node for storing information about the active nodes in the scene.