#ifndef FORM_SAVEPARAM_H #define FORM_SAVEPARAM_H #include #include #include #include "dialog_writesettings.h" namespace Ui { class Form_SaveParam; } struct SaveParam { std::string savePath; bool isUseSubfolderByTime; bool isUseSubfolderByBlankPages; bool isUseSubfolderByColor; int jpegQuality; int tiffCompressionBW; int tiffCompression; int tiffQuality; std::string fileNamePrefix; int fileNameStartIndex; int fileNameDigits; int fileNameOddEvenType; std::string fileNameExt; bool isOcr; bool isSaveAsMultiPage; int multiPagesType; int customMultiPages; }; class Form_SaveParam : public QWidget { Q_OBJECT public: explicit Form_SaveParam(const SaveParam &saveParam, QWidget *parent = nullptr); ~Form_SaveParam(); SaveParam GetSaveParam(); static SaveParam GetDefSaveParam(); private: int getFormatIndex(const std::string &ext, bool ocr); private slots: void on_closeDevice(); void on_btn_directory_clicked(); void on_btn_option_clicked(); void on_cbox_format_currentIndexChanged(int index); void on_lineEdit_directory_textChanged(const QString& arg1); void on_cbox_digit_currentIndexChanged(int index); void on_cbtn_multiFile_toggled(bool checked); void on_radio_multiCustom_toggled(bool checked); void on_lineEdit_fileName_textChanged(const QString &arg1); void on_spin_index_valueChanged(int arg1); private: Ui::Form_SaveParam *ui; WriteParam m_writeParam; Dialog_WriteSettings *m_writeSettingsDlg; }; #endif // FORM_SAVEPARAM_H