OGS
FileListDialog.h
Go to the documentation of this file.
1
15#pragma once
16
17#include "ui_FileList.h"
18#include <QDialog>
19#include <QFileDialog>
20#include <QStringListModel>
21
22enum class FileType {
23 GML, // xml-geometries
24 VTU, // xml-meshes
25 GLI, // ascii-geometries
26 MSH, // ascii-meshes
27};
28
32class FileListDialog : public QDialog, private Ui_FileList
33{
34 Q_OBJECT
35
36public:
38 FileListDialog(FileType input, FileType output, QWidget* parent = nullptr);
40 ~FileListDialog() override;
41
43 const QStringList getInputFileList() const { return _allFiles.stringList(); };
45 const QString getOutputDir() const { return _output_dir; };
46
47private:
49 QString getFileTypeString(FileType file_type) const;
51 void displayWarningLabel() const;
52
53 QStringListModel _allFiles;
54 QString _output_dir;
57
58private slots:
62
64 void accept() override;
65
67 void reject() override;
68};
FileType
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.
const QStringList getInputFileList() const
Returns list of all selected files.
FileListDialog(FileType input, FileType output, QWidget *parent=nullptr)
Constructor.
const QString getOutputDir() const
Returns selected output directory.
void reject() override
Instructions if the Cancel-Button has been pressed.
const FileType _output_file_type
void on_removeButton_pressed()
QString _output_dir