code_production/app/HGProductionTool/hgscanner.cpp

52 lines
994 B
C++
Raw Normal View History

2022-12-15 06:12:53 +00:00
#include "hgscanner.h"
2022-12-26 08:24:20 +00:00
#include <QMessageBox>
2022-12-26 10:38:34 +00:00
#include "form_maininterface.h"
2022-12-15 06:12:53 +00:00
2022-12-26 10:38:34 +00:00
hgscanner::hgscanner(Form_mainInterface *form, SANE_Handle h)
: m_interface(form)
, devHandle_(h)
2022-12-15 06:12:53 +00:00
{
}
hgscanner::~hgscanner()
{
}
parameter* hgscanner::get_user_input(data_from from, value_type type, const wchar_t* title, const wchar_t* desc)
{
return nullptr;
}
void hgscanner::test_callback(const wchar_t* name, test_event ev, void* data, size_t flag)
{
2022-12-26 08:24:20 +00:00
QString testName = QString::fromStdWString(name);
QString info = QString::fromStdWString((const wchar_t*)data);
2022-12-15 11:53:41 +00:00
if (ev == ui_helper::TEST_EVENT_TIPS)
{
2022-12-15 06:12:53 +00:00
2022-12-15 11:53:41 +00:00
}
else if(ev == ui_helper::TEST_EVENT_RESULT)
{
}
2022-12-15 06:12:53 +00:00
}
int hgscanner::register_sane_callback(sane_callback cb, void* param)
{
2022-12-15 11:53:41 +00:00
cb_ = cb;
2022-12-15 06:12:53 +00:00
return 0;
}
int hgscanner::unregister_sane_callback(sane_callback cb)
{
2022-12-15 11:53:41 +00:00
2022-12-15 06:12:53 +00:00
return 0;
}
int hgscanner::io_control(unsigned long code, void* data, unsigned* len)
{
sane_io_control(devHandle_, code, data, len);
return 0;
2022-12-26 08:24:20 +00:00
}