diff options
Diffstat (limited to 'src/export-import/CsvExportDialog.h')
-rw-r--r-- | src/export-import/CsvExportDialog.h | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/src/export-import/CsvExportDialog.h b/src/export-import/CsvExportDialog.h new file mode 100644 index 0000000..d99c421 --- /dev/null +++ b/src/export-import/CsvExportDialog.h @@ -0,0 +1,52 @@ +#ifndef CSVEXPORTDIALOG_H +#define CSVEXPORTDIALOG_H + +#include <QtCore> +#include <QtWidgets> + +#include "CsvDialog.h" + +class Dictionary; +class DicCsvWriter; + +class CsvExportDialog: public CsvDialog +{ + Q_OBJECT + +public: + CsvExportDialog(QWidget* parent, const Dictionary* dict ); + ~CsvExportDialog(); + + void SaveCSVToFile( const QString& aFilePath ); + +protected: + QLayout* createLeftGroupLayout(); + QString getLeftGroupTitle() { return tr("Output"); } + QLayout* createSeparatorsLayout(); + QLayout* createPreviewLt(); + +protected slots: + void updatePreview(); + +private slots: + void UpdateQuoteAllFieldsCB(); + void UpdateCharVisibility(); + +private: + QWidget* createUsedColsEdit(); + QWidget* createWriteColumnNamesBox(); + QList<int> getUsedColumns(); + QWidget* createPreview(); + QCheckBox* createShowInvisibleBox(); + +private: + const Dictionary* dictionary; // not own, created here + DicCsvWriter* dicWriter; + QLineEdit* usedColsEdit; + QCheckBox* writeColumnNamesCB; + QCheckBox* quoteAllFieldsCB; + QTextEdit* csvPreview; + QCheckBox* showInvisibleCharsCB; +}; + +#endif |