Slicer 5.9
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
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
34class qSlicerSubjectHierarchyDefaultPluginPrivate;
35class QIcon;
36
39class Q_SLICER_MODULE_SUBJECTHIERARCHY_WIDGETS_EXPORT qSlicerSubjectHierarchyDefaultPlugin : public qSlicerSubjectHierarchyAbstractPlugin
40{
41public:
42 Q_OBJECT
43
44public:
46 qSlicerSubjectHierarchyDefaultPlugin(QObject* parent = nullptr);
48
49public:
56 double canOwnSubjectHierarchyItem(vtkIdType itemID)const override;
57
60 Q_INVOKABLE const QString roleForPlugin()const override;
61
63 const QString helpText()const override;
64
67 QIcon icon(vtkIdType itemID) override;
68
70 QIcon visibilityIcon(int visible) override;
71
75
78 void showVisibilityContextMenuActionsForItem(vtkIdType itemID) override;
79
80public:
82 void setDefaultVisibilityIcons(QIcon visibleIcon, QIcon hiddenIcon, QIcon partiallyVisibleIcon);
83
84public slots:
87
90
93
94protected:
95 QScopedPointer<qSlicerSubjectHierarchyDefaultPluginPrivate> d_ptr;
96
97private:
98 Q_DECLARE_PRIVATE(qSlicerSubjectHierarchyDefaultPlugin);
100};
101
102#endif
qSlicerSubjectHierarchyAbstractPlugin(QObject *parent=nullptr)
void showVisibilityContextMenuActionsForItem(vtkIdType itemID) override
qSlicerSubjectHierarchyDefaultPlugin(QObject *parent=nullptr)
void showAllChildren()
Show all direct children of current item.
Q_INVOKABLE const QString roleForPlugin() const override
void toggleVisibility()
Toggle visibility for current item.
QIcon visibilityIcon(int visible) override
Get visibility icon for a visibility state.
void setDefaultVisibilityIcons(QIcon visibleIcon, QIcon hiddenIcon, QIcon partiallyVisibleIcon)
Set default visibility icons owned by the scene model so that the default plugin can set them.
const QString helpText() const override
Get help text for plugin to be added in subject hierarchy module widget help box.
QList< QAction * > visibilityContextMenuActions() const override
QScopedPointer< qSlicerSubjectHierarchyDefaultPluginPrivate > d_ptr
double canOwnSubjectHierarchyItem(vtkIdType itemID) const override
QIcon icon(vtkIdType itemID) override
void hideAllChildren()
Hide all direct children of current item.