DieItem.h 698 B

1234567891011121314151617181920212223242526272829303132
  1. #ifndef DIEITEM_H
  2. #define DIEITEM_H
  3. #include <QGraphicsRectItem>
  4. #include <QColor>
  5. enum PICK_DIE_STATUS {
  6. DIE_EXIST,/*原来的*/
  7. PICK_ING,/*正在取*/
  8. NO_EXIST,/*已取走*/
  9. SKIP_DIE,/*跳过的点*/
  10. EDGE_DIE /*边缘无效*/
  11. };
  12. // 自定义矩形代表晶圆单元格
  13. class DieItem : public QGraphicsRectItem {
  14. public:
  15. DieItem(int row, int col, PICK_DIE_STATUS status, qreal size, QGraphicsItem* parent = nullptr);
  16. // 获取单元格的行列号
  17. int getRow() const;
  18. int getCol() const;
  19. private:
  20. int row, col;
  21. PICK_DIE_STATUS status;
  22. // 获取单元格状态颜色
  23. QColor getColorByStatus(PICK_DIE_STATUS status);
  24. };
  25. #endif // DIEITEM_H