Slicer  5.2
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
qSlicerAnnotationModuleWidget.h
Go to the documentation of this file.
1 #ifndef __qSlicerAnnotationModuleWidget_h
2 #define __qSlicerAnnotationModuleWidget_h
3 
4 // CTK includes
5 #include <ctkVTKObject.h>
6 
7 // Slicer includes
9 #include "../qSlicerAnnotationsModuleExport.h"
10 #include "vtkMRMLInteractionNode.h"
11 #include "vtkMRMLLayoutLogic.h"
12 #include "vtkMRMLSelectionNode.h"
13 
16 class qSlicerAnnotationModuleWidgetPrivate;
18 class vtkMRMLNode;
19 
21 class Q_SLICER_QTMODULES_ANNOTATIONS_EXPORT qSlicerAnnotationModuleWidget :
23 {
24  Q_OBJECT
25  QVTK_OBJECT
26 public:
28  qSlicerAnnotationModuleWidget(QWidget *parent=nullptr);
30  vtkSmartPointer<vtkMRMLApplicationLogic> MRMLAppLogic;
31 
33  enum
34  {
35  TextNode = 1000,
43  };
44 
48  void updateWidgetFromInteractionMode(vtkMRMLInteractionNode *interactionNode);
49 
50  bool setEditedNode(vtkMRMLNode* node, QString role = QString(), QString context = QString()) override;
51 
52 protected:
53 
54 public slots:
56  void refreshTree();
58  void onHierarchyNodeAddedEvent(vtkObject *caller, vtkObject *obj);
59 
62  void grabSnapShot();
63 
66  void updateActiveHierarchyLabel();
67 
68 protected slots:
69 
71  void propertyEditButtonClicked(QString mrmlId);
72 
73  // Table and Property Modify
74  void moveDownSelected();
75  void moveUpSelected();
76 
77 
78  //------------------------------------------------------------------
79  // Daniel's approved code starting here
80 
82  void onCreateLineButtonClicked();
83  void onCreateROIButtonClicked();
84 
86  void onAddHierarchyButtonClicked();
87 
89  void onJumpSlicesButtonClicked();
90 
92  void selectAllButtonClicked();
93 
95  void unselectAllButtonClicked();
96 
98  void visibleSelectedButtonClicked();
99 
101  void lockSelectedButtonClicked();
102 
104  void deleteSelectedButtonClicked();
105 
107  void invisibleHierarchyButtonClicked();
108  void visibleHierarchyButtonClicked();
110  void lockHierarchyButtonClicked();
111  void unlockHierarchyButtonClicked();
112 
113  // Property dialog
114  void propertyRestored();
115  void propertyAccepted();
116 
117  // Report dialog
118  void reportDialogRejected();
119  void reportDialogAccepted();
120  void onReportButtonClicked();
121 
122 protected:
123  QScopedPointer<qSlicerAnnotationModuleWidgetPrivate> d_ptr;
124 
125 private:
126  Q_DECLARE_PRIVATE(qSlicerAnnotationModuleWidget);
127  Q_DISABLE_COPY(qSlicerAnnotationModuleWidget);
128 
129  void setup() override;
130 
131  qSlicerAnnotationModulePropertyDialog* m_PropertyDialog;
132  qSlicerAnnotationModuleReportDialog* m_ReportDialog;
133 
135  int m_CurrentAnnotationType;
136 
137 };
138 
139 #endif
Q_INVOKABLE bool setEditedNode(vtkMRMLNode *node, QString role=QString(), QString context=QString()) override
Node editing.
qSlicerAbstractModuleWidget Superclass
vtkSmartPointer< vtkMRMLApplicationLogic > MRMLAppLogic
QScopedPointer< qSlicerAnnotationModuleWidgetPrivate > d_ptr
Abstract Superclass for all specific types of MRML nodes.
Definition: vtkMRMLNode.h:167