OGS
DataExplorerSettingsDialog.cpp
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) OpenGeoSys Community (opengeosys.org)
2// SPDX-License-Identifier: BSD-3-Clause
3
5
6#include <QFileDialog>
7#include <QSettings>
8
9#include "Base/OGSError.h"
10
12 : QDialog(parent)
13{
14 setupUi(this);
15
16 QSettings settings;
17 this->gmshPathEdit->setText(
18 settings.value("DataExplorerGmshPath").toString());
19}
20
22
24{
25 QSettings settings;
26 QString file_name = QFileDialog::getOpenFileName(
27 this, "Select path for GMSH...",
28 settings.value("DataExplorerGmshPath").toString(), "*gmsh*");
29 if (!file_name.isEmpty())
30 {
31 this->gmshPathEdit->setText(file_name);
32 }
33}
34
36{
37 QSettings settings;
38 settings.setValue("DataExplorerGmshPath", this->gmshPathEdit->text());
39 this->done(QDialog::Accepted);
40}
void accept() override
Instructions if the OK-Button has been pressed.
DataExplorerSettingsDialog(QDialog *parent=nullptr)
~DataExplorerSettingsDialog() override