123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566 |
- #ifndef WAFER_H
- #define WAFER_H
- #include <QWidget>
- #include <vector>
- #include <QMenu>
- #include "WaferGraphicsView.h"
- #include "DieItem.h"
- enum OperateMode {
- ModeImage,
- ModeView
- };
- 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
|