1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162 |
- #ifndef WAFER_H
- #define WAFER_H
- #include <QWidget>
- #include <vector>
- #include <QMenu>
- #include "WaferGraphicsView.h"
- #include "DieItem.h"
- typedef struct
- {
- double x;
- double y;
- }XY_DOUBLE_STRUCT;
- typedef struct
- {
- int nDieMatrixId;
- int nDieRow;
- int nDieCol;
- int iDieIndex;
- 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<WAFER_MATRIX_POINT_INFO_STRUCT> waferData;
- int rows, cols;
- int centerX, centerY;
- qreal radius;
- QMenu *contextMenu = nullptr;
- QPixmap globalPixmap;
- };
- #endif
|