QAbstractItemModel implementation for vtkDataAssembly.
More...
#include <pqDataAssemblyTreeModel.h>
Inherits QAbstractItemModel.
QAbstractItemModel implementation for vtkDataAssembly.
pqDataAssemblyTreeModel builds a tree-model from a vtkDataAssembly. The vtkDataAssembly to shown is set using setDataAssembly
. To allow user-settable check-states, use setUserCheckable(true)
. The model doesn't support any additional custom properties. One is expected to use a proxy model to store additional meta-data associated with nodes.
Definition at line 51 of file pqDataAssemblyTreeModel.h.
◆ pqDataAssemblyTreeModel()
pqDataAssemblyTreeModel::pqDataAssemblyTreeModel |
( |
QObject * |
parent = nullptr | ) |
|
◆ ~pqDataAssemblyTreeModel()
pqDataAssemblyTreeModel::~pqDataAssemblyTreeModel |
( |
| ) |
|
|
override |
◆ setDataAssembly()
void pqDataAssemblyTreeModel::setDataAssembly |
( |
vtkDataAssembly * |
assembly | ) |
|
Get/Set the vtkDataAssembly to represent in this model.
◆ dataAssembly()
vtkDataAssembly* pqDataAssemblyTreeModel::dataAssembly |
( |
| ) |
const |
◆ setUserCheckable()
void pqDataAssemblyTreeModel::setUserCheckable |
( |
bool |
| ) |
|
Get whether the model is user-checkable.
◆ userCheckable()
bool pqDataAssemblyTreeModel::userCheckable |
( |
| ) |
const |
|
inline |
◆ setCheckedNodes()
void pqDataAssemblyTreeModel::setCheckedNodes |
( |
const QStringList & |
paths | ) |
|
Get/Set the check state for Qt::Checked for nodes selected using the path names specified.
- Note
- checking a node causes all it child nodes to be checked as well.
-
checkedNodes()
may not returns exactly the same paths passed to setCheckedNodes
even if the check-states were not changed in between the two calls.
- See also
- vtkDataAssembly::SelectNodes
◆ checkedNodes()
QStringList pqDataAssemblyTreeModel::checkedNodes |
( |
| ) |
const |
Get/Set the check state for Qt::Checked for nodes selected using the path names specified.
- Note
- checking a node causes all it child nodes to be checked as well.
-
checkedNodes()
may not returns exactly the same paths passed to setCheckedNodes
even if the check-states were not changed in between the two calls.
- See also
- vtkDataAssembly::SelectNodes
◆ columnCount()
int pqDataAssemblyTreeModel::columnCount |
( |
const QModelIndex & |
parent = QModelIndex() | ) |
const |
|
override |
QAbstractItemModel interface implementation.
◆ rowCount()
int pqDataAssemblyTreeModel::rowCount |
( |
const QModelIndex & |
parent = QModelIndex() | ) |
const |
|
override |
QAbstractItemModel interface implementation.
◆ index()
QModelIndex pqDataAssemblyTreeModel::index |
( |
int |
row, |
|
|
int |
column, |
|
|
const QModelIndex & |
parent = QModelIndex() |
|
) |
| const |
|
override |
QAbstractItemModel interface implementation.
◆ parent()
QModelIndex pqDataAssemblyTreeModel::parent |
( |
const QModelIndex & |
index = QModelIndex() | ) |
const |
|
override |
QAbstractItemModel interface implementation.
◆ data()
QVariant pqDataAssemblyTreeModel::data |
( |
const QModelIndex & |
index, |
|
|
int |
role |
|
) |
| const |
|
override |
QAbstractItemModel interface implementation.
◆ flags()
Qt::ItemFlags pqDataAssemblyTreeModel::flags |
( |
const QModelIndex & |
index | ) |
const |
|
override |
QAbstractItemModel interface implementation.
◆ setData()
bool pqDataAssemblyTreeModel::setData |
( |
const QModelIndex & |
index, |
|
|
const QVariant & |
value, |
|
|
int |
role |
|
) |
| |
|
override |
QAbstractItemModel interface implementation.
◆ modelDataChanged
void pqDataAssemblyTreeModel::modelDataChanged |
( |
int |
role | ) |
|
|
signal |
This signal is fired in setData
if the data is changed.
setData
can result in multiple calls to dataChanged
signal as the data is updated on nodes in the hierarchy. This signal is fired only once for setData
call irrespective of how many internal nodes are updated.
The documentation for this class was generated from the following file: