ParaView
Public Types | Public Member Functions
pqCustomFilterDefinitionModel Class Reference

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

#include <pqCustomFilterDefinitionModel.h>

List of all members.

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.
QModelIndex getNextIndex (const QModelIndex &index) const
 Gets the next index in the model's tree hierarchy.
pqPipelineSourcegetSourceFor (const QModelIndex &index) const
 Gets the source associated with an index.
QAbstractItemModel Methods
virtual int rowCount (const QModelIndex &parent=QModelIndex()) const
 Gets the number of rows for a given index.
virtual int columnCount (const QModelIndex &parent=QModelIndex()) const
 Gets the number of columns for a given index.
virtual bool hasChildren (const QModelIndex &parent=QModelIndex()) const
 Gets whether or not the given index has child items.
virtual QModelIndex index (int row, int column, const QModelIndex &parent=QModelIndex()) const
 Gets a model index for a given location.
virtual QModelIndex parent (const QModelIndex &index) const
 Gets the parent for a given index.
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.

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

Enumerator:
Invalid 
Source 
Filter 
CustomFilter 
Link 
LastType 

Definition at line 62 of file pqCustomFilterDefinitionModel.h.


Constructor & Destructor Documentation

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

Member Function Documentation

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.
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.
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.
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.
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.
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.
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.
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.
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.
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: