Slicer  5.3
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
qSlicerSubjectHierarchyTransformsPlugin.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 __qSlicerSubjectHierarchyTransformsPlugin_h
24 #define __qSlicerSubjectHierarchyTransformsPlugin_h
25 
26 // SubjectHierarchy includes
28 
29 #include "qSlicerTransformsSubjectHierarchyPluginsExport.h"
30 
31 class qSlicerSubjectHierarchyTransformsPluginPrivate;
32 
34 class Q_SLICER_TRANSFORMS_SUBJECT_HIERARCHY_PLUGINS_EXPORT qSlicerSubjectHierarchyTransformsPlugin : public qSlicerSubjectHierarchyAbstractPlugin
35 {
36 public:
37  Q_OBJECT
38 
39 public:
41  qSlicerSubjectHierarchyTransformsPlugin(QObject* parent = nullptr);
43 
44 public:
53  double canReparentItemInsideSubjectHierarchy(vtkIdType itemID, vtkIdType parentItemID)const override;
54 
57  bool reparentItemInsideSubjectHierarchy(vtkIdType itemID, vtkIdType parentItemID) override;
58 
67  vtkMRMLNode* node,
68  vtkIdType parentItemID=vtkMRMLSubjectHierarchyNode::INVALID_ITEM_ID )const override;
69 
76  double canOwnSubjectHierarchyItem(vtkIdType itemID)const override;
77 
80  Q_INVOKABLE const QString roleForPlugin()const override;
81 
84  QIcon icon(vtkIdType itemID) override;
85 
87  QIcon visibilityIcon(int visible) override;
88 
90  QString tooltip(vtkIdType itemID)const override;
91 
94 
97  void showContextMenuActionsForItem(vtkIdType itemID) override;
98 
102 
105  void showVisibilityContextMenuActionsForItem(vtkIdType itemID) override;
106 
107 protected slots:
109  void invert();
110 
112  void identity();
113 
115  void toggleInteractionBox(bool);
116 
117 protected:
118  QScopedPointer<qSlicerSubjectHierarchyTransformsPluginPrivate> d_ptr;
119 
120 private:
121  Q_DECLARE_PRIVATE(qSlicerSubjectHierarchyTransformsPlugin);
123 };
124 
125 #endif
virtual QIcon icon(vtkIdType itemID)
QScopedPointer< qSlicerSubjectHierarchyTransformsPluginPrivate > d_ptr
virtual Q_INVOKABLE const QString roleForPlugin() const
virtual double canAddNodeToSubjectHierarchy(vtkMRMLNode *node, vtkIdType parentItemID=vtkMRMLSubjectHierarchyNode::INVALID_ITEM_ID) const
virtual Q_INVOKABLE QString tooltip(vtkIdType itemID) const
Generate tooltip for a owned subject hierarchy item.
Abstract plugin for handling Subject Hierarchy items.
virtual double canReparentItemInsideSubjectHierarchy(vtkIdType itemID, vtkIdType parentItemID) const
virtual Q_INVOKABLE void showContextMenuActionsForItem(vtkIdType itemID)
virtual Q_INVOKABLE QIcon visibilityIcon(int visible)
Get visibility icon for a visibility state.
virtual Q_INVOKABLE QList< QAction * > visibilityContextMenuActions() const
Abstract Superclass for all specific types of MRML nodes.
Definition: vtkMRMLNode.h:167
virtual Q_INVOKABLE void showVisibilityContextMenuActionsForItem(vtkIdType itemID)
virtual Q_INVOKABLE double canOwnSubjectHierarchyItem(vtkIdType itemID) const
virtual bool reparentItemInsideSubjectHierarchy(vtkIdType itemID, vtkIdType parentItemID)
virtual Q_INVOKABLE QList< QAction * > itemContextMenuActions() const