ParaView
Public Types | Public Member Functions | List of all members
pqCustomFilterDefinitionModel Class Reference

The pqCustomFilterDefinitionModel class stores the sources that define a compound proxy in a hierarchical format. More...

#include <pqCustomFilterDefinitionModel.h>

Inherits QAbstractItemModel.

Public Types

enum  ItemType {
  Invalid = -1, Source = 0, Filter, CustomFilter,
  Link, LastType = Link
}
 

Public Member Functions

 pqCustomFilterDefinitionModel (QObject *parent=0)
 
virtual ~pqCustomFilterDefinitionModel ()
 
void setContents (const pqProxySelection &items)
 Sets the contents of the custom filter definition model. More...
 
QModelIndex getNextIndex (const QModelIndex &index) const
 Gets the next index in the model's tree hierarchy. More...
 
pqPipelineSourcegetSourceFor (const QModelIndex &index) const
 Gets the source associated with an index. More...
 
QAbstractItemModel Methods
virtual int rowCount (const QModelIndex &parent=QModelIndex()) const
 Gets the number of rows for a given index. More...
 
virtual int columnCount (const QModelIndex &parent=QModelIndex()) const
 Gets the number of columns for a given index. More...
 
virtual bool hasChildren (const QModelIndex &parent=QModelIndex()) const
 Gets whether or not the given index has child items. More...
 
virtual QModelIndex index (int row, int column, const QModelIndex &parent=QModelIndex()) const
 Gets a model index for a given location. More...
 
virtual QModelIndex parent (const QModelIndex &index) const
 Gets the parent for a given index. More...
 
virtual QVariant data (const QModelIndex &index, int role=Qt::DisplayRole) const
 Gets the data for a given model index. More...
 
virtual Qt::ItemFlags flags (const QModelIndex &index) const
 Gets the flags for a given model index. More...
 

Detailed Description

The pqCustomFilterDefinitionModel class stores the sources that define a compound proxy in a hierarchical format.

The hierarchical format is similar to the pqPipelineModel. The custom filter definition model contains only sources. It does not include any server objects, since the custom filter must be defined on one server.

Definition at line 59 of file pqCustomFilterDefinitionModel.h.

Member Enumeration Documentation

§ ItemType

Enumerator
Invalid 
Source 
Filter 
CustomFilter 
Link 
LastType 

Definition at line 62 of file pqCustomFilterDefinitionModel.h.

Constructor & Destructor Documentation

§ pqCustomFilterDefinitionModel()

pqCustomFilterDefinitionModel::pqCustomFilterDefinitionModel ( QObject *  parent = 0)

§ ~pqCustomFilterDefinitionModel()

virtual pqCustomFilterDefinitionModel::~pqCustomFilterDefinitionModel ( )
virtual

Member Function Documentation

§ rowCount()

virtual int pqCustomFilterDefinitionModel::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.

§ columnCount()

virtual int pqCustomFilterDefinitionModel::columnCount ( const QModelIndex &  parent = QModelIndex()) const
virtual

Gets the number of columns for a given index.

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

§ hasChildren()

virtual bool pqCustomFilterDefinitionModel::hasChildren ( const QModelIndex &  parent = QModelIndex()) const
virtual

Gets whether or not the given index has child items.

Parameters
parentThe parent index.
Returns
True if the given index has child items.

§ index()

virtual QModelIndex pqCustomFilterDefinitionModel::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.

§ parent()

virtual QModelIndex pqCustomFilterDefinitionModel::parent ( const QModelIndex &  index) const
virtual

Gets the parent for a given index.

Parameters
indexThe model index.
Returns
A model index for the parent of the given index.

§ data()

virtual QVariant pqCustomFilterDefinitionModel::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.

§ flags()

virtual Qt::ItemFlags pqCustomFilterDefinitionModel::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.

§ setContents()

void pqCustomFilterDefinitionModel::setContents ( const pqProxySelection items)

Sets the contents of the custom filter definition model.

The items are added to the custom filter definition model in a hierarchy similar to the pipeline model. Only the items in the list are added to the hierarchy.

Parameters
itemsThe list of selected model items.

§ getNextIndex()

QModelIndex pqCustomFilterDefinitionModel::getNextIndex ( const QModelIndex &  index) const

Gets the next index in the model's tree hierarchy.

Parameters
indexThe current model index.
Returns
A model index for the next item in the hierarchy.

§ getSourceFor()

pqPipelineSource* pqCustomFilterDefinitionModel::getSourceFor ( const QModelIndex &  index) const

Gets the source associated with an index.

Parameters
indexThe model index to look up.
Returns
A pointer to the source object or null if there is none.

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