Loading [MathJax]/extensions/MathMenu.js
OGS
Toggle main menu visibility
Main Page
Related Pages
Namespaces
Namespace List
Namespace Members
All
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Variables
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
Typedefs
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
v
w
z
Enumerations
b
c
d
e
f
g
i
l
m
n
o
p
s
t
u
v
Enumerator
a
b
c
d
e
f
g
h
l
m
n
p
r
s
t
v
y
Classes
Class List
Class Index
Class Hierarchy
Files
File List
File Members
All
a
b
c
d
e
f
g
i
k
m
n
o
p
r
s
t
v
w
x
Functions
a
c
d
e
f
g
i
m
o
p
r
s
t
v
w
Variables
Typedefs
Enumerations
Macros
b
c
g
m
n
o
p
r
s
t
▼
OGS
►
OpenGeoSys 6.5.4-171-gf370a16a5 source code documentation
►
OGS CTests—Project Files
►
OGS Input File Parameters—Quality Assurance
►
OGS Input File Parameters
BulkMappingDocuPage
Todo List
OGS Input File Parameters—List of incomplete documentation pages
Bibliography
►
Namespaces
►
Classes
▼
Files
▼
File List
▼
Applications
►
ApplicationsLib
►
CLI
▼
DataExplorer
►
Base
▼
DataView
►
DiagramView
►
StratView
►
AddFaultsToVoxelGridDialog.cpp
►
AddFaultsToVoxelGridDialog.h
AddLayerToMeshDialog.cpp
►
AddLayerToMeshDialog.h
►
BaseItem.h
ColorTableModel.cpp
►
ColorTableModel.h
ColorTableView.cpp
►
ColorTableView.h
CondFromRasterDialog.cpp
►
CondFromRasterDialog.h
►
CondItem.h
CreateStructuredGridDialog.cpp
►
CreateStructuredGridDialog.h
DataExplorerSettingsDialog.cpp
►
DataExplorerSettingsDialog.h
DirectConditionGenerator.cpp
►
DirectConditionGenerator.h
►
ElementTreeModel.cpp
►
ElementTreeModel.h
ElementTreeView.cpp
►
ElementTreeView.h
FemConditionModel.cpp
►
FemConditionModel.h
FemConditionView.cpp
►
FemConditionView.h
GEOModels.cpp
►
GEOModels.h
►
GeoObjectListItem.h
GeoOnMeshMappingDialog.cpp
►
GeoOnMeshMappingDialog.h
GeoTabWidget.cpp
►
GeoTabWidget.h
►
GeoTreeItem.h
GeoTreeModel.cpp
►
GeoTreeModel.h
GeoTreeView.cpp
►
GeoTreeView.h
GMSHPrefsDialog.cpp
►
GMSHPrefsDialog.h
Layers2GridDialog.cpp
►
Layers2GridDialog.h
LicenseDialog.cpp
►
LicenseDialog.h
LinearEditDialog.cpp
►
LinearEditDialog.h
LineEditDialog.cpp
►
LineEditDialog.h
MergeGeometriesDialog.cpp
►
MergeGeometriesDialog.h
MeshAnalysisDialog.cpp
►
MeshAnalysisDialog.h
MeshElementRemovalDialog.cpp
►
MeshElementRemovalDialog.h
MeshItem.cpp
►
MeshItem.h
MeshLayerEditDialog.cpp
►
MeshLayerEditDialog.h
MeshMapping2DDialog.cpp
►
MeshMapping2DDialog.h
MeshModel.cpp
►
MeshModel.h
MeshQualitySelectionDialog.cpp
►
MeshQualitySelectionDialog.h
MeshTabWidget.cpp
►
MeshTabWidget.h
MeshValueEditDialog.cpp
►
MeshValueEditDialog.h
MeshView.cpp
►
MeshView.h
ModellingTabWidget.cpp
►
ModellingTabWidget.h
ModelTreeItem.cpp
►
ModelTreeItem.h
ProcessModel.cpp
►
ProcessModel.h
►
ProcessVarItem.h
ProcessView.cpp
►
ProcessView.h
RasterDataToMeshDialog.cpp
►
RasterDataToMeshDialog.h
SaveMeshDialog.cpp
►
SaveMeshDialog.h
SelectMeshDialog.cpp
►
SelectMeshDialog.h
SetNameDialog.cpp
►
SetNameDialog.h
SHPImportDialog.cpp
►
SHPImportDialog.h
StationTabWidget.cpp
►
StationTabWidget.h
StationTreeModel.cpp
►
StationTreeModel.h
StationTreeView.cpp
►
StationTreeView.h
SurfaceExtractionDialog.cpp
►
SurfaceExtractionDialog.h
TranslateDataDialog.cpp
►
TranslateDataDialog.h
►
Vtu2GridDialog.cpp
►
Vtu2GridDialog.h
►
VtkVis
►
main.cpp
mainwindow.cpp
►
mainwindow.h
►
DataHolderLib
►
FileIO
►
InSituLib
►
Python
►
Utils
►
BaseLib
►
build
►
ChemistryLib
Documentation
►
GeoLib
►
InfoLib
►
MaterialLib
►
MathLib
►
MeshGeoToolsLib
►
MeshLib
►
MeshToolsLib
►
NumLib
►
ParameterLib
►
ProcessLib
►
File Members
RasterDataToMeshDialog.cpp
Go to the documentation of this file.
1
11
#include "
RasterDataToMeshDialog.h
"
12
13
#include <QFileDialog>
14
#include <QSettings>
15
16
#include "
Base/OGSError.h
"
17
#include "
Base/StrictDoubleValidator.h
"
18
19
RasterDataToMeshDialog::RasterDataToMeshDialog
(std::string
const
& mesh_name,
20
QDialog* parent)
21
: QDialog(parent)
22
{
23
setupUi(
this
);
24
25
this->meshNameEdit->setText(QString::fromStdString(mesh_name) +
"_Raster"
);
26
auto
* no_data_validator =
new
StrictDoubleValidator
(
this
);
27
this->noDataValueEdit->setValidator(no_data_validator);
28
}
19
RasterDataToMeshDialog::RasterDataToMeshDialog
(std::string
const
& mesh_name, {
…
}
29
30
void
RasterDataToMeshDialog::on_rasterSelectButton_pressed
()
31
{
32
QSettings settings;
33
QString filename = QFileDialog::getOpenFileName(
34
this
,
"Select raster file to open"
,
35
settings.value(
"lastOpenedRasterFileDirectory"
).toString(),
36
"ASCII raster files (*.asc);;All files (* *.*)"
);
37
this->rasterPathEdit->setText(filename);
38
QFileInfo fi(filename);
39
settings.setValue(
"lastOpenedRasterFileDirectory"
, fi.absolutePath());
40
}
30
void
RasterDataToMeshDialog::on_rasterSelectButton_pressed
() {
…
}
41
42
void
RasterDataToMeshDialog::accept
()
43
{
44
if
(this->rasterPathEdit->text().isEmpty())
45
{
46
OGSError::box
(
"Please specify path to raster file."
);
47
return
;
48
}
49
else
if
(this->arrayNameEdit->text().isEmpty())
50
{
51
OGSError::box
(
"Please specify a name for the new array."
);
52
return
;
53
}
54
else
if
(this->noDataValueEdit->text().isEmpty())
55
{
56
OGSError::box
(
"Please specify No Data value."
);
57
return
;
58
}
59
else
if
(this->meshNameEdit->text().isEmpty())
60
{
61
OGSError::box
(
"Please specify name of new mesh."
);
62
return
;
63
}
64
65
this->done(QDialog::Accepted);
66
}
42
void
RasterDataToMeshDialog::accept
() {
…
}
OGSError.h
Definition of the OGSError class.
RasterDataToMeshDialog.h
StrictDoubleValidator.h
Implementation of the StrictDoubleValidator class.
OGSError::box
static void box(const QString &e)
Definition
OGSError.cpp:23
RasterDataToMeshDialog::accept
void accept() override
Definition
RasterDataToMeshDialog.cpp:42
RasterDataToMeshDialog::RasterDataToMeshDialog
RasterDataToMeshDialog(std::string const &mesh_name, QDialog *parent=nullptr)
Definition
RasterDataToMeshDialog.cpp:19
RasterDataToMeshDialog::on_rasterSelectButton_pressed
void on_rasterSelectButton_pressed()
Definition
RasterDataToMeshDialog.cpp:30
StrictDoubleValidator
A validator for an input field which only accepts decimals. Source code adapted from StackOverflow
Definition
StrictDoubleValidator.h:23
Applications
DataExplorer
DataView
RasterDataToMeshDialog.cpp
Generated by
1.12.0