#ifndef PRINTERTHREADHANDLE_H
#define PRINTERTHREADHANDLE_H

#include <QObject>
#include <QThread>
#include "printer/printermanger.h"

// 单独线程处理打印事件，不出现批量卡机
class PrinterThreadHandle : public QObject
{
    Q_OBJECT
public:
    explicit PrinterThreadHandle(QObject *parent = nullptr);

signals:
    void printerBox(QSharedPointer<BoxInfo> info);
    void printerBox1(QSharedPointer<BoxInfo> info);
    void printerBoxModel(QSharedPointer<BoxInfo> info,int ModelIndex);
    void printerPack(QSharedPointer<PackInfo> info);
    void printerPackModel(QSharedPointer<PackInfo> info,int ModelIndex);
public slots:
    void start();

private slots:
        void updateConfig();
private:
    PrinterManger * manger;
    QThread * thread;
};

#endif // PRINTERTHREADHANDLE_H
