2022-12-15 06:12:53 +00:00
|
|
|
#pragma once
|
|
|
|
#include "sane/sane_ex.h"
|
|
|
|
#include "ui_helper.h"
|
|
|
|
#include "test_base.h"
|
2023-02-16 05:52:18 +00:00
|
|
|
#include <QString>
|
2022-12-15 12:16:43 +00:00
|
|
|
|
2022-12-26 10:38:34 +00:00
|
|
|
class Form_mainInterface;
|
2023-01-04 06:28:44 +00:00
|
|
|
class Form_BurnMode;
|
2023-01-06 07:17:48 +00:00
|
|
|
class Dialog_InputSerialNum;
|
2022-12-26 10:38:34 +00:00
|
|
|
|
2022-12-15 06:12:53 +00:00
|
|
|
class hgscanner :public ui_helper
|
|
|
|
{
|
|
|
|
public:
|
2023-01-06 07:17:48 +00:00
|
|
|
hgscanner(Form_mainInterface *form, Form_BurnMode *burnMode, Dialog_InputSerialNum *inputSnDlg, SANE_Handle h);
|
2022-12-15 06:12:53 +00:00
|
|
|
~hgscanner();
|
|
|
|
virtual parameter* get_user_input(data_from from, value_type type, const wchar_t* title, const wchar_t* desc = NULL);
|
|
|
|
virtual void test_callback(const wchar_t* name/*test name*/, test_event ev, void* data, size_t flag);
|
|
|
|
virtual int register_sane_callback(sane_callback cb, void* param);
|
|
|
|
virtual int unregister_sane_callback(sane_callback cb);
|
|
|
|
virtual int io_control(unsigned long code, void* data, unsigned* len);
|
2022-12-15 12:16:43 +00:00
|
|
|
sane_callback cb_;
|
2023-02-08 10:24:19 +00:00
|
|
|
|
|
|
|
void setDistortValue(double value);
|
2023-02-16 05:52:18 +00:00
|
|
|
|
|
|
|
private:
|
|
|
|
union VIDPID
|
|
|
|
{
|
|
|
|
struct
|
|
|
|
{
|
|
|
|
unsigned short VID;
|
|
|
|
unsigned short PID;
|
|
|
|
};
|
|
|
|
unsigned int Value;
|
|
|
|
};
|
|
|
|
|
2022-12-15 06:12:53 +00:00
|
|
|
private:
|
2022-12-26 10:38:34 +00:00
|
|
|
class Form_mainInterface *m_interface;
|
2023-01-04 06:28:44 +00:00
|
|
|
class Form_BurnMode *m_burnMode;
|
2023-01-06 07:17:48 +00:00
|
|
|
class Dialog_InputSerialNum *m_inputSnDlg;
|
2022-12-15 06:12:53 +00:00
|
|
|
SANE_Handle devHandle_;
|
2023-02-08 10:24:19 +00:00
|
|
|
|
2023-02-16 05:52:18 +00:00
|
|
|
private:
|
2023-02-08 10:24:19 +00:00
|
|
|
double m_distortValue;
|
2023-02-16 05:52:18 +00:00
|
|
|
VIDPID m_vidPid;
|
|
|
|
int m_sleepTime;
|
|
|
|
int m_speedMode;
|
|
|
|
QString m_devSn;
|
2022-12-15 06:12:53 +00:00
|
|
|
};
|
|
|
|
|