Slicer  4.11
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
qMRMLMarkupsDisplayNodeWidget.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 this License.
15 
16 ==============================================================================*/
17 
18 #ifndef __qMRMLMarkupsDisplayNodeWidget_h
19 #define __qMRMLMarkupsDisplayNodeWidget_h
20 
21 // Qt includes
22 #include <QWidget>
23 
24 // CTK includes
25 #include <ctkVTKObject.h>
26 
27 // qMRML includes
28 #include "qSlicerMarkupsModuleWidgetsExport.h"
29 
30 class qMRMLMarkupsDisplayNodeWidgetPrivate;
31 class vtkMRMLScene;
32 class vtkMRMLNode;
34 class vtkMRMLMarkupsNode;
35 class vtkMRMLColorNode;
37 
38 class Q_SLICER_MODULE_MARKUPS_WIDGETS_EXPORT qMRMLMarkupsDisplayNodeWidget : public QWidget
39 {
40  Q_OBJECT
41  QVTK_OBJECT
42 
43 /*
44  Q_PROPERTY(ControlMode scalarRangeMode READ scalarRangeMode WRITE setScalarRangeMode)
45  Q_PROPERTY(double minimumValue READ minimumValue WRITE setMinimumValue)
46  Q_PROPERTY(double maximumValue READ maximumValue WRITE setMaximumValue)
47  Q_PROPERTY(bool clippingConfigurationButtonVisible READ clippingConfigurationButtonVisible WRITE setClippingConfigurationButtonVisible)
48  */
49 public:
50 
51  qMRMLMarkupsDisplayNodeWidget(QWidget *parent=nullptr);
53 
54  vtkMRMLMarkupsDisplayNode* mrmlMarkupsDisplayNode()const;
55 
56  bool visibility()const;
57 
58  bool glyphSizeIsAbsolute()const;
59 
60  bool pointLabelsVisibility()const;
61 
62 signals:
65  void displayNodeChanged();
66 
67 public slots:
69  void setMRMLMarkupsDisplayNode(vtkMRMLMarkupsDisplayNode *node);
71  void setMRMLMarkupsDisplayNode(vtkMRMLNode *node);
72 
75  void setMRMLMarkupsNode(vtkMRMLMarkupsNode* node);
77  void setMRMLMarkupsNode(vtkMRMLNode* node);
78 
79  void setVisibility(bool);
80 
81  void setGlyphSizeIsAbsolute(bool absolute);
82 
83  void setPointLabelsVisibility(bool);
84 
85  void setMaximumMarkupsScale(double maxScale);
86  void setMaximumMarkupsSize(double maxScale);
87 
88 protected slots:
89  void updateWidgetFromMRML();
90  vtkMRMLSelectionNode* getSelectionNode(vtkMRMLScene *mrmlScene);
91 
92  void onSelectedColorPickerButtonChanged(QColor qcolor);
93  void onUnselectedColorPickerButtonChanged(QColor qcolor);
94  void onGlyphTypeComboBoxChanged(QString value);
95  void onGlyphScaleSliderWidgetChanged(double value);
96  void onGlyphSizeSliderWidgetChanged(double value);
97  void onTextScaleSliderWidgetChanged(double value);
98  void onOpacitySliderWidgetChanged(double value);
99 
100 protected:
101  QScopedPointer<qMRMLMarkupsDisplayNodeWidgetPrivate> d_ptr;
102 
103 private:
104  Q_DECLARE_PRIVATE(qMRMLMarkupsDisplayNodeWidget);
105  Q_DISABLE_COPY(qMRMLMarkupsDisplayNodeWidget);
106 };
107 
108 #endif
A set of MRML Nodes that supports serialization and undo/redo.
Definition: vtkMRMLScene.h:56
Abstract MRML node to represent color information.
Abstract Superclass for all specific types of MRML nodes.
Definition: vtkMRMLNode.h:139
MRML node for storing information about the active nodes in the scene.
QScopedPointer< qMRMLMarkupsDisplayNodeWidgetPrivate > d_ptr