|
ParaView
|
#include <pqSILModel.h>

Public Slots | |
| void | update (vtkGraph *sil) |
| Used to reset the model based on the sil. | |
Signals | |
| void | checkStatusChanged () |
Public Member Functions | |
| pqSILModel (QObject *parent=0) | |
| virtual | ~pqSILModel () |
| QModelIndex | hierarchyIndex (const QString &hierarchyName) const |
| Returns the QModelIndex for the hierarchy with the given name, if present. | |
| 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. | |
| void | setStatus (const QString &hierarchyName, const QList< QVariant > &values) |
| QModelIndex | makeIndex (vtkIdType vertexid) const |
| Returns the model index for a vertex. | |
| vtkIdType | findVertex (const char *name) const |
| Returns the vertex id for a vertex with the given name in the SIL. | |
QAbstractItemModel Methods | |
| virtual int | rowCount (const QModelIndex &parent=QModelIndex()) const |
| Gets the number of rows for a given index. | |
| virtual int | columnCount (const QModelIndex &parent=QModelIndex()) const |
| Gets the number of columns for a given index. | |
| virtual bool | hasChildren (const QModelIndex &parent=QModelIndex()) const |
| Gets whether or not the given index has child items. | |
| virtual QModelIndex | index (int row, int column, const QModelIndex &parent=QModelIndex()) const |
| Gets a model index for a given location. | |
| virtual QModelIndex | parent (const QModelIndex &index) const |
| Gets the parent for a given index. | |
| virtual QVariant | data (const QModelIndex &index, int role=Qt::DisplayRole) const |
| Gets the data for a given model index. | |
| virtual Qt::ItemFlags | flags (const QModelIndex &index) const |
| Gets the flags for a given model index. | |
| bool | setData (const QModelIndex &index, const QVariant &value, int role=Qt::EditRole) |
| Sets the role data for the item at index to value. | |
Protected Member Functions | |
| void | checkStateUpdated (vtkObject *caller, unsigned long eventid, void *calldata) |
| Called every time vtkSMSILModel tells us that the check state has changed. | |
| bool | isLeaf (vtkIdType vertexid) const |
| Returns if the given vertex id refers to a leaf node. | |
| vtkIdType | parent (vtkIdType vertexid) const |
| Returns the parent vertex id for the given vertex. | |
| int | childrenCount (vtkIdType vertexid) const |
| Returns the number of children for the given vertex. | |
| void | collectLeaves (vtkIdType vertexid, std::set< vtkIdType > &list) |
| Used to initialize the HierarchyVertexIds list with the leaf node ids for each of the hierarchies. | |
Protected Attributes | |
| vtkSMSILModel * | SILModel |
| QMap< vtkIdType, QModelIndex > * | ModelIndexCache |
| Cache used by makeIndex() to avoid iterating over the edges each time. | |
| QMap< QString, QModelIndex > | Hierarchies |
| QMap< QString, std::set < vtkIdType > > | HierarchyVertexIds |
| This map keeps a list of vertex ids that refer to the leaves in the hierarchy. | |
| vtkSmartPointer< vtkGraph > | SIL |
Definition at line 47 of file pqSILModel.h.
| pqSILModel::pqSILModel | ( | QObject * | parent = 0 | ) |
| virtual pqSILModel::~pqSILModel | ( | ) | [virtual] |
| virtual int pqSILModel::rowCount | ( | const QModelIndex & | parent = QModelIndex() | ) | const [virtual] |
Gets the number of rows for a given index.
| parent | The parent index. |
| virtual int pqSILModel::columnCount | ( | const QModelIndex & | parent = QModelIndex() | ) | const [virtual] |
Gets the number of columns for a given index.
| parent | The parent index. |
| virtual bool pqSILModel::hasChildren | ( | const QModelIndex & | parent = QModelIndex() | ) | const [virtual] |
Gets whether or not the given index has child items.
| parent | The parent index. |
| virtual QModelIndex pqSILModel::index | ( | int | row, |
| int | column, | ||
| const QModelIndex & | parent = QModelIndex() |
||
| ) | const [virtual] |
Gets a model index for a given location.
| row | The row number. |
| column | The column number. |
| parent | The parent index. |
| virtual QModelIndex pqSILModel::parent | ( | const QModelIndex & | index | ) | const [virtual] |
Gets the parent for a given index.
| index | The model index. |
| virtual QVariant pqSILModel::data | ( | const QModelIndex & | index, |
| int | role = Qt::DisplayRole |
||
| ) | const [virtual] |
Gets the data for a given model index.
| index | The model index. |
| role | The role to get data for. |
| 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.
| index | The model index. |
| 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.
| 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.
| virtual QVariant pqSILModel::headerData | ( | int | , |
| Qt::Orientation | , | ||
| int | role = Qt::DisplayRole |
||
| ) | const [inline, virtual] |
Definition at line 126 of file pqSILModel.h.
| QList<QVariant> pqSILModel::status | ( | const QString & | hierarchyName | ) | const |
API to get/set status of a given hierarchy.
| void pqSILModel::setStatus | ( | const QString & | hierarchyName, |
| const QList< QVariant > & | values | ||
| ) |
| QModelIndex pqSILModel::makeIndex | ( | vtkIdType | vertexid | ) | const |
Returns the model index for a vertex.
| 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.
| void pqSILModel::checkStatusChanged | ( | ) | [signal] |
| void pqSILModel::update | ( | vtkGraph * | sil | ) | [slot] |
Used to reset the model based on the sil.
| 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.
| bool pqSILModel::isLeaf | ( | vtkIdType | vertexid | ) | const [protected] |
Returns if the given vertex id refers to a leaf node.
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.
Returns the number of children for the given vertex.
Used to initialize the HierarchyVertexIds list with the leaf node ids for each of the hierarchies.
vtkSMSILModel* pqSILModel::SILModel [protected] |
Definition at line 173 of file pqSILModel.h.
QMap<vtkIdType, QModelIndex>* pqSILModel::ModelIndexCache [protected] |
Cache used by makeIndex() to avoid iterating over the edges each time.
Definition at line 176 of file pqSILModel.h.
QMap<QString, QModelIndex> pqSILModel::Hierarchies [protected] |
Definition at line 178 of file pqSILModel.h.
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.
vtkSmartPointer<vtkGraph> pqSILModel::SIL [protected] |
Definition at line 183 of file pqSILModel.h.
1.7.5.1