Slicer  4.11
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 | Public Member Functions | Protected Member Functions | Protected Attributes
qMRMLSortFilterSubjectHierarchyProxyModel Class Reference

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

Inheritance diagram for qMRMLSortFilterSubjectHierarchyProxyModel:
Inheritance graph
Collaboration diagram for qMRMLSortFilterSubjectHierarchyProxyModel:
Collaboration graph

Public Types

typedef QSortFilterProxyModel Superclass


QString attributeNameFilter
 Filter to show only items that contain an attribute with this name. Empty by default. More...
QString attributeValueFilter
QStringList hideChildNodeTypes
vtkIdType hideItemsUnaffiliatedWithItemID
QStringList levelFilter
 Filter to show only items of a certain level (and their parents). If empty, then show all. More...
QString nameFilter
 Filter to show only items that contain the string in their names. Empty by default. More...
QStringList nodeTypes

Public Slots

void setAttributeNameFilter (QString filter)
void setAttributeValueFilter (QString filter)
void setHideChildNodeTypes (const QStringList &types)
void setLevelFilter (QStringList filter)
void setNameFilter (QString filter)
void setNodeTypes (const QStringList &types)

Public Member Functions

Q_INVOKABLE int acceptedItemCount (vtkIdType rootItemID) const
QString attributeNameFilter () const
QString attributeValueFilter () const
virtual bool filterAcceptsItem (vtkIdType itemID, bool canAcceptIfAnyChildIsAccepted=true) const
 Filters items to decide which to display in the view. More...
bool filterAcceptsRow (int sourceRow, const QModelIndex &sourceParent) const override
Qt::ItemFlags flags (const QModelIndex &index) const override
QStringList hideChildNodeTypes () const
vtkIdType hideItemsUnaffiliatedWithItemID ()
Q_INVOKABLE QModelIndex indexFromSubjectHierarchyItem (vtkIdType itemID, int column=0) const
 Retrieve an index for a given a subject hierarchy item ID. More...
QStringList levelFilter () const
Q_INVOKABLE vtkMRMLScenemrmlScene () const
QString nameFilter () const
QStringList nodeTypes () const
 qMRMLSortFilterSubjectHierarchyProxyModel (QObject *parent=nullptr)
void setHideItemsUnaffiliatedWithItemID (vtkIdType itemID)
Q_INVOKABLE vtkIdType subjectHierarchyItemFromIndex (const QModelIndex &index) const
 Retrieve the associated subject hierarchy item ID from a model index. More...
Q_INVOKABLE vtkMRMLSubjectHierarchyNodesubjectHierarchyNode () const
Q_INVOKABLE QModelIndex subjectHierarchySceneIndex () const
 Retrieve the index of the MRML scene (the root item) in the subject hierarchy tree. More...
 ~qMRMLSortFilterSubjectHierarchyProxyModel () override

Protected Member Functions

QStandardItem * sourceItem (const QModelIndex &index) const

Protected Attributes

QScopedPointer< qMRMLSortFilterSubjectHierarchyProxyModelPrivate > d_ptr

Detailed Description

Definition at line 42 of file qMRMLSortFilterSubjectHierarchyProxyModel.h.

Member Typedef Documentation

◆ Superclass

Definition at line 74 of file qMRMLSortFilterSubjectHierarchyProxyModel.h.

Property Documentation

◆ attributeNameFilter

QString qMRMLSortFilterSubjectHierarchyProxyModel::attributeNameFilter

Filter to show only items that contain an attribute with this name. Empty by default.

Definition at line 50 of file qMRMLSortFilterSubjectHierarchyProxyModel.h.

◆ attributeValueFilter

QString qMRMLSortFilterSubjectHierarchyProxyModel::attributeValueFilter

Filter to show only items that contain an attribute with

See also
attributeNameFilter (must be set) with this value. If empty, then existence of the attribute is enough to show Exact match is required. Empty by default

Definition at line 54 of file qMRMLSortFilterSubjectHierarchyProxyModel.h.

◆ hideChildNodeTypes

QStringList qMRMLSortFilterSubjectHierarchyProxyModel::hideChildNodeTypes

This property controls the items to hide by MRML node type Any node of type nodeType are visible except the ones also of type hideChildNodeTypes. e.g.: nodeTypes = vtkMRMLVolumeNode, showChildNodeTypes = true, hideChildNodeTypes = vtkMRMLDiffusionWeightedVolumeNode -> all the nodes of type vtkMRMLScalarVolumeNode, vtkMRMLTensorVolumeNode, vtkMRMLDiffusionImageVolumeNode... (but not vtkMRMLDiffusionWeightedVolumeNode) will be visible.

Definition at line 71 of file qMRMLSortFilterSubjectHierarchyProxyModel.h.

◆ hideItemsUnaffiliatedWithItemID

vtkIdType qMRMLSortFilterSubjectHierarchyProxyModel::hideItemsUnaffiliatedWithItemID

This property controls whether items unaffiliated with a given subject hierarchy item are hidden or not. All the nodes are visible (invalid item ID - vtkMRMLSubjectHierarchyNode::INVALID_ITEM_ID) by default

Definition at line 57 of file qMRMLSortFilterSubjectHierarchyProxyModel.h.

◆ levelFilter

QStringList qMRMLSortFilterSubjectHierarchyProxyModel::levelFilter

Filter to show only items of a certain level (and their parents). If empty, then show all.

Definition at line 59 of file qMRMLSortFilterSubjectHierarchyProxyModel.h.

◆ nameFilter

QString qMRMLSortFilterSubjectHierarchyProxyModel::nameFilter

Filter to show only items that contain the string in their names. Empty by default.

Definition at line 48 of file qMRMLSortFilterSubjectHierarchyProxyModel.h.

◆ nodeTypes

QStringList qMRMLSortFilterSubjectHierarchyProxyModel::nodeTypes

This property controls which items are visible. The MRML node class name must be provided. An empty list means all the nodes are visible (default).

Definition at line 62 of file qMRMLSortFilterSubjectHierarchyProxyModel.h.

Constructor & Destructor Documentation

◆ qMRMLSortFilterSubjectHierarchyProxyModel()

qMRMLSortFilterSubjectHierarchyProxyModel::qMRMLSortFilterSubjectHierarchyProxyModel ( QObject *  parent = nullptr)

◆ ~qMRMLSortFilterSubjectHierarchyProxyModel()

qMRMLSortFilterSubjectHierarchyProxyModel::~qMRMLSortFilterSubjectHierarchyProxyModel ( )

Member Function Documentation

◆ acceptedItemCount()

Q_INVOKABLE int qMRMLSortFilterSubjectHierarchyProxyModel::acceptedItemCount ( vtkIdType  rootItemID) const

Determine the number of accepted (shown) items

rootItemIDAncestor item of branch in which the accepted items are counted

◆ attributeNameFilter()

QString qMRMLSortFilterSubjectHierarchyProxyModel::attributeNameFilter ( ) const

◆ attributeValueFilter()

QString qMRMLSortFilterSubjectHierarchyProxyModel::attributeValueFilter ( ) const

◆ filterAcceptsItem()

virtual bool qMRMLSortFilterSubjectHierarchyProxyModel::filterAcceptsItem ( vtkIdType  itemID,
bool  canAcceptIfAnyChildIsAccepted = true 
) const

Filters items to decide which to display in the view.

◆ filterAcceptsRow()

bool qMRMLSortFilterSubjectHierarchyProxyModel::filterAcceptsRow ( int  sourceRow,
const QModelIndex &  sourceParent 
) const

Returns true if the item in the row indicated by the given sourceRow and sourceParent should be included in the model; otherwise returns false. This method test each item via filterAcceptsItem

◆ flags()

Qt::ItemFlags qMRMLSortFilterSubjectHierarchyProxyModel::flags ( const QModelIndex &  index) const

◆ hideChildNodeTypes()

QStringList qMRMLSortFilterSubjectHierarchyProxyModel::hideChildNodeTypes ( ) const

◆ hideItemsUnaffiliatedWithItemID()

vtkIdType qMRMLSortFilterSubjectHierarchyProxyModel::hideItemsUnaffiliatedWithItemID ( )

◆ indexFromSubjectHierarchyItem()

Q_INVOKABLE QModelIndex qMRMLSortFilterSubjectHierarchyProxyModel::indexFromSubjectHierarchyItem ( vtkIdType  itemID,
int  column = 0 
) const

Retrieve an index for a given a subject hierarchy item ID.

◆ levelFilter()

QStringList qMRMLSortFilterSubjectHierarchyProxyModel::levelFilter ( ) const

◆ mrmlScene()

Q_INVOKABLE vtkMRMLScene* qMRMLSortFilterSubjectHierarchyProxyModel::mrmlScene ( ) const

◆ nameFilter()

QString qMRMLSortFilterSubjectHierarchyProxyModel::nameFilter ( ) const

◆ nodeTypes()

QStringList qMRMLSortFilterSubjectHierarchyProxyModel::nodeTypes ( ) const

◆ setAttributeNameFilter

void qMRMLSortFilterSubjectHierarchyProxyModel::setAttributeNameFilter ( QString  filter)

◆ setAttributeValueFilter

void qMRMLSortFilterSubjectHierarchyProxyModel::setAttributeValueFilter ( QString  filter)

◆ setHideChildNodeTypes

void qMRMLSortFilterSubjectHierarchyProxyModel::setHideChildNodeTypes ( const QStringList &  types)

◆ setHideItemsUnaffiliatedWithItemID()

void qMRMLSortFilterSubjectHierarchyProxyModel::setHideItemsUnaffiliatedWithItemID ( vtkIdType  itemID)

◆ setLevelFilter

void qMRMLSortFilterSubjectHierarchyProxyModel::setLevelFilter ( QStringList  filter)

◆ setNameFilter

void qMRMLSortFilterSubjectHierarchyProxyModel::setNameFilter ( QString  filter)

◆ setNodeTypes

void qMRMLSortFilterSubjectHierarchyProxyModel::setNodeTypes ( const QStringList &  types)

◆ sourceItem()

QStandardItem* qMRMLSortFilterSubjectHierarchyProxyModel::sourceItem ( const QModelIndex &  index) const

◆ subjectHierarchyItemFromIndex()

Q_INVOKABLE vtkIdType qMRMLSortFilterSubjectHierarchyProxyModel::subjectHierarchyItemFromIndex ( const QModelIndex &  index) const

Retrieve the associated subject hierarchy item ID from a model index.

◆ subjectHierarchyNode()

Q_INVOKABLE vtkMRMLSubjectHierarchyNode* qMRMLSortFilterSubjectHierarchyProxyModel::subjectHierarchyNode ( ) const

◆ subjectHierarchySceneIndex()

Q_INVOKABLE QModelIndex qMRMLSortFilterSubjectHierarchyProxyModel::subjectHierarchySceneIndex ( ) const

Retrieve the index of the MRML scene (the root item) in the subject hierarchy tree.

Member Data Documentation

◆ d_ptr

QScopedPointer<qMRMLSortFilterSubjectHierarchyProxyModelPrivate> qMRMLSortFilterSubjectHierarchyProxyModel::d_ptr

Definition at line 127 of file qMRMLSortFilterSubjectHierarchyProxyModel.h.

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