OGS
MeshFromRasterDialog.cpp
Go to the documentation of this file.
1
16
17#include "Base/OGSError.h"
19
21 : QDialog(parent), _mesh_name("mesh"), _array_name("MaterialIDs")
22{
23 setupUi(this);
24
25 this->elevationButton->setChecked(true);
26 this->triButton->setChecked(true);
27 this->mshNameEdit->setText("RasterDataMesh");
28}
29
31
33{
34 if (isChecked)
35 {
36 if (this->prismButton->isChecked())
37 {
38 this->triButton->setChecked(true);
39 }
40 if (this->hexButton->isChecked())
41 {
42 this->quadButton->setChecked(true);
43 }
44 }
45
46 this->prismButton->setEnabled(!isChecked);
47 this->hexButton->setEnabled(!isChecked);
48}
49
51{
52 if (this->mshNameEdit->text().isEmpty())
53 {
54 OGSError::box("Please specify a name for the resulting mesh.");
55 return;
56 }
57 _mesh_name = this->mshNameEdit->text().toStdString();
58
60 if (this->materialButton->isChecked())
61 {
63 }
64 else if (this->otherButton->isChecked())
65 {
67 }
68 else if (this->ignoreButton->isChecked())
69 {
71 }
72
74 {
75 if (this->arrayNameEdit->text().isEmpty())
76 {
77 OGSError::box("Please specify a name for the data vector.");
78 return;
79 }
80
81 _array_name = this->arrayNameEdit->text().toStdString();
82 }
84 if (this->quadButton->isChecked())
85 {
87 }
88 else if (this->prismButton->isChecked())
89 {
91 }
92 else if (this->hexButton->isChecked())
93 {
95 }
96
97 this->done(QDialog::Accepted);
98}
99
101{
102 this->done(QDialog::Rejected);
103}
Definition of the MeshFromRasterDialog class.
Definition of the OGSError class.
Definition of the VtkMeshConverter class.
MeshFromRasterDialog(QDialog *parent=nullptr)
Constructor.
~MeshFromRasterDialog() override
void accept() override
Instructions if the OK-Button has been pressed.
MeshLib::MeshElemType _element_selection
void reject() override
Instructions if the Cancel-Button has been pressed.
MeshLib::UseIntensityAs _intensity_selection
void on_elevationButton_toggled(bool isChecked)
static void box(const QString &e)
Definition OGSError.cpp:23