Wafer.h 918 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. #ifndef WAFER_H
  2. #define WAFER_H
  3. #pragma once
  4. #include <QWidget>
  5. #include <vector>
  6. #include <QMenu>
  7. #include "WaferGraphicsView.h"
  8. #include "DieItem.h"
  9. #include <CWaferMatrix.h>
  10. enum OperateMode {
  11. ModeImage, // 显示图片
  12. ModeView // 显示 view
  13. };
  14. class Wafer : public QWidget
  15. {
  16. Q_OBJECT
  17. public:
  18. explicit Wafer(int flag, QWidget *parent = nullptr);
  19. void initFrom(QWidget *parent);
  20. void paintInitFrom(QWidget *parent);
  21. QPixmap getGlobalPixmap() const;
  22. QColor getColorByStatus(ns_mat::PICK_DIE_STATUS status);
  23. signals:
  24. void sendCoordinates(int x, int y);
  25. private:
  26. int Flag;
  27. QVector<ns_mat::WAFER_MATRIX_POINT_INFO_STRUCT> waferData;
  28. int rows, cols;
  29. int centerX, centerY;
  30. qreal radius;
  31. QMenu *contextMenu = nullptr;
  32. QPixmap globalPixmap;
  33. public:
  34. QGraphicsScene* scene = nullptr;
  35. WaferGraphicsView* view = nullptr;
  36. };
  37. #endif // WAFER_H