OGS
MeshMapping2DDialog.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 "ui_MeshMapping2D.h"
7
8#include <QDialog>
9#include <QLineEdit>
10#include <QString>
11
15class MeshMapping2DDialog : public QDialog, private Ui_MeshMapping2D
16{
17 Q_OBJECT
18
19public:
20 explicit MeshMapping2DDialog(QDialog* parent = nullptr);
21
22 bool useRasterMapping() const { return this->rasterValueButton->isChecked(); }
23 bool useStaticMapping() const { return this->staticValueButton->isChecked(); }
24 std::string getRasterPath() const { return this->rasterPathEdit->text().toStdString(); }
25 double getNoDataReplacement() const { return this->noDataValueEdit->text().toDouble(); }
26 bool getIgnoreNoData() const { return this->ignoreNoDataCheckbox->isChecked(); }
27 double getStaticValue() const { return this->staticValueEdit->text().toDouble(); }
28 std::string getNewMeshName() const { return this->newNameEdit->text().toStdString(); }
29
30private slots:
31 void on_ignoreNoDataCheckbox_toggled(bool isChecked);
32 void on_rasterValueButton_toggled(bool isChecked);
34
36 void accept() override;
37
39 void reject() override { this->done(QDialog::Rejected); }
40};
std::string getNewMeshName() const
void on_rasterValueButton_toggled(bool isChecked)
void on_ignoreNoDataCheckbox_toggled(bool isChecked)
void accept() override
Instructions if the OK-Button has been pressed.
std::string getRasterPath() const
double getNoDataReplacement() const
void reject() override
Instructions if the Cancel-Button has been pressed.
MeshMapping2DDialog(QDialog *parent=nullptr)
double getStaticValue() const