OGS
DataExplorerSettingsDialog.cpp
Go to the documentation of this file.
1
15
#include "
DataExplorerSettingsDialog.h
"
16
17
#include <QFileDialog>
18
#include <QSettings>
19
20
#include "
Base/OGSError.h
"
21
22
DataExplorerSettingsDialog::DataExplorerSettingsDialog
(QDialog* parent)
23
: QDialog(parent)
24
{
25
setupUi(
this
);
26
27
QSettings settings;
28
this->gmshPathEdit->setText(
29
settings.value(
"DataExplorerGmshPath"
).toString());
30
}
31
32
DataExplorerSettingsDialog::~DataExplorerSettingsDialog
() =
default
;
33
34
void
DataExplorerSettingsDialog::on_gmshPathButton_clicked
()
35
{
36
QSettings settings;
37
QString file_name = QFileDialog::getOpenFileName(
38
this
,
"Select path for GMSH..."
,
39
settings.value(
"DataExplorerGmshPath"
).toString(),
"*gmsh*"
);
40
if
(!file_name.isEmpty())
41
{
42
this->gmshPathEdit->setText(file_name);
43
}
44
}
45
46
void
DataExplorerSettingsDialog::accept
()
47
{
48
QSettings settings;
49
settings.setValue(
"DataExplorerGmshPath"
, this->gmshPathEdit->text());
50
this->done(QDialog::Accepted);
51
}
DataExplorerSettingsDialog.h
Definition of the DataExplorerSettingsDialog class.
OGSError.h
Definition of the OGSError class.
DataExplorerSettingsDialog::accept
void accept() override
Instructions if the OK-Button has been pressed.
Definition
DataExplorerSettingsDialog.cpp:46
DataExplorerSettingsDialog::on_gmshPathButton_clicked
void on_gmshPathButton_clicked()
Definition
DataExplorerSettingsDialog.cpp:34
DataExplorerSettingsDialog::DataExplorerSettingsDialog
DataExplorerSettingsDialog(QDialog *parent=nullptr)
Definition
DataExplorerSettingsDialog.cpp:22
DataExplorerSettingsDialog::~DataExplorerSettingsDialog
~DataExplorerSettingsDialog() override
Applications
DataExplorer
DataView
DataExplorerSettingsDialog.cpp
Generated by
1.11.0