printerthreadhandle.h 753 B

123456789101112131415161718192021222324252627282930
  1. #ifndef PRINTERTHREADHANDLE_H
  2. #define PRINTERTHREADHANDLE_H
  3. #include <QObject>
  4. #include <QThread>
  5. #include "printer/printermanger.h"
  6. // 单独线程处理打印事件,不出现批量卡机
  7. class PrinterThreadHandle : public QObject
  8. {
  9. Q_OBJECT
  10. public:
  11. explicit PrinterThreadHandle(QObject *parent = nullptr);
  12. signals:
  13. void printerBox(QSharedPointer<BoxInfo> info);
  14. void printerBoxModel(QSharedPointer<BoxInfo> info,int ModelIndex);
  15. void printerPack(QSharedPointer<PackInfo> info);
  16. void printerPackModel(QSharedPointer<PackInfo> info,int ModelIndex);
  17. public slots:
  18. void start();
  19. private slots:
  20. void updateConfig();
  21. private:
  22. PrinterManger * manger;
  23. QThread * thread;
  24. };
  25. #endif // PRINTERTHREADHANDLE_H