28 _input_file_type(input),
29 _output_file_type(output)
45 QSettings settings(
"UFZ",
"OpenGeoSys-5");
46 QFileDialog dlg(
this);
47 dlg.setDirectory(settings.value(
"lastOpenedOgsFileDirectory").toString());
48 dlg.setFileMode(QFileDialog::ExistingFiles);
53 QStringList
const file_names = dlg.selectedFiles();
55 if (file_names.empty())
60 QStringList list =
_allFiles.stringList();
61 list.append(file_names);
63 QDir
const dir = QDir(file_names[0]);
64 settings.setValue(
"lastOpenedOgsFileDirectory", dir.absolutePath());
70 QModelIndexList selected =
71 this->listView->selectionModel()->selectedIndexes();
72 for (
auto& item : selected)
80 QSettings
const settings(
"UFZ",
"OpenGeoSys-5");
81 QFileInfo
const fi(settings.value(
"lastOpenedOgsFileDirectory").toString());
82 QString
const dirName = QFileDialog::getExistingDirectory(
83 this,
"Save to", fi.absolutePath().append(
"/"));
84 this->outputDirEdit->setText(dirName);
96 if (!this->outputDirEdit->text().isEmpty() && QDir(
_output_dir).exists())
98 this->done(QDialog::Accepted);
108 this->done(QDialog::Rejected);
115 return "OpenGeoSys geometry files (*.gml)";
119 return "OpenGeoSys mesh files (*.vtu)";
123 return "GeoSys geometry files (*.gli)";
127 return "GeoSys mesh files (*.msh)";
129 return "All files (*.*)";
134 this->warningLabel->setFixedWidth(300);
135 this->warningLabel->setFixedHeight(40);
136 QFont font = this->warningLabel->font();
137 font.setPointSize(9);
139 warningLabel->setFont(font);
140 this->warningLabel->setStyleSheet(
"QLabel { color : red; }");
141 this->warningLabel->setText(
142 "Warning: all scalar information except<br />MaterialIDs will be "
Definition of FileListDialog class.
Definition of the OGSError class.
void on_addButton_pressed()
~FileListDialog() override
Destructor.
void on_browseButton_pressed()
QStringListModel _allFiles
void accept() override
Instructions if the OK-Button has been pressed.
QString getFileTypeString(FileType file_type) const
Returns a string for the given file type enum.
const FileType _input_file_type
void displayWarningLabel() const
Display a warning for vtu- to msh-conversion.
FileListDialog(FileType input, FileType output, QWidget *parent=nullptr)
Constructor.
void reject() override
Instructions if the Cancel-Button has been pressed.
const FileType _output_file_type
void on_removeButton_pressed()
static void box(const QString &e)