#include <pqSILModel.h>
Inherits QAbstractItemModel.
|
void | update (vtkGraph *sil) |
| Used to reset the model based on the sil. More...
|
|
|
| pqSILModel (QObject *parent=0) |
|
virtual | ~pqSILModel () |
|
QModelIndex | hierarchyIndex (const QString &hierarchyName) const |
| Returns the QModelIndex for the hierarchy with the given name, if present. More...
|
|
virtual QVariant | headerData (int, Qt::Orientation, int role=Qt::DisplayRole) const |
|
QList< QVariant > | status (const QString &hierarchyName) const |
| API to get/set status of a given hierarchy. More...
|
|
void | setStatus (const QString &hierarchyName, const QList< QVariant > &values) |
|
QModelIndex | makeIndex (vtkIdType vertexid) const |
| Returns the model index for a vertex. More...
|
|
vtkIdType | findVertex (const char *name) const |
| Returns the vertex id for a vertex with the given name in the SIL. More...
|
|
|
virtual int | rowCount (const QModelIndex &parent=QModelIndex()) const |
| Gets the number of rows for a given index. More...
|
|
virtual int | columnCount (const QModelIndex &parent=QModelIndex()) const |
| Gets the number of columns for a given index. More...
|
|
virtual bool | hasChildren (const QModelIndex &parent=QModelIndex()) const |
| Gets whether or not the given index has child items. More...
|
|
virtual QModelIndex | index (int row, int column, const QModelIndex &parent=QModelIndex()) const |
| Gets a model index for a given location. More...
|
|
virtual QModelIndex | parent (const QModelIndex &index) const |
| Gets the parent for a given index. More...
|
|
virtual QVariant | data (const QModelIndex &index, int role=Qt::DisplayRole) const |
| Gets the data for a given model index. More...
|
|
virtual Qt::ItemFlags | flags (const QModelIndex &index) const |
| Gets the flags for a given model index. More...
|
|
bool | setData (const QModelIndex &index, const QVariant &value, int role=Qt::EditRole) |
| Sets the role data for the item at index to value. More...
|
|
|
void | checkStateUpdated (vtkObject *caller, unsigned long eventid, void *calldata) |
| Called every time vtkSMSILModel tells us that the check state has changed. More...
|
|
bool | isLeaf (vtkIdType vertexid) const |
| Returns if the given vertex id refers to a leaf node. More...
|
|
vtkIdType | parent (vtkIdType vertexid) const |
| Returns the parent vertex id for the given vertex. More...
|
|
int | childrenCount (vtkIdType vertexid) const |
| Returns the number of children for the given vertex. More...
|
|
void | collectLeaves (vtkIdType vertexid, std::set< vtkIdType > &list) |
| Used to initialize the HierarchyVertexIds list with the leaf node ids for each of the hierarchies. More...
|
|
Definition at line 47 of file pqSILModel.h.
§ pqSILModel()
pqSILModel::pqSILModel |
( |
QObject * |
parent = 0 | ) |
|
§ ~pqSILModel()
virtual pqSILModel::~pqSILModel |
( |
| ) |
|
|
virtual |
§ rowCount()
virtual int pqSILModel::rowCount |
( |
const QModelIndex & |
parent = QModelIndex() | ) |
const |
|
virtual |
Gets the number of rows for a given index.
- Parameters
-
- Returns
- The number of rows for the given index.
§ columnCount()
virtual int pqSILModel::columnCount |
( |
const QModelIndex & |
parent = QModelIndex() | ) |
const |
|
virtual |
Gets the number of columns for a given index.
- Parameters
-
- Returns
- The number of columns for the given index.
§ hasChildren()
virtual bool pqSILModel::hasChildren |
( |
const QModelIndex & |
parent = QModelIndex() | ) |
const |
|
virtual |
Gets whether or not the given index has child items.
- Parameters
-
- Returns
- True if the given index has child items.
§ index()
virtual QModelIndex pqSILModel::index |
( |
int |
row, |
|
|
int |
column, |
|
|
const QModelIndex & |
parent = QModelIndex() |
|
) |
| const |
|
virtual |
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]
virtual QModelIndex pqSILModel::parent |
( |
const QModelIndex & |
index | ) |
const |
|
virtual |
Gets the parent for a given index.
- Parameters
-
- Returns
- A model index for the parent of the given index.
§ data()
virtual QVariant pqSILModel::data |
( |
const QModelIndex & |
index, |
|
|
int |
role = Qt::DisplayRole |
|
) |
| const |
|
virtual |
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()
virtual Qt::ItemFlags pqSILModel::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
-
- Returns
- The flags for the given model index.
§ setData()
bool pqSILModel::setData |
( |
const QModelIndex & |
index, |
|
|
const QVariant & |
value, |
|
|
int |
role = Qt::EditRole |
|
) |
| |
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()
virtual QVariant pqSILModel::headerData |
( |
int |
, |
|
|
Qt::Orientation |
, |
|
|
int |
role = Qt::DisplayRole |
|
) |
| const |
|
inlinevirtual |
§ 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 |
|
) |
| |
§ makeIndex()
QModelIndex pqSILModel::makeIndex |
( |
vtkIdType |
vertexid | ) |
const |
Returns the model index for a vertex.
§ findVertex()
vtkIdType pqSILModel::findVertex |
( |
const char * |
name | ) |
const |
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 |
( |
vtkGraph * |
sil | ) |
|
|
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]
vtkIdType pqSILModel::parent |
( |
vtkIdType |
vertexid | ) |
const |
|
protected |
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()
int pqSILModel::childrenCount |
( |
vtkIdType |
vertexid | ) |
const |
|
protected |
Returns the number of children for the given vertex.
§ collectLeaves()
void pqSILModel::collectLeaves |
( |
vtkIdType |
vertexid, |
|
|
std::set< vtkIdType > & |
list |
|
) |
| |
|
protected |
Used to initialize the HierarchyVertexIds list with the leaf node ids for each of the hierarchies.
§ SILModel
vtkSMSILModel* pqSILModel::SILModel |
|
protected |
§ 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 182 of file pqSILModel.h.
§ SIL
vtkSmartPointer<vtkGraph> pqSILModel::SIL |
|
protected |
The documentation for this class was generated from the following file:
- /builddir/build/BUILD/ParaView-v5.2.0-RC2/Qt/Components/pqSILModel.h