#ifndef WAFER_H #define WAFER_H #include #include #include #include "WaferGraphicsView.h" #include "DieItem.h" enum OperateMode { ModeImage, // 显示图片 ModeView // 显示 view }; typedef struct { double x; double y; }XY_DOUBLE_STRUCT; typedef struct { int nDieMatrixId; //晶圆矩阵Id int nDieRow; //固晶点在矩阵中所在行 int nDieCol; //固晶点在矩阵中所在列 int iDieIndex; //所在Point点ID bool bDisable; //不可用点,等同于无效点 PICK_DIE_STATUS eStatus; //晶片状态 XY_DOUBLE_STRUCT stPosition; //程序设置的位置 } WAFER_MATRIX_POINT_INFO_STRUCT; class Wafer : public QWidget { Q_OBJECT public: explicit Wafer(int flag, QWidget *parent = nullptr); void initFrom(QWidget *parent); void paintInitFrom(QWidget *parent); QPixmap getGlobalPixmap() const; QColor getColorByStatus(PICK_DIE_STATUS status); QGraphicsScene* scene; WaferGraphicsView *view; protected: private slots: void handleAction1(); void handleAction2(); signals: void sendCoordinates(int x, int y); private: int Flag; void showContextMenu(const QPoint &pos); QVector waferData; int rows, cols; int centerX, centerY; qreal radius; QMenu *contextMenu = nullptr; QPixmap globalPixmap; }; #endif // WAFER_H