OGS
MeshView.h
Go to the documentation of this file.
1
14#pragma once
15
16#include <QTreeView>
17#include "GeoLib/GeoType.h"
18#include "GeoLib/Point.h"
19
20class MeshModel;
21class vtkUnstructuredGridAlgorithm;
22
23namespace MeshLib {
24 class Mesh;
25}
26
27namespace MeshLib {
28 class VtkMappedMeshSource;
29}
30
35class MeshView : public QTreeView
36{
37 Q_OBJECT
38
39public:
40 explicit MeshView(QWidget* parent = nullptr);
41 ~MeshView() override;
42
43public slots:
44 void updateView();
45
46protected slots:
48 void selectionChanged(const QItemSelection& selected,
49 const QItemSelection& deselected) override;
50
51private:
53 {
54 QAction* action;
55 unsigned min_dim;
56 unsigned max_dim;
57 };
58
59 void contextMenuEvent(QContextMenuEvent* event) override;
60
61private slots:
64
67
69 void openMeshEditDialog();
70
73
75 void openAddLayerDialog();
76
78 void addMesh();
79
81
82 void extractSurfaceMesh();
83
84 void exportToTetGen();
85
87
89
90 void exportToShapefile() const;
91
93 void removeMesh();
94
96 void writeToFile() const;
97
99 void checkMeshQuality();
100
101signals:
102 void elementSelected(vtkUnstructuredGridAlgorithm const*const, unsigned, bool);
106 void openMeshFile(int);
109 void requestCondSetupDialog(const std::string&, const GeoLib::GEOTYPE, const std::size_t, bool on_points);
110 void requestMeshRemoval(const QModelIndex&);
112 void loadFEMCondFileRequested(const std::string);
114
115};
Definition of the Point class.
Definition of the GEOTYPE enumeration.
void enableSaveButton(bool)
void selectionChanged(const QItemSelection &selected, const QItemSelection &deselected) override
Is called when the selection of this view changes.
Definition MeshView.cpp:67
~MeshView() override
void checkMeshQuality()
Calls the dialog for calculating an element quality metric.
Definition MeshView.cpp:452
void saveMeshAction()
void extractSurfaceMesh()
Definition MeshView.cpp:320
void meshSelected(MeshLib::Mesh const &)
void qualityCheckRequested(MeshLib::VtkMappedMeshSource *)
void contextMenuEvent(QContextMenuEvent *event) override
Definition MeshView.cpp:117
void openValuesEditDialog()
Opens a dialog for editing material groups.
Definition MeshView.cpp:271
MeshView(QWidget *parent=nullptr)
Definition MeshView.cpp:46
void openMap2dMeshDialog()
Opens a dialog for mapping 2d meshes.
Definition MeshView.cpp:175
void openMeshEditDialog()
Opens a dialog for editing meshes.
Definition MeshView.cpp:259
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:418
void requestMeshToGeometryConversion(const MeshLib::Mesh *)
void addMesh()
Adds a new mesh.
Definition MeshView.cpp:97
void exportToTetGen()
Definition MeshView.cpp:390
void removeSelectedMeshComponent()
void openRasterDataToMeshDialog()
Opens a dialog for assigning raster data to the mesh.
Definition MeshView.cpp:220
void convertMeshToGeometry()
Definition MeshView.cpp:353
void openMeshFile(int)
void loadDIRECTSourceTerms()
Definition MeshView.cpp:446
void openAddLayerDialog()
Opens a dialog for adding a layer to the mesh.
Definition MeshView.cpp:283
void elementSelected(vtkUnstructuredGridAlgorithm const *const, unsigned, bool)
void requestMeshRemoval(const QModelIndex &)
void loadFEMCondFileRequested(const std::string)
void addDIRECTSourceTerms()
Definition MeshView.cpp:439
void removeMesh()
Remove the currently selected mesh.
Definition MeshView.cpp:102
void updateView()
Definition MeshView.cpp:55
void exportToShapefile() const
Definition MeshView.cpp:361
void enableRemoveButton(bool)
GEOTYPE
Definition GeoType.h:23