#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 }; 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); QPixmap convertToPixmap(const ImageInfo& imgData); void yuv422_to_rgb888(const unsigned char* src, unsigned char* dst, int width, int height); typedef struct { int maxRow; int maxCol; double minX; double minY; double maxX; double maxY; }MaxRow_Col; 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; QMenu *contextMenu = nullptr; QPixmap globalPixmap; QMap maxRow_Colmap; public: QGraphicsScene* scene = nullptr; WaferGraphicsView* view = nullptr; }; #endif // WAFER_H