sdk测试工具增加输出图像流程

This commit is contained in:
yangjiaxuan 2024-05-21 15:06:36 +08:00
parent 43008b7cc6
commit 2cb0e93d14
3 changed files with 14 additions and 1 deletions

View File

@ -1,6 +1,7 @@
#include "mainwindow.h"
#include "ui_mainwindow.h"
#include <QDateTime>
#include "HGImgFmt.h"
MainWindow::MainWindow(QWidget *parent)
: QMainWindow(parent)
@ -13,6 +14,7 @@ MainWindow::MainWindow(QWidget *parent)
connect(this, SIGNAL(sane_dev_arrive(QString)), this, SLOT(on_sane_dev_arrive(QString)), Qt::QueuedConnection);
connect(this, SIGNAL(sane_dev_remove(QString)), this, SLOT(on_sane_dev_remove(QString)), Qt::QueuedConnection);
connect(this, SIGNAL(newImage(void*)), this, SLOT(on_newImage(void*)), Qt::DirectConnection);
HGLib_InitDevice(DeviceHotPlugEventFunc, this);
}
@ -46,6 +48,7 @@ void MainWindow::DeviceScanEventFunc(HGLibDevice device, HGUInt event, HGInt ope
void MainWindow::DeviceScanImageFunc(HGLibDevice device, HGLibImage image, HGPointer param)
{
MainWindow *p = (MainWindow*)param;
emit p->newImage(image);
int id = HGLib_GetDevicePageId(device);
char info[64];
sprintf(info, "Page id: %d", id);
@ -94,6 +97,11 @@ void MainWindow::on_sane_dev_remove(QString devName)
}
}
void MainWindow::on_newImage(void *image)
{
}
void MainWindow::on_comboDevList_currentIndexChanged(int index)
{
if (-1 != index)

View File

@ -24,10 +24,14 @@ signals:
void sane_dev_arrive(QString devName);
void sane_dev_remove(QString devName);
void newImage(void *image);
private slots:
void on_sane_dev_arrive(QString devName);
void on_sane_dev_remove(QString devName);
void on_newImage(void *image);
private slots:
void on_comboDevList_currentIndexChanged(int index);

View File

@ -47,13 +47,14 @@ win32 {
}
LIBS += -lgdi32 -lgdiplus -ldbghelp -luser32 -ladvapi32
LIBS += -L$$PWD/../../build/$${MY_OS}/$${OEM_NAME}/$${MY_ARCH}/$${MY_CONFIGURE} -l$${OEM_PREFIX}ScannerLib
LIBS += -L$$PWD/../../build/$${MY_OS}/$${OEM_NAME}/$${MY_ARCH}/$${MY_CONFIGURE} -l$${OEM_PREFIX}ScannerLib -l$${OEM_PREFIX}ImgFmt
LIBS += -L$$PWD/../../../../release/win/$${MY_ARCH}/OEM/$${OEM_NAME}
}
INCLUDEPATH += $$PWD/../../../sdk/scannerlib
INCLUDEPATH += $$PWD/../../../modules/base
INCLUDEPATH += $$PWD/../../../modules/imgfmt
DESTDIR = $$PWD/../../build/$${MY_OS}/$${OEM_NAME}/$${MY_ARCH}/$${MY_CONFIGURE}
UI_DIR = $$PWD/../../temp/$${MY_OS}/$${OEM_NAME}/$${MY_ARCH}/$${MY_CONFIGURE}/$${TARGET}