32class vtkUnstructuredGridAlgorithm;
43 QObject*
parent =
nullptr);
46 void addMesh(std::unique_ptr<MeshLib::Mesh> mesh);
67 vtkUnstructuredGridAlgorithm*
vtkSource(
const QModelIndex &idx)
const;
69 vtkUnstructuredGridAlgorithm*
vtkSource(
const std::string &name)
const;
Definition of mesh-related Enumerations.
Definition of the TreeModel class.
void meshAdded(MeshModel *, const QModelIndex &)
void updateModel()
Updates the model based on the ProjectData-object.
bool removeMesh(const QModelIndex &idx)
Removes the mesh with the given index.
static std::map< MeshLib::MeshElemType, QVariant > createMeshElemTypeMap()
Creates a static map of all element type name-strings in QVariant format.
static const std::map< MeshLib::MeshElemType, QVariant > elem_type_map
void addMesh(std::unique_ptr< MeshLib::Mesh > mesh)
Adds a new mesh.
static const QVariant element_str
void meshRemoved(MeshModel *, const QModelIndex &)
vtkUnstructuredGridAlgorithm * vtkSource(const QModelIndex &idx) const
Returns the VTK source item for the mesh with the given index.
DataHolderLib::Project & _project
Checks if the name of the mesh is already exists, if so it generates a unique name.
int columnCount(const QModelIndex &parent=QModelIndex()) const override
Returns the number of columns used for the data list.
void addMeshObject(const MeshLib::Mesh *mesh)
Adds the mesh to the GUI-Mesh-Model und -View.
const MeshLib::Mesh * getMesh(const QModelIndex &idx) const
Returns the mesh with the given index.
MeshModel(DataHolderLib::Project &project, QObject *parent=nullptr)
void updateMesh(MeshLib::Mesh *)
Updates the model/view for a mesh.
A hierarchical model for a tree implemented as a double-linked list.
QModelIndex parent(const QModelIndex &index) const override