QAbstractItemModel for legacy SIL (vtkGraph-based SIL)
More...
#include <pqSILModel.h>
Inherits QAbstractItemModel.
QAbstractItemModel for legacy SIL (vtkGraph-based SIL)
pqSILModel is QAbstractItemModel implementation for legacy SIL.
Legacy Warning
While not deprecated, this class exists to support readers that use legacy representation for SIL which used a vtkGraph
to represent the SIL. It is recommended that newer code uses vtkSubsetInclusionLattice (or subclass) to represent the SIL. In that case, you should use pqSubsetInclusionLatticeTreeModel
instead.
Definition at line 61 of file pqSILModel.h.
◆ pqSILModel()
pqSILModel::pqSILModel |
( |
QObject * |
parent = 0 | ) |
|
◆ ~pqSILModel()
pqSILModel::~pqSILModel |
( |
| ) |
|
|
override |
◆ rowCount()
int pqSILModel::rowCount |
( |
const QModelIndex & |
parent = QModelIndex() | ) |
const |
|
override |
Gets the number of rows for a given index.
- Parameters
-
- Returns
- The number of rows for the given index.
◆ columnCount()
int pqSILModel::columnCount |
( |
const QModelIndex & |
parent = QModelIndex() | ) |
const |
|
override |
Gets the number of columns for a given index.
- Parameters
-
- Returns
- The number of columns for the given index.
◆ hasChildren()
bool pqSILModel::hasChildren |
( |
const QModelIndex & |
parent = QModelIndex() | ) |
const |
|
override |
Gets whether or not the given index has child items.
- Parameters
-
- Returns
- True if the given index has child items.
◆ index()
QModelIndex pqSILModel::index |
( |
int |
row, |
|
|
int |
column, |
|
|
const QModelIndex & |
parent = QModelIndex() |
|
) |
| const |
|
override |
Gets a model index for a given location.
- Parameters
-
row | The row number. |
column | The column number. |
parent | The parent index. |
- Returns
- A model index for the given location.
◆ parent() [1/2]
QModelIndex pqSILModel::parent |
( |
const QModelIndex & |
index | ) |
const |
|
override |
Gets the parent for a given index.
- Parameters
-
- Returns
- A model index for the parent of the given index.
◆ data()
QVariant pqSILModel::data |
( |
const QModelIndex & |
index, |
|
|
int |
role = Qt::DisplayRole |
|
) |
| const |
|
override |
Gets the data for a given model index.
- Parameters
-
index | The model index. |
role | The role to get data for. |
- Returns
- The data for the given model index.
◆ flags()
Qt::ItemFlags pqSILModel::flags |
( |
const QModelIndex & |
index | ) |
const |
|
override |
Gets the flags for a given model index.
The flags for an item indicate if it is enabled, editable, etc.
- Parameters
-
- Returns
- The flags for the given model index.
◆ setData()
bool pqSILModel::setData |
( |
const QModelIndex & |
index, |
|
|
const QVariant & |
value, |
|
|
int |
role = Qt::EditRole |
|
) |
| |
|
override |
Sets the role data for the item at index to value.
Returns true if successful; otherwise returns false.
◆ hierarchyIndex()
QModelIndex pqSILModel::hierarchyIndex |
( |
const QString & |
hierarchyName | ) |
const |
Returns the QModelIndex for the hierarchy with the given name, if present.
If the hierarchy is not present an index referring to an empty tree will be returned.
◆ headerData()
QVariant pqSILModel::headerData |
( |
int |
, |
|
|
Qt::Orientation |
, |
|
|
int |
role = Qt::DisplayRole |
|
) |
| const |
|
inlineoverride |
◆ status()
QList<QVariant> pqSILModel::status |
( |
const QString & |
hierarchyName | ) |
const |
API to get/set status of a given hierarchy.
◆ setStatus()
void pqSILModel::setStatus |
( |
const QString & |
hierarchyName, |
|
|
const QList< QVariant > & |
values |
|
) |
| |
◆ setSILDomain()
◆ domainModified()
void pqSILModel::domainModified |
( |
| ) |
|
◆ makeIndex()
QModelIndex pqSILModel::makeIndex |
( |
vtkIdType |
vertexid | ) |
const |
Returns the model index for a vertex.
◆ findVertex()
Returns the vertex id for a vertex with the given name in the SIL.
Returns -1 if no such vertex could be found.
◆ checkStatusChanged
void pqSILModel::checkStatusChanged |
( |
| ) |
|
|
signal |
◆ update
void pqSILModel::update |
( |
| ) |
|
|
slot |
Used to reset the model based on the sil.
◆ checkStateUpdated()
void pqSILModel::checkStateUpdated |
( |
vtkObject * |
caller, |
|
|
unsigned long |
eventid, |
|
|
void * |
calldata |
|
) |
| |
|
protected |
Called every time vtkSMSILModel tells us that the check state has changed.
We fire the dataChanged() event so that the view updates.
◆ isLeaf()
bool pqSILModel::isLeaf |
( |
vtkIdType |
vertexid | ) |
const |
|
protected |
Returns if the given vertex id refers to a leaf node.
◆ parent() [2/2]
Returns the parent vertex id for the given vertex.
It's an error to call this method for the root vertex id i.e. 0.
◆ childrenCount()
Returns the number of children for the given vertex.
◆ collectLeaves()
Used to initialize the HierarchyVertexIds list with the leaf node ids for each of the hierarchies.
◆ SILModel
◆ ModelIndexCache
QMap<vtkIdType, QModelIndex>* pqSILModel::ModelIndexCache |
|
protected |
◆ Hierarchies
QMap<QString, QModelIndex> pqSILModel::Hierarchies |
|
protected |
◆ HierarchyVertexIds
QMap<QString, std::set<vtkIdType> > pqSILModel::HierarchyVertexIds |
|
protected |
This map keeps a list of vertex ids that refer to the leaves in the hierarchy.
Definition at line 239 of file pqSILModel.h.
◆ SILDomain
◆ SILDomainObserverId
unsigned long pqSILModel::SILDomainObserverId |
|
protected |
The documentation for this class was generated from the following file: