ParaView
Public Slots | Signals | Public Member Functions | Protected Slots | Properties | List of all members
pqProxySILModel Class Reference

pqProxySILModel is a proxy model for pqSILModel. More...

#include <pqProxySILModel.h>

Inherits QAbstractProxyModel.

Public Slots

void setValues (const QList< QVariant > &)
 Set the status values for the hierarchy. More...
 
void toggleRootCheckState ()
 Convenience slot to toggle the check state of the entire subtree shown by this model. More...
 

Signals

void valuesChanged ()
 

Public Member Functions

 pqProxySILModel (const QString &hierarchyName, QObject *parent=0)
 
 ~pqProxySILModel ()
 
virtual QModelIndex mapFromSource (const QModelIndex &sourceIndex) const
 Methods from QAbstractProxyModel. More...
 
virtual QModelIndex mapToSource (const QModelIndex &proxyIndex) const
 
virtual void setSourceModel (QAbstractItemModel *sourceModel)
 
virtual QVariant headerData (int, Qt::Orientation, int role=Qt::DisplayRole) const
 Overridden to return the same name as the hierarchy. More...
 
virtual QVariant data (const QModelIndex &proxyIndex, int role=Qt::DisplayRole) const
 Overridden to provide a means of turning off checkboxes. More...
 
virtual Qt::ItemFlags flags (const QModelIndex &index) const
 overridden to allow us to turn off checkboxes in the flags returned from the model More...
 
QList< QVariant > values () const
 Get the status values for the hierarchy. More...
 
void setNoCheckBoxes (bool val)
 Checkboxes for each item can be disabled by setting this flag. More...
 
void setHeaderTitle (QString &title)
 Override the display of the title in the header with this string. More...
 
QAbstractItemModel Methods
virtual int rowCount (const QModelIndex &theParent=QModelIndex()) const
 Gets the number of rows for a given index. More...
 
virtual int columnCount (const QModelIndex &theParent=QModelIndex()) const
 Gets the number of columns for a given index. More...
 
virtual bool hasChildren (const QModelIndex &theParent=QModelIndex()) const
 Gets whether or not the given index has child items. More...
 
virtual QModelIndex index (int row, int column, const QModelIndex &theParent=QModelIndex()) const
 Gets a model index for a given location. More...
 
virtual QModelIndex parent (const QModelIndex &theIndex) const
 Gets the parent for a given index. More...
 
bool setData (const QModelIndex &theIndex, const QVariant &value, int role=Qt::EditRole)
 Sets the role data for the item at index to value. More...
 

Protected Slots

void sourceDataChanged (const QModelIndex &idx1, const QModelIndex &idx2)
 
void onCheckStatusChanged ()
 

Properties

QList< QVariant > values
 

Detailed Description

pqProxySILModel is a proxy model for pqSILModel.

This makes it possible for tree views to show only a sub-tree in the SIL. This also provides API to get/set status values which is useful for property linking using pqPropertyManager or pqPropertyLinks.

Definition at line 47 of file pqProxySILModel.h.

Constructor & Destructor Documentation

◆ pqProxySILModel()

pqProxySILModel::pqProxySILModel ( const QString &  hierarchyName,
QObject *  parent = 0 
)

◆ ~pqProxySILModel()

pqProxySILModel::~pqProxySILModel ( )

Member Function Documentation

◆ rowCount()

virtual int pqProxySILModel::rowCount ( const QModelIndex &  theParent = QModelIndex()) const
inlinevirtual

Gets the number of rows for a given index.

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

Definition at line 68 of file pqProxySILModel.h.

◆ columnCount()

virtual int pqProxySILModel::columnCount ( const QModelIndex &  theParent = QModelIndex()) const
inlinevirtual

Gets the number of columns for a given index.

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

Definition at line 80 of file pqProxySILModel.h.

◆ hasChildren()

virtual bool pqProxySILModel::hasChildren ( const QModelIndex &  theParent = QModelIndex()) const
inlinevirtual

Gets whether or not the given index has child items.

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

Definition at line 92 of file pqProxySILModel.h.

◆ index()

virtual QModelIndex pqProxySILModel::index ( int  row,
int  column,
const QModelIndex &  theParent = QModelIndex() 
) const
inlinevirtual

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.

Definition at line 106 of file pqProxySILModel.h.

◆ parent()

virtual QModelIndex pqProxySILModel::parent ( const QModelIndex &  theIndex) const
inlinevirtual

Gets the parent for a given index.

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

Definition at line 119 of file pqProxySILModel.h.

◆ setData()

bool pqProxySILModel::setData ( const QModelIndex &  theIndex,
const QVariant &  value,
int  role = Qt::EditRole 
)
inline

Sets the role data for the item at index to value.

Returns true if successful; otherwise returns false.

Definition at line 130 of file pqProxySILModel.h.

◆ mapFromSource()

virtual QModelIndex pqProxySILModel::mapFromSource ( const QModelIndex &  sourceIndex) const
virtual

Methods from QAbstractProxyModel.

◆ mapToSource()

virtual QModelIndex pqProxySILModel::mapToSource ( const QModelIndex &  proxyIndex) const
virtual

◆ setSourceModel()

virtual void pqProxySILModel::setSourceModel ( QAbstractItemModel *  sourceModel)
virtual

◆ headerData()

virtual QVariant pqProxySILModel::headerData ( int  ,
Qt::Orientation  ,
int  role = Qt::DisplayRole 
) const
virtual

Overridden to return the same name as the hierarchy.

Also returns a DecorationRole icon which can show the check state of the root node. Connect the header's sectionClicked() signal to toggleRootCheckState() to support affecting the check state using the header.

◆ data()

virtual QVariant pqProxySILModel::data ( const QModelIndex &  proxyIndex,
int  role = Qt::DisplayRole 
) const
virtual

Overridden to provide a means of turning off checkboxes.

◆ flags()

virtual Qt::ItemFlags pqProxySILModel::flags ( const QModelIndex &  index) const
virtual

overridden to allow us to turn off checkboxes in the flags returned from the model

◆ values()

QList<QVariant> pqProxySILModel::values ( ) const

Get the status values for the hierarchy.

◆ setNoCheckBoxes()

void pqProxySILModel::setNoCheckBoxes ( bool  val)

Checkboxes for each item can be disabled by setting this flag.

◆ setHeaderTitle()

void pqProxySILModel::setHeaderTitle ( QString &  title)

Override the display of the title in the header with this string.

◆ setValues

void pqProxySILModel::setValues ( const QList< QVariant > &  )
slot

Set the status values for the hierarchy.

◆ toggleRootCheckState

void pqProxySILModel::toggleRootCheckState ( )
slot

Convenience slot to toggle the check state of the entire subtree shown by this model.

◆ valuesChanged

void pqProxySILModel::valuesChanged ( )
signal

◆ sourceDataChanged

void pqProxySILModel::sourceDataChanged ( const QModelIndex &  idx1,
const QModelIndex &  idx2 
)
inlineprotectedslot

Definition at line 194 of file pqProxySILModel.h.

◆ onCheckStatusChanged

void pqProxySILModel::onCheckStatusChanged ( )
protectedslot

Property Documentation

◆ values

QList<QVariant> pqProxySILModel::values
readwrite

Definition at line 51 of file pqProxySILModel.h.


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