OGS
ElementTreeModel.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) OpenGeoSys Community (opengeosys.org)
2// SPDX-License-Identifier: BSD-3-Clause
3
4#pragma once
5
6#include <array>
7#include "Base/TreeModel.h"
8
9class vtkUnstructuredGridAlgorithm;
10
11namespace MeshLib {
12 class Mesh;
13}
14
20{
21 Q_OBJECT
22
23public:
24 explicit ElementTreeModel(QObject* parent = nullptr);
26
27 vtkUnstructuredGridAlgorithm const* getSource() const { return _mesh_source; };
28
29public slots:
31 void clearView();
32
34 void setElement(vtkUnstructuredGridAlgorithm const*const grid, const unsigned elem_index);
35
37 void setMesh(MeshLib::Mesh const& mesh);
38
39private:
40 vtkUnstructuredGridAlgorithm const* _mesh_source{nullptr};
41};
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.
QModelIndex parent(const QModelIndex &index) const override
Definition TreeModel.cpp:70
TreeModel(QObject *parent=nullptr)
Definition TreeModel.cpp:15