Wafer.h 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. #ifndef WAFER_H
  2. #define WAFER_H
  3. #include <QWidget>
  4. #include <vector>
  5. #include <QMenu>
  6. #include "WaferGraphicsView.h"
  7. #include "DieItem.h"
  8. typedef struct
  9. {
  10. double x;
  11. double y;
  12. }XY_DOUBLE_STRUCT;
  13. typedef struct
  14. {
  15. int nDieMatrixId; //晶圆矩阵Id
  16. int nDieRow; //固晶点在矩阵中所在行
  17. int nDieCol; //固晶点在矩阵中所在列
  18. int iDieIndex; //所在Point点ID
  19. bool bDisable; //不可用点,等同于无效点
  20. PICK_DIE_STATUS eStatus; //晶片状态
  21. XY_DOUBLE_STRUCT stPosition; //程序设置的位置
  22. } WAFER_MATRIX_POINT_INFO_STRUCT;
  23. class Wafer : public QWidget
  24. {
  25. Q_OBJECT
  26. public:
  27. explicit Wafer(int flag, QWidget *parent = nullptr);
  28. void initFrom(QWidget *parent);
  29. void paintInitFrom(QWidget *parent);
  30. QPixmap getGlobalPixmap() const;
  31. QWidget *globalWidget;
  32. QColor getColorByStatus(PICK_DIE_STATUS status);
  33. QGraphicsScene* scene;
  34. WaferGraphicsView *view;
  35. protected:
  36. private slots:
  37. void handleAction1();
  38. void handleAction2();
  39. signals:
  40. void sendCoordinates(int x, int y);
  41. private:
  42. int Flag;
  43. void showContextMenu(const QPoint &pos);
  44. QVector<WAFER_MATRIX_POINT_INFO_STRUCT> waferData;
  45. int rows, cols;
  46. int centerX, centerY;
  47. qreal radius;
  48. QMenu *contextMenu = nullptr;
  49. QPixmap globalPixmap;
  50. };
  51. #endif // WAFER_H