printerthreadhandle.h 609 B

12345678910111213141516171819202122232425262728
  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 printerPack(QSharedPointer<PackInfo> info);
  15. public slots:
  16. void start();
  17. private slots:
  18. void updateConfig();
  19. private:
  20. PrinterManger * manger;
  21. QThread * thread;
  22. };
  23. #endif // PRINTERTHREADHANDLE_H