Slicer  5.0
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
qSlicerAbstractModuleWidget.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 Jean-Christophe Fillion-Robin, Kitware Inc.
17  and was partially funded by NIH grant 3P41RR013218-12S1
18 
19 ==============================================================================*/
20 
21 #ifndef __qSlicerAbstractModuleWidget_h
22 #define __qSlicerAbstractModuleWidget_h
23 
24 #if defined(_MSC_VER)
25 #pragma warning( disable:4250 )
26 #endif
27 
28 // CTK includes
29 #include <ctkPimpl.h>
30 
31 // Slicer includes
33 #include "qSlicerWidget.h"
34 class qSlicerAbstractModuleWidgetPrivate;
35 class vtkMRMLNode;
39 class Q_SLICER_BASE_QTGUI_EXPORT qSlicerAbstractModuleWidget
41 {
42  Q_OBJECT
43  Q_PROPERTY(bool isEntered READ isEntered);
44 public:
47  qSlicerAbstractModuleWidget(QWidget *parent=nullptr);
48  ~qSlicerAbstractModuleWidget() override;
49 
56  Q_INVOKABLE virtual void enter();
57  Q_INVOKABLE virtual void exit();
58  bool isEntered()const;
59 
61  Q_INVOKABLE bool setEditedNode(vtkMRMLNode* node, QString role = QString(), QString context = QString()) override;
62  Q_INVOKABLE double nodeEditable(vtkMRMLNode* node) override;
63 
64 protected:
65  QScopedPointer<qSlicerAbstractModuleWidgetPrivate> d_ptr;
66 
67  void setup() override;
68 
69 private:
70  Q_DECLARE_PRIVATE(qSlicerAbstractModuleWidget);
71  Q_DISABLE_COPY(qSlicerAbstractModuleWidget);
72 };
73 
74 #endif
virtual bool setEditedNode(vtkMRMLNode *node, QString role=QString(), QString context=QString())
virtual double nodeEditable(vtkMRMLNode *node)
QScopedPointer< qSlicerAbstractModuleWidgetPrivate > d_ptr
Abstract Superclass for all specific types of MRML nodes.
Definition: vtkMRMLNode.h:167