OGS
MeshView.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 <QTreeView>
7#include "GeoLib/GeoType.h"
8#include "GeoLib/Point.h"
9
10class MeshModel;
11class vtkUnstructuredGridAlgorithm;
12
13namespace MeshLib {
14 class Mesh;
15}
16
17namespace MeshLib {
19}
20
25class MeshView : public QTreeView
26{
27 Q_OBJECT
28
29public:
30 explicit MeshView(QWidget* parent = nullptr);
31 ~MeshView() override;
32
33public slots:
34 void updateView();
35
36protected slots:
38 void selectionChanged(const QItemSelection& selected,
39 const QItemSelection& deselected) override;
40
41private:
43 {
44 QAction* action;
45 unsigned min_dim;
46 unsigned max_dim;
47 };
48
49 void contextMenuEvent(QContextMenuEvent* event) override;
50
51private slots:
54
57
59 void openMeshEditDialog();
60
63
65 void openAddLayerDialog();
66
68 void addMesh();
69
71
72 void extractSurfaceMesh();
73
74 void exportToTetGen();
75
77
79
80 void exportToShapefile() const;
81
83 void removeMesh();
84
86 void writeToFile() const;
87
89 void checkMeshQuality();
90
91signals:
92 void elementSelected(vtkUnstructuredGridAlgorithm const*const, unsigned, bool);
93 void enableSaveButton(bool);
96 void openMeshFile(int);
99 void requestCondSetupDialog(const std::string&, const GeoLib::GEOTYPE, const std::size_t, bool on_points);
100 void requestMeshRemoval(const QModelIndex&);
102 void loadFEMCondFileRequested(const std::string);
104
105};
VtkMappedMeshSource is a source class to transform OGS meshes into complete vtkUnstructuredGrids....
void enableSaveButton(bool)
void selectionChanged(const QItemSelection &selected, const QItemSelection &deselected) override
Is called when the selection of this view changes.
Definition MeshView.cpp:56
~MeshView() override
void checkMeshQuality()
Calls the dialog for calculating an element quality metric.
Definition MeshView.cpp:441
void saveMeshAction()
void extractSurfaceMesh()
Definition MeshView.cpp:309
void meshSelected(MeshLib::Mesh const &)
void qualityCheckRequested(MeshLib::VtkMappedMeshSource *)
void contextMenuEvent(QContextMenuEvent *event) override
Definition MeshView.cpp:106
void openValuesEditDialog()
Opens a dialog for editing material groups.
Definition MeshView.cpp:260
MeshView(QWidget *parent=nullptr)
Definition MeshView.cpp:35
void openMap2dMeshDialog()
Opens a dialog for mapping 2d meshes.
Definition MeshView.cpp:164
void openMeshEditDialog()
Opens a dialog for editing meshes.
Definition MeshView.cpp:248
void requestCondSetupDialog(const std::string &, const GeoLib::GEOTYPE, const std::size_t, bool on_points)
void writeToFile() const
Calls the FileDialog to save a mesh to a file.
Definition MeshView.cpp:407
void requestMeshToGeometryConversion(const MeshLib::Mesh *)
void addMesh()
Adds a new mesh.
Definition MeshView.cpp:86
void exportToTetGen()
Definition MeshView.cpp:379
void removeSelectedMeshComponent()
void openRasterDataToMeshDialog()
Opens a dialog for assigning raster data to the mesh.
Definition MeshView.cpp:209
void convertMeshToGeometry()
Definition MeshView.cpp:342
void openMeshFile(int)
void loadDIRECTSourceTerms()
Definition MeshView.cpp:435
void openAddLayerDialog()
Opens a dialog for adding a layer to the mesh.
Definition MeshView.cpp:272
void elementSelected(vtkUnstructuredGridAlgorithm const *const, unsigned, bool)
void requestMeshRemoval(const QModelIndex &)
void loadFEMCondFileRequested(const std::string)
void addDIRECTSourceTerms()
Definition MeshView.cpp:428
void removeMesh()
Remove the currently selected mesh.
Definition MeshView.cpp:91
void updateView()
Definition MeshView.cpp:44
void exportToShapefile() const
Definition MeshView.cpp:350
void enableRemoveButton(bool)
GEOTYPE
Definition GeoType.h:12