Slicer
5.0
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
|
#include <Modules/Loadable/SubjectHierarchy/Widgets/qMRMLSortFilterSubjectHierarchyProxyModel.h>
Public Types | |
typedef QSortFilterProxyModel | Superclass |
Properties | |
QString | attributeNameFilter |
QString | attributeValueFilter |
QStringList | excludeItemAttributeNamesFilter |
QStringList | excludeNodeAttributeNamesFilter |
QStringList | hideChildNodeTypes |
vtkIdType | hideItemsUnaffiliatedWithItemID |
QStringList | includeItemAttributeNamesFilter |
QStringList | includeNodeAttributeNamesFilter |
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 |
bool | showEmptyHierarchyItems |
Public Slots | |
void | setAttributeNameFilter (QString filter) |
void | setAttributeValueFilter (QString filter) |
void | setExcludeItemAttributeNamesFilter (QStringList filterList) |
void | setExcludeNodeAttributeNamesFilter (QStringList filterList) |
void | setHideChildNodeTypes (const QStringList &types) |
void | setIncludeItemAttributeNamesFilter (QStringList filterList) |
void | setIncludeNodeAttributeNamesFilter (QStringList filterList) |
void | setLevelFilter (QStringList filter) |
void | setNameFilter (QString filter) |
void | setNodeTypes (const QStringList &types) |
Public Member Functions | |
Q_INVOKABLE int | acceptedItemCount (vtkIdType rootItemID=0) const |
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 |
QStringList | excludeItemAttributeNamesFilter () const |
QStringList | excludeNodeAttributeNamesFilter () const |
bool | filterAcceptsRow (int sourceRow, const QModelIndex &sourceParent) const override |
Qt::ItemFlags | flags (const QModelIndex &index) const override |
QStringList | hideChildNodeTypes () const |
vtkIdType | hideItemsUnaffiliatedWithItemID () const |
QStringList | includeItemAttributeNamesFilter () const |
QStringList | includeNodeAttributeNamesFilter () const |
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 vtkMRMLScene * | mrmlScene () const |
QString | nameFilter () const |
QStringList | nodeTypes () const |
qMRMLSortFilterSubjectHierarchyProxyModel (QObject *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... | |
void | setHideItemsUnaffiliatedWithItemID (vtkIdType itemID) |
void | setShowEmptyHierarchyItems (bool show) |
bool | showEmptyHierarchyItems () const |
Q_INVOKABLE vtkIdType | subjectHierarchyItemFromIndex (const QModelIndex &index) const |
Retrieve the associated subject hierarchy item ID from a model index. More... | |
Q_INVOKABLE vtkMRMLSubjectHierarchyNode * | subjectHierarchyNode () 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 Types | |
enum | AcceptType { Reject = 0, Accept, AcceptDueToBeingParentOfAccepted } |
Protected Member Functions | |
virtual AcceptType | filterAcceptsItem (vtkIdType itemID, bool canAcceptIfAnyChildIsAccepted=true) const |
Filters items to decide which to display in the view. More... | |
QStandardItem * | sourceItem (const QModelIndex &index) const |
Protected Attributes | |
QScopedPointer< qMRMLSortFilterSubjectHierarchyProxyModelPrivate > | d_ptr |
Friends | |
class | qMRMLSubjectHierarchyTreeView |
Definition at line 42 of file qMRMLSortFilterSubjectHierarchyProxyModel.h.
typedef QSortFilterProxyModel qMRMLSortFilterSubjectHierarchyProxyModel::Superclass |
Definition at line 98 of file qMRMLSortFilterSubjectHierarchyProxyModel.h.
|
protected |
This enum type is used to describe the behavior of an item with regard to filtering:
Enumerator | |
---|---|
Reject | |
Accept | |
AcceptDueToBeingParentOfAccepted |
Definition at line 189 of file qMRMLSortFilterSubjectHierarchyProxyModel.h.
|
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
Definition at line 90 of file qMRMLSortFilterSubjectHierarchyProxyModel.h.
|
readwrite |
Filter to show only items that contain any attribute given in
Definition at line 95 of file qMRMLSortFilterSubjectHierarchyProxyModel.h.
|
readwrite |
Filter to hide items that contain any of the given attributes with this name. Empty by default. When setting it, all the include filters are overwritten. Overrides
Definition at line 82 of file qMRMLSortFilterSubjectHierarchyProxyModel.h.
|
readwrite |
Filter to hide items for data nodes that contain any of the given attributes with this name. Empty by default. When setting it, all the include filters are overwritten. Overrides
Definition at line 86 of file qMRMLSortFilterSubjectHierarchyProxyModel.h.
|
readwrite |
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.
|
readwrite |
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 51 of file qMRMLSortFilterSubjectHierarchyProxyModel.h.
|
readwrite |
Filter to show only items that contain any of the given attributes with this name. Empty by default. When setting it, all the include filters are overwritten.
Definition at line 75 of file qMRMLSortFilterSubjectHierarchyProxyModel.h.
|
readwrite |
Filter to show only items for data nodes that contain any of the given attributes with this name. Empty by default. When setting it, all the include filters are overwritten.
Definition at line 78 of file qMRMLSortFilterSubjectHierarchyProxyModel.h.
|
readwrite |
Filter to show only items of a certain level (and their parents). If empty, then show all.
Definition at line 58 of file qMRMLSortFilterSubjectHierarchyProxyModel.h.
|
readwrite |
Filter to show only items that contain the string in their names. Empty by default.
Definition at line 48 of file qMRMLSortFilterSubjectHierarchyProxyModel.h.
|
readwrite |
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.
|
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 56 of file qMRMLSortFilterSubjectHierarchyProxyModel.h.
qMRMLSortFilterSubjectHierarchyProxyModel::qMRMLSortFilterSubjectHierarchyProxyModel | ( | QObject * | parent = nullptr | ) |
|
override |
Q_INVOKABLE int qMRMLSortFilterSubjectHierarchyProxyModel::acceptedItemCount | ( | vtkIdType | rootItemID = 0 | ) | const |
Determine the number of accepted (shown) items
rootItemID | Ancestor item of branch in which the accepted items are counted. If no item is given, then the scene item is used (all items) |
Q_INVOKABLE void qMRMLSortFilterSubjectHierarchyProxyModel::addItemAttributeFilter | ( | QString | attributeName, |
QVariant | attributeValue = QString() , |
||
bool | include = true |
||
) |
Add single item attribute filter specifying attribute name, value, include/exclude, and class name
attributeName | Name of the item attribute to filter |
attributeValue | Value of the item attribute to filter |
include | Flag indicating whether this is an include filter or exclude filter.
|
Q_INVOKABLE void qMRMLSortFilterSubjectHierarchyProxyModel::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
attributeName | Name of the node attribute to filter |
attributeValue | Value of the node attribute to filter |
include | Flag indicating whether this is an include filter or exclude filter.
|
className | Only filter attributes on a certain type. Empty by default (i.e. allow all classes) |
QString qMRMLSortFilterSubjectHierarchyProxyModel::attributeNameFilter | ( | ) | const |
QString qMRMLSortFilterSubjectHierarchyProxyModel::attributeValueFilter | ( | ) | const |
QStringList qMRMLSortFilterSubjectHierarchyProxyModel::excludeItemAttributeNamesFilter | ( | ) | const |
QStringList qMRMLSortFilterSubjectHierarchyProxyModel::excludeNodeAttributeNamesFilter | ( | ) | const |
|
protectedvirtual |
Filters items to decide which to display in the view.
|
override |
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
|
override |
QStringList qMRMLSortFilterSubjectHierarchyProxyModel::hideChildNodeTypes | ( | ) | const |
vtkIdType qMRMLSortFilterSubjectHierarchyProxyModel::hideItemsUnaffiliatedWithItemID | ( | ) | const |
QStringList qMRMLSortFilterSubjectHierarchyProxyModel::includeItemAttributeNamesFilter | ( | ) | const |
QStringList qMRMLSortFilterSubjectHierarchyProxyModel::includeNodeAttributeNamesFilter | ( | ) | const |
Q_INVOKABLE QModelIndex qMRMLSortFilterSubjectHierarchyProxyModel::indexFromSubjectHierarchyItem | ( | vtkIdType | itemID, |
int | column = 0 |
||
) | const |
Retrieve an index for a given a subject hierarchy item ID.
QStringList qMRMLSortFilterSubjectHierarchyProxyModel::levelFilter | ( | ) | const |
Q_INVOKABLE vtkMRMLScene* qMRMLSortFilterSubjectHierarchyProxyModel::mrmlScene | ( | ) | const |
QString qMRMLSortFilterSubjectHierarchyProxyModel::nameFilter | ( | ) | const |
QStringList qMRMLSortFilterSubjectHierarchyProxyModel::nodeTypes | ( | ) | const |
Q_INVOKABLE void qMRMLSortFilterSubjectHierarchyProxyModel::removeItemAttributeFilter | ( | QString | attributeName, |
QVariant | attributeValue, | ||
bool | include | ||
) |
Remove single item attribute filter specifying each attribute.
Q_INVOKABLE void qMRMLSortFilterSubjectHierarchyProxyModel::removeItemAttributeFilter | ( | QString | attributeName, |
bool | include | ||
) |
Remove all item attribute filters specifying a given attribute name and include flag.
Q_INVOKABLE void qMRMLSortFilterSubjectHierarchyProxyModel::removeNodeAttributeFilter | ( | QString | attributeName, |
QVariant | attributeValue, | ||
bool | include, | ||
QString | className | ||
) |
Remove single node attribute filter specifying each attribute.
Q_INVOKABLE void qMRMLSortFilterSubjectHierarchyProxyModel::removeNodeAttributeFilter | ( | QString | attributeName, |
bool | include | ||
) |
Remove all node attribute filters specifying a given attribute name and include flag.
|
slot |
|
slot |
|
slot |
|
slot |
|
slot |
void qMRMLSortFilterSubjectHierarchyProxyModel::setHideItemsUnaffiliatedWithItemID | ( | vtkIdType | itemID | ) |
|
slot |
|
slot |
|
slot |
|
slot |
|
slot |
void qMRMLSortFilterSubjectHierarchyProxyModel::setShowEmptyHierarchyItems | ( | bool | show | ) |
bool qMRMLSortFilterSubjectHierarchyProxyModel::showEmptyHierarchyItems | ( | ) | const |
|
protected |
Q_INVOKABLE vtkIdType qMRMLSortFilterSubjectHierarchyProxyModel::subjectHierarchyItemFromIndex | ( | const QModelIndex & | index | ) | const |
Retrieve the associated subject hierarchy item ID from a model index.
Q_INVOKABLE vtkMRMLSubjectHierarchyNode* qMRMLSortFilterSubjectHierarchyProxyModel::subjectHierarchyNode | ( | ) | const |
Q_INVOKABLE QModelIndex qMRMLSortFilterSubjectHierarchyProxyModel::subjectHierarchySceneIndex | ( | ) | const |
Retrieve the index of the MRML scene (the root item) in the subject hierarchy tree.
|
friend |
Definition at line 207 of file qMRMLSortFilterSubjectHierarchyProxyModel.h.
|
protected |
Definition at line 202 of file qMRMLSortFilterSubjectHierarchyProxyModel.h.