Slicer  5.0
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
List of all members | Public Types | Properties | Public Slots | Signals | Public Member Functions | Protected Member Functions | Protected Attributes
qMRMLSortFilterSegmentsProxyModel Class Reference

#include <Modules/Loadable/Segmentations/Widgets/qMRMLSortFilterSegmentsProxyModel.h>

Inheritance diagram for qMRMLSortFilterSegmentsProxyModel:
Inheritance graph
[legend]
Collaboration diagram for qMRMLSortFilterSegmentsProxyModel:
Collaboration graph
[legend]

Public Types

typedef QSortFilterProxyModel Superclass
 

Properties

bool filterEnabled
 Whether the filter should be applied. More...
 
QString nameFilter
 Filter to show only items that contain the string in their names. Empty by default. More...
 
QString textFilter
 Filter to show only items that contain the string in their names or within tag values. Empty by default. More...
 

Public Slots

void setFilterEnabled (bool filterEnabled)
 
void setNameFilter (QString filter)
 
void setTextFilter (QString filter)
 

Signals

void filterModified ()
 

Public Member Functions

virtual bool filterAcceptsItem (QString segmentID) const
 Filters items to decide which to display in the view. More...
 
bool filterAcceptsRow (int sourceRow, const QModelIndex &sourceParent) const override
 
bool filterEnabled () const
 
Qt::ItemFlags flags (const QModelIndex &index) const override
 Returns the flags for the current index. More...
 
Q_INVOKABLE QStringList hideSegments () const
 
Q_INVOKABLE QModelIndex indexFromSegmentID (QString segmentID, int column=0) const
 Retrieve an index for a given a segment ID. More...
 
QString nameFilter () const
 
 qMRMLSortFilterSegmentsProxyModel (QObject *parent=nullptr)
 
Q_INVOKABLE vtkMRMLSegmentationNodesegmentationNode () const
 Returns the segmentation node in the source model. More...
 
Q_INVOKABLE QString segmentIDFromIndex (const QModelIndex &index) const
 Retrieve the associated segment ID from a model index. More...
 
Q_INVOKABLE void setHideSegments (const QStringList &segmentIDs)
 
Q_INVOKABLE void setShowStatus (int status, bool shown)
 
Q_INVOKABLE bool showStatus (int status) const
 
QString textFilter () const
 
 ~qMRMLSortFilterSegmentsProxyModel () override
 

Protected Member Functions

QStandardItem * sourceItem (const QModelIndex &index) const
 

Protected Attributes

QScopedPointer< qMRMLSortFilterSegmentsProxyModelPrivate > d_ptr
 

Detailed Description

Definition at line 40 of file qMRMLSortFilterSegmentsProxyModel.h.

Member Typedef Documentation

◆ Superclass

typedef QSortFilterProxyModel qMRMLSortFilterSegmentsProxyModel::Superclass

Definition at line 53 of file qMRMLSortFilterSegmentsProxyModel.h.

Property Documentation

◆ filterEnabled

bool qMRMLSortFilterSegmentsProxyModel::filterEnabled
readwrite

Whether the filter should be applied.

Definition at line 46 of file qMRMLSortFilterSegmentsProxyModel.h.

◆ nameFilter

QString qMRMLSortFilterSegmentsProxyModel::nameFilter
readwrite

Filter to show only items that contain the string in their names. Empty by default.

Definition at line 48 of file qMRMLSortFilterSegmentsProxyModel.h.

◆ textFilter

QString qMRMLSortFilterSegmentsProxyModel::textFilter
readwrite

Filter to show only items that contain the string in their names or within tag values. Empty by default.

Definition at line 50 of file qMRMLSortFilterSegmentsProxyModel.h.

Constructor & Destructor Documentation

◆ qMRMLSortFilterSegmentsProxyModel()

qMRMLSortFilterSegmentsProxyModel::qMRMLSortFilterSegmentsProxyModel ( QObject *  parent = nullptr)

◆ ~qMRMLSortFilterSegmentsProxyModel()

qMRMLSortFilterSegmentsProxyModel::~qMRMLSortFilterSegmentsProxyModel ( )
override

Member Function Documentation

◆ filterAcceptsItem()

virtual bool qMRMLSortFilterSegmentsProxyModel::filterAcceptsItem ( QString  segmentID) const
virtual

Filters items to decide which to display in the view.

◆ filterAcceptsRow()

bool qMRMLSortFilterSegmentsProxyModel::filterAcceptsRow ( int  sourceRow,
const QModelIndex &  sourceParent 
) const
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 tests each item via filterAcceptsItem

◆ filterEnabled()

bool qMRMLSortFilterSegmentsProxyModel::filterEnabled ( ) const

◆ filterModified

void qMRMLSortFilterSegmentsProxyModel::filterModified ( )
signal

Emitted when one of the filter parameters are modified

See also
setShowStatus setTextFilter setNameFilter

◆ flags()

Qt::ItemFlags qMRMLSortFilterSegmentsProxyModel::flags ( const QModelIndex &  index) const
override

Returns the flags for the current index.

◆ hideSegments()

Q_INVOKABLE QStringList qMRMLSortFilterSegmentsProxyModel::hideSegments ( ) const

◆ indexFromSegmentID()

Q_INVOKABLE QModelIndex qMRMLSortFilterSegmentsProxyModel::indexFromSegmentID ( QString  segmentID,
int  column = 0 
) const

Retrieve an index for a given a segment ID.

◆ nameFilter()

QString qMRMLSortFilterSegmentsProxyModel::nameFilter ( ) const

◆ segmentationNode()

Q_INVOKABLE vtkMRMLSegmentationNode* qMRMLSortFilterSegmentsProxyModel::segmentationNode ( ) const

Returns the segmentation node in the source model.

◆ segmentIDFromIndex()

Q_INVOKABLE QString qMRMLSortFilterSegmentsProxyModel::segmentIDFromIndex ( const QModelIndex &  index) const

Retrieve the associated segment ID from a model index.

◆ setFilterEnabled

void qMRMLSortFilterSegmentsProxyModel::setFilterEnabled ( bool  filterEnabled)
slot

◆ setHideSegments()

Q_INVOKABLE void qMRMLSortFilterSegmentsProxyModel::setHideSegments ( const QStringList &  segmentIDs)

Segments that have their ID listed in hideSegments are not shown in the table.

◆ setNameFilter

void qMRMLSortFilterSegmentsProxyModel::setNameFilter ( QString  filter)
slot

◆ setShowStatus()

Q_INVOKABLE void qMRMLSortFilterSegmentsProxyModel::setShowStatus ( int  status,
bool  shown 
)

Set filter to show segments with the specified state If the flags for all states are false, than no filtering is performed The list of available status is in vtkSlicerSegmentationsModuleLogic::SegmentStatus

See also
showStatus

◆ setTextFilter

void qMRMLSortFilterSegmentsProxyModel::setTextFilter ( QString  filter)
slot

◆ showStatus()

Q_INVOKABLE bool qMRMLSortFilterSegmentsProxyModel::showStatus ( int  status) const

Filter to show segments with the specified state If the flags for all states are false, than no filtering is performed The list of available status is in vtkSlicerSegmentationsModuleLogic::SegmentStatus

See also
setShowStatus

◆ sourceItem()

QStandardItem* qMRMLSortFilterSegmentsProxyModel::sourceItem ( const QModelIndex &  index) const
protected

◆ textFilter()

QString qMRMLSortFilterSegmentsProxyModel::textFilter ( ) const

Member Data Documentation

◆ d_ptr

QScopedPointer<qMRMLSortFilterSegmentsProxyModelPrivate> qMRMLSortFilterSegmentsProxyModel::d_ptr
protected

Definition at line 112 of file qMRMLSortFilterSegmentsProxyModel.h.


The documentation for this class was generated from the following file: