Signals | Public Member Functions | Protected Member Functions | Properties | List of all members
pqSubsetInclusionLatticeTreeModel Class Reference

Tree model using a vtkSubsetInclusionLattice. More...

#include <pqSubsetInclusionLatticeTreeModel.h>

Inherits QAbstractItemModel.

Signals

void selectionModified ()
 

Public Member Functions

 pqSubsetInclusionLatticeTreeModel (QObject *parent=nullptr)
 
virtual ~pqSubsetInclusionLatticeTreeModel ()
 
QList< QVariant > selection () const
 Returns the list of nodes that were selected. More...
 
void setSelection (const QList< QVariant > &sel)
 
void setSubsetInclusionLattice (vtkSubsetInclusionLattice *sil)
 Get/Set the vtkSubsetInclusionLattice. More...
 
vtkSubsetInclusionLatticesubsetInclusionLattice () const
 Get/Set the vtkSubsetInclusionLattice. More...
 
int columnCount (const QModelIndex &parent=QModelIndex()) const override
 QAbstractItemModel interface implementation. More...
 
int rowCount (const QModelIndex &parent=QModelIndex()) const override
 QAbstractItemModel interface implementation. More...
 
QModelIndex index (int row, int column, const QModelIndex &parent=QModelIndex()) const override
 QAbstractItemModel interface implementation. More...
 
QModelIndex parent (const QModelIndex &index=QModelIndex()) const override
 QAbstractItemModel interface implementation. More...
 
QVariant data (const QModelIndex &index, int role) const override
 QAbstractItemModel interface implementation. More...
 
Qt::ItemFlags flags (const QModelIndex &index) const override
 QAbstractItemModel interface implementation. More...
 
bool setData (const QModelIndex &index, const QVariant &value, int role) override
 QAbstractItemModel interface implementation. More...
 

Protected Member Functions

void silSelectionModified (vtkObject *, unsigned long, void *)
 
void silStructureModified ()
 
QModelIndex indexForNode (int node) const
 

Properties

QList< QVariant > selection
 

Detailed Description

Tree model using a vtkSubsetInclusionLattice.

pqSubsetInclusionLatticeTreeModel is QAbstractItemModel implementation for vtkSubsetInclusionLattice. It exposes a tree-model using parent-child relationships defined among vtkSubsetInclusionLattice nodes. Cross links are ignored.

pqSubsetInclusionLatticeTreeModel is given a vtkSubsetInclusionLattice to model itself after. Since vtkSubsetInclusionLattice provides API to track and update selection states, this class simply uses vtkSubsetInclusionLattice to store it. However, to avoid modifying the instance passed in to setSubsetInclusionLattice, this class creates an internal deep copy and uses that to modify and track selection states.

Note
pqSubsetInclusionLatticeTreeModel will eventually replace pqSILModel after all readers have been updated to use vtkSubsetInclusionLattice rather that the vtkGraph-based SIL.

Definition at line 63 of file pqSubsetInclusionLatticeTreeModel.h.

Constructor & Destructor Documentation

◆ pqSubsetInclusionLatticeTreeModel()

pqSubsetInclusionLatticeTreeModel::pqSubsetInclusionLatticeTreeModel ( QObject *  parent = nullptr)

◆ ~pqSubsetInclusionLatticeTreeModel()

virtual pqSubsetInclusionLatticeTreeModel::~pqSubsetInclusionLatticeTreeModel ( )
virtual

Member Function Documentation

◆ setSubsetInclusionLattice()

void pqSubsetInclusionLatticeTreeModel::setSubsetInclusionLattice ( vtkSubsetInclusionLattice sil)

Get/Set the vtkSubsetInclusionLattice.

This class observes the instance passed, thus the model will continue to reflect the state for the SIL. sil is treated as constant i.e. no methods that modify its structure or selection state are called.

◆ subsetInclusionLattice()

vtkSubsetInclusionLattice* pqSubsetInclusionLatticeTreeModel::subsetInclusionLattice ( ) const

Get/Set the vtkSubsetInclusionLattice.

This class observes the instance passed, thus the model will continue to reflect the state for the SIL. sil is treated as constant i.e. no methods that modify its structure or selection state are called.

◆ selection()

QList<QVariant> pqSubsetInclusionLatticeTreeModel::selection ( ) const

Returns the list of nodes that were selected.

◆ setSelection()

void pqSubsetInclusionLatticeTreeModel::setSelection ( const QList< QVariant > &  sel)

◆ columnCount()

int pqSubsetInclusionLatticeTreeModel::columnCount ( const QModelIndex &  parent = QModelIndex()) const
override

QAbstractItemModel interface implementation.

◆ rowCount()

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

QAbstractItemModel interface implementation.

◆ index()

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

QAbstractItemModel interface implementation.

◆ parent()

QModelIndex pqSubsetInclusionLatticeTreeModel::parent ( const QModelIndex &  index = QModelIndex()) const
override

QAbstractItemModel interface implementation.

◆ data()

QVariant pqSubsetInclusionLatticeTreeModel::data ( const QModelIndex &  index,
int  role 
) const
override

QAbstractItemModel interface implementation.

◆ flags()

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

QAbstractItemModel interface implementation.

◆ setData()

bool pqSubsetInclusionLatticeTreeModel::setData ( const QModelIndex &  index,
const QVariant &  value,
int  role 
)
override

QAbstractItemModel interface implementation.

◆ selectionModified

void pqSubsetInclusionLatticeTreeModel::selectionModified ( )
signal

◆ silSelectionModified()

void pqSubsetInclusionLatticeTreeModel::silSelectionModified ( vtkObject ,
unsigned  long,
void *   
)
protected

◆ silStructureModified()

void pqSubsetInclusionLatticeTreeModel::silStructureModified ( )
protected

◆ indexForNode()

QModelIndex pqSubsetInclusionLatticeTreeModel::indexForNode ( int  node) const
protected

Property Documentation

◆ selection

QList<QVariant> pqSubsetInclusionLatticeTreeModel::selection
readwrite

Definition at line 68 of file pqSubsetInclusionLatticeTreeModel.h.


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