PrintThread.h 979 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. #pragma once
  2. #pragma execution_character_set("utf-8")
  3. #include <qthread.h>
  4. #include "CGH_Printer.h"
  5. class CGH_Printer;
  6. class PrintThread :
  7. public QThread
  8. {
  9. Q_OBJECT
  10. public:
  11. explicit PrintThread(QObject* parent = 0);
  12. ~PrintThread();
  13. string numberToString(int n, int l = 3);
  14. protected:
  15. // QThread的虚函数
  16. // 线程处理函数
  17. // 不能直接调用,通过start()间接调用
  18. void run();
  19. signals:
  20. void TransCGH(const QString& tempCGH);
  21. void TransPrintProgress(int tempLL, int tempCC);
  22. void PrintOK();
  23. void PrintCancel();
  24. public slots:
  25. void Print();
  26. private:
  27. CGH_Printer* m_Printer;
  28. vector<int> Devices;
  29. string sAxis;
  30. double PrintLSpacing, PrintCSpacing;
  31. int PrintLine, PrintColumn;
  32. string PrintPrefix;
  33. int PrintExpose, PrintQuiet;
  34. string PrintResource;
  35. double HoloLine, HoloColumn;
  36. double initPrintX, initPrintY;
  37. double OffsetX,OffsetY;
  38. bool PRINTSTOP;
  39. CGH_Shutter* MyShutter;
  40. };