Slicer  5.3
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
qSlicerSubjectHierarchyDefaultPlugin.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 __qSlicerSubjectHierarchyDefaultPlugin_h
24 #define __qSlicerSubjectHierarchyDefaultPlugin_h
25 
26 // Qt includes
27 #include <QObject>
28 
29 // SubjectHierarchy Plugins includes
31 
32 #include "qSlicerSubjectHierarchyModuleWidgetsExport.h"
33 
34 class qSlicerSubjectHierarchyDefaultPluginPrivate;
35 class QIcon;
36 
40 class Q_SLICER_MODULE_SUBJECTHIERARCHY_WIDGETS_EXPORT qSlicerSubjectHierarchyDefaultPlugin : public qSlicerSubjectHierarchyAbstractPlugin
41 {
42 public:
43  Q_OBJECT
44 
45 public:
47  qSlicerSubjectHierarchyDefaultPlugin(QObject* parent = nullptr);
49 
50 public:
57  double canOwnSubjectHierarchyItem(vtkIdType itemID)const override;
58 
61  Q_INVOKABLE const QString roleForPlugin()const override;
62 
64  const QString helpText()const override;
65 
68  QIcon icon(vtkIdType itemID) override;
69 
71  QIcon visibilityIcon(int visible) override;
72 
76 
79  void showVisibilityContextMenuActionsForItem(vtkIdType itemID) override;
80 
81 public:
83  void setDefaultVisibilityIcons(QIcon visibleIcon, QIcon hiddenIcon, QIcon partiallyVisibleIcon);
84 
85 public slots:
87  void toggleVisibility();
88 
90  void showAllChildren();
91 
93  void hideAllChildren();
94 
95 protected:
96  QScopedPointer<qSlicerSubjectHierarchyDefaultPluginPrivate> d_ptr;
97 
98 private:
99  Q_DECLARE_PRIVATE(qSlicerSubjectHierarchyDefaultPlugin);
100  Q_DISABLE_COPY(qSlicerSubjectHierarchyDefaultPlugin);
101 };
102 
103 #endif
virtual QIcon icon(vtkIdType itemID)
virtual Q_INVOKABLE const QString roleForPlugin() const
qSlicerSubjectHierarchyAbstractPlugin Superclass
Default Subject Hierarchy plugin to exercise features of the abstract plugin. This plugin must not be...
Abstract plugin for handling Subject Hierarchy items.
QScopedPointer< qSlicerSubjectHierarchyDefaultPluginPrivate > d_ptr
virtual Q_INVOKABLE QIcon visibilityIcon(int visible)
Get visibility icon for a visibility state.
virtual Q_INVOKABLE QList< QAction * > visibilityContextMenuActions() const
virtual const QString helpText() const
Get help text for plugin to be added in subject hierarchy module widget help box. ...
virtual Q_INVOKABLE void showVisibilityContextMenuActionsForItem(vtkIdType itemID)
virtual Q_INVOKABLE double canOwnSubjectHierarchyItem(vtkIdType itemID) const