1234567891011121314151617181920212223242526272829303132 |
- #ifndef DIEITEM_H
- #define DIEITEM_H
- #include <QGraphicsRectItem>
- #include <QColor>
- enum PICK_DIE_STATUS {
- DIE_EXIST,/*原来的*/
- PICK_ING,/*正在取*/
- NO_EXIST,/*已取走*/
- SKIP_DIE,/*跳过的点*/
- EDGE_DIE /*边缘无效*/
- };
- // 自定义矩形代表晶圆单元格
- class DieItem : public QGraphicsRectItem {
- public:
- DieItem(int row, int col, PICK_DIE_STATUS status, qreal size, QGraphicsItem* parent = nullptr);
- // 获取单元格的行列号
- int getRow() const;
- int getCol() const;
- private:
- int row, col;
- PICK_DIE_STATUS status;
- // 获取单元格状态颜色
- QColor getColorByStatus(PICK_DIE_STATUS status);
- };
- #endif // DIEITEM_H
|