#ifndef WAFER_H #define WAFER_H #pragma once #include #include #include #include "WaferGraphicsView.h" #include "DieItem.h" #include #include #include "TypeDef.h" #include #include enum OperateMode { ModeImage, // 显示图片 ModeView // 显示 view }; typedef struct { int maxRow; int maxCol; double minX; double minY; double maxX; double maxY; }MaxRow_Col; class Wafer : public QWidget { Q_OBJECT public: explicit Wafer(int flag, QWidget *parent = nullptr); void UpdataGenerateTestData(); /**晶圆 */ void UpdataVal(const std::vector& veWafer); void initFrom(QWidget *parent); void paintInitFrom(QWidget *parent); QPixmap getGlobalPixmap() const; QColor getColorByStatus(ns_mat::PICK_DIE_STATUS status); void setWaferInfo(ns_module::CViewInterface* CViewInterface); signals: void sendCoordinates(int x, int y); private: int Flag; QVector waferData; //int rows, cols; int m_dieLong; int m_dieWide; double m_centerX, m_centerY; double m_radius; /**接口指针 */ ns_module::CViewInterface* m_pCViewInterface = nullptr; QMenu *contextMenu = nullptr; QPixmap m_globalPixmap; QMap maxRow_Colmap; public: /**在外面new 画布? */ QPointer m_pScene; WaferGraphicsView* m_pView = nullptr; QPointer m_parent; }; #endif // WAFER_H