diff options
author | Jedidiah Barber <contact@jedbarber.id.au> | 2021-07-14 11:49:10 +1200 |
---|---|---|
committer | Jedidiah Barber <contact@jedbarber.id.au> | 2021-07-14 11:49:10 +1200 |
commit | d24f813f3f2a05c112e803e4256b53535895fc98 (patch) | |
tree | 601e6ae9a1cd44bcfdcf91739a5ca36aedd827c9 /src/export-import/CsvExportDialog.h |
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 |