Slicer  5.1
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
qMRMLSubjectHierarchyComboBox Class Reference

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

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

Public Types

typedef ctkComboBox Superclass
 

Properties

bool alignPopupVertically
 
QString attributeNameFilter
 
QString attributeValueFilter
 
QStringList excludeItemAttributeNamesFilter
 
QStringList excludeNodeAttributeNamesFilter
 
bool highlightReferencedItems
 
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...
 
int maximumNumberOfShownItems
 Property determining the maximum number of items (rows) shown in the popup tree. More...
 
QString noneDisplay
 
bool noneEnabled
 
bool showCurrentItemParents
 
bool showEmptyHierarchyItems
 
bool showRootItem
 

Public Slots

void disablePlugin (QString plugin)
 
void setAttributeNameFilter (QString &filter)
 
void setAttributeValueFilter (QString &filter)
 
virtual void setCurrentItem (vtkIdType itemID)
 Set current (=selected) subject hierarchy item. More...
 
void setExcludeItemAttributeNamesFilter (QStringList filter)
 
void setExcludeNodeAttributeNamesFilter (QStringList filter)
 
void setIncludeItemAttributeNamesFilter (QStringList filter)
 
void setIncludeNodeAttributeNamesFilter (QStringList filter)
 
virtual void setMRMLScene (vtkMRMLScene *scene)
 Set MRML scene. More...
 
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...
 

Signals

void currentItemChanged (vtkIdType)
 
void currentItemModified (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())
 
bool alignPopupVertically () const
 
QString attributeNameFilter () const
 
QString attributeValueFilter () const
 
Q_INVOKABLE void clearSelection ()
 
Q_INVOKABLE vtkIdType currentItem () const
 
QStringList excludeItemAttributeNamesFilter () const
 
QStringList excludeNodeAttributeNamesFilter () const
 
bool highlightReferencedItems () const
 
QStringList includeItemAttributeNamesFilter () const
 
QStringList includeNodeAttributeNamesFilter () const
 
int maximumNumberOfShownItems () const
 
Q_INVOKABLE qMRMLSubjectHierarchyModelmodel () const
 
Q_INVOKABLE vtkMRMLScenemrmlScene () const
 
QString noneDisplay () const
 
bool noneEnabled () const
 
 qMRMLSubjectHierarchyComboBox (QWidget *parent=nullptr)
 
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
 
void setAlignPopupVertically (bool align)
 
Q_INVOKABLE void setHideChildNodeTypes (const QStringList &types)
 
void setHighlightReferencedItems (bool highlightOn)
 
Q_INVOKABLE 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 setMaximumNumberOfShownItems (int maxNumberOfShownItems)
 
Q_INVOKABLE 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 setNoneDisplay (const QString &displayName)
 
void setNoneEnabled (bool enable)
 
void setShowCurrentItemParents (bool enable)
 
void setShowEmptyHierarchyItems (bool show)
 
void setShowRootItem (bool show)
 
bool showCurrentItemParents () const
 
bool showEmptyHierarchyItems () const
 
void showPopup () override
 Provides customized popup window for the tree view. More...
 
bool showRootItem () const
 
Q_INVOKABLE qMRMLSortFilterSubjectHierarchyProxyModelsortFilterProxyModel () const
 
Q_INVOKABLE vtkMRMLSubjectHierarchyNodesubjectHierarchyNode () const
 
 ~qMRMLSubjectHierarchyComboBox () override
 

Protected Slots

void hidePopup () override
 
virtual void onMRMLSceneCloseEnded (vtkObject *sceneObject)
 
void updateComboBoxTitleAndIcon (vtkIdType selectedShItemID)
 

Protected Member Functions

void mousePressEvent (QMouseEvent *event) override
 Handle mouse press event (disable context menu) More...
 

Protected Attributes

QScopedPointer< qMRMLSubjectHierarchyComboBoxPrivate > d_ptr
 

Detailed Description

Definition at line 41 of file qMRMLSubjectHierarchyComboBox.h.

Member Typedef Documentation

◆ Superclass

Definition at line 99 of file qMRMLSubjectHierarchyComboBox.h.

Property Documentation

◆ alignPopupVertically

bool qMRMLSubjectHierarchyComboBox::alignPopupVertically
readwrite

Property determining the vertical alignment of the popup tree with the combobox. If aligned, the popup will shift vertically so that the selected item overlays above the combobox. Else, the popup tree appears below the combobox, like for a qMRMLNodeComboBox.

Definition at line 60 of file qMRMLSubjectHierarchyComboBox.h.

◆ attributeNameFilter

QString qMRMLSubjectHierarchyComboBox::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 91 of file qMRMLSubjectHierarchyComboBox.h.

◆ attributeValueFilter

QString qMRMLSubjectHierarchyComboBox::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 96 of file qMRMLSubjectHierarchyComboBox.h.

◆ excludeItemAttributeNamesFilter

QStringList qMRMLSubjectHierarchyComboBox::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 84 of file qMRMLSubjectHierarchyComboBox.h.

◆ excludeNodeAttributeNamesFilter

QStringList qMRMLSubjectHierarchyComboBox::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 87 of file qMRMLSubjectHierarchyComboBox.h.

◆ highlightReferencedItems

bool qMRMLSubjectHierarchyComboBox::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 54 of file qMRMLSubjectHierarchyComboBox.h.

◆ includeItemAttributeNamesFilter

QStringList qMRMLSubjectHierarchyComboBox::includeItemAttributeNamesFilter
readwrite

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

Definition at line 79 of file qMRMLSubjectHierarchyComboBox.h.

◆ includeNodeAttributeNamesFilter

QStringList qMRMLSubjectHierarchyComboBox::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 81 of file qMRMLSubjectHierarchyComboBox.h.

◆ maximumNumberOfShownItems

int qMRMLSubjectHierarchyComboBox::maximumNumberOfShownItems
readwrite

Property determining the maximum number of items (rows) shown in the popup tree.

Definition at line 56 of file qMRMLSubjectHierarchyComboBox.h.

◆ noneDisplay

QString qMRMLSubjectHierarchyComboBox::noneDisplay
readwrite

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

See also
noneItemEnabled

Definition at line 67 of file qMRMLSubjectHierarchyComboBox.h.

◆ noneEnabled

bool qMRMLSubjectHierarchyComboBox::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 63 of file qMRMLSubjectHierarchyComboBox.h.

◆ showCurrentItemParents

bool qMRMLSubjectHierarchyComboBox::showCurrentItemParents
readwrite

This property controls whether hierarchy information is included in the current item text (showed when collapsed). If enabled (which is the default), then the text looks like "[ParentName] / [ParentName] / [SelectedItemName]". If disabled, the title will only be "[SelectedItemName]".

Definition at line 71 of file qMRMLSubjectHierarchyComboBox.h.

◆ showEmptyHierarchyItems

bool qMRMLSubjectHierarchyComboBox::showEmptyHierarchyItems
readwrite

Show hierarchy items (items without data node such as patient/study/folder) that have no children to show according to the filters. This is most useful to in off state keep combobox content reasonable size for selecting data nodes. True by default.

Definition at line 76 of file qMRMLSubjectHierarchyComboBox.h.

◆ showRootItem

bool qMRMLSubjectHierarchyComboBox::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 50 of file qMRMLSubjectHierarchyComboBox.h.

Constructor & Destructor Documentation

◆ qMRMLSubjectHierarchyComboBox()

qMRMLSubjectHierarchyComboBox::qMRMLSubjectHierarchyComboBox ( QWidget *  parent = nullptr)

◆ ~qMRMLSubjectHierarchyComboBox()

qMRMLSubjectHierarchyComboBox::~qMRMLSubjectHierarchyComboBox ( )
override

Member Function Documentation

◆ addItemAttributeFilter()

Q_INVOKABLE void qMRMLSubjectHierarchyComboBox::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 qMRMLSubjectHierarchyComboBox::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)

◆ alignPopupVertically()

bool qMRMLSubjectHierarchyComboBox::alignPopupVertically ( ) const

◆ attributeNameFilter()

QString qMRMLSubjectHierarchyComboBox::attributeNameFilter ( ) const

◆ attributeValueFilter()

QString qMRMLSubjectHierarchyComboBox::attributeValueFilter ( ) const

◆ clearSelection()

Q_INVOKABLE void qMRMLSubjectHierarchyComboBox::clearSelection ( )

◆ currentItem()

Q_INVOKABLE vtkIdType qMRMLSubjectHierarchyComboBox::currentItem ( ) const

◆ currentItemChanged

void qMRMLSubjectHierarchyComboBox::currentItemChanged ( vtkIdType  )
signal

◆ currentItemModified

void qMRMLSubjectHierarchyComboBox::currentItemModified ( vtkIdType  )
signal

◆ disablePlugin

void qMRMLSubjectHierarchyComboBox::disablePlugin ( QString  plugin)
slot

Disable subject hierarchy plugin by adding it to the blacklist

See also
setPluginBlacklist
Parameters
pluginName of the plugin to disable

◆ excludeItemAttributeNamesFilter()

QStringList qMRMLSubjectHierarchyComboBox::excludeItemAttributeNamesFilter ( ) const

◆ excludeNodeAttributeNamesFilter()

QStringList qMRMLSubjectHierarchyComboBox::excludeNodeAttributeNamesFilter ( ) const

◆ hidePopup

void qMRMLSubjectHierarchyComboBox::hidePopup ( )
overrideprotectedslot

◆ highlightReferencedItems()

bool qMRMLSubjectHierarchyComboBox::highlightReferencedItems ( ) const

◆ includeItemAttributeNamesFilter()

QStringList qMRMLSubjectHierarchyComboBox::includeItemAttributeNamesFilter ( ) const

◆ includeNodeAttributeNamesFilter()

QStringList qMRMLSubjectHierarchyComboBox::includeNodeAttributeNamesFilter ( ) const

◆ maximumNumberOfShownItems()

int qMRMLSubjectHierarchyComboBox::maximumNumberOfShownItems ( ) const

◆ model()

Q_INVOKABLE qMRMLSubjectHierarchyModel* qMRMLSubjectHierarchyComboBox::model ( ) const

◆ mousePressEvent()

void qMRMLSubjectHierarchyComboBox::mousePressEvent ( QMouseEvent *  event)
overrideprotected

Handle mouse press event (disable context menu)

◆ mrmlScene()

Q_INVOKABLE vtkMRMLScene* qMRMLSubjectHierarchyComboBox::mrmlScene ( ) const

◆ noneDisplay()

QString qMRMLSubjectHierarchyComboBox::noneDisplay ( ) const

◆ noneEnabled()

bool qMRMLSubjectHierarchyComboBox::noneEnabled ( ) const

◆ onMRMLSceneCloseEnded

virtual void qMRMLSubjectHierarchyComboBox::onMRMLSceneCloseEnded ( vtkObject *  sceneObject)
protectedvirtualslot

◆ removeItemAttributeFilter() [1/2]

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

Remove single item attribute filter specifying each attribute.

See also
addAttributeFilter

◆ removeItemAttributeFilter() [2/2]

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

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

◆ removeNodeAttributeFilter() [1/2]

Q_INVOKABLE void qMRMLSubjectHierarchyComboBox::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 qMRMLSubjectHierarchyComboBox::removeNodeAttributeFilter ( QString  attributeName,
bool  include 
)

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

◆ rootItem()

Q_INVOKABLE vtkIdType qMRMLSubjectHierarchyComboBox::rootItem ( ) const

◆ setAlignPopupVertically()

void qMRMLSubjectHierarchyComboBox::setAlignPopupVertically ( bool  align)

◆ setAttributeNameFilter

void qMRMLSubjectHierarchyComboBox::setAttributeNameFilter ( QString &  filter)
slot

◆ setAttributeValueFilter

void qMRMLSubjectHierarchyComboBox::setAttributeValueFilter ( QString &  filter)
slot

◆ setCurrentItem

virtual void qMRMLSubjectHierarchyComboBox::setCurrentItem ( vtkIdType  itemID)
virtualslot

Set current (=selected) subject hierarchy item.

◆ setExcludeItemAttributeNamesFilter

void qMRMLSubjectHierarchyComboBox::setExcludeItemAttributeNamesFilter ( QStringList  filter)
slot

◆ setExcludeNodeAttributeNamesFilter

void qMRMLSubjectHierarchyComboBox::setExcludeNodeAttributeNamesFilter ( QStringList  filter)
slot

◆ setHideChildNodeTypes()

Q_INVOKABLE void qMRMLSubjectHierarchyComboBox::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 qMRMLSubjectHierarchyComboBox::setHighlightReferencedItems ( bool  highlightOn)

◆ setIncludeItemAttributeNamesFilter

void qMRMLSubjectHierarchyComboBox::setIncludeItemAttributeNamesFilter ( QStringList  filter)
slot

◆ setIncludeNodeAttributeNamesFilter

void qMRMLSubjectHierarchyComboBox::setIncludeNodeAttributeNamesFilter ( QStringList  filter)
slot

◆ setLevelFilter()

Q_INVOKABLE void qMRMLSubjectHierarchyComboBox::setLevelFilter ( QStringList &  levelFilter)

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

◆ setMaximumNumberOfShownItems()

void qMRMLSubjectHierarchyComboBox::setMaximumNumberOfShownItems ( int  maxNumberOfShownItems)

◆ setMRMLScene

virtual void qMRMLSubjectHierarchyComboBox::setMRMLScene ( vtkMRMLScene scene)
virtualslot

Set MRML scene.

◆ setNodeTypes()

Q_INVOKABLE void qMRMLSubjectHierarchyComboBox::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 qMRMLSubjectHierarchyComboBox::setNoneDisplay ( const QString &  displayName)

◆ setNoneEnabled()

void qMRMLSubjectHierarchyComboBox::setNoneEnabled ( bool  enable)

◆ setPluginBlacklist

void qMRMLSubjectHierarchyComboBox::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 qMRMLSubjectHierarchyComboBox::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 qMRMLSubjectHierarchyComboBox::setRootItem ( vtkIdType  itemID)
virtualslot

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

◆ setShowCurrentItemParents()

void qMRMLSubjectHierarchyComboBox::setShowCurrentItemParents ( bool  enable)

◆ setShowEmptyHierarchyItems()

void qMRMLSubjectHierarchyComboBox::setShowEmptyHierarchyItems ( bool  show)

◆ setShowRootItem()

void qMRMLSubjectHierarchyComboBox::setShowRootItem ( bool  show)

◆ showCurrentItemParents()

bool qMRMLSubjectHierarchyComboBox::showCurrentItemParents ( ) const

◆ showEmptyHierarchyItems()

bool qMRMLSubjectHierarchyComboBox::showEmptyHierarchyItems ( ) const

◆ showPopup()

void qMRMLSubjectHierarchyComboBox::showPopup ( )
override

Provides customized popup window for the tree view.

◆ showRootItem()

bool qMRMLSubjectHierarchyComboBox::showRootItem ( ) const

◆ sortFilterProxyModel()

Q_INVOKABLE qMRMLSortFilterSubjectHierarchyProxyModel* qMRMLSubjectHierarchyComboBox::sortFilterProxyModel ( ) const

◆ subjectHierarchyNode()

Q_INVOKABLE vtkMRMLSubjectHierarchyNode* qMRMLSubjectHierarchyComboBox::subjectHierarchyNode ( ) const

◆ updateComboBoxTitleAndIcon

void qMRMLSubjectHierarchyComboBox::updateComboBoxTitleAndIcon ( vtkIdType  selectedShItemID)
protectedslot

Member Data Documentation

◆ d_ptr

QScopedPointer<qMRMLSubjectHierarchyComboBoxPrivate> qMRMLSubjectHierarchyComboBox::d_ptr
protected

Definition at line 228 of file qMRMLSubjectHierarchyComboBox.h.


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