Instructions if the OK-Button has been pressed.
61{
62 QString const& file_name(this->fileNameEdit->text());
63 if (file_name.isEmpty())
64 {
66 return;
67 }
68
69 QFileInfo fi(file_name);
70 if (fi.suffix().toLower() == "vtu")
71 {
72 int const dataMode = dataModeBox->currentIndex();
73 bool const compress(compressionCheckBox->isChecked());
75 compress, dataMode) != 0)
76 {
77 return;
78 }
79 }
80 if (fi.suffix().toLower() == "msh")
81 {
82 MeshLib::IO::Legacy::MeshIO meshIO;
85 file_name.toStdString());
86 }
88
89 this->done(QDialog::Accepted);
90}
std::string writeToString()
Writes the object to a string.
static void setDir(const QString &path)
Sets the directory last used for saving a file.
void setMesh(const MeshLib::Mesh *mesh)
Set mesh for writing.
static void box(const QString &e)
int writeStringToFile(std::string_view content, std::filesystem::path const &file_path)
int writeMeshToFile(const MeshLib::Mesh &mesh, std::filesystem::path const &file_path, std::set< std::string > output_variable_names, bool const use_compression, int const data_mode)