OGS
MeshMapping2DDialog.h
Go to the documentation of this file.
1 
10 #pragma once
11 
12 #include "ui_MeshMapping2D.h"
13 
14 #include <QDialog>
15 #include <QLineEdit>
16 #include <QString>
17 
21 class MeshMapping2DDialog : public QDialog, private Ui_MeshMapping2D
22 {
23  Q_OBJECT
24 
25 public:
26  explicit MeshMapping2DDialog(QDialog* parent = nullptr);
27 
28  bool useRasterMapping() const { return this->rasterValueButton->isChecked(); }
29  bool useStaticMapping() const { return this->staticValueButton->isChecked(); }
30  std::string getRasterPath() const { return this->rasterPathEdit->text().toStdString(); }
31  double getNoDataReplacement() const { return this->noDataValueEdit->text().toDouble(); }
32  bool getIgnoreNoData() const { return this->ignoreNoDataCheckbox->isChecked(); }
33  double getStaticValue() const { return this->staticValueEdit->text().toDouble(); }
34  std::string getNewMeshName() const { return this->newNameEdit->text().toStdString(); }
35 
36 private slots:
37  void on_ignoreNoDataCheckbox_toggled(bool isChecked);
38  void on_rasterValueButton_toggled(bool isChecked);
40 
42  void accept() override;
43 
45  void reject() override { this->done(QDialog::Rejected); }
46 };
A dialog window for mapping a 2d mesh based on a raster file.
std::string getNewMeshName() const
void on_rasterValueButton_toggled(bool isChecked)
void on_ignoreNoDataCheckbox_toggled(bool isChecked)
bool getIgnoreNoData() const
bool useRasterMapping() const
void accept() override
Instructions if the OK-Button has been pressed.
std::string getRasterPath() const
bool useStaticMapping() const
double getNoDataReplacement() const
void reject() override
Instructions if the Cancel-Button has been pressed.
MeshMapping2DDialog(QDialog *parent=nullptr)
double getStaticValue() const