Slicer  4.8
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
List of all members | Public Types | Public Member Functions | Protected Slots | Protected Member Functions | Protected Attributes
qSlicerSubjectHierarchyPluginLogic Class Reference

Qt-based logic class to exercise Qt-related logic functions. The Subject hierarchy plugin mechanism and those are Qt classes. More...

#include <Modules/Loadable/SubjectHierarchy/Widgets/qSlicerSubjectHierarchyPluginLogic.h>

Inheritance diagram for qSlicerSubjectHierarchyPluginLogic:
Inheritance graph
[legend]
Collaboration diagram for qSlicerSubjectHierarchyPluginLogic:
Collaboration graph
[legend]

Public Types

typedef QObject Superclass
 

Public Member Functions

Q_INVOKABLE vtkIdType currentSubjectHierarchyItem () const
 Assessor function for getting currently selected subject hierarchy item (for python) More...
 
 qSlicerSubjectHierarchyPluginLogic (QObject *parent=0)
 
void registerCorePlugins ()
 
Q_INVOKABLE void setCurrentSubjectHierarchyItem (vtkIdType itemID)
 
virtual void setMRMLScene (vtkMRMLScene *scene)
 Set the current MRML scene to the logic. More...
 
Q_INVOKABLE qSlicerSubjectHierarchyAbstractPluginsubjectHierarchyPluginByName (QString name) const
 Assessor function for getting subject hierarchy plugin by name (for python) More...
 
virtual ~qSlicerSubjectHierarchyPluginLogic ()
 
- Public Member Functions inherited from qSlicerObject
vtkMRMLScenemrmlScene () const
 Return a pointer on the MRML scene. More...
 
 qSlicerObject ()
 
virtual ~qSlicerObject ()
 

Protected Slots

void onNodeAboutToBeRemoved (vtkObject *scene, vtkObject *nodeObject)
 
void onNodeAdded (vtkObject *scene, vtkObject *nodeObject)
 Called when a node is added to the scene so that a plugin can create an item for it. More...
 
void onNodeRemoved (vtkObject *scene, vtkObject *nodeObject)
 
void onSceneCloseEnded (vtkObject *sceneObject)
 Called when scene import is finished. Hierarchy is cleared in that case. More...
 
void onSceneImportEnded (vtkObject *sceneObject)
 
void onSceneRestoreEnded (vtkObject *sceneObject)
 

Protected Member Functions

void addSupportedDataNodesToSubjectHierarchy ()
 
void observeNode (vtkMRMLNode *node)
 Add observations for node that was added to subject hierarchy. More...
 

Protected Attributes

QScopedPointer< qSlicerSubjectHierarchyPluginLogicPrivate > d_ptr
 
- Protected Attributes inherited from qSlicerObject
QScopedPointer< qSlicerObjectPrivate > d_ptr
 

Detailed Description

Qt-based logic class to exercise Qt-related logic functions. The Subject hierarchy plugin mechanism and those are Qt classes.

Definition at line 47 of file qSlicerSubjectHierarchyPluginLogic.h.

Member Typedef Documentation

◆ Superclass

Definition at line 54 of file qSlicerSubjectHierarchyPluginLogic.h.

Constructor & Destructor Documentation

◆ qSlicerSubjectHierarchyPluginLogic()

qSlicerSubjectHierarchyPluginLogic::qSlicerSubjectHierarchyPluginLogic ( QObject *  parent = 0)

◆ ~qSlicerSubjectHierarchyPluginLogic()

virtual qSlicerSubjectHierarchyPluginLogic::~qSlicerSubjectHierarchyPluginLogic ( )
virtual

Member Function Documentation

◆ addSupportedDataNodesToSubjectHierarchy()

void qSlicerSubjectHierarchyPluginLogic::addSupportedDataNodesToSubjectHierarchy ( )
protected

Add supported nodes to subject hierarchy. This method is called if auto-creation is enabled and a supported node is added to the scene, or if the user answers yes to the question that pops up upon entering subject hierarchy module if supported nodes are found that are not in the hierarchy.

◆ currentSubjectHierarchyItem()

Q_INVOKABLE vtkIdType qSlicerSubjectHierarchyPluginLogic::currentSubjectHierarchyItem ( ) const

Assessor function for getting currently selected subject hierarchy item (for python)

◆ observeNode()

void qSlicerSubjectHierarchyPluginLogic::observeNode ( vtkMRMLNode node)
protected

Add observations for node that was added to subject hierarchy.

◆ onNodeAboutToBeRemoved

void qSlicerSubjectHierarchyPluginLogic::onNodeAboutToBeRemoved ( vtkObject *  scene,
vtkObject *  nodeObject 
)
protectedslot

Called when a node is removed from the scene so that the associated subject hierarchy item can be deleted too

◆ onNodeAdded

void qSlicerSubjectHierarchyPluginLogic::onNodeAdded ( vtkObject *  scene,
vtkObject *  nodeObject 
)
protectedslot

Called when a node is added to the scene so that a plugin can create an item for it.

◆ onNodeRemoved

void qSlicerSubjectHierarchyPluginLogic::onNodeRemoved ( vtkObject *  scene,
vtkObject *  nodeObject 
)
protectedslot

Called when a node is removed from the scene so if the subject hierarchy node is removed, it is re-created and the hierarchy rebuilt

◆ onSceneCloseEnded

void qSlicerSubjectHierarchyPluginLogic::onSceneCloseEnded ( vtkObject *  sceneObject)
protectedslot

Called when scene import is finished. Hierarchy is cleared in that case.

◆ onSceneImportEnded

void qSlicerSubjectHierarchyPluginLogic::onSceneImportEnded ( vtkObject *  sceneObject)
protectedslot

Called when scene import is finished. Subject hierarchy items are created for supported data nodes if they have not been imported with the scene (backwards compatibility for older scenes)

◆ onSceneRestoreEnded

void qSlicerSubjectHierarchyPluginLogic::onSceneRestoreEnded ( vtkObject *  sceneObject)
protectedslot

Called when scene restore is finished. As the restored node contains only unresolved items, they need to be resolved when restoring ended

◆ registerCorePlugins()

void qSlicerSubjectHierarchyPluginLogic::registerCorePlugins ( )

Register subject hierarchy core plugins Note: Registering plugins provided by other modules is the responsibility of the module!

◆ setCurrentSubjectHierarchyItem()

Q_INVOKABLE void qSlicerSubjectHierarchyPluginLogic::setCurrentSubjectHierarchyItem ( vtkIdType  itemID)

Utility test function to be able to set currently selected subject hierarchy node from python Only used in python tests!

◆ setMRMLScene()

virtual void qSlicerSubjectHierarchyPluginLogic::setMRMLScene ( vtkMRMLScene scene)
virtual

Set the current MRML scene to the logic.

Reimplemented from qSlicerObject.

◆ subjectHierarchyPluginByName()

Q_INVOKABLE qSlicerSubjectHierarchyAbstractPlugin* qSlicerSubjectHierarchyPluginLogic::subjectHierarchyPluginByName ( QString  name) const

Assessor function for getting subject hierarchy plugin by name (for python)

Member Data Documentation

◆ d_ptr

QScopedPointer<qSlicerSubjectHierarchyPluginLogicPrivate> qSlicerSubjectHierarchyPluginLogic::d_ptr
protected

Definition at line 107 of file qSlicerSubjectHierarchyPluginLogic.h.


The documentation for this class was generated from the following file: