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)
70 QString nameFilter()const;
71 QString attributeNameFilter()const;
72 QString attributeValueFilter()const;
73 QString levelFilter()const;
75 vtkIdType hideItemsUnaffiliatedWithItemID();
76 void setHideItemsUnaffiliatedWithItemID(vtkIdType itemID);
79 Q_INVOKABLE QModelIndex subjectHierarchySceneIndex()const;
82 Q_INVOKABLE vtkIdType subjectHierarchyItemFromIndex(const QModelIndex& index)const;
85 Q_INVOKABLE QModelIndex indexFromSubjectHierarchyItem(vtkIdType itemID,
int column=0)const;
89 Q_INVOKABLE
int acceptedItemCount(vtkIdType rootItemID)const;
94 virtual
bool filterAcceptsRow(
int sourceRow, const QModelIndex &sourceParent)const;
97 virtual
bool filterAcceptsItem(vtkIdType itemID,
bool canAcceptIfAnyChildIsAccepted=true)const;
99 virtual Qt::ItemFlags flags(const QModelIndex & index)const;
102 void setNameFilter(QString filter);
103 void setAttributeNameFilter(QString filter);
104 void setAttributeValueFilter(QString filter);
105 void setLevelFilter(QString filter);
109 QStandardItem* sourceItem(const QModelIndex& index)const;
112 QScopedPointer<qMRMLSortFilterSubjectHierarchyProxyModelPrivate> d_ptr;
115 Q_DECLARE_PRIVATE(qMRMLSortFilterSubjectHierarchyProxyModel);
116 Q_DISABLE_COPY(qMRMLSortFilterSubjectHierarchyProxyModel);
MRML node to represent a complete subject hierarchy tree.
A set of MRML Nodes that supports serialization and undo/redo.
QSortFilterProxyModel Superclass