Slicer  5.3
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 // CTK includes
25 #include "ctkVTKObject.h"
26 
27 // Slicer includes
29 
30 #include "qSlicerModelsModuleExport.h"
31 
32 class qSlicerModelsModuleWidgetPrivate;
33 class vtkMRMLNode;
35 
37 class Q_SLICER_QTMODULES_MODELS_EXPORT qSlicerModelsModuleWidget : public qSlicerAbstractModuleWidget
38 {
39  Q_OBJECT
40  QVTK_OBJECT
41 
42 public:
44  qSlicerModelsModuleWidget(QWidget *parent=nullptr);
45  ~qSlicerModelsModuleWidget() override;
46 
47  void enter() override;
48  void exit() override;
49  bool setEditedNode(vtkMRMLNode* node, QString role = QString(), QString context = QString()) override;
50 
51 public slots:
52  void setMRMLScene(vtkMRMLScene* scene) override;
53 
58  void setDisplaySelectionFromSubjectHierarchyItems(QList<vtkIdType> itemIDs);
59 
60  void onClippingConfigurationButtonClicked();
61  void onDisplayNodeChanged();
62  void onClipSelectedModelToggled(bool);
64  void onColorLegendCollapsibleGroupBoxToggled(bool);
65 
66  static void onMRMLSceneEvent(vtkObject* vtk_obj, unsigned long event,
67  void* client_data, void* call_data);
68 
70  void hideAllModels();
71  void showAllModels();
72 
73 protected slots:
76  void onSubjectHierarchyItemModified(vtkObject* caller, void* callData);
77 
79  void onInformationSectionCollapsed(bool);
80 
81 protected:
82  void setup() override;
83 
84 protected:
85  QScopedPointer<qSlicerModelsModuleWidgetPrivate> d_ptr;
86 
87 private:
88  Q_DECLARE_PRIVATE(qSlicerModelsModuleWidget);
89  Q_DISABLE_COPY(qSlicerModelsModuleWidget);
90 };
91 
92 #endif
Q_INVOKABLE bool setEditedNode(vtkMRMLNode *node, QString role=QString(), QString context=QString()) override
Node editing.
QScopedPointer< qSlicerModelsModuleWidgetPrivate > d_ptr
void setMRMLScene(vtkMRMLScene *scene) override
A set of MRML Nodes that supports serialization and undo/redo.
Definition: vtkMRMLScene.h:57
qSlicerAbstractModuleWidget Superclass
Abstract Superclass for all specific types of MRML nodes.
Definition: vtkMRMLNode.h:167
MRML node for storing information about the active nodes in the scene.
virtual Q_INVOKABLE void enter()
virtual Q_INVOKABLE void exit()