OGS
|
A model for the display of information concerning element information implemented as a TreeModel.
Definition at line 30 of file ElementTreeModel.h.
#include <ElementTreeModel.h>
Public Slots | |
void | clearView () |
Clears the tree. | |
void | setElement (vtkUnstructuredGridAlgorithm const *const grid, const unsigned elem_index) |
Displays information of the element with the given index from the given grid. | |
void | setMesh (MeshLib::Mesh const &mesh) |
Displays information of the given mesh. | |
Public Slots inherited from TreeModel | |
void | updateData () |
Public Member Functions | |
ElementTreeModel (QObject *parent=nullptr) | |
~ElementTreeModel () override | |
vtkUnstructuredGridAlgorithm const * | getSource () const |
Public Member Functions inherited from TreeModel | |
TreeModel (QObject *parent=nullptr) | |
~TreeModel () override | |
QVariant | data (const QModelIndex &index, int role) const override |
bool | setData (const QModelIndex &index, const QVariant &value, int role) override |
Qt::ItemFlags | flags (const QModelIndex &index) const override |
TreeItem * | getItem (const QModelIndex &index) const |
QVariant | headerData (int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const override |
QModelIndex | index (int row, int column, const QModelIndex &parent=QModelIndex()) const override |
QModelIndex | parent (const QModelIndex &index) const override |
bool | removeRows (int position, int count, const QModelIndex &parent) override |
int | rowCount (const QModelIndex &parent=QModelIndex()) const override |
int | columnCount (const QModelIndex &parent=QModelIndex()) const override |
TreeItem * | rootItem () const |
Private Attributes | |
vtkUnstructuredGridAlgorithm const * | _mesh_source {nullptr} |
Additional Inherited Members | |
Protected Attributes inherited from TreeModel | |
TreeItem * | _rootItem |
|
explicit |
Constructor.
Definition at line 44 of file ElementTreeModel.cpp.
References TreeModel::_rootItem.
|
overridedefault |
|
slot |
Clears the tree.
Definition at line 128 of file ElementTreeModel.cpp.
References TreeModel::_rootItem, TreeItem::childCount(), and TreeItem::removeChildren().
Referenced by setElement(), and setMesh().
|
inline |
Definition at line 38 of file ElementTreeModel.h.
References _mesh_source.
|
slot |
Displays information of the element with the given index from the given grid.
Definition at line 57 of file ElementTreeModel.cpp.
References _mesh_source, TreeModel::_rootItem, TreeItem::appendChild(), clearView(), MeshLib::Element::getContent(), MeshLib::Mesh::getElement(), MeshLib::Element::getGeomType(), MathLib::Point3dWithID::getID(), MeshLib::Element::getID(), MeshLib::Element::getNode(), and MeshLib::Element::getNumberOfBaseNodes().
|
slot |
Displays information of the given mesh.
Definition at line 135 of file ElementTreeModel.cpp.
References TreeModel::_rootItem, TreeItem::appendChild(), clearView(), MeshToolsLib::MeshInformation::getBoundingBox(), MeshLib::Mesh::getElements(), GeoLib::AABB::getMinMaxPoints(), MeshLib::Mesh::getName(), MeshLib::Mesh::getNumberOfElements(), MeshToolsLib::MeshInformation::getNumberOfElementTypes(), MeshLib::Mesh::getNumberOfNodes(), MeshLib::Mesh::getProperties(), and MeshLib::MeshElemType2String().
|
private |
Definition at line 51 of file ElementTreeModel.h.
Referenced by getSource(), and setElement().