code_app/app/scantool/form_saveparam.h

72 lines
1.5 KiB
C
Raw Normal View History

2024-04-24 03:57:56 +00:00
#ifndef FORM_SAVEPARAM_H
#define FORM_SAVEPARAM_H
#include <QWidget>
2024-04-30 09:16:13 +00:00
#include <string>
2024-04-24 03:57:56 +00:00
#include "dialog_writesettings.h"
namespace Ui {
class Form_SaveParam;
}
struct SaveParam
{
2024-04-30 09:16:13 +00:00
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;
2024-04-24 03:57:56 +00:00
};
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:
2024-04-30 09:16:13 +00:00
int getFormatIndex(const std::string &ext, bool ocr);
2024-04-24 03:57:56 +00:00
private slots:
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;
};
#endif // FORM_SAVEPARAM_H