23 #ifndef __qMRMLSortFilterSubjectHierarchyProxyModel_h 24 #define __qMRMLSortFilterSubjectHierarchyProxyModel_h 27 #include "qSlicerSubjectHierarchyModuleWidgetsExport.h" 30 #include <QSortFilterProxyModel> 33 #include <ctkVTKObject.h> 36 class qMRMLSortFilterSubjectHierarchyProxyModelPrivate;
48 Q_PROPERTY(QString nameFilter READ nameFilter WRITE setNameFilter)
50 Q_PROPERTY(QString attributeNameFilter READ attributeNameFilter WRITE setAttributeNameFilter)
54 Q_PROPERTY(QString attributeValueFilter READ attributeValueFilter WRITE setAttributeValueFilter)
57 Q_PROPERTY(vtkIdType hideItemsUnaffiliatedWithItemID READ hideItemsUnaffiliatedWithItemID WRITE setHideItemsUnaffiliatedWithItemID)
60 Q_PROPERTY(QString levelFilter READ levelFilter WRITE setLevelFilter)
63 Q_PROPERTY(QStringList nodeTypes READ nodeTypes WRITE setNodeTypes)
72 Q_PROPERTY(QStringList hideChildNodeTypes READ hideChildNodeTypes WRITE setHideChildNodeTypes)
82 QString nameFilter()const;
83 QString attributeNameFilter()const;
84 QString attributeValueFilter()const;
85 QString levelFilter()const;
86 QStringList nodeTypes()const;
87 QStringList hideChildNodeTypes()const;
89 vtkIdType hideItemsUnaffiliatedWithItemID();
90 void setHideItemsUnaffiliatedWithItemID(vtkIdType itemID);
93 Q_INVOKABLE QModelIndex subjectHierarchySceneIndex()const;
96 Q_INVOKABLE vtkIdType subjectHierarchyItemFromIndex(const QModelIndex& index)const;
99 Q_INVOKABLE QModelIndex indexFromSubjectHierarchyItem(vtkIdType itemID,
int column=0)const;
103 Q_INVOKABLE
int acceptedItemCount(vtkIdType rootItemID)const;
108 virtual
bool filterAcceptsRow(
int sourceRow, const QModelIndex &sourceParent)const;
111 virtual
bool filterAcceptsItem(vtkIdType itemID,
bool canAcceptIfAnyChildIsAccepted=true)const;
113 virtual Qt::ItemFlags flags(const QModelIndex & index)const;
116 void setNameFilter(QString filter);
117 void setAttributeNameFilter(QString filter);
118 void setAttributeValueFilter(QString filter);
119 void setLevelFilter(QString filter);
120 void setNodeTypes(const QStringList& types);
121 void setHideChildNodeTypes(const QStringList& types);
125 QStandardItem* sourceItem(const QModelIndex& index)const;
128 QScopedPointer<qMRMLSortFilterSubjectHierarchyProxyModelPrivate> d_ptr;
MRML node to represent a complete subject hierarchy tree.
A set of MRML Nodes that supports serialization and undo/redo.
QSortFilterProxyModel Superclass