Public Slots | Signals | Public Member Functions | List of all members
pqCustomFilterManagerModel Class Reference

The pqCustomFilterManagerModel class stores the list of registered pipeline custom filter definitions. More...

#include <pqCustomFilterManagerModel.h>

Inherits QAbstractListModel.

Public Slots

void addCustomFilter (QString name)
 Adds a new custom filter definition to the model. More...
 
void removeCustomFilter (QString name)
 Removes a custom filter definition from the model. More...
 
void importCustomFiltersFromSettings ()
 Save/Load custom filters from pqSettings. More...
 
void exportCustomFiltersToSettings ()
 

Signals

void customFilterAdded (const QString &name)
 Emitted when a new custom filter definition is added to the model. More...
 

Public Member Functions

 pqCustomFilterManagerModel (QObject *parent=0)
 
 ~pqCustomFilterManagerModel () override
 
QAbstractItemModel Methods
int rowCount (const QModelIndex &parent=QModelIndex()) const override
 Gets the number of rows for a given index. More...
 
QModelIndex index (int row, int column, const QModelIndex &parent=QModelIndex()) const override
 Gets a model index for a given location. More...
 
QVariant data (const QModelIndex &index, int role=Qt::DisplayRole) const override
 Gets the data for a given model index. More...
 
Qt::ItemFlags flags (const QModelIndex &index) const override
 Gets the flags for a given model index. More...
 
Index Mapping Methods
QString getCustomFilterName (const QModelIndex &index) const
 Gets the custom filter name for the given model index. More...
 
QModelIndex getIndexFor (const QString &filter) const
 Gets the model index for the given custom filter name. More...
 

Detailed Description

The pqCustomFilterManagerModel class stores the list of registered pipeline custom filter definitions.

The list is modified using the addCustomFilter and removeCustomFilter methods. When a new custom filter is added to the model a signal is emitted. This signal can be used to highlight the new custom filter.

Definition at line 58 of file pqCustomFilterManagerModel.h.

Constructor & Destructor Documentation

◆ pqCustomFilterManagerModel()

pqCustomFilterManagerModel::pqCustomFilterManagerModel ( QObject *  parent = 0)

◆ ~pqCustomFilterManagerModel()

pqCustomFilterManagerModel::~pqCustomFilterManagerModel ( )
override

Member Function Documentation

◆ rowCount()

int pqCustomFilterManagerModel::rowCount ( const QModelIndex &  parent = QModelIndex()) const
override

Gets the number of rows for a given index.

Parameters
parentThe parent index.
Returns
The number of rows for the given index.

◆ index()

QModelIndex pqCustomFilterManagerModel::index ( int  row,
int  column,
const QModelIndex &  parent = QModelIndex() 
) const
override

Gets a model index for a given location.

Parameters
rowThe row number.
columnThe column number.
parentThe parent index.
Returns
A model index for the given location.

◆ data()

QVariant pqCustomFilterManagerModel::data ( const QModelIndex &  index,
int  role = Qt::DisplayRole 
) const
override

Gets the data for a given model index.

Parameters
indexThe model index.
roleThe role to get data for.
Returns
The data for the given model index.

◆ flags()

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

Gets the flags for a given model index.

The flags for an item indicate if it is enabled, editable, etc.

Parameters
indexThe model index.
Returns
The flags for the given model index.

◆ getCustomFilterName()

QString pqCustomFilterManagerModel::getCustomFilterName ( const QModelIndex &  index) const

Gets the custom filter name for the given model index.

Parameters
indexThe model index to look up.
Returns
The custom filter definition name or an empty string.

◆ getIndexFor()

QModelIndex pqCustomFilterManagerModel::getIndexFor ( const QString &  filter) const

Gets the model index for the given custom filter name.

Parameters
filterThe custom filter definition name to look up.
Returns
The model index for the given name.

◆ addCustomFilter

void pqCustomFilterManagerModel::addCustomFilter ( QString  name)
slot

Adds a new custom filter definition to the model.

Parameters
nameThe name of the new custom filter definition.

◆ removeCustomFilter

void pqCustomFilterManagerModel::removeCustomFilter ( QString  name)
slot

Removes a custom filter definition from the model.

Parameters
nameThe name of the custom filter definition.

◆ importCustomFiltersFromSettings

void pqCustomFilterManagerModel::importCustomFiltersFromSettings ( )
slot

Save/Load custom filters from pqSettings.

◆ exportCustomFiltersToSettings

void pqCustomFilterManagerModel::exportCustomFiltersToSettings ( )
slot

◆ customFilterAdded

void pqCustomFilterManagerModel::customFilterAdded ( const QString &  name)
signal

Emitted when a new custom filter definition is added to the model.

Parameters
nameThe name of the new custom filter definition.

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