21 #ifndef __qMRMLSortFilterSegmentsProxyModel_h 22 #define __qMRMLSortFilterSegmentsProxyModel_h 25 #include "qSlicerSegmentationsModuleWidgetsExport.h" 28 #include <QSortFilterProxyModel> 31 #include <ctkVTKObject.h> 34 class qMRMLSortFilterSegmentsProxyModelPrivate;
46 Q_PROPERTY(
bool filterEnabled READ filterEnabled WRITE setFilterEnabled)
48 Q_PROPERTY(QString nameFilter READ nameFilter WRITE setNameFilter)
50 Q_PROPERTY(QString textFilter READ textFilter WRITE setTextFilter)
62 Q_INVOKABLE
void setHideSegments(const QStringList& segmentIDs);
63 Q_INVOKABLE QStringList hideSegments()const;
65 bool filterEnabled()const;
66 QString nameFilter()const;
67 QString textFilter()const;
73 Q_INVOKABLE
bool showStatus(
int status) const;
76 Q_INVOKABLE QString segmentIDFromIndex(const QModelIndex& index)const;
79 Q_INVOKABLE QModelIndex indexFromSegmentID(QString segmentID,
int column=0)const;
84 bool filterAcceptsRow(
int sourceRow, const QModelIndex &sourceParent)const override;
87 virtual
bool filterAcceptsItem(QString segmentID)const;
90 Qt::ItemFlags flags(const QModelIndex & index)const override;
96 Q_INVOKABLE
void setShowStatus(
int status,
bool shown);
99 void setFilterEnabled(
bool filterEnabled);
100 void setNameFilter(QString filter);
101 void setTextFilter(QString filter);
106 void filterModified();
109 QStandardItem* sourceItem(const QModelIndex& index)const;
112 QScopedPointer<qMRMLSortFilterSegmentsProxyModelPrivate> d_ptr;
QSortFilterProxyModel Superclass
A set of MRML Nodes that supports serialization and undo/redo.
MRML node containing segmentationsSegmentation node stores a set of segments (also known as contours ...