Slicer  4.10
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
qSlicerSubjectHierarchyTablesPlugin.h
Go to the documentation of this file.
1 /*==============================================================================
2 
3  Program: 3D Slicer
4 
5  Portions (c) Copyright 2015 Brigham and Women's Hospital (BWH) All Rights Reserved.
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 Andras Lasso (PerkLab, Queen's
17  University) and Kevin Wang (Princess Margaret Hospital, Toronto) and was
18  supported through OCAIRO and the Applied Cancer Research Unit program of
19  Cancer Care Ontario.
20 
21 ==============================================================================*/
22 
23 #ifndef __qSlicerSubjectHierarchyTablesPlugin_h
24 #define __qSlicerSubjectHierarchyTablesPlugin_h
25 
26 // SubjectHierarchy includes
28 
29 #include "qSlicerTablesSubjectHierarchyPluginsExport.h"
30 
31 class qSlicerSubjectHierarchyTablesPluginPrivate;
32 class vtkMRMLNode;
35 
36 // Due to some reason the Python wrapping of this class fails, therefore
37 // put everything between BTX/ETX to exclude from wrapping.
38 // TODO investigate why the wrapping fails:
39 // https://www.assembla.com/spaces/slicerrt/tickets/210-python-wrapping-error-when-starting-up-slicer-with-slicerrt
40 //BTX
41 
43 class Q_SLICER_TABLES_SUBJECT_HIERARCHY_PLUGINS_EXPORT qSlicerSubjectHierarchyTablesPlugin : public qSlicerSubjectHierarchyAbstractPlugin
44 {
45 public:
46  Q_OBJECT
47 
48 public:
50  qSlicerSubjectHierarchyTablesPlugin(QObject* parent = NULL);
52 
53 public:
61  virtual double canAddNodeToSubjectHierarchy(
62  vtkMRMLNode* node,
63  vtkIdType parentItemID=vtkMRMLSubjectHierarchyNode::INVALID_ITEM_ID )const;
64 
71  virtual double canOwnSubjectHierarchyItem(vtkIdType itemID)const;
72 
75  Q_INVOKABLE virtual const QString roleForPlugin()const;
76 
79  virtual QIcon icon(vtkIdType itemID);
80 
82  virtual QIcon visibilityIcon(int visible);
83 
85  virtual void setDisplayVisibility(vtkIdType itemID, int visible);
86 
89  virtual int getDisplayVisibility(vtkIdType itemID)const;
90 
91 protected:
93  vtkMRMLTableViewNode* getTableViewNode()const;
94 
95 protected:
96  QScopedPointer<qSlicerSubjectHierarchyTablesPluginPrivate> d_ptr;
97 
98 private:
99  Q_DECLARE_PRIVATE(qSlicerSubjectHierarchyTablesPlugin);
100  Q_DISABLE_COPY(qSlicerSubjectHierarchyTablesPlugin);
101 };
102 
103 //ETX
104 
105 #endif
virtual Q_INVOKABLE void setDisplayVisibility(vtkIdType itemID, int visible)
Set display visibility of an owned subject hierarchy item.
virtual QIcon icon(vtkIdType itemID)
virtual Q_INVOKABLE const QString roleForPlugin() const
virtual double canAddNodeToSubjectHierarchy(vtkMRMLNode *node, vtkIdType parentItemID=vtkMRMLSubjectHierarchyNode::INVALID_ITEM_ID) const
QScopedPointer< qSlicerSubjectHierarchyTablesPluginPrivate > d_ptr
Abstract plugin for handling Subject Hierarchy items.
MRML node to represent a complete subject hierarchy tree.
virtual Q_INVOKABLE int getDisplayVisibility(vtkIdType itemID) const
virtual Q_INVOKABLE QIcon visibilityIcon(int visible)
Get visibility icon for a visibility state.
MRML node to represent table view parameters.
qSlicerSubjectHierarchyAbstractPlugin Superclass
Abstract Superclass for all specific types of MRML nodes.
Definition: vtkMRMLNode.h:138
virtual Q_INVOKABLE double canOwnSubjectHierarchyItem(vtkIdType itemID) const