Slicer  4.8
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
qSlicerSubjectHierarchySceneViewsPlugin.h
Go to the documentation of this file.
1 /*==============================================================================
2 
3  Program: 3D Slicer
4 
5  Copyright (c) Laboratory for Percutaneous Surgery (PerkLab)
6  Queen's University, Kingston, ON, Canada. All Rights Reserved.
7 
8  See COPYRIGHT.txt
9  or http://www.slicer.org/copyright/copyright.txt for details.
10 
11  Unless required by applicable law or agreed to in writing, software
12  distributed under the License is distributed on an "AS IS" BASIS,
13  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  See the License for the specific language governing permissions and
15  limitations under the License.
16 
17  This file was originally developed by Csaba Pinter, PerkLab, Queen's University
18  and was supported through the Applied Cancer Research Unit program of Cancer Care
19  Ontario with funds provided by the Ontario Ministry of Health and Long-Term Care
20 
21 ==============================================================================*/
22 
23 #ifndef __qSlicerSubjectHierarchySceneViewsPlugin_h
24 #define __qSlicerSubjectHierarchySceneViewsPlugin_h
25 
26 // SubjectHierarchy Plugins includes
28 
29 #include "qSlicerSceneViewsSubjectHierarchyPluginsExport.h"
30 
31 class qSlicerSubjectHierarchySceneViewsPluginPrivate;
32 class vtkMRMLNode;
34 
35 // Due to some reason the Python wrapping of this class fails, therefore
36 // put everything between BTX/ETX to exclude from wrapping.
37 // TODO investigate why the wrapping fails:
38 // https://www.assembla.com/spaces/slicerrt/tickets/210-python-wrapping-error-when-starting-up-slicer-with-slicerrt
39 //BTX
40 
42 class Q_SLICER_SCENEVIEWS_SUBJECT_HIERARCHY_PLUGINS_EXPORT qSlicerSubjectHierarchySceneViewsPlugin : public qSlicerSubjectHierarchyAbstractPlugin
43 {
44 public:
45  Q_OBJECT
46 
47 public:
49  qSlicerSubjectHierarchySceneViewsPlugin(QObject* parent = NULL);
51 
52 public:
60  virtual double canAddNodeToSubjectHierarchy(
61  vtkMRMLNode* node,
62  vtkIdType parentItemID=vtkMRMLSubjectHierarchyNode::INVALID_ITEM_ID )const;
63 
70  virtual double canOwnSubjectHierarchyItem(vtkIdType itemID)const;
71 
74  Q_INVOKABLE virtual const QString roleForPlugin()const;
75 
78  virtual QIcon icon(vtkIdType itemID);
79 
82 
85  virtual void showContextMenuActionsForItem(vtkIdType itemID);
86 
87 protected slots:
89  void restoreCurrentSceneView()const;
90 
91 protected:
92  QScopedPointer<qSlicerSubjectHierarchySceneViewsPluginPrivate> d_ptr;
93 
94 private:
95  Q_DECLARE_PRIVATE(qSlicerSubjectHierarchySceneViewsPlugin);
97 };
98 
99 //ETX
100 
101 #endif
virtual QIcon icon(vtkIdType itemID)
virtual Q_INVOKABLE const QString roleForPlugin() const
virtual double canAddNodeToSubjectHierarchy(vtkMRMLNode *node, vtkIdType parentItemID=vtkMRMLSubjectHierarchyNode::INVALID_ITEM_ID) const
Abstract plugin for handling Subject Hierarchy items.
MRML node to represent a complete subject hierarchy tree.
QScopedPointer< qSlicerSubjectHierarchySceneViewsPluginPrivate > d_ptr
virtual Q_INVOKABLE void showContextMenuActionsForItem(vtkIdType itemID)
Abstract Superclass for all specific types of MRML nodes.
Definition: vtkMRMLNode.h:135
virtual Q_INVOKABLE double canOwnSubjectHierarchyItem(vtkIdType itemID) const
virtual Q_INVOKABLE QList< QAction * > itemContextMenuActions() const