diff --git a/app/libtest/mainwindow.cpp b/app/libtest/mainwindow.cpp index 2de41f67..78728773 100644 --- a/app/libtest/mainwindow.cpp +++ b/app/libtest/mainwindow.cpp @@ -1,6 +1,7 @@ #include "mainwindow.h" #include "ui_mainwindow.h" #include +#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) diff --git a/app/libtest/mainwindow.h b/app/libtest/mainwindow.h index 9a00b17b..5e8a9625 100644 --- a/app/libtest/mainwindow.h +++ b/app/libtest/mainwindow.h @@ -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); diff --git a/build2/qt/HGLibTest/HGLibTest.pro b/build2/qt/HGLibTest/HGLibTest.pro index 3174c2e8..80a58795 100644 --- a/build2/qt/HGLibTest/HGLibTest.pro +++ b/build2/qt/HGLibTest/HGLibTest.pro @@ -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}