Slicer  5.1
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
qSlicerSubjectHierarchyColorLegendPlugin.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 ==============================================================================*/
18 
19 #ifndef __qSlicerSubjectHierarchyColorLegendPlugin_h
20 #define __qSlicerSubjectHierarchyColorLegendPlugin_h
21 
22 // SubjectHierarchy Plugins includes
24 
25 #include "qSlicerColorsSubjectHierarchyPluginsExport.h"
26 
27 class qSlicerSubjectHierarchyColorLegendPluginPrivate;
28 class vtkMRMLSliceNode;
29 class vtkMRMLViewNode;
31 class vtkMRMLDisplayNode;
32 
34 class Q_SLICER_COLORS_SUBJECT_HIERARCHY_PLUGINS_EXPORT qSlicerSubjectHierarchyColorLegendPlugin : public qSlicerSubjectHierarchyAbstractPlugin
35 {
36 public:
37  Q_OBJECT
38 
39 public:
41  qSlicerSubjectHierarchyColorLegendPlugin(QObject* parent = nullptr);
43 
44 public:
45 
49 
52  void showVisibilityContextMenuActionsForItem(vtkIdType itemID) override;
53 
57  bool showItemInView(vtkIdType itemID, vtkMRMLAbstractViewNode* viewNode, vtkIdList* allItemsToShow) override;
58 
61  bool showColorLegendInView( bool show, vtkIdType itemID, vtkMRMLViewNode* viewNode=nullptr);
62  bool showColorLegendInSlice( bool show, vtkIdType itemID, vtkMRMLSliceNode* sliceNode=nullptr);
63 
64 protected slots:
66  void toggleVisibilityForCurrentItem(bool);
67 
68 protected:
69  QScopedPointer<qSlicerSubjectHierarchyColorLegendPluginPrivate> d_ptr;
70 
71 private:
74 };
75 
76 #endif
MRML node for storing a slice through RAS space.
virtual bool showItemInView(vtkIdType itemID, vtkMRMLAbstractViewNode *viewNode, vtkIdList *allItemsToShow)
Abstract plugin for handling Subject Hierarchy items.
Abstract MRML node to represent a view. The class holds the properties common to any view type (3D...
MRML node to represent a 3D view.
virtual Q_INVOKABLE QList< QAction * > visibilityContextMenuActions() const
Abstract class that contains graphical display properties for displayable nodes.
QScopedPointer< qSlicerSubjectHierarchyColorLegendPluginPrivate > d_ptr
virtual Q_INVOKABLE void showVisibilityContextMenuActionsForItem(vtkIdType itemID)