#ifndef CSVIMPORTDIALOG_H #define CSVIMPORTDIALOG_H #include #include #include "CsvData.h" #include "CsvDialog.h" class DictTableView; class Dictionary; class DicCsvReader; class DictTableModel; class AppModel; class CsvImportDialog: public CsvDialog { Q_OBJECT public: CsvImportDialog(QWidget* parent, QString filePath, const AppModel* appModel ); ~CsvImportDialog(); Dictionary* getDictionary() { return dictionary; } protected: QLayout* createLeftGroupLayout(); QString getLeftGroupTitle() { return tr("Input"); } QLayout* createSeparatorsLayout(); QLayout* createPreviewLt(); protected slots: void updatePreview(); private slots: void UpdateCommentCharacterCombo(); void DeleteDictionary(); private: QWidget* createFromLineSpin(); QWidget* createColsToImportSpin(); QWidget* createFirstLineIsHeaderCB(); void createSeparationRadioButtons(); FieldSeparationMode getSeparationMode(); QWidget* createCommentCharBox(); QWidget* createPreview(); private: QString filePath; Dictionary* dictionary; // not own, created here const AppModel* appModel; DicCsvReader* dicReader; DictTableModel* iPreviewModel; QSpinBox* fromLineSpin; // 1-based QSpinBox* colsToImportSpin; // 1-based; 0 = all QCheckBox* firstLineIsHeaderCB; QRadioButton* anyCharacterRB; QRadioButton* anyCombinationRB; QRadioButton* exactStringRB; QCheckBox* commentCharCB; DictTableView* previewTable; }; #endif