ParaView
Public Slots | Signals | Public Member Functions
pqCustomFilterManagerModel Class Reference

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

#include <pqCustomFilterManagerModel.h>

List of all members.

Public Slots

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

Signals

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

Public Member Functions

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

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 56 of file pqCustomFilterManagerModel.h.


Constructor & Destructor Documentation

pqCustomFilterManagerModel::pqCustomFilterManagerModel ( QObject *  parent = 0)
virtual pqCustomFilterManagerModel::~pqCustomFilterManagerModel ( ) [virtual]

Member Function Documentation

virtual int pqCustomFilterManagerModel::rowCount ( const QModelIndex &  parent = QModelIndex()) const [virtual]

Gets the number of rows for a given index.

Parameters:
parentThe parent index.
Returns:
The number of rows for the given index.
virtual QModelIndex pqCustomFilterManagerModel::index ( int  row,
int  column,
const QModelIndex &  parent = QModelIndex() 
) const [virtual]

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.
virtual QVariant pqCustomFilterManagerModel::data ( const QModelIndex &  index,
int  role = Qt::DisplayRole 
) const [virtual]

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.
virtual Qt::ItemFlags pqCustomFilterManagerModel::flags ( const QModelIndex &  index) const [virtual]

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.
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.
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.
void pqCustomFilterManagerModel::addCustomFilter ( QString  name) [slot]

Adds a new custom filter definition to the model.

Parameters:
nameThe name of the new custom filter definition.
void pqCustomFilterManagerModel::removeCustomFilter ( QString  name) [slot]

Removes a custom filter definition from the model.

Parameters:
nameThe name of the custom filter definition.
void pqCustomFilterManagerModel::importCustomFiltersFromSettings ( ) [slot]

Save/Load custom filters from pqSettings.

void pqCustomFilterManagerModel::exportCustomFiltersToSettings ( ) [slot]
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: