OGS
ElementTreeModel.h
Go to the documentation of this file.
1
15#pragma once
16
17#include <array>
18#include "Base/TreeModel.h"
19
20class vtkUnstructuredGridAlgorithm;
21
22namespace MeshLib {
23 class Mesh;
24}
25
31{
32 Q_OBJECT
33
34public:
35 explicit ElementTreeModel(QObject* parent = nullptr);
37
38 vtkUnstructuredGridAlgorithm const* getSource() const { return _mesh_source; };
39
40public slots:
42 void clearView();
43
45 void setElement(vtkUnstructuredGridAlgorithm const*const grid, const unsigned elem_index);
46
48 void setMesh(MeshLib::Mesh const& mesh);
49
50private:
51 vtkUnstructuredGridAlgorithm const* _mesh_source{nullptr};
52};
Definition of the TreeModel class.
A model for the display of information concerning element information implemented as a TreeModel.
void setElement(vtkUnstructuredGridAlgorithm const *const grid, const unsigned elem_index)
Displays information of the element with the given index from the given grid.
~ElementTreeModel() override
vtkUnstructuredGridAlgorithm const * getSource() const
vtkUnstructuredGridAlgorithm const * _mesh_source
void clearView()
Clears the tree.
ElementTreeModel(QObject *parent=nullptr)
void setMesh(MeshLib::Mesh const &mesh)
Displays information of the given mesh.
A hierarchical model for a tree implemented as a double-linked list.
Definition TreeModel.h:30
QModelIndex parent(const QModelIndex &index) const override
Definition TreeModel.cpp:81