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

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

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

Public Types

typedef QTreeView Superclass
 

Properties

QString attributeNameFilter
 
QString attributeValueFilter
 
bool colorColumnVisible
 
bool contextMenuEnabled
 Flag determining whether context menu is enabled. More...
 
bool descriptionColumnVisible
 
bool editMenuActionVisible
 This property controls whether the Edit properties context menu action is visible. Visible by default. More...
 
QStringList excludeItemAttributeNamesFilter
 
QStringList excludeNodeAttributeNamesFilter
 
QStringList hideChildNodeTypes
 
bool highlightReferencedItems
 
bool idColumnVisible
 
QStringList includeItemAttributeNamesFilter
 Filter to show only items that contain any of the given attributes with this name. Empty by default. More...
 
QStringList includeNodeAttributeNamesFilter
 Filter to show only items for data nodes that contain any of the given attributes with this name. Empty by default. More...
 
QStringList levelFilter
 
bool multiSelection
 Flag determining whether multiple items can be selected. More...
 
QString nameFilter
 
QStringList nodeTypes
 
QString noneDisplay
 
bool noneEnabled
 
bool selectRoleSubMenuVisible
 This property controls whether the Select role context menu sub-menu is visible. Visible by default. More...
 
bool showRootItem
 
bool transformColumnVisible
 
bool visibilityColumnVisible
 

Public Slots

virtual void collapseItem (vtkIdType itemID)
 Handle collapse item requests in the subject hierarchy tree. Collapses branch. More...
 
void deleteSelectedItems ()
 Delete selected subject hierarchy items and associated data nodes. More...
 
void disablePlugin (QString plugin)
 
virtual void editCurrentItem ()
 Edit properties of current item. More...
 
virtual void expandItem (vtkIdType itemID)
 Handle expand item requests in the subject hierarchy tree. Expands branch. More...
 
void renameCurrentItem ()
 Rename currently selected one item by popping up a dialog. More...
 
void resetColumnSizesToDefault ()
 Resets column sizes and size policies to default. More...
 
virtual void selectPluginForCurrentItem ()
 Handle manual selection of a plugin as the new owner of a subject hierarchy node. More...
 
void setAttributeNameFilter (QString &filter)
 
void setAttributeValueFilter (QString &filter)
 
void setContextMenuEnabled (bool enabled)
 
virtual void setCurrentItem (vtkIdType itemID)
 Set current (=selected) subject hierarchy item. More...
 
virtual void setCurrentItems (QList< vtkIdType > items)
 Set current (=selected) subject hierarchy items. More...
 
virtual void setCurrentItems (vtkIdList *items)
 Python compatibility function to set current (=selected) subject hierarchy items. More...
 
virtual void setCurrentNode (vtkMRMLNode *node)
 Convenience method to set current item by associated data node. More...
 
void setEditMenuActionVisible (bool visible)
 
void setExcludeItemAttributeNamesFilter (QStringList filter)
 
void setExcludeNodeAttributeNamesFilter (QStringList filter)
 
void setHighlightReferencedItems (bool highlightOn)
 
void setIncludeItemAttributeNamesFilter (QStringList filter)
 
void setIncludeNodeAttributeNamesFilter (QStringList filter)
 
virtual void setMRMLScene (vtkMRMLScene *scene)
 Set MRML scene. More...
 
virtual void setMultiSelection (bool multiSelectionOn)
 Set multi-selection. More...
 
void setNoneDisplay (const QString &displayName)
 
void setNoneEnabled (bool enable)
 
void setPluginBlacklist (QStringList blacklist)
 
void setPluginWhitelist (QStringList whitelist)
 
virtual void setRootItem (vtkIdType itemID)
 Set subject hierarchy item to be the root in the shown tree. More...
 
void setSelectRoleSubMenuVisible (bool visible)
 
void setShowRootItem (bool show)
 Set root item visibility. More...
 
bool showContextMenuHint (bool visibility=false)
 
void toggleVisibilityOfSelectedItems ()
 Toggle visibility of selected subject hierarchy items. More...
 
virtual void updateSelectPluginActions ()
 

Signals

void currentItemChanged (vtkIdType)
 
void currentItemModified (vtkIdType)
 
void currentItemsChanged (QList< vtkIdType >)
 

Public Member Functions

Q_INVOKABLE void addItemAttributeFilter (QString attributeName, QVariant attributeValue=QString(), bool include=true)
 
Q_INVOKABLE void addNodeAttributeFilter (QString attributeName, QVariant attributeValue=QString(), bool include=true, QString className=QString())
 
QString attributeNameFilter () const
 
QString attributeValueFilter () const
 
bool colorColumnVisible ()
 
bool contextMenuEnabled () const
 
Q_INVOKABLE vtkIdType currentItem () const
 Get current (=selected) item. If there are multiple items selected, then the first one is returned. More...
 
QList< vtkIdType > currentItems ()
 Get current (=selected) items. More...
 
Q_INVOKABLE void currentItems (vtkIdList *selectedItems)
 
virtual vtkMRMLNodecurrentNode () const
 Convenience method to set current item by associated data node. More...
 
bool descriptionColumnVisible ()
 
Q_INVOKABLE int displayedItemCount () const
 Determine the number of shown items. More...
 
bool editMenuActionVisible () const
 
QStringList excludeItemAttributeNamesFilter () const
 
QStringList excludeNodeAttributeNamesFilter () const
 
QStringList hideChildNodeTypes () const
 
bool highlightReferencedItems () const
 
bool idColumnVisible ()
 
QStringList includeItemAttributeNamesFilter () const
 
QStringList includeNodeAttributeNamesFilter () const
 
QStringList levelFilter () const
 
Q_INVOKABLE qMRMLSubjectHierarchyModelmodel () const
 
Q_INVOKABLE vtkMRMLScenemrmlScene () const
 
bool multiSelection ()
 Get whether multi-selection is enabled. More...
 
QString nameFilter () const
 
QStringList nodeTypes () const
 
QString noneDisplay () const
 
bool noneEnabled () const
 
 qMRMLSubjectHierarchyTreeView (QWidget *parent=nullptr)
 
Q_INVOKABLE void removeAttributeFilter ()
 Remove item attribute filtering. More...
 
Q_INVOKABLE void removeItemAttributeFilter (QString attributeName, QVariant attributeValue, bool include)
 Remove single item attribute filter specifying each attribute. More...
 
Q_INVOKABLE void removeItemAttributeFilter (QString attributeName, bool include)
 Remove all item attribute filters specifying a given attribute name and include flag. More...
 
Q_INVOKABLE void removeNodeAttributeFilter (QString attributeName, QVariant attributeValue, bool include, QString className)
 Remove single node attribute filter specifying each attribute. More...
 
Q_INVOKABLE void removeNodeAttributeFilter (QString attributeName, bool include)
 Remove all node attribute filters specifying a given attribute name and include flag. More...
 
Q_INVOKABLE vtkIdType rootItem () const
 Get root item of the tree. More...
 
bool selectRoleSubMenuVisible () const
 
Q_INVOKABLE void setAttributeFilter (const QString &attributeName, const QVariant &attributeValue=QVariant())
 
void setColorColumnVisible (bool visible)
 Set color column visibility. More...
 
void setDescriptionColumnVisible (bool visible)
 Set description column visibility. More...
 
void setHideChildNodeTypes (const QStringList &types)
 
void setIdColumnVisible (bool visible)
 Set ID column visibility. More...
 
void setLevelFilter (QStringList &levelFilter)
 Set level filter that allows showing only items at a specified level and their parents. Show all items if empty. More...
 
void setNameFilter (QString &nameFilter)
 Set name filter that allows showing only items containing a specified string (case-insensitive). Show all items if empty. More...
 
void setNodeTypes (const QStringList &types)
 Set node type filter that allows showing only data nodes of a certain type. Show all data nodes if empty. More...
 
void setTransformColumnVisible (bool visible)
 Set transform column visibility. More...
 
void setVisibilityColumnVisible (bool visible)
 Set visibility column visibility. More...
 
bool showRootItem () const
 Get root item visibility. More...
 
Q_INVOKABLE qMRMLSortFilterSubjectHierarchyProxyModelsortFilterProxyModel () const
 
Q_INVOKABLE vtkMRMLSubjectHierarchyNodesubjectHierarchyNode () const
 
bool transformColumnVisible ()
 
bool visibilityColumnVisible ()
 
 ~qMRMLSubjectHierarchyTreeView () override
 

Protected Slots

virtual void expandToDepthFromContextMenu ()
 Expand tree to depth specified by the clicked context menu action. More...
 
virtual void onCreateNewTransform ()
 
virtual void onCurrentSelection (const QModelIndex &currentItemIndex)
 
void onCustomContextMenu (const QPoint &point)
 
virtual void onItemCollapsed (const QModelIndex &collapsedItemIndex)
 Updates subject hierarchy item expanded property when item is collapsed. More...
 
virtual void onItemExpanded (const QModelIndex &expandedItemIndex)
 Updates subject hierarchy item expanded property when item is expanded. More...
 
virtual void onMRMLSceneEndBatchProcess (vtkObject *sceneObject)
 Called when batch processing ends. Restores selection, which is lost when the hierarchy is rebuilt. More...
 
virtual void onMRMLSceneEndClose (vtkObject *sceneObject)
 Called when scene close is finished. Hierarchy is cleared in that case. More...
 
virtual void onMRMLSceneStartBatchProcess (vtkObject *sceneObject)
 Called when batch processing starts. Makes sure stored selection does not get emptied before restoring. More...
 
virtual void onMRMLSceneStartClose (vtkObject *sceneObject)
 Called when scene close is started. More...
 
virtual void onSelectionChanged (const QItemSelection &selected, const QItemSelection &deselected)
 
virtual void onSubjectHierarchyItemModified (vtkObject *caller, void *callData)
 Propagate item modified event. More...
 
virtual void onSubjectHierarchyItemTransformModified (vtkObject *caller, void *callData)
 Propagate item transform modified event. More...
 
virtual void onTransformActionSelected ()
 
virtual void onTransformEditProperties ()
 
virtual void onTransformInteractionInViewToggled (bool show)
 
virtual void updateRootItem ()
 

Protected Member Functions

void applyReferenceHighlightForItems (QList< vtkIdType > itemIDs)
 
void changeEvent (QEvent *e) override
 
virtual bool clickDecoration (QMouseEvent *e)
 
vtkIdType firstSelectedSubjectHierarchyItemInBranch (vtkIdType itemID)
 
void keyPressEvent (QKeyEvent *e) override
 Handle key press event. More...
 
void mousePressEvent (QMouseEvent *e) override
 Handle mouse press event. More...
 
virtual void populateContextMenuForItem (vtkIdType itemID)
 
virtual void populateTransformContextMenuForItem (vtkIdType itemID)
 Populate transform context menu for given subject hierarchy item. More...
 
virtual void populateVisibilityContextMenuForItem (vtkIdType itemID)
 Populate visibility context menu for given subject hierarchy item. More...
 
virtual void setSubjectHierarchyNode (vtkMRMLSubjectHierarchyNode *shNode)
 Set the subject hierarchy node found in the given scene. Called only internally. More...
 
void toggleSubjectHierarchyItemVisibility (vtkIdType itemID)
 Toggle visibility for given subject hierarchy item. More...
 

Protected Attributes

QScopedPointer< qMRMLSubjectHierarchyTreeViewPrivate > d_ptr
 

Friends

class qMRMLSubjectHierarchyComboBox
 

Detailed Description

Definition at line 44 of file qMRMLSubjectHierarchyTreeView.h.

Member Typedef Documentation

◆ Superclass

Definition at line 105 of file qMRMLSubjectHierarchyTreeView.h.

Property Documentation

◆ attributeNameFilter

QString qMRMLSubjectHierarchyTreeView::attributeNameFilter
readwrite

Filter to show only items that contain an attribute with this name. Empty by default Note: Deprecated, kept only for backwards compatibility. Sets and returns the first attribute in

See also
includeNodeAttributeNamesFilter

Definition at line 97 of file qMRMLSubjectHierarchyTreeView.h.

◆ attributeValueFilter

QString qMRMLSubjectHierarchyTreeView::attributeValueFilter
readwrite

Filter to show only items that contain any attribute given in

See also
includeItemAttributeNamesFilter with the value. If empty, then existence of the attributes is enough to show. Exact match is required. Empty by default Note: Deprecated, kept only for backwards compatibility. Works consistently with the previous operation.

Definition at line 102 of file qMRMLSubjectHierarchyTreeView.h.

◆ colorColumnVisible

bool qMRMLSubjectHierarchyTreeView::colorColumnVisible
readwrite

Definition at line 72 of file qMRMLSubjectHierarchyTreeView.h.

◆ contextMenuEnabled

bool qMRMLSubjectHierarchyTreeView::contextMenuEnabled
readwrite

Flag determining whether context menu is enabled.

Definition at line 59 of file qMRMLSubjectHierarchyTreeView.h.

◆ descriptionColumnVisible

bool qMRMLSubjectHierarchyTreeView::descriptionColumnVisible
readwrite

Definition at line 74 of file qMRMLSubjectHierarchyTreeView.h.

◆ editMenuActionVisible

bool qMRMLSubjectHierarchyTreeView::editMenuActionVisible
readwrite

This property controls whether the Edit properties context menu action is visible. Visible by default.

Definition at line 61 of file qMRMLSubjectHierarchyTreeView.h.

◆ excludeItemAttributeNamesFilter

QStringList qMRMLSubjectHierarchyTreeView::excludeItemAttributeNamesFilter
readwrite

Filter to hide items that contain any of the given attributes with this name. Empty by default Overrides

See also
includeItemAttributeNamesFilter

Definition at line 90 of file qMRMLSubjectHierarchyTreeView.h.

◆ excludeNodeAttributeNamesFilter

QStringList qMRMLSubjectHierarchyTreeView::excludeNodeAttributeNamesFilter
readwrite

Filter to hide items for data nodes that contain any of the given attributes with this name. Empty by default Overrides

See also
includeNodeAttributeNamesFilter

Definition at line 93 of file qMRMLSubjectHierarchyTreeView.h.

◆ hideChildNodeTypes

QStringList qMRMLSubjectHierarchyTreeView::hideChildNodeTypes
readwrite

Definition at line 69 of file qMRMLSubjectHierarchyTreeView.h.

◆ highlightReferencedItems

bool qMRMLSubjectHierarchyTreeView::highlightReferencedItems
readwrite

Flag determining whether to highlight items referenced by DICOM. Storing DICOM references: Referenced SOP instance UIDs (in attribute named vtkMRMLSubjectHierarchyConstants::GetDICOMReferencedInstanceUIDsAttributeName()) -> SH item instance UIDs (serialized string lists in subject hierarchy UID vtkMRMLSubjectHierarchyConstants::GetDICOMInstanceUIDName())

Definition at line 57 of file qMRMLSubjectHierarchyTreeView.h.

◆ idColumnVisible

bool qMRMLSubjectHierarchyTreeView::idColumnVisible
readwrite

Definition at line 71 of file qMRMLSubjectHierarchyTreeView.h.

◆ includeItemAttributeNamesFilter

QStringList qMRMLSubjectHierarchyTreeView::includeItemAttributeNamesFilter
readwrite

Filter to show only items that contain any of the given attributes with this name. Empty by default.

Definition at line 85 of file qMRMLSubjectHierarchyTreeView.h.

◆ includeNodeAttributeNamesFilter

QStringList qMRMLSubjectHierarchyTreeView::includeNodeAttributeNamesFilter
readwrite

Filter to show only items for data nodes that contain any of the given attributes with this name. Empty by default.

Definition at line 87 of file qMRMLSubjectHierarchyTreeView.h.

◆ levelFilter

QStringList qMRMLSubjectHierarchyTreeView::levelFilter
readwrite

Definition at line 66 of file qMRMLSubjectHierarchyTreeView.h.

◆ multiSelection

bool qMRMLSubjectHierarchyTreeView::multiSelection
readwrite

Flag determining whether multiple items can be selected.

Definition at line 65 of file qMRMLSubjectHierarchyTreeView.h.

◆ nameFilter

QString qMRMLSubjectHierarchyTreeView::nameFilter
readwrite

Definition at line 67 of file qMRMLSubjectHierarchyTreeView.h.

◆ nodeTypes

QStringList qMRMLSubjectHierarchyTreeView::nodeTypes
readwrite

Definition at line 68 of file qMRMLSubjectHierarchyTreeView.h.

◆ noneDisplay

QString qMRMLSubjectHierarchyTreeView::noneDisplay
readwrite

This property controls the name that is displayed for the None item. "None" by default.

See also
noneItemEnabled

Definition at line 82 of file qMRMLSubjectHierarchyTreeView.h.

◆ noneEnabled

bool qMRMLSubjectHierarchyTreeView::noneEnabled
readwrite

This property controls whether an extra item is added before any subject hierarchy item under the scene item for indicating 'None' selection.

Definition at line 78 of file qMRMLSubjectHierarchyTreeView.h.

◆ selectRoleSubMenuVisible

bool qMRMLSubjectHierarchyTreeView::selectRoleSubMenuVisible
readwrite

This property controls whether the Select role context menu sub-menu is visible. Visible by default.

Definition at line 63 of file qMRMLSubjectHierarchyTreeView.h.

◆ showRootItem

bool qMRMLSubjectHierarchyTreeView::showRootItem
readwrite

This property controls whether the root item (folder, an item for a data node, or the scene itself), if any is visible. When the root item is visible, it appears as a top-level item, if it is hidden only its children are top-level items. It doesn't have any effect if rootItem() is invalid. Shown by default.

See also
setShowRootItem(), showRootItem(), setRootItem(), setRootIndex()

Definition at line 53 of file qMRMLSubjectHierarchyTreeView.h.

◆ transformColumnVisible

bool qMRMLSubjectHierarchyTreeView::transformColumnVisible
readwrite

Definition at line 73 of file qMRMLSubjectHierarchyTreeView.h.

◆ visibilityColumnVisible

bool qMRMLSubjectHierarchyTreeView::visibilityColumnVisible
readwrite

Definition at line 70 of file qMRMLSubjectHierarchyTreeView.h.

Constructor & Destructor Documentation

◆ qMRMLSubjectHierarchyTreeView()

qMRMLSubjectHierarchyTreeView::qMRMLSubjectHierarchyTreeView ( QWidget *  parent = nullptr)

◆ ~qMRMLSubjectHierarchyTreeView()

qMRMLSubjectHierarchyTreeView::~qMRMLSubjectHierarchyTreeView ( )
override

Member Function Documentation

◆ addItemAttributeFilter()

Q_INVOKABLE void qMRMLSubjectHierarchyTreeView::addItemAttributeFilter ( QString  attributeName,
QVariant  attributeValue = QString(),
bool  include = true 
)

Add single item attribute filter specifying attribute name, value, include/exclude, and class name

Parameters
attributeNameName of the item attribute to filter
attributeValueValue of the item attribute to filter
includeFlag indicating whether this is an include filter or exclude filter.
  • Include filter means that only the items are shown that match the filter.
  • Exclude filter hides items that match the filter. Overrides include filters. True by default (i.e. include filter).

◆ addNodeAttributeFilter()

Q_INVOKABLE void qMRMLSubjectHierarchyTreeView::addNodeAttributeFilter ( QString  attributeName,
QVariant  attributeValue = QString(),
bool  include = true,
QString  className = QString() 
)

Add single node attribute filter specifying attribute name, value, include/exclude, and class name

Parameters
attributeNameName of the node attribute to filter
attributeValueValue of the node attribute to filter
includeFlag indicating whether this is an include filter or exclude filter.
  • Include filter means that only the items are shown that match the filter.
  • Exclude filter hides items that match the filter. Overrides include filters. True by default (i.e. include filter).
classNameOnly filter attributes on a certain type. Empty by default (i.e. allow all classes)

◆ applyReferenceHighlightForItems()

void qMRMLSubjectHierarchyTreeView::applyReferenceHighlightForItems ( QList< vtkIdType >  itemIDs)
protected

Apply highlight for subject hierarchy items referenced by argument items by DICOM

See also
highlightReferencedItems

◆ attributeNameFilter()

QString qMRMLSubjectHierarchyTreeView::attributeNameFilter ( ) const

◆ attributeValueFilter()

QString qMRMLSubjectHierarchyTreeView::attributeValueFilter ( ) const

◆ changeEvent()

void qMRMLSubjectHierarchyTreeView::changeEvent ( QEvent *  e)
overrideprotected

◆ clickDecoration()

virtual bool qMRMLSubjectHierarchyTreeView::clickDecoration ( QMouseEvent *  e)
protectedvirtual

Handles clicks on the decoration of items (i.e. icon). In visibility column this means either toggle visibility or show visibility context menu.

Returns
True if decoration of an enabled item was indeed clicked (and event handled). False otherwise

◆ collapseItem

virtual void qMRMLSubjectHierarchyTreeView::collapseItem ( vtkIdType  itemID)
virtualslot

Handle collapse item requests in the subject hierarchy tree. Collapses branch.

◆ colorColumnVisible()

bool qMRMLSubjectHierarchyTreeView::colorColumnVisible ( )

◆ contextMenuEnabled()

bool qMRMLSubjectHierarchyTreeView::contextMenuEnabled ( ) const

◆ currentItem()

Q_INVOKABLE vtkIdType qMRMLSubjectHierarchyTreeView::currentItem ( ) const

Get current (=selected) item. If there are multiple items selected, then the first one is returned.

◆ currentItemChanged

void qMRMLSubjectHierarchyTreeView::currentItemChanged ( vtkIdType  )
signal

◆ currentItemModified

void qMRMLSubjectHierarchyTreeView::currentItemModified ( vtkIdType  )
signal

◆ currentItems() [1/2]

QList<vtkIdType> qMRMLSubjectHierarchyTreeView::currentItems ( )

Get current (=selected) items.

◆ currentItems() [2/2]

Q_INVOKABLE void qMRMLSubjectHierarchyTreeView::currentItems ( vtkIdList *  selectedItems)

Get current (=selected) items.

Parameters
vtkIdListfor python compatibility

◆ currentItemsChanged

void qMRMLSubjectHierarchyTreeView::currentItemsChanged ( QList< vtkIdType >  )
signal

◆ currentNode()

virtual vtkMRMLNode* qMRMLSubjectHierarchyTreeView::currentNode ( ) const
virtual

Convenience method to set current item by associated data node.

◆ deleteSelectedItems

void qMRMLSubjectHierarchyTreeView::deleteSelectedItems ( )
slot

Delete selected subject hierarchy items and associated data nodes.

◆ descriptionColumnVisible()

bool qMRMLSubjectHierarchyTreeView::descriptionColumnVisible ( )

◆ disablePlugin

void qMRMLSubjectHierarchyTreeView::disablePlugin ( QString  plugin)
slot

Disable subject hierarchy plugin by adding it to the blacklist

See also
setPluginBlacklist
Parameters
pluginName of the plugin to disable

◆ displayedItemCount()

Q_INVOKABLE int qMRMLSubjectHierarchyTreeView::displayedItemCount ( ) const

Determine the number of shown items.

◆ editCurrentItem

virtual void qMRMLSubjectHierarchyTreeView::editCurrentItem ( )
virtualslot

Edit properties of current item.

◆ editMenuActionVisible()

bool qMRMLSubjectHierarchyTreeView::editMenuActionVisible ( ) const

◆ excludeItemAttributeNamesFilter()

QStringList qMRMLSubjectHierarchyTreeView::excludeItemAttributeNamesFilter ( ) const

◆ excludeNodeAttributeNamesFilter()

QStringList qMRMLSubjectHierarchyTreeView::excludeNodeAttributeNamesFilter ( ) const

◆ expandItem

virtual void qMRMLSubjectHierarchyTreeView::expandItem ( vtkIdType  itemID)
virtualslot

Handle expand item requests in the subject hierarchy tree. Expands branch.

◆ expandToDepthFromContextMenu

virtual void qMRMLSubjectHierarchyTreeView::expandToDepthFromContextMenu ( )
protectedvirtualslot

Expand tree to depth specified by the clicked context menu action.

◆ firstSelectedSubjectHierarchyItemInBranch()

vtkIdType qMRMLSubjectHierarchyTreeView::firstSelectedSubjectHierarchyItemInBranch ( vtkIdType  itemID)
protected

Return the id of the first subject hierarchy item that is found to be selected within the branch that has the input item id as its root

◆ hideChildNodeTypes()

QStringList qMRMLSubjectHierarchyTreeView::hideChildNodeTypes ( ) const

◆ highlightReferencedItems()

bool qMRMLSubjectHierarchyTreeView::highlightReferencedItems ( ) const

◆ idColumnVisible()

bool qMRMLSubjectHierarchyTreeView::idColumnVisible ( )

◆ includeItemAttributeNamesFilter()

QStringList qMRMLSubjectHierarchyTreeView::includeItemAttributeNamesFilter ( ) const

◆ includeNodeAttributeNamesFilter()

QStringList qMRMLSubjectHierarchyTreeView::includeNodeAttributeNamesFilter ( ) const

◆ keyPressEvent()

void qMRMLSubjectHierarchyTreeView::keyPressEvent ( QKeyEvent *  e)
overrideprotected

Handle key press event.

◆ levelFilter()

QStringList qMRMLSubjectHierarchyTreeView::levelFilter ( ) const

◆ model()

Q_INVOKABLE qMRMLSubjectHierarchyModel* qMRMLSubjectHierarchyTreeView::model ( ) const

◆ mousePressEvent()

void qMRMLSubjectHierarchyTreeView::mousePressEvent ( QMouseEvent *  e)
overrideprotected

Handle mouse press event.

◆ mrmlScene()

Q_INVOKABLE vtkMRMLScene* qMRMLSubjectHierarchyTreeView::mrmlScene ( ) const

◆ multiSelection()

bool qMRMLSubjectHierarchyTreeView::multiSelection ( )

Get whether multi-selection is enabled.

◆ nameFilter()

QString qMRMLSubjectHierarchyTreeView::nameFilter ( ) const

◆ nodeTypes()

QStringList qMRMLSubjectHierarchyTreeView::nodeTypes ( ) const

◆ noneDisplay()

QString qMRMLSubjectHierarchyTreeView::noneDisplay ( ) const

◆ noneEnabled()

bool qMRMLSubjectHierarchyTreeView::noneEnabled ( ) const

◆ onCreateNewTransform

virtual void qMRMLSubjectHierarchyTreeView::onCreateNewTransform ( )
protectedvirtualslot

◆ onCurrentSelection

virtual void qMRMLSubjectHierarchyTreeView::onCurrentSelection ( const QModelIndex &  currentItemIndex)
protectedvirtualslot

◆ onCustomContextMenu

void qMRMLSubjectHierarchyTreeView::onCustomContextMenu ( const QPoint &  point)
protectedslot

◆ onItemCollapsed

virtual void qMRMLSubjectHierarchyTreeView::onItemCollapsed ( const QModelIndex &  collapsedItemIndex)
protectedvirtualslot

Updates subject hierarchy item expanded property when item is collapsed.

◆ onItemExpanded

virtual void qMRMLSubjectHierarchyTreeView::onItemExpanded ( const QModelIndex &  expandedItemIndex)
protectedvirtualslot

Updates subject hierarchy item expanded property when item is expanded.

◆ onMRMLSceneEndBatchProcess

virtual void qMRMLSubjectHierarchyTreeView::onMRMLSceneEndBatchProcess ( vtkObject *  sceneObject)
protectedvirtualslot

Called when batch processing ends. Restores selection, which is lost when the hierarchy is rebuilt.

◆ onMRMLSceneEndClose

virtual void qMRMLSubjectHierarchyTreeView::onMRMLSceneEndClose ( vtkObject *  sceneObject)
protectedvirtualslot

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

◆ onMRMLSceneStartBatchProcess

virtual void qMRMLSubjectHierarchyTreeView::onMRMLSceneStartBatchProcess ( vtkObject *  sceneObject)
protectedvirtualslot

Called when batch processing starts. Makes sure stored selection does not get emptied before restoring.

◆ onMRMLSceneStartClose

virtual void qMRMLSubjectHierarchyTreeView::onMRMLSceneStartClose ( vtkObject *  sceneObject)
protectedvirtualslot

Called when scene close is started.

◆ onSelectionChanged

virtual void qMRMLSubjectHierarchyTreeView::onSelectionChanged ( const QItemSelection &  selected,
const QItemSelection &  deselected 
)
protectedvirtualslot

◆ onSubjectHierarchyItemModified

virtual void qMRMLSubjectHierarchyTreeView::onSubjectHierarchyItemModified ( vtkObject *  caller,
void *  callData 
)
protectedvirtualslot

Propagate item modified event.

◆ onSubjectHierarchyItemTransformModified

virtual void qMRMLSubjectHierarchyTreeView::onSubjectHierarchyItemTransformModified ( vtkObject *  caller,
void *  callData 
)
protectedvirtualslot

Propagate item transform modified event.

◆ onTransformActionSelected

virtual void qMRMLSubjectHierarchyTreeView::onTransformActionSelected ( )
protectedvirtualslot

◆ onTransformEditProperties

virtual void qMRMLSubjectHierarchyTreeView::onTransformEditProperties ( )
protectedvirtualslot

◆ onTransformInteractionInViewToggled

virtual void qMRMLSubjectHierarchyTreeView::onTransformInteractionInViewToggled ( bool  show)
protectedvirtualslot

◆ populateContextMenuForItem()

virtual void qMRMLSubjectHierarchyTreeView::populateContextMenuForItem ( vtkIdType  itemID)
protectedvirtual

Populate general context menu for given subject hierarchy item

Parameters
itemIDSubject hierarchy item ID of the item to show context menu for. It is only used to determine whether empty area or scene was clicked. If not, then use the current items vector so that multi-selection can also be handled.

◆ populateTransformContextMenuForItem()

virtual void qMRMLSubjectHierarchyTreeView::populateTransformContextMenuForItem ( vtkIdType  itemID)
protectedvirtual

Populate transform context menu for given subject hierarchy item.

◆ populateVisibilityContextMenuForItem()

virtual void qMRMLSubjectHierarchyTreeView::populateVisibilityContextMenuForItem ( vtkIdType  itemID)
protectedvirtual

Populate visibility context menu for given subject hierarchy item.

◆ removeAttributeFilter()

Q_INVOKABLE void qMRMLSubjectHierarchyTreeView::removeAttributeFilter ( )

Remove item attribute filtering.

See also
setAttribute

◆ removeItemAttributeFilter() [1/2]

Q_INVOKABLE void qMRMLSubjectHierarchyTreeView::removeItemAttributeFilter ( QString  attributeName,
QVariant  attributeValue,
bool  include 
)

Remove single item attribute filter specifying each attribute.

See also
addAttributeFilter

◆ removeItemAttributeFilter() [2/2]

Q_INVOKABLE void qMRMLSubjectHierarchyTreeView::removeItemAttributeFilter ( QString  attributeName,
bool  include 
)

Remove all item attribute filters specifying a given attribute name and include flag.

◆ removeNodeAttributeFilter() [1/2]

Q_INVOKABLE void qMRMLSubjectHierarchyTreeView::removeNodeAttributeFilter ( QString  attributeName,
QVariant  attributeValue,
bool  include,
QString  className 
)

Remove single node attribute filter specifying each attribute.

See also
addAttributeFilter

◆ removeNodeAttributeFilter() [2/2]

Q_INVOKABLE void qMRMLSubjectHierarchyTreeView::removeNodeAttributeFilter ( QString  attributeName,
bool  include 
)

Remove all node attribute filters specifying a given attribute name and include flag.

◆ renameCurrentItem

void qMRMLSubjectHierarchyTreeView::renameCurrentItem ( )
slot

Rename currently selected one item by popping up a dialog.

◆ resetColumnSizesToDefault

void qMRMLSubjectHierarchyTreeView::resetColumnSizesToDefault ( )
slot

Resets column sizes and size policies to default.

◆ rootItem()

Q_INVOKABLE vtkIdType qMRMLSubjectHierarchyTreeView::rootItem ( ) const

Get root item of the tree.

◆ selectPluginForCurrentItem

virtual void qMRMLSubjectHierarchyTreeView::selectPluginForCurrentItem ( )
virtualslot

Handle manual selection of a plugin as the new owner of a subject hierarchy node.

◆ selectRoleSubMenuVisible()

bool qMRMLSubjectHierarchyTreeView::selectRoleSubMenuVisible ( ) const

◆ setAttributeFilter()

Q_INVOKABLE void qMRMLSubjectHierarchyTreeView::setAttributeFilter ( const QString &  attributeName,
const QVariant &  attributeValue = QVariant() 
)

Set attribute filter that allows showing only items that have the specified attribute and their parents.

Parameters
attributeNameName of the attribute by which the items are filtered
attributeValueValue of the specified attribute that needs to match this given value in order for it to be shown. If empty, then existence of the attribute is enough to show. Empty by default

◆ setAttributeNameFilter

void qMRMLSubjectHierarchyTreeView::setAttributeNameFilter ( QString &  filter)
slot

◆ setAttributeValueFilter

void qMRMLSubjectHierarchyTreeView::setAttributeValueFilter ( QString &  filter)
slot

◆ setColorColumnVisible()

void qMRMLSubjectHierarchyTreeView::setColorColumnVisible ( bool  visible)

Set color column visibility.

◆ setContextMenuEnabled

void qMRMLSubjectHierarchyTreeView::setContextMenuEnabled ( bool  enabled)
slot

◆ setCurrentItem

virtual void qMRMLSubjectHierarchyTreeView::setCurrentItem ( vtkIdType  itemID)
virtualslot

Set current (=selected) subject hierarchy item.

◆ setCurrentItems [1/2]

virtual void qMRMLSubjectHierarchyTreeView::setCurrentItems ( QList< vtkIdType >  items)
virtualslot

Set current (=selected) subject hierarchy items.

◆ setCurrentItems [2/2]

virtual void qMRMLSubjectHierarchyTreeView::setCurrentItems ( vtkIdList *  items)
virtualslot

Python compatibility function to set current (=selected) subject hierarchy items.

◆ setCurrentNode

virtual void qMRMLSubjectHierarchyTreeView::setCurrentNode ( vtkMRMLNode node)
virtualslot

Convenience method to set current item by associated data node.

◆ setDescriptionColumnVisible()

void qMRMLSubjectHierarchyTreeView::setDescriptionColumnVisible ( bool  visible)

Set description column visibility.

◆ setEditMenuActionVisible

void qMRMLSubjectHierarchyTreeView::setEditMenuActionVisible ( bool  visible)
slot

◆ setExcludeItemAttributeNamesFilter

void qMRMLSubjectHierarchyTreeView::setExcludeItemAttributeNamesFilter ( QStringList  filter)
slot

◆ setExcludeNodeAttributeNamesFilter

void qMRMLSubjectHierarchyTreeView::setExcludeNodeAttributeNamesFilter ( QStringList  filter)
slot

◆ setHideChildNodeTypes()

void qMRMLSubjectHierarchyTreeView::setHideChildNodeTypes ( const QStringList &  types)

Set child node types filter that allows hiding certain data node subclasses that would otherwise be accepted by the data node type filter. Show all data nodes if empty

◆ setHighlightReferencedItems

void qMRMLSubjectHierarchyTreeView::setHighlightReferencedItems ( bool  highlightOn)
slot

◆ setIdColumnVisible()

void qMRMLSubjectHierarchyTreeView::setIdColumnVisible ( bool  visible)

Set ID column visibility.

◆ setIncludeItemAttributeNamesFilter

void qMRMLSubjectHierarchyTreeView::setIncludeItemAttributeNamesFilter ( QStringList  filter)
slot

◆ setIncludeNodeAttributeNamesFilter

void qMRMLSubjectHierarchyTreeView::setIncludeNodeAttributeNamesFilter ( QStringList  filter)
slot

◆ setLevelFilter()

void qMRMLSubjectHierarchyTreeView::setLevelFilter ( QStringList &  levelFilter)

Set level filter that allows showing only items at a specified level and their parents. Show all items if empty.

◆ setMRMLScene

virtual void qMRMLSubjectHierarchyTreeView::setMRMLScene ( vtkMRMLScene scene)
virtualslot

Set MRML scene.

◆ setMultiSelection

virtual void qMRMLSubjectHierarchyTreeView::setMultiSelection ( bool  multiSelectionOn)
virtualslot

Set multi-selection.

◆ setNameFilter()

void qMRMLSubjectHierarchyTreeView::setNameFilter ( QString &  nameFilter)

Set name filter that allows showing only items containing a specified string (case-insensitive). Show all items if empty.

◆ setNodeTypes()

void qMRMLSubjectHierarchyTreeView::setNodeTypes ( const QStringList &  types)

Set node type filter that allows showing only data nodes of a certain type. Show all data nodes if empty.

◆ setNoneDisplay

void qMRMLSubjectHierarchyTreeView::setNoneDisplay ( const QString &  displayName)
slot

◆ setNoneEnabled

void qMRMLSubjectHierarchyTreeView::setNoneEnabled ( bool  enable)
slot

◆ setPluginBlacklist

void qMRMLSubjectHierarchyTreeView::setPluginBlacklist ( QStringList  blacklist)
slot

Set list of subject hierarchy plugins that are disabled.

Parameters
blacklistList of blacklisted subject hierarchy plugin names. Empty blacklist means all plugins are enabled. That is the default.

◆ setPluginWhitelist

void qMRMLSubjectHierarchyTreeView::setPluginWhitelist ( QStringList  whitelist)
slot

Set list of subject hierarchy plugins that are enabled.

Parameters
whitelistList of whitelisted subject hierarchy plugin names. Empty whitelist means all plugins are enabled. That is the default.

◆ setRootItem

virtual void qMRMLSubjectHierarchyTreeView::setRootItem ( vtkIdType  itemID)
virtualslot

Set subject hierarchy item to be the root in the shown tree.

◆ setSelectRoleSubMenuVisible

void qMRMLSubjectHierarchyTreeView::setSelectRoleSubMenuVisible ( bool  visible)
slot

◆ setShowRootItem

void qMRMLSubjectHierarchyTreeView::setShowRootItem ( bool  show)
slot

Set root item visibility.

◆ setSubjectHierarchyNode()

virtual void qMRMLSubjectHierarchyTreeView::setSubjectHierarchyNode ( vtkMRMLSubjectHierarchyNode shNode)
protectedvirtual

Set the subject hierarchy node found in the given scene. Called only internally.

◆ setTransformColumnVisible()

void qMRMLSubjectHierarchyTreeView::setTransformColumnVisible ( bool  visible)

Set transform column visibility.

◆ setVisibilityColumnVisible()

void qMRMLSubjectHierarchyTreeView::setVisibilityColumnVisible ( bool  visible)

Set visibility column visibility.

◆ showContextMenuHint

bool qMRMLSubjectHierarchyTreeView::showContextMenuHint ( bool  visibility = false)
slot

Show hint to user about context menus

Parameters
visibilityTrue if visibility context menu hint is to be shown, false for general context menu. False by default
Returns
Flag indicating whether hint could be shown (i.e. there was an item in the tree is displayable)

◆ showRootItem()

bool qMRMLSubjectHierarchyTreeView::showRootItem ( ) const

Get root item visibility.

◆ sortFilterProxyModel()

Q_INVOKABLE qMRMLSortFilterSubjectHierarchyProxyModel* qMRMLSubjectHierarchyTreeView::sortFilterProxyModel ( ) const

◆ subjectHierarchyNode()

Q_INVOKABLE vtkMRMLSubjectHierarchyNode* qMRMLSubjectHierarchyTreeView::subjectHierarchyNode ( ) const

◆ toggleSubjectHierarchyItemVisibility()

void qMRMLSubjectHierarchyTreeView::toggleSubjectHierarchyItemVisibility ( vtkIdType  itemID)
protected

Toggle visibility for given subject hierarchy item.

◆ toggleVisibilityOfSelectedItems

void qMRMLSubjectHierarchyTreeView::toggleVisibilityOfSelectedItems ( )
slot

Toggle visibility of selected subject hierarchy items.

◆ transformColumnVisible()

bool qMRMLSubjectHierarchyTreeView::transformColumnVisible ( )

◆ updateRootItem

virtual void qMRMLSubjectHierarchyTreeView::updateRootItem ( )
protectedvirtualslot

Update root item to restore view (e.g. after tree was updated in the model from the subject hierarchy)

◆ updateSelectPluginActions

virtual void qMRMLSubjectHierarchyTreeView::updateSelectPluginActions ( )
virtualslot

Update select plugin actions. Is called when the plugin selection sub-menu is opened, and when the user manually changes the owner plugin of a node. It sets checked state and update confidence values in the select plugin actions in the node context menu for the currently selected node.

◆ visibilityColumnVisible()

bool qMRMLSubjectHierarchyTreeView::visibilityColumnVisible ( )

Friends And Related Function Documentation

◆ qMRMLSubjectHierarchyComboBox

friend class qMRMLSubjectHierarchyComboBox
friend

Definition at line 380 of file qMRMLSubjectHierarchyTreeView.h.

Member Data Documentation

◆ d_ptr

QScopedPointer<qMRMLSubjectHierarchyTreeViewPrivate> qMRMLSubjectHierarchyTreeView::d_ptr
protected

Definition at line 375 of file qMRMLSubjectHierarchyTreeView.h.


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