23#ifndef __qSlicerSubjectHierarchyPluginHandler_h
24#define __qSlicerSubjectHierarchyPluginHandler_h
27#include "qSlicerSubjectHierarchyModuleWidgetsExport.h"
34#include <vtkSmartPointer.h>
35#include <vtkWeakPointer.h>
44class vtkCallbackCommand;
49class qSlicerSubjectHierarchyPluginHandlerCleanup;
55class Q_SLICER_MODULE_SUBJECTHIERARCHY_WIDGETS_EXPORT qSlicerSubjectHierarchyPluginHandler :
public QObject
84 Q_INVOKABLE static qSlicerSubjectHierarchyPluginHandler*
instance();
173 vtkIdType itemID, vtkIdType parentItemID );
244 static void cleanup();
247 qSlicerSubjectHierarchyPluginHandler(QObject* parent=
nullptr);
248 ~qSlicerSubjectHierarchyPluginHandler()
override;
250 Q_DISABLE_COPY(qSlicerSubjectHierarchyPluginHandler);
256 static qSlicerSubjectHierarchyPluginHandler* m_Instance;
55class Q_SLICER_MODULE_SUBJECTHIERARCHY_WIDGETS_EXPORT qSlicerSubjectHierarchyPluginHandler :
public QObject {
…};
Abstract plugin for handling Subject Hierarchy items.
Default Subject Hierarchy plugin to exercise features of the abstract plugin. This plugin must not be...
Q_INVOKABLE void showItemsInView(vtkIdList *itemIDsToShow, vtkMRMLAbstractViewNode *viewNode)
Show a list of items in a selected view (used for drag&drop of items into a view node)
Q_INVOKABLE QList< qSlicerSubjectHierarchyAbstractPlugin * > registeredPlugins()
Get list of registered plugins.
bool displayPatientBirthDateInSubjectHierarchyItemName
QList< qSlicerSubjectHierarchyAbstractPlugin * > pluginsForReparentingItemInSubjectHierarchy(vtkIdType itemID, vtkIdType parentItemID)
friend class qSlicerSubjectHierarchyPluginHandlerCleanup
Q_INVOKABLE QString dumpContextMenuActions()
Q_INVOKABLE qSlicerSubjectHierarchyPluginLogic * pluginLogic()
Get plugin logic.
qSlicerSubjectHierarchyAbstractPlugin * findAndSetOwnerPluginForSubjectHierarchyItem(vtkIdType itemID)
Q_INVOKABLE vtkMRMLSubjectHierarchyNode * subjectHierarchyNode() const
Get subject hierarchy node.
Q_INVOKABLE vtkMRMLScene * mrmlScene() const
Get MRML scene.
Q_INVOKABLE QList< qSlicerSubjectHierarchyAbstractPlugin * > allPlugins()
Returns all plugins (registered plugins and default plugin)
Q_INVOKABLE void setPluginLogic(qSlicerSubjectHierarchyPluginLogic *pluginLogic)
Set plugin logic.
vtkSmartPointer< vtkCallbackCommand > m_CallBack
Callback handling deletion of the subject hierarchy node.
friend class PythonQtWrapper_qSlicerSubjectHierarchyPluginHandler
Q_INVOKABLE void setDisplayPatientIDInSubjectHierarchyItemName(bool on)
static Q_INVOKABLE qSlicerSubjectHierarchyPluginHandler * instance()
bool displayPatientIDInSubjectHierarchyItemName
Q_INVOKABLE qSlicerSubjectHierarchyAbstractPlugin * pluginByName(QString name)
Q_INVOKABLE qSlicerSubjectHierarchyDefaultPlugin * defaultPlugin()
Get default plugin instance.
Q_INVOKABLE void setAutoDeleteSubjectHierarchyChildren(bool flag)
qSlicerSubjectHierarchyAbstractPlugin * findOwnerPluginForSubjectHierarchyItem(vtkIdType itemID)
QList< vtkIdType > m_CurrentItems
qSlicerSubjectHierarchyDefaultPlugin * m_DefaultPlugin
static void onSubjectHierarchyNodeEvent(vtkObject *caller, unsigned long event, void *clientData, void *callData)
Handle subject hierarchy node events.
Q_INVOKABLE void setCurrentItems(QList< vtkIdType > items)
bool autoDeleteSubjectHierarchyChildren
QList< qSlicerSubjectHierarchyAbstractPlugin * > pluginsForAddingNodeToSubjectHierarchy(vtkMRMLNode *node, vtkIdType parentItemID=vtkMRMLSubjectHierarchyNode::INVALID_ITEM_ID)
Q_INVOKABLE void setDisplayStudyIDInSubjectHierarchyItemName(bool on)
Q_INVOKABLE void setCurrentTreeView(qMRMLSubjectHierarchyTreeView *treeView)
Q_INVOKABLE qMRMLSubjectHierarchyTreeView * currentTreeView() const
Get current tree view.
qSlicerSubjectHierarchyPluginLogic * m_PluginLogic
Plugin logic.
Q_INVOKABLE qSlicerSubjectHierarchyAbstractPlugin * getOwnerPluginForSubjectHierarchyItem(vtkIdType itemID)
Q_INVOKABLE vtkIdType currentItem() const
qSlicerSubjectHierarchyAbstractPlugin * selectPluginFromDialog(QString textToDisplay, QList< qSlicerSubjectHierarchyAbstractPlugin * > candidatePlugins)
QDateTime LastPluginRegistrationTime
Timestamp of the last plugin registration. Used to allow context menus be repopulated if needed.
bool displayStudyDateInSubjectHierarchyItemName
Q_INVOKABLE void setDisplayPatientBirthDateInSubjectHierarchyItemName(bool on)
void setMRMLScene(vtkMRMLScene *scene)
Set MRML scene.
void observeSubjectHierarchyNode(vtkMRMLSubjectHierarchyNode *shNode)
vtkWeakPointer< vtkMRMLScene > m_MRMLScene
MRML scene (to get new subject hierarchy node if the stored one is deleted)
bool displayStudyIDInSubjectHierarchyItemName
Q_INVOKABLE bool registerPlugin(qSlicerSubjectHierarchyAbstractPlugin *plugin)
qMRMLSubjectHierarchyTreeView * m_CurrentTreeView
Most recently right-clicked subject hierarchy tree view.
Q_INVOKABLE QList< vtkIdType > currentItems() const
QList< qSlicerSubjectHierarchyAbstractPlugin * > m_RegisteredPlugins
List of registered plugin instances.
Q_INVOKABLE void setCurrentItem(vtkIdType itemID)
Q_INVOKABLE void setDisplayStudyDateInSubjectHierarchyItemName(bool on)
Qt-based logic class to exercise Qt-related logic functions. The Subject hierarchy plugin mechanism a...
Abstract MRML node to represent a view. The class holds the properties common to any view type (3D,...
Abstract Superclass for all specific types of MRML nodes.
A set of MRML Nodes that supports serialization and undo/redo.
MRML node to represent a complete subject hierarchy tree.
static const vtkIdType INVALID_ITEM_ID