Slicer  5.1
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
qMRMLMarkupsAngleMeasurementsWidget.h
Go to the documentation of this file.
1 /*==============================================================================
2 
3  Copyright (c) The Intervention Centre
4  Oslo University Hospital, Oslo, Norway. All Rights Reserved.
5 
6  See COPYRIGHT.txt
7  or http://www.slicer.org/copyright/copyright.txt for details.
8 
9  Unless required by applicable law or agreed to in writing, software
10  distributed under the License is distributed on an "AS IS" BASIS,
11  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  See the License for the specific language governing permissions and
13  limitations under the License.
14 
15  This file was originally developed by Rafael Palomar (The Intervention Centre,
16  Oslo University Hospital) and was supported by The Research Council of Norway
17  through the ALive project (grant nr. 311393).
18 
19 ==============================================================================*/
20 
21 #ifndef __qMRMLMarkupsAngleMeasurementsWidget_h_
22 #define __qMRMLMarkupsAngleMeasurementsWidget_h_
23 
24 // Markups widgets includes
26 #include "qSlicerMarkupsModuleWidgetsExport.h"
27 
28 #include <ctkVTKObject.h>
29 
30 // ------------------------------------------------------------------------------
31 class qMRMLMarkupsAngleMeasurementsWidgetPrivate;
32 class vtkMRMLMarkupsNode;
33 
34 // ------------------------------------------------------------------------------
35 class Q_SLICER_MODULE_MARKUPS_WIDGETS_EXPORT qMRMLMarkupsAngleMeasurementsWidget
37 {
38  Q_OBJECT
39  QVTK_OBJECT
40 
41 public:
43  qMRMLMarkupsAngleMeasurementsWidget(QWidget* parent=nullptr);
45 
47  const QString className() const override { return "qMRMLMarkupsAngleMeasurementsWidget"; }
48 
50  bool canManageMRMLMarkupsNode(vtkMRMLMarkupsNode *markupsNode) const override;
51 
53  void setMRMLMarkupsNode(vtkMRMLMarkupsNode* node) override;
54 
57  { return new qMRMLMarkupsAngleMeasurementsWidget(); }
58 
59 public slots:
61  void onAngleMeasurementModeChanged();
63  void onRotationAxisChanged();
65  void updateWidgetFromMRML() override;
66 
67 protected:
68  qMRMLMarkupsAngleMeasurementsWidget(QWidget* parent, qMRMLMarkupsAngleMeasurementsWidgetPrivate &d);
69 
70 protected:
71  void setup();
72 
73 protected:
74  QScopedPointer<qMRMLMarkupsAngleMeasurementsWidgetPrivate> d_ptr;
75 
76 private:
77  Q_DECLARE_PRIVATE(qMRMLMarkupsAngleMeasurementsWidget);
79 };
80 
81 #endif // __qMRMLMarkupsAngleMeasurementsWidget_h_
virtual void updateWidgetFromMRML()=0
Updates the widget based on information from MRML.
virtual bool canManageMRMLMarkupsNode(vtkMRMLMarkupsNode *markupsNode) const =0
void setMRMLMarkupsNode(vtkMRMLNode *markupsNode)
Sets the vtkMRMLNode to operate on.
QScopedPointer< qMRMLMarkupsAngleMeasurementsWidgetPrivate > d_ptr
const QString className() const override
Gets the name of the additional options widget type.
qMRMLMarkupsAbstractOptionsWidget * createInstance() const override
Returns an instance of the widget.