21 : QDialog(parent), _mesh(mesh)
24 this->edit_old_value->setEnabled(
false);
25 this->edit_new_value->setEnabled(
false);
26 this->replaceCheckBox->setEnabled(
false);
33 if (this->condenseButton->isChecked())
39 if (this->edit_old_value->text().isEmpty())
41 OGSError::box(
"Please input which material you want to replace.");
45 static_cast<unsigned>(this->edit_old_value->text().toInt());
46 if (this->edit_new_value->text().isEmpty())
48 OGSError::box(
"Please input the new material to replace group " +
49 this->edit_old_value->text() +
".");
53 static_cast<unsigned>(this->edit_new_value->text().toInt());
54 bool do_not_replace = this->replaceCheckBox->isChecked();
56 *
_mesh, old_value, new_value, !do_not_replace);
57 if (!result && do_not_replace)
65 this->done(QDialog::Accepted);
70 this->done(QDialog::Rejected);
75 this->edit_old_value->setEnabled(isSelected);
76 this->edit_new_value->setEnabled(isSelected);
77 this->replaceCheckBox->setEnabled(isSelected);
Definition of the ElementValueModification class.
Definition of the MeshValueEditDialog class.
Definition of the OGSError class.
MeshValueEditDialog(MeshLib::Mesh *mesh, QDialog *parent=nullptr)
Constructor for creating a new FEM condition.
~MeshValueEditDialog() override
void on_replaceButton_toggled(bool isSelected)
void accept() override
Instructions if the OK-Button has been pressed.
void reject() override
Instructions if the Cancel-Button has been pressed.
void valueEditFinished(MeshLib::Mesh *)
static void box(const QString &e)