21#ifndef __qMRMLSortFilterSegmentsProxyModel_h
22#define __qMRMLSortFilterSegmentsProxyModel_h
25#include "qSlicerSegmentationsModuleWidgetsExport.h"
28#include <QSortFilterProxyModel>
31#include <ctkVTKObject.h>
34class qMRMLSortFilterSegmentsProxyModelPrivate;
89 Qt::ItemFlags
flags(const QModelIndex & index)const override;
111 QScopedPointer<qMRMLSortFilterSegmentsProxyModelPrivate>
d_ptr;
Q_INVOKABLE vtkMRMLSegmentationNode * segmentationNode() const
Returns the segmentation node in the source model.
Q_INVOKABLE QModelIndex indexFromSegmentID(QString segmentID, int column=0) const
Retrieve an index for a given a segment ID.
qMRMLSortFilterSegmentsProxyModel(QObject *parent=nullptr)
void setNameFilter(QString filter)
Q_INVOKABLE bool showStatus(int status) const
QVTK_OBJECTbool filterEnabled
Whether the filter should be applied.
bool filterAcceptsRow(int sourceRow, const QModelIndex &sourceParent) const override
QStandardItem * sourceItem(const QModelIndex &index) const
Q_INVOKABLE QStringList hideSegments() const
Q_INVOKABLE void setShowStatus(int status, bool shown)
QString nameFilter
Filter to show only items that contain the string in their names. Empty by default.
virtual bool filterAcceptsItem(QString segmentID) const
Filters items to decide which to display in the view.
void setTextFilter(QString filter)
Qt::ItemFlags flags(const QModelIndex &index) const override
Returns the flags for the current index.
QScopedPointer< qMRMLSortFilterSegmentsProxyModelPrivate > d_ptr
void setFilterEnabled(bool filterEnabled)
Q_INVOKABLE QString segmentIDFromIndex(const QModelIndex &index) const
Retrieve the associated segment ID from a model index.
QSortFilterProxyModel Superclass
Q_INVOKABLE void setHideSegments(const QStringList &segmentIDs)
QString textFilter
Filter to show only items that contain the string in their names or within tag values....
A set of MRML Nodes that supports serialization and undo/redo.
MRML node containing segmentations.