23#ifndef __qSlicerSubjectHierarchyPluginHandler_h
24#define __qSlicerSubjectHierarchyPluginHandler_h
27#include "qSlicerSubjectHierarchyModuleWidgetsExport.h"
34#include <vtkSmartPointer.h>
35#include <vtkWeakPointer.h>
44class vtkCallbackCommand;
48class qSlicerSubjectHierarchyPluginHandlerCleanup;
63 Q_PROPERTY (
bool autoDeleteSubjectHierarchyChildren READ autoDeleteSubjectHierarchyChildren WRITE setAutoDeleteSubjectHierarchyChildren)
67 Q_PROPERTY (
bool displayPatientIDInSubjectHierarchyItemName READ displayPatientIDInSubjectHierarchyItemName WRITE setDisplayPatientIDInSubjectHierarchyItemName)
71 Q_PROPERTY (
bool displayPatientBirthDateInSubjectHierarchyItemName READ displayPatientBirthDateInSubjectHierarchyItemName WRITE setDisplayPatientBirthDateInSubjectHierarchyItemName)
75 Q_PROPERTY (
bool displayStudyIDInSubjectHierarchyItemName READ displayStudyIDInSubjectHierarchyItemName WRITE setDisplayStudyIDInSubjectHierarchyItemName)
79 Q_PROPERTY (
bool displayStudyDateInSubjectHierarchyItemName READ displayStudyDateInSubjectHierarchyItemName WRITE setDisplayStudyDateInSubjectHierarchyItemName)
101 Q_INVOKABLE
void setCurrentItem(vtkIdType itemID);
109 Q_INVOKABLE vtkIdType currentItem();
114 Q_INVOKABLE
void setCurrentItems(
QList<vtkIdType> items);
119 Q_INVOKABLE
QList<vtkIdType> currentItems();
120 Q_INVOKABLE
void currentItems(vtkIdList* selectedItems);
122 Q_INVOKABLE
bool autoDeleteSubjectHierarchyChildren()const;
123 Q_INVOKABLE
void setAutoDeleteSubjectHierarchyChildren(
bool flag);
124 Q_INVOKABLE
bool displayPatientIDInSubjectHierarchyItemName()const;
125 Q_INVOKABLE
void setDisplayPatientIDInSubjectHierarchyItemName(
bool on);
126 Q_INVOKABLE
bool displayPatientBirthDateInSubjectHierarchyItemName()const;
127 Q_INVOKABLE
void setDisplayPatientBirthDateInSubjectHierarchyItemName(
bool on);
128 Q_INVOKABLE
bool displayStudyIDInSubjectHierarchyItemName()const;
129 Q_INVOKABLE
void setDisplayStudyIDInSubjectHierarchyItemName(
bool on);
130 Q_INVOKABLE
bool displayStudyDateInSubjectHierarchyItemName()const;
131 Q_INVOKABLE
void setDisplayStudyDateInSubjectHierarchyItemName(
bool on);
145 Q_INVOKABLE QList<qSlicerSubjectHierarchyAbstractPlugin*>
allPlugins();
167 vtkIdType itemID, vtkIdType parentItemID );
235 static void cleanup();
242 friend class qSlicerSubjectHierarchyPluginHandlerCleanup;
243 friend class PythonQtWrapper_qSlicerSubjectHierarchyPluginHandler;
Abstract plugin for handling Subject Hierarchy items.
Default Subject Hierarchy plugin to exercise features of the abstract plugin. This plugin must not be...
Singleton class managing Subject Hierarchy plugins.
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)
QList< qSlicerSubjectHierarchyAbstractPlugin * > pluginsForReparentingItemInSubjectHierarchy(vtkIdType itemID, vtkIdType parentItemID)
Q_INVOKABLE QString dumpContextMenuActions()
qSlicerSubjectHierarchyAbstractPlugin * findAndSetOwnerPluginForSubjectHierarchyItem(vtkIdType itemID)
Q_INVOKABLE QList< qSlicerSubjectHierarchyAbstractPlugin * > allPlugins()
Returns all plugins (registered plugins and default plugin)
vtkSmartPointer< vtkCallbackCommand > m_CallBack
Callback handling deletion of the subject hierarchy node.
Q_INVOKABLE qSlicerSubjectHierarchyAbstractPlugin * pluginByName(QString name)
Q_INVOKABLE qSlicerSubjectHierarchyDefaultPlugin * defaultPlugin()
Get default plugin instance.
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.
QList< qSlicerSubjectHierarchyAbstractPlugin * > pluginsForAddingNodeToSubjectHierarchy(vtkMRMLNode *node, vtkIdType parentItemID=vtkMRMLSubjectHierarchyNode::INVALID_ITEM_ID)
Q_INVOKABLE qSlicerSubjectHierarchyAbstractPlugin * getOwnerPluginForSubjectHierarchyItem(vtkIdType itemID)
qSlicerSubjectHierarchyAbstractPlugin * selectPluginFromDialog(QString textToDisplay, QList< qSlicerSubjectHierarchyAbstractPlugin * > candidatePlugins)
QDateTime LastPluginRegistrationTime
Timestamp of the last plugin registration. Used to allow context menus be repopulated if needed.
void observeSubjectHierarchyNode(vtkMRMLSubjectHierarchyNode *shNode)
vtkWeakPointer< vtkMRMLScene > m_MRMLScene
MRML scene (to get new subject hierarchy node if the stored one is deleted)
QList< qSlicerSubjectHierarchyAbstractPlugin * > m_RegisteredPlugins
List of registered plugin instances.
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