Browse Source

增加物料口圆晶、华夫台的实现

Change-Id: I032a448d730fbc2c367ce41e4c5ed6aa7a0c6962
li_xingqi* 2 months ago
parent
commit
4adba8cdf4
44 changed files with 1733 additions and 875 deletions
  1. 148 0
      CInterface.h
  2. 91 0
      CameraMaterialGroupWnd/CameraImage/CameraImageHandler.cpp
  3. 21 0
      CameraMaterialGroupWnd/CameraImage/CameraImageHandler.h
  4. 103 0
      CameraMaterialGroupWnd/Group.cpp
  5. 39 0
      CameraMaterialGroupWnd/Group.h
  6. 84 0
      CameraMaterialGroupWnd/Group.ui
  7. 113 0
      CameraMaterialGroupWnd/MaterialWindow/MaterialBox.cpp
  8. 41 0
      CameraMaterialGroupWnd/MaterialWindow/MaterialBox.h
  9. 81 0
      CameraMaterialGroupWnd/MaterialWindow/Wafer.cpp
  10. 21 0
      CameraMaterialGroupWnd/MaterialWindow/Wafer.h
  11. 77 0
      CameraMaterialGroupWnd/MaterialWindow/Waffle.cpp
  12. 29 0
      CameraMaterialGroupWnd/MaterialWindow/Waffle.h
  13. 72 17
      OriginalWnd/ChartsAndCamerasWnd.cpp
  14. 11 0
      OriginalWnd/ChartsAndCamerasWnd.h
  15. 80 186
      OriginalWnd/ChartsAndCamerasWnd.ui
  16. 141 15
      OriginalWnd/MainAndSecondaryCamerasWnd.cpp
  17. 12 0
      OriginalWnd/MainAndSecondaryCamerasWnd.h
  18. 83 189
      OriginalWnd/MainAndSecondaryCamerasWnd.ui
  19. 18 6
      OriginalWnd/OriginalWnd.cpp
  20. 4 0
      OriginalWnd/OriginalWnd.h
  21. 47 2
      OriginalWnd/OriginalWnd.ui
  22. 98 42
      OriginalWnd/SingleCameraOperationWnd.cpp
  23. 14 2
      OriginalWnd/SingleCameraOperationWnd.h
  24. 200 306
      OriginalWnd/SingleCameraOperationWnd.ui
  25. 14 5
      SBTdie-bonder-ui.pro
  26. 44 45
      SBTdie-bonder-ui.pro.user
  27. 0 0
      images/LightGroup/BlueLight.png
  28. BIN
      images/LightGroup/DotLight.png
  29. 0 0
      images/LightGroup/GreenLight.png
  30. 0 0
      images/LightGroup/LightSwitch.png
  31. 0 0
      images/LightGroup/RedLight.png
  32. 0 0
      images/LightGroup/slider.png
  33. 0 0
      images/TopStatusBar/HostStatus.png
  34. 0 0
      images/TopStatusBar/MachineLink.png
  35. 0 0
      images/TopStatusBar/user.png
  36. BIN
      images/light/start.png
  37. BIN
      images/light/stop.png
  38. BIN
      images/one.png
  39. BIN
      images/two.png
  40. BIN
      images/unknown_2.png
  41. BIN
      images/unknown_3_1.png
  42. BIN
      images/unknown_4_1.png
  43. 38 49
      light.qss
  44. 9 11
      res.qrc

+ 148 - 0
CInterface.h

@@ -0,0 +1,148 @@
+#pragma once
+#include <vector>
+#include <string>
+
+#ifdef INTERFACE_DLL
+#define INTERFACE_API __declspec(dllexport)
+#else
+#define INTERFACE_API
+#endif
+
+using namespace std;
+
+// 图像数据类型,指向内存中的图像二进制数据
+typedef unsigned char* ImageDataPtr;
+
+enum ImageFormat
+{
+    GRAY8 = 0, // 灰度图,色值0~255                                           Format_Grayscale8
+    RGB888,    // 每个像素 24 位,顺序是 0xRRGGBB,没有 Alpha 通道            Format_RGB888
+    ARGB8888,  // 带有 Alpha 通道的 32 位像素格式,顺序是 0xAARRGGBB          
+    RGB32,     // 每个像素 32 位,其中包含了 RGB 颜色信息,顺序通常是 0xAARRGGBB(最高字节为 Alpha 通道,但被忽略,因为 Alpha 通道总是视为 0xFF)
+    YUV422,    // YUV4:2:2
+};
+
+/**
+ * @brief 存储图像信息的结构
+ */
+typedef struct
+{
+    int width;          // 图像宽度
+    int height;         // 图像高度
+    int channel;        // 图像通道数
+    ImageFormat format; // 图像格式
+    ImageDataPtr data;  // 图像数据
+}ImageInfo;
+
+
+typedef struct
+{
+    int Lot;                //批次号
+    int PtIndex;            //固晶点编号
+    int Attribute;          //0表示正常数据;1表示接手动允许数据;2表示跳过数据。其它无意义
+    int X_Offset;           //X方向偏差
+    int X_RefMin;           //X方向参考范围小值
+    int X_RefMax;           //X方向参考范围大值
+    int Y_Offset;           //Y方向偏差
+    int Y_RefMin;           //Y方向参考范围小值
+    int Y_RefMax;           //Y方向参考范围大值
+    int Theta_Offset;       //Theta方向偏差
+    int Theta_RefMin;       //Theta方向参考范围小值
+    int Theta_RefMax;       //Theta方向参考范围大值
+    long Time;              //加工时间
+} CPK_LIST_STRUCT; 
+
+typedef struct _CONFIG_BASE_STRUCT
+{
+    int iGroupId;
+    string strName;
+    string strDescribe;
+    int iUserGrade;
+    int iChangeFlag;
+    string strValue;
+    string strType;
+    string strDefult;
+    string strLowerLimit;
+    string strUpperLimit;
+    string strUnit;
+}CONFIG_BASE_STRUCT;
+
+class INTERFACE_API CInterface
+{
+public:
+    /// <summary>
+    /// 设置红光
+    /// </summary>
+    /// <param name="iCameraId">相机Id</param>
+    /// <param name="LightValue">灯光值</param>
+    /// <returns>成功返回0,否则返回错误码</returns>
+    long SetRedLight(int iCameraId,int LightValue);
+
+    /// <summary>
+    /// 设置绿光
+    /// </summary>
+    /// <param name="LightValue">灯光值</param>
+    /// <returns>成功返回0,否则返回错误码</returns>
+    /// 
+    long SetGreenLight(int iCameraId, int LightValue);
+    /// <summary>
+    /// 设置蓝光
+    /// </summary>
+    /// <param name="iCameraId">相机Id</param>
+    /// <param name="LightValue">灯光值</param>
+    /// <returns>成功返回0,否则返回错误码</returns>
+    long SetBlueLight(int iCameraId, int LightValue);
+
+    /// <summary>
+    /// 设置点光
+    /// </summary>
+    /// <param name="iCameraId">相机Id</param>
+    /// <param name="LightValue">灯光值</param>
+    /// <returns>成功返回0,否则返回错误码</returns>    
+    long SetPointLight(int iCameraId, int LightValue);
+
+    /// <summary>
+    /// 获取灯光值
+    /// </summary>
+    /// <param name="iCameraId">相机Id</param>
+    /// <param name="redLightValue">红光。值为-1时,表示没有该灯</param>
+    /// <param name="greenLightValue">绿光。值为-1时,表示没有该灯</param>
+    /// <param name="blueLightValue">蓝光。值为-1时,表示没有该灯</param>
+    /// <param name="pointLightValue">点光。值为-1时,表示没有该灯</param>
+    /// <returns>成功返回0,否则返回错误码</returns>
+    long GetLight(int iCameraId, int &redLightValue, int &greenLightValue, int &blueLightValue,int &pointLightValue);
+    
+    /// <summary>
+    /// 获取相机图像。调用后会阻塞,直到有新的相机图像时才返回
+    /// </summary>
+    /// <param name="iCameraId">相机Id</param>
+    /// <param name="image"></param>
+    /// <returns>成功返回0,否则返回错误码</returns>
+    long GrabImage(int iCameraId, ImageInfo& image);
+
+    /// <summary>
+    /// 获取CPK数据信息
+    /// </summary>
+    /// <param name="CpkList">CPK数据</param>
+    /// <returns>成功返回0,否则返回错误码</returns>
+    long GetCpkList(std::vector<CPK_LIST_STRUCT> &CpkList);
+
+
+    /// <summary>
+    /// 读取表中指定GroupId的配置信息
+    /// </summary>
+    /// <param name="iGroupId">组Id</param>
+    /// <param name="strTableName">表名</param>
+    /// <param name="vecConfig">返回的配置信息</param>
+    /// <returns>成功返回0,否则返回错误码</returns>
+    long LoadConfigDB(string strTableName, vector<int> iGroupId, vector<CONFIG_BASE_STRUCT>& vecConfig);
+
+    /// <summary>
+    /// 保存配置信息
+    /// </summary>
+    /// <param name="strTableName">表名</param>
+    /// <param name="vecConfig">要保存的配置信息</param>
+    /// <returns>成功返回0,否则返回错误码</returns>
+    long SaveConfigDB(string strTableName, vector<CONFIG_BASE_STRUCT> vecConfig);
+};
+

+ 91 - 0
CameraMaterialGroupWnd/CameraImage/CameraImageHandler.cpp

@@ -0,0 +1,91 @@
+#include "CameraImageHandler.h"
+#include "CameraMaterialGroupWnd/Group.h"
+#include "CInterface.h"
+
+CameraImageHandler::CameraImageHandler(int iCameraId) {
+    captureAndConvertImage(iCameraId);
+}
+
+void CameraImageHandler::captureAndConvertImage(int iCameraId) {
+    CInterface interface;
+    ImageInfo image;
+
+    long result = interface.GrabImage(iCameraId, image);
+
+    if (result == 0) {
+        initGroup(iCameraId);
+    }
+
+    // if (result == 0) {
+    //     qDebug() << "Image width: " << image.width;
+    //     qDebug() << "Image height: " << image.height;
+
+    //     QImage img;
+
+    //     // 根据图像格式转换
+    //     switch (image.format) {
+    //     case GRAY8:
+    //         img = QImage(image.data, image.width, image.height, QImage::Format_Grayscale8);
+    //         break;
+    //     case RGB888:
+    //         img = QImage(image.data, image.width, image.height, QImage::Format_RGB888);
+    //         break;
+    //     case ARGB8888:
+    //         img = QImage(image.data, image.width, image.height, QImage::Format_ARGB32);
+    //         break;
+    //     case RGB32:
+    //         img = QImage(image.data, image.width, image.height, QImage::Format_RGB32);
+    //         break;
+    //     case YUV422:
+
+    //         break;
+    //     default:
+    //         qDebug() << "Unsupported image format";
+    //     }
+    // } else {
+    //     qDebug() << "Failed to grab image, error code: " << result;
+    // }
+
+}
+
+Group* CameraImageHandler::getGroup() const {
+    return group;
+}
+
+void CameraImageHandler::initGroup(int CameraId) {
+    QStringList dispmodel1;
+    dispmodel1 << "P die align" << "D device align";
+
+    QStringList dispmodel2;
+    dispmodel2 << "D device align" << "P die align";
+
+    QStringList dispmodel3;
+    dispmodel3 << "B device align" << "P die align";
+
+    QStringList dispmodel4;
+    dispmodel4 << "U die align" << "D device align";
+
+    if (CameraId == 1) {
+        group = new Group(CameraId, ":/images/test_image/image_1.png", MaterialWindowType, dispmodel1, this);
+    } else if (CameraId == 2) {
+        MaterialWindowType = 2;
+        group = new Group(CameraId, ":/images/test_image/image_3.png", MaterialWindowType, dispmodel2, this);
+    } else if (CameraId == 3) {
+        MaterialWindowType = 3;
+        group = new Group(CameraId, ":/images/test_image/image_5.png", MaterialWindowType, dispmodel3, this);
+    } else if (CameraId == 4) {
+        group = new Group(CameraId, ":/images/test_image/image_7.png", MaterialWindowType, dispmodel4, this);
+    } else if (CameraId == 5) {
+        group = new Group(CameraId, ":/images/test_image/image_1.png", MaterialWindowType, dispmodel1, this);
+    } else if (CameraId == 6) {
+        MaterialWindowType = 2;
+        group = new Group(CameraId, ":/images/test_image/image_3.png", MaterialWindowType, dispmodel2, this);
+    } else if (CameraId == 7) {
+        MaterialWindowType = 3;
+        group = new Group(CameraId, ":/images/test_image/image_5.png", MaterialWindowType, dispmodel3, this);
+    } else if (CameraId == 8) {
+        group = new Group(CameraId, ":/images/test_image/image_7.png", MaterialWindowType, dispmodel4, this);
+    } else {
+        group = nullptr; // 如果 CameraId 不匹配,则 group 为 nullptr
+    }
+}

+ 21 - 0
CameraMaterialGroupWnd/CameraImage/CameraImageHandler.h

@@ -0,0 +1,21 @@
+#ifndef CAMERAIMAGEHANDLER_H
+#define CAMERAIMAGEHANDLER_H
+#include "CameraMaterialGroupWnd/Group.h"
+
+
+class CameraImageHandler : public QWidget {
+    Q_OBJECT
+public:
+    CameraImageHandler(int iCameraId);
+
+    Group* getGroup() const;
+
+private:
+    void captureAndConvertImage(int CameraId);
+    Group* group;  // 存储 Group 对象的容器
+    void initGroup(int CameraId);
+
+    int MaterialWindowType = 1; // 物料窗口类型标识,1代表圆晶 后面接口获取标识
+};
+
+#endif // CAMERAIMAGEHANDLER_H

+ 103 - 0
CameraMaterialGroupWnd/Group.cpp

@@ -0,0 +1,103 @@
+#include "Group.h"
+#include "ui_Group.h"
+#include <QDebug>
+#include <QMouseEvent>
+#include <QSettings>
+#include <QVBoxLayout>
+
+
+Group::Group(int Id, const QString& imagePath1, int MaterialWindowType, const QStringList& textList, QWidget* parent)
+    : QWidget(parent), ui(new Ui::Group) {
+    ui->setupUi(this);
+
+    QPixmap pixmap1(imagePath1);
+    ui->Imagewidget_left->setPixmap(pixmap1);
+
+    ui->DatacomboBox->addItems(textList);
+
+    ui->Imagewidget_left->setProperty("groupId", Id);
+    ui->Imagewidget_right->setProperty("groupId", Id);
+
+    if (MaterialWindowType == 1) { // 判断物料窗口类型,转到处理函数
+        WaferWidget();
+    } else if (MaterialWindowType == 2) {
+        WaffleWidget();
+    } else if (MaterialWindowType == 3) {
+        MaterialBoxWidget();
+    }
+
+    // 存储参数到 QSettings
+    saveGroupSettings(Id, imagePath1, MaterialWindowType, textList);
+
+    initForm();
+}
+
+Group::~Group() {
+    delete ui;
+}
+
+void Group::initForm() {
+    ui->Imagewidget_left->installEventFilter(this);
+    ui->Imagewidget_right->installEventFilter(this);
+}
+
+bool Group::eventFilter(QObject *obj, QEvent *event) {
+    if (event->type() == QEvent::MouseButtonDblClick) {
+        QMouseEvent* mouseEvent = static_cast<QMouseEvent*>(event);
+        if (mouseEvent->button() == Qt::LeftButton) {
+            int groupId = obj->property("groupId").toInt();
+            QSettings settings("YourCompany", "YourApplication_");
+            settings.setValue("GroupId", groupId);
+
+            if (obj == this->ui->Imagewidget_left) {
+                settings.setValue("Index", 1);
+            } else if (obj == this->ui->Imagewidget_right) {
+                settings.setValue("Index", 2);
+            }
+            return true;
+        }
+    }
+    return QWidget::eventFilter(obj, event);
+}
+
+void Group::saveGroupSettings(int Id, const QString& imagePath1, int materialWndType, const QStringList& textList) {
+    QSettings settings("YourOrganization", "YourApplication");
+    settings.beginGroup(QString::number(Id));
+    settings.setValue("ImagePath1", imagePath1);
+    settings.setValue("MaterialWndType", materialWndType);
+    settings.setValue("TextList", textList);
+    settings.endGroup();
+}
+
+// 圆晶
+void Group::WaferWidget() {
+    QVBoxLayout *layout2 = new QVBoxLayout(ui->Imagewidget_right);
+    wafer = new Wafer(0, ui->Imagewidget_right);
+
+    ui->Imagewidget_right->setLayout(layout2);
+    ui->Imagewidget_right->setFixedSize(114, 114);
+    layout2->setContentsMargins(0, 0, 0, 0);
+    layout2->addWidget(wafer);
+}
+
+// 华夫盒
+void Group::WaffleWidget() {
+    QVBoxLayout *layout2 = new QVBoxLayout(ui->Imagewidget_right);
+    waffle = new Waffle(0, ui->Imagewidget_right);
+
+    ui->Imagewidget_right->setLayout(layout2);
+    ui->Imagewidget_right->setFixedSize(114, 114);
+    layout2->setContentsMargins(0, 0, 0, 0);
+    layout2->addWidget(waffle);
+}
+
+// 料盒
+void Group::MaterialBoxWidget() {
+    QVBoxLayout *layout2 = new QVBoxLayout(ui->Imagewidget_right);
+    materialbox = new MaterialBox(0, ui->Imagewidget_right);
+
+    ui->Imagewidget_right->setLayout(layout2);
+    ui->Imagewidget_right->setFixedSize(114, 114);
+    layout2->setContentsMargins(0, 0, 0, 0);
+    layout2->addWidget(materialbox);
+}

+ 39 - 0
CameraMaterialGroupWnd/Group.h

@@ -0,0 +1,39 @@
+#ifndef GROUP_H
+#define GROUP_H
+
+#include <QWidget>
+#include "CameraMaterialGroupWnd/MaterialWindow/Wafer.h"
+#include "CameraMaterialGroupWnd/MaterialWindow/Waffle.h"
+#include "CameraMaterialGroupWnd/MaterialWindow/MaterialBox.h"
+
+namespace Ui {
+class Group;
+}
+
+class Group : public QWidget
+{
+    Q_OBJECT
+
+public:
+    // 相机ID 实时图片 物料窗口类型 下拉框文本
+    explicit Group(int Id, const QString& imagePath1, int MaterialWindowType, const QStringList& textList, QWidget* parent);
+    ~Group();
+
+    void initForm();
+    bool eventFilter(QObject *obj, QEvent *event);
+    void saveGroupSettings(int Id, const QString& imagePath1, int materialWndType, const QStringList& textList);
+
+protected:
+    void WaferWidget(); // 圆晶
+    void WaffleWidget(); // 华夫盒
+    void MaterialBoxWidget(); // 料盒
+
+private:
+    Ui::Group *ui;
+
+    Wafer *wafer; // 声明Wafer指针
+    Waffle *waffle; // 声明Waffle指针
+    MaterialBox *materialbox; // 声明materialbox指针
+};
+
+#endif // GROUP_H

+ 84 - 0
CameraMaterialGroupWnd/Group.ui

@@ -0,0 +1,84 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>Group</class>
+ <widget class="QWidget" name="Group">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>326</width>
+    <height>245</height>
+   </rect>
+  </property>
+  <property name="windowTitle">
+   <string>Form</string>
+  </property>
+  <widget class="ImageWidget_nodrag" name="Imagewidget_left" native="true">
+   <property name="geometry">
+    <rect>
+     <x>0</x>
+     <y>48</y>
+     <width>114</width>
+     <height>114</height>
+    </rect>
+   </property>
+   <property name="styleSheet">
+    <string notr="true">background-color: rgb(0, 170, 127);</string>
+   </property>
+  </widget>
+  <widget class="QComboBox" name="DatacomboBox">
+   <property name="geometry">
+    <rect>
+     <x>0</x>
+     <y>0</y>
+     <width>172</width>
+     <height>32</height>
+    </rect>
+   </property>
+   <property name="styleSheet">
+    <string notr="true">background-color: rgb(255, 255, 255);</string>
+   </property>
+  </widget>
+  <widget class="QPushButton" name="GroupButton">
+
+   <property name="geometry">
+    <rect>
+     <x>184</x>
+     <y>0</y>
+     <width>60</width>
+     <height>32</height>
+    </rect>
+   </property>
+   <property name="text">
+    <string/>
+   </property>
+  </widget>
+
+  <widget class="ImageWidget_nodrag" name="Imagewidget_right" native="true">
+
+   <property name="geometry">
+    <rect>
+     <x>130</x>
+     <y>48</y>
+     <width>114</width>
+     <height>114</height>
+    </rect>
+   </property>
+   <property name="styleSheet">
+    <string notr="true">background-color: rgb(0, 170, 127);</string>
+   </property>
+  </widget>
+ </widget>
+ <customwidgets>
+  <customwidget>
+
+   <class>ImageWidget_nodrag</class>
+   <extends>QWidget</extends>
+   <header location="global">ImageWidget_nodrag.h</header>
+
+   <container>1</container>
+  </customwidget>
+ </customwidgets>
+ <resources/>
+ <connections/>
+</ui>

+ 113 - 0
CameraMaterialGroupWnd/MaterialWindow/MaterialBox.cpp

@@ -0,0 +1,113 @@
+#include "MaterialBox.h"
+
+// 构造函数
+MaterialBox::MaterialBox(int flag, QWidget *parent) : QWidget(parent) {
+    // 初始化料盒数据
+    boxes = {
+        Material_box("Box 1", Idle),
+        Material_box("Box 2", Occupied),
+        Material_box("Box 3", Warning),
+        Material_box("Box 4", Idle),
+        Material_box("Box 5", Occupied),
+        Material_box("Box 6", Warning)
+    };
+
+    // 根据不同窗口设置不同大小 0:小 1:中 2:大
+    // if (flag == 0) {
+    //     boxWidth = 30;  // 每个料盒的宽度
+    //     boxHeight = 18;  // 每个料盒的高度
+    //     gap = 10;        // 料盒之间的间距
+    // } else if (flag == 1) {
+    //     boxWidth = 50;  // 每个料盒的宽度
+    //     boxHeight = 18;  // 每个料盒的高度
+    //     gap = 10;
+    // } else if (flag == 2) {
+    //     boxWidth = 30;  // 每个料盒的宽度
+    //     boxHeight = 18;  // 每个料盒的高度
+    //     gap = 10;
+    // }
+
+}
+
+// 绘制事件
+void MaterialBox::paintEvent(QPaintEvent *event) {
+    QPainter painter(this);
+    painter.setRenderHint(QPainter::Antialiasing);
+
+    // 设置背景颜色
+    painter.fillRect(this->rect(), Qt::white);
+
+    // 网格参数
+    int boxWidth = 30;  // 每个料盒的宽度
+    int boxHeight = 18;  // 每个料盒的高度
+    int gap = 10;        // 料盒之间的间距
+    int cols = 3;        // 每行的列数
+
+    // 计算料盒的总宽度和总高度
+    int totalWidth = cols * boxWidth + (cols - 1) * gap;
+    int rows = (boxes.size() + cols - 1) / cols;  // 计算总行数
+    int totalHeight = rows * boxHeight + (rows - 1) * gap;
+
+    // 计算料盒的起始位置(居中显示)
+    int startX = (width() - totalWidth) / 2;
+    int startY = (height() - totalHeight) / 2;
+
+    // 绘制所有料盒
+    for (size_t i = 0; i < boxes.size(); ++i) {
+        int row = i / cols; // 当前料盒所在的行
+        int col = i % cols; // 当前料盒所在的列
+        int x = startX + col * (boxWidth + gap);
+        int y = startY + row * (boxHeight + gap);
+
+        // 绘制料盒外框
+        QRect boxRect(x, y, boxWidth, boxHeight);
+        painter.setPen(Qt::black);
+        painter.drawRect(boxRect);
+
+        // 根据状态设置填充颜色
+        switch (boxes[i].status) {
+        case Idle:
+            painter.setBrush(Qt::green); // 空闲状态:绿色
+            break;
+        case Occupied:
+            painter.setBrush(Qt::blue);  // 已占用状态:蓝色
+            break;
+        case Warning:
+            painter.setBrush(Qt::red);   // 警告状态:红色
+            break;
+        }
+        painter.fillRect(boxRect, painter.brush());
+
+        // 在料盒中绘制名称
+        painter.setPen(Qt::white); // 设置文字颜色为白色
+        painter.drawText(boxRect, Qt::AlignCenter, boxes[i].name);
+    }
+}
+
+// 鼠标点击事件
+// void MaterialBox::mousePressEvent(QMouseEvent *event) {
+//     int boxWidth = 30;  // 每个料盒的宽度
+//     int boxHeight = 18;  // 每个料盒的高度
+//     int gap = 10;        // 料盒之间的间距
+//     int cols = 3;        // 每行的列数
+
+//     // 计算料盒的起始位置(居中显示)
+//     int totalWidth = cols * boxWidth + (cols - 1) * gap;
+//     int startX = (width() - totalWidth) / 2;
+//     int startY = 50;
+
+//     // 遍历所有料盒,检查是否被点击
+//     for (size_t i = 0; i < boxes.size(); ++i) {
+//         int row = i / cols;
+//         int col = i % cols;
+//         int x = startX + col * (boxWidth + gap);
+//         int y = startY + row * (boxHeight + gap);
+
+//         QRect boxRect(x, y, boxWidth, boxHeight);
+//         if (boxRect.contains(event->pos())) {
+//             // 打印被点击料盒的信息
+//             qDebug() << "Clicked on:" << boxes[i].name;
+//             return;
+//         }
+//     }
+// }

+ 41 - 0
CameraMaterialGroupWnd/MaterialWindow/MaterialBox.h

@@ -0,0 +1,41 @@
+#ifndef MATERIALBOX_H
+#define MATERIALBOX_H
+
+#include <QApplication>
+#include <QWidget>
+#include <QPainter>
+#include <QMouseEvent>
+#include <vector>
+#include <QString>
+#include <QDebug>
+
+// 枚举定义:料盒的状态
+enum BoxStatus {
+    Idle,       // 空闲
+    Occupied,   // 已占用
+    Warning     // 警告
+};
+
+// 料盒类
+class Material_box {
+public:
+    Material_box(const QString &name, BoxStatus status)
+        : name(name), status(status) {}
+
+    QString name;     // 料盒名称或编号
+    BoxStatus status; // 状态
+};
+
+// 自定义绘制窗口类
+class MaterialBox : public QWidget {
+public:
+    MaterialBox(int flag, QWidget *parent = nullptr);
+
+protected:
+    void paintEvent(QPaintEvent *event) override;
+
+private:
+    std::vector<Material_box> boxes; // 所有料盒的数据
+};
+
+#endif // MATERIALBOX_H

+ 81 - 0
CameraMaterialGroupWnd/MaterialWindow/Wafer.cpp

@@ -0,0 +1,81 @@
+#include "Wafer.h"
+#include <QPainter>
+#include <QPaintEvent>
+#include <cmath>
+
+Wafer::Wafer(int flag, QWidget *parent) : QWidget(parent) {
+    waferData = {
+        {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+        {0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0},
+        {0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0},
+        {0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0},
+        {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0},
+        {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0},
+        {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0},
+        {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0},
+        {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0},
+        {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0},
+        {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0},
+        {0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0},
+        {0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0},
+        {0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0},
+        {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
+    };
+
+    // 根据不同窗口设置不同大小 0:小 1:中 2:大
+    if (flag == 0) {
+        num = 9;
+    } else if (flag == 1) {
+        num = 15;
+    } else if (flag == 2) {
+        num = 21;
+    }
+}
+
+void Wafer::paintEvent(QPaintEvent *event) {
+    QPainter painter(this);
+
+
+
+    // 抗锯齿效果
+    painter.setRenderHint(QPainter::Antialiasing);
+
+    // 绘制背景
+    painter.fillRect(this->rect(), Qt::white);
+
+    // 定义晶圆的整体圆形
+    int diameter = qMin(width(), height()) - num; // 确保圆形不会超出窗口边界
+    int centerX = width() / 2;
+    int centerY = height() / 2;
+    QRect waferRect(centerX - diameter / 2, centerY - diameter / 2, diameter, diameter);
+
+    // 绘制晶圆圆形边界
+    painter.setPen(Qt::gray);
+    painter.drawEllipse(waferRect);
+
+    // 绘制二维数组表示的晶圆图案
+    int rows = waferData.size();
+    int cols = waferData[0].size();
+    int cellSize = diameter / qMax(rows, cols); // 根据晶圆大小动态调整单元格大小
+
+    int radiusSquared = (diameter / 2) * (diameter / 2);
+
+    for (int i = 0; i < rows; ++i) {
+        for (int j = 0; j < cols; ++j) {
+            if (waferData[i][j] == 1) { // 如果格点状态为 1,则填充颜色
+                int x = centerX - diameter / 2 + j * cellSize;
+                int y = centerY - diameter / 2 + i * cellSize;
+                QRect cellRect(x, y, cellSize, cellSize);
+
+                // 判断是否在圆形范围内
+                int distanceSquared = pow(x + cellSize / 2 - centerX, 2) + pow(y + cellSize / 2 - centerY, 2);
+                if (distanceSquared <= radiusSquared) {
+                    painter.fillRect(cellRect, Qt::blue);
+                    // 绘制边框
+                    painter.setPen(Qt::gray);
+                    painter.drawRect(cellRect);
+                }
+            }
+        }
+    }
+}

+ 21 - 0
CameraMaterialGroupWnd/MaterialWindow/Wafer.h

@@ -0,0 +1,21 @@
+#ifndef WAFER_H
+#define WAFER_H
+
+#include <QWidget>
+#include <vector>
+
+class Wafer : public QWidget
+{
+public:
+    Wafer(int flag, QWidget *parent = nullptr);
+
+protected:
+    void paintEvent(QPaintEvent *event) override;
+
+private:
+    std::vector<std::vector<int>> waferData; // 二维数组存储晶圆数据
+
+    int num;
+};
+
+#endif // WAFER_H

+ 77 - 0
CameraMaterialGroupWnd/MaterialWindow/Waffle.cpp

@@ -0,0 +1,77 @@
+#include "Waffle.h"
+#include <QPainter>
+#include <QPaintEvent>
+
+Waffle::Waffle(int flag, QWidget *parent) : QWidget(parent) {
+    // 根据不同窗口设置不同大小 0:小 1:中 2:大
+    if (flag == 0) {
+        // 华夫台的参数
+        gridSize = 5;  // 每个格子的大小
+        gap = 3;        // 格子之间的间隙
+        boxGap = 6;    // 华夫台之间的间隙
+    } else if (flag == 1) {
+        // 华夫台的参数
+        gridSize = 20;  // 每个格子的大小
+        gap = 6;        // 格子之间的间隙
+        boxGap = 12;    // 华夫台之间的间隙
+    } else if (flag == 2) {
+        // 华夫台的参数
+        gridSize = 50;  // 每个格子的大小
+        gap = 6;        // 格子之间的间隙
+        boxGap = 12;    // 华夫台之间的间隙
+    }
+}
+
+void Waffle::paintEvent(QPaintEvent *event) {
+    QPainter painter(this);
+
+    // 设置抗锯齿,使绘图更平滑
+    painter.setRenderHint(QPainter::Antialiasing);
+
+    // 绘制背景
+    painter.fillRect(this->rect(), Qt::white);
+
+
+    // 计算每个华夫台的总宽度和高度
+    int totalWidth = cols * gridSize + (cols - 1) * gap;
+    int totalHeight = rows * gridSize + (rows - 1) * gap;
+
+    // 计算华夫盒的总宽度和高度
+    int boxTotalWidth = boxCols * totalWidth + (boxCols - 1) * boxGap;
+    int boxTotalHeight = boxRows * totalHeight + (boxRows - 1) * boxGap;
+
+    // 确定华夫盒的起始位置,使其居中
+    int boxStartX = (width() - boxTotalWidth) / 2;
+    int boxStartY = (height() - boxTotalHeight) / 2;
+
+    // 绘制多个华夫台
+    for (int i = 0; i < boxRows; ++i) {
+        for (int j = 0; j < boxCols; ++j) {
+            // 计算每个华夫台的起始位置
+            int startX = boxStartX + j * (totalWidth + boxGap);
+            int startY = boxStartY + i * (totalHeight + boxGap);
+
+            // 绘制单个华夫台
+            drawWaffle(painter, startX, startY, rows, cols, gridSize, gap);
+        }
+    }
+}
+
+void Waffle::drawWaffle(QPainter &painter, int startX, int startY, int rows, int cols, int gridSize, int gap) {
+    // 绘制网格
+    for (int i = 0; i < rows; ++i) {
+        for (int j = 0; j < cols; ++j) {
+            // 计算每个格子的坐标
+            int x = startX + j * (gridSize + gap);
+            int y = startY + i * (gridSize + gap);
+            QRect cellRect(x, y, gridSize, gridSize);
+
+            // 填充颜色
+            painter.fillRect(cellRect, Qt::yellow);
+
+            // 绘制边框
+            painter.setPen(Qt::black);
+            painter.drawRect(cellRect);
+        }
+    }
+}

+ 29 - 0
CameraMaterialGroupWnd/MaterialWindow/Waffle.h

@@ -0,0 +1,29 @@
+#ifndef WAFFLE_H
+#define WAFFLE_H
+
+#include <QWidget>
+
+class Waffle : public QWidget
+{
+public:
+    Waffle(int flag, QWidget *parent = nullptr);
+
+protected:
+    void paintEvent(QPaintEvent *event) override;
+
+private:
+    void drawWaffle(QPainter &painter, int startX, int startY, int rows, int cols, int gridSize, int gap);
+
+    // 华夫台的参数
+    int gridSize;  // 每个格子的大小
+    int gap;        // 格子之间的间隙
+    int rows = 3;       // 华夫台的行数
+    int cols = 3;       // 华夫台的列数
+
+    // 华夫盒的参数
+    int boxRows = 3;    // 华夫盒的行数
+    int boxCols = 4;    // 华夫盒的列数
+    int boxGap;    // 华夫台之间的间隙
+};
+
+#endif // WAFFLE_H

+ 72 - 17
OriginalWnd/ChartsAndCamerasWnd.cpp

@@ -2,14 +2,14 @@
 #include "ui_ChartsAndCamerasWnd.h"
 #include <QSettings>
 #include <QCloseEvent>
-#include "Group.h"
 #include <QVBoxLayout>
 #include <QTimer>
 #include "chartline.h"
 #include <QRandomGenerator>
 #include <qDebug>
 // #include "CInterface.h"
-#include "CameraImage/CameraImageHandler.h"
+#include "CameraMaterialGroupWnd/CameraImage/CameraImageHandler.h"
+
 
 ChartsAndCamerasWnd::ChartsAndCamerasWnd(QWidget *parent) :
     QMainWindow(parent),
@@ -214,12 +214,10 @@ void ChartsAndCamerasWnd::initFrom() {
     initSliders();
     initLineEdits();
 
-    connectSliderAndLineEdit(ui->verticalSlider, ui->lineEdit);
-    connectSliderAndLineEdit(ui->verticalSlider_2, ui->lineEdit_2);
-    connectSliderAndLineEdit(ui->verticalSlider_3, ui->lineEdit_3);
-    connectSliderAndLineEdit(ui->verticalSlider_4, ui->lineEdit_4);
-    connectSliderAndLineEdit(ui->verticalSlider_7, ui->lineEdit_7);
-    connectSliderAndLineEdit(ui->verticalSlider_8, ui->lineEdit_8);
+    connectSliderAndLineEdit(ui->RedLightverticalSlider, ui->RedLightlineEdit);
+    connectSliderAndLineEdit(ui->GreenLightverticalSlider, ui->GreenLightlineEdit);
+    connectSliderAndLineEdit(ui->BlueLightverticalSlider, ui->BlueLightlineEdit);
+    connectSliderAndLineEdit(ui->DotLightverticalSlider, ui->DotLightlineEdit);
 
     QWidget *viewport = ui->scrollArea->viewport();
     QWidget *container = new QWidget(viewport);
@@ -304,10 +302,10 @@ void ChartsAndCamerasWnd::initFrom() {
 
 void ChartsAndCamerasWnd::initSliders() {
     QList<QSlider*> sliders = {
-        ui->verticalSlider, ui->verticalSlider_2, ui->verticalSlider_3,
-        ui->verticalSlider_4, ui->verticalSlider_7, ui->verticalSlider_8
+        ui->RedLightverticalSlider, ui->GreenLightverticalSlider,
+        ui->BlueLightverticalSlider, ui->DotLightverticalSlider
     };
-    QList<int> initialValues = {11, 22, 9, 11, 0, 0};
+    QList<int> initialValues = {22, 11, 0, 0};
 
     for (int i = 0; i < sliders.size(); ++i) {
         sliders[i]->setMinimum(0);
@@ -318,8 +316,8 @@ void ChartsAndCamerasWnd::initSliders() {
 
 void ChartsAndCamerasWnd::initLineEdits() {
     QList<QLineEdit*> lineEdits = {
-        ui->lineEdit, ui->lineEdit_2, ui->lineEdit_3,
-        ui->lineEdit_4, ui->lineEdit_7, ui->lineEdit_8
+        ui->RedLightlineEdit, ui->GreenLightlineEdit,
+        ui->BlueLightlineEdit, ui->DotLightlineEdit
     };
 
     for (QLineEdit* lineEdit : lineEdits) {
@@ -372,19 +370,28 @@ void ChartsAndCamerasWnd::loadGroupSettings(int Id, int Index) {
     QSettings settings("YourOrganization", "YourApplication");
     settings.beginGroup(QString::number(Id));
     QString imagePath1 = settings.value("ImagePath1").toString();
-    QString imagePath2 = settings.value("ImagePath2").toString();
+    int materialWndType = settings.value("MaterialWndType").toInt();
     QStringList textList = settings.value("TextList").toStringList();
     settings.endGroup();
 
     QSize size = ui->Operatewidget->size();
 
     QPixmap newPixmap;
+    // 判断是实时图片还是物料窗口
     if (Index == 1) {
         newPixmap = QPixmap(imagePath1);
+        clearLayout();
     } else if (Index == 2) {
-        newPixmap = QPixmap(imagePath2);
-    } else {
-        newPixmap = QPixmap(":/images/test_image/image.png");
+        if (materialWndType == 1) {
+            clearLayout();
+            WaferWidget();
+        } else if (materialWndType == 2) {
+            clearLayout();
+            WaffleWidget();
+        } else if (materialWndType == 3) {
+            clearLayout();
+            MaterialBoxWidget();
+        }
     }
 
     QPixmap scaledPixmap = newPixmap.scaled(size, Qt::KeepAspectRatio, Qt::SmoothTransformation);
@@ -400,6 +407,54 @@ void ChartsAndCamerasWnd::loadGroupSettings(int Id, int Index) {
     // connect(ui->DatacomboBox, SIGNAL(currentIndexChanged(int)), this, SLOT(Demo001_3::onComboBoxIndexChanged(int)));
 }
 
+void ChartsAndCamerasWnd::clearLayout() {
+    // 获取当前布局
+    QLayout* layout = ui->Operatewidget->layout();
+    if (layout) {
+        QLayoutItem *child;
+        while ((child = layout->takeAt(0)) != nullptr) {
+            if (child->widget() != nullptr) {
+                delete child->widget();  // 删除控件
+            }
+            delete child;  // 删除布局项
+        }
+        delete layout;  // 删除布局本身
+    }
+}
+
+// 圆晶
+void ChartsAndCamerasWnd::WaferWidget() {
+    QVBoxLayout *layout = new QVBoxLayout(ui->Operatewidget);
+    wafer = new Wafer(1, ui->Operatewidget);
+
+    layout->setContentsMargins(0, 0, 0, 0);
+    layout->addWidget(wafer);
+    ui->Operatewidget->setLayout(layout);
+    ui->Operatewidget->setFixedSize(480, 480);
+}
+
+// 华夫盒
+void ChartsAndCamerasWnd::WaffleWidget() {
+    QVBoxLayout *layout = new QVBoxLayout(ui->Operatewidget);
+    waffle = new Waffle(1, ui->Operatewidget);
+
+    layout->setContentsMargins(0, 0, 0, 0);
+    layout->addWidget(waffle);
+    ui->Operatewidget->setLayout(layout);
+    ui->Operatewidget->setFixedSize(480, 480);
+}
+
+// 料盒
+void ChartsAndCamerasWnd::MaterialBoxWidget() {
+    QVBoxLayout *layout = new QVBoxLayout(ui->Operatewidget);
+    materialbox = new MaterialBox(1, ui->Operatewidget);
+
+    layout->setContentsMargins(0, 0, 0, 0);
+    layout->addWidget(materialbox);
+    ui->Operatewidget->setLayout(layout);
+    ui->Operatewidget->setFixedSize(480, 480);
+}
+
 void ChartsAndCamerasWnd::on_ZoomUpButton_clicked()
 {
     scaleFactor *= 1.1;

+ 11 - 0
OriginalWnd/ChartsAndCamerasWnd.h

@@ -6,6 +6,9 @@
 #include <QLineEdit>
 #include <QSettings>
 #include "chartline.h"
+#include "CameraMaterialGroupWnd/MaterialWindow/Wafer.h"
+#include "CameraMaterialGroupWnd/MaterialWindow/Waffle.h"
+#include "CameraMaterialGroupWnd/MaterialWindow/MaterialBox.h"
 
 namespace Ui {
 class ChartsAndCamerasWnd;
@@ -40,6 +43,11 @@ protected:
     void showEvent(QShowEvent *event) override;
     void hideEvent(QHideEvent *event) override;
 
+    void clearLayout(); // 清除大窗口上当前的布局
+    void WaferWidget(); // 圆晶
+    void WaffleWidget(); // 华夫盒
+    void MaterialBoxWidget(); // 料盒
+
 private slots:
     void on_ZoomUpButton_clicked();
 
@@ -99,6 +107,9 @@ private:
     int lastGroupId = -1;
     int lastIndex = -1;
 
+    Wafer *wafer; // 声明Wafer指针
+    Waffle *waffle; // 声明Waffle指针
+    MaterialBox *materialbox; // 声明materialbox指针
 };
 
 #endif // CHARTSANDCAMERASWND_H

+ 80 - 186
OriginalWnd/ChartsAndCamerasWnd.ui

@@ -528,32 +528,19 @@
       </rect>
      </property>
     </widget>
-    <widget class="QWidget" name="widget_6" native="true">
+    <widget class="QWidget" name="RedLight" native="true">
      <property name="geometry">
       <rect>
-       <x>16</x>
+       <x>19</x>
        <y>840</y>
-       <width>114</width>
+       <width>61</width>
        <height>114</height>
       </rect>
      </property>
-     <widget class="QSlider" name="verticalSlider">
-      <property name="geometry">
-       <rect>
-        <x>30</x>
-        <y>12</y>
-        <width>18</width>
-        <height>56</height>
-       </rect>
-      </property>
-      <property name="orientation">
-       <enum>Qt::Vertical</enum>
-      </property>
-     </widget>
-     <widget class="QSlider" name="verticalSlider_2">
+     <widget class="QSlider" name="RedLightverticalSlider">
       <property name="geometry">
        <rect>
-        <x>65</x>
+        <x>10</x>
         <y>12</y>
         <width>18</width>
         <height>56</height>
@@ -563,23 +550,10 @@
        <enum>Qt::Vertical</enum>
       </property>
      </widget>
-     <widget class="QLineEdit" name="lineEdit">
-      <property name="geometry">
-       <rect>
-        <x>6</x>
-        <y>78</y>
-        <width>40</width>
-        <height>24</height>
-       </rect>
-      </property>
-      <property name="text">
-       <string>11</string>
-      </property>
-     </widget>
-     <widget class="QLineEdit" name="lineEdit_2">
+     <widget class="QLineEdit" name="RedLightlineEdit">
       <property name="geometry">
        <rect>
-        <x>68</x>
+        <x>10</x>
         <y>78</y>
         <width>40</width>
         <height>24</height>
@@ -589,36 +563,10 @@
        <string>22</string>
       </property>
      </widget>
-     <widget class="QLabel" name="label">
-      <property name="geometry">
-       <rect>
-        <x>50</x>
-        <y>83</y>
-        <width>14</width>
-        <height>14</height>
-       </rect>
-      </property>
-      <property name="text">
-       <string>%</string>
-      </property>
-     </widget>
-     <widget class="QLabel" name="label_4">
-      <property name="geometry">
-       <rect>
-        <x>12</x>
-        <y>22</y>
-        <width>10</width>
-        <height>34</height>
-       </rect>
-      </property>
-      <property name="text">
-       <string/>
-      </property>
-     </widget>
-     <widget class="QLabel" name="label_5">
+     <widget class="QLabel" name="RedLightlabel">
       <property name="geometry">
        <rect>
-        <x>94</x>
+        <x>39</x>
         <y>22</y>
         <width>10</width>
         <height>34</height>
@@ -629,32 +577,19 @@
       </property>
      </widget>
     </widget>
-    <widget class="QWidget" name="widget_7" native="true">
+    <widget class="QWidget" name="GreenLight" native="true">
      <property name="geometry">
       <rect>
-       <x>146</x>
+       <x>96</x>
        <y>840</y>
-       <width>114</width>
+       <width>61</width>
        <height>114</height>
       </rect>
      </property>
-     <widget class="QSlider" name="verticalSlider_3">
-      <property name="geometry">
-       <rect>
-        <x>30</x>
-        <y>12</y>
-        <width>18</width>
-        <height>56</height>
-       </rect>
-      </property>
-      <property name="orientation">
-       <enum>Qt::Vertical</enum>
-      </property>
-     </widget>
-     <widget class="QSlider" name="verticalSlider_4">
+     <widget class="QSlider" name="GreenLightverticalSlider">
       <property name="geometry">
        <rect>
-        <x>65</x>
+        <x>10</x>
         <y>12</y>
         <width>18</width>
         <height>56</height>
@@ -664,23 +599,10 @@
        <enum>Qt::Vertical</enum>
       </property>
      </widget>
-     <widget class="QLineEdit" name="lineEdit_3">
-      <property name="geometry">
-       <rect>
-        <x>6</x>
-        <y>78</y>
-        <width>40</width>
-        <height>24</height>
-       </rect>
-      </property>
-      <property name="text">
-       <string>9</string>
-      </property>
-     </widget>
-     <widget class="QLineEdit" name="lineEdit_4">
+     <widget class="QLineEdit" name="GreenLightlineEdit">
       <property name="geometry">
        <rect>
-        <x>68</x>
+        <x>10</x>
         <y>78</y>
         <width>40</width>
         <height>24</height>
@@ -690,36 +612,10 @@
        <string>11</string>
       </property>
      </widget>
-     <widget class="QLabel" name="label_2">
-      <property name="geometry">
-       <rect>
-        <x>50</x>
-        <y>83</y>
-        <width>14</width>
-        <height>14</height>
-       </rect>
-      </property>
-      <property name="text">
-       <string>%</string>
-      </property>
-     </widget>
-     <widget class="QLabel" name="label_6">
-      <property name="geometry">
-       <rect>
-        <x>12</x>
-        <y>22</y>
-        <width>12</width>
-        <height>34</height>
-       </rect>
-      </property>
-      <property name="text">
-       <string/>
-      </property>
-     </widget>
-     <widget class="QLabel" name="label_7">
+     <widget class="QLabel" name="GreenLightlabel">
       <property name="geometry">
        <rect>
-        <x>91</x>
+        <x>36</x>
         <y>22</y>
         <width>12</width>
         <height>34</height>
@@ -730,19 +626,19 @@
       </property>
      </widget>
     </widget>
-    <widget class="QWidget" name="widget_8" native="true">
+    <widget class="QWidget" name="BlueLight" native="true">
      <property name="geometry">
       <rect>
-       <x>276</x>
+       <x>173</x>
        <y>840</y>
-       <width>114</width>
+       <width>61</width>
        <height>114</height>
       </rect>
      </property>
-     <widget class="QSlider" name="verticalSlider_7">
+     <widget class="QSlider" name="BlueLightverticalSlider">
       <property name="geometry">
        <rect>
-        <x>30</x>
+        <x>10</x>
         <y>12</y>
         <width>18</width>
         <height>56</height>
@@ -752,36 +648,10 @@
        <enum>Qt::Vertical</enum>
       </property>
      </widget>
-     <widget class="QSlider" name="verticalSlider_8">
+     <widget class="QLineEdit" name="BlueLightlineEdit">
       <property name="geometry">
        <rect>
-        <x>65</x>
-        <y>12</y>
-        <width>18</width>
-        <height>56</height>
-       </rect>
-      </property>
-      <property name="orientation">
-       <enum>Qt::Vertical</enum>
-      </property>
-     </widget>
-     <widget class="QLineEdit" name="lineEdit_7">
-      <property name="geometry">
-       <rect>
-        <x>6</x>
-        <y>78</y>
-        <width>40</width>
-        <height>24</height>
-       </rect>
-      </property>
-      <property name="text">
-       <string>0</string>
-      </property>
-     </widget>
-     <widget class="QLineEdit" name="lineEdit_8">
-      <property name="geometry">
-       <rect>
-        <x>68</x>
+        <x>10</x>
         <y>78</y>
         <width>40</width>
         <height>24</height>
@@ -791,36 +661,10 @@
        <string>0</string>
       </property>
      </widget>
-     <widget class="QLabel" name="label_10">
-      <property name="geometry">
-       <rect>
-        <x>50</x>
-        <y>83</y>
-        <width>14</width>
-        <height>14</height>
-       </rect>
-      </property>
-      <property name="text">
-       <string>%</string>
-      </property>
-     </widget>
-     <widget class="QLabel" name="label_11">
-      <property name="geometry">
-       <rect>
-        <x>7</x>
-        <y>22</y>
-        <width>19</width>
-        <height>34</height>
-       </rect>
-      </property>
-      <property name="text">
-       <string/>
-      </property>
-     </widget>
-     <widget class="QLabel" name="label_12">
+     <widget class="QLabel" name="BlueLightlabel">
       <property name="geometry">
        <rect>
-        <x>87</x>
+        <x>32</x>
         <y>22</y>
         <width>19</width>
         <height>34</height>
@@ -873,16 +717,66 @@
       </property>
      </widget>
     </widget>
+    <widget class="QWidget" name="DotLight" native="true">
+     <property name="geometry">
+      <rect>
+       <x>250</x>
+       <y>840</y>
+       <width>61</width>
+       <height>114</height>
+      </rect>
+     </property>
+     <widget class="QSlider" name="DotLightverticalSlider">
+      <property name="geometry">
+       <rect>
+        <x>10</x>
+        <y>12</y>
+        <width>18</width>
+        <height>56</height>
+       </rect>
+      </property>
+      <property name="orientation">
+       <enum>Qt::Vertical</enum>
+      </property>
+     </widget>
+     <widget class="QLineEdit" name="DotLightlineEdit">
+      <property name="geometry">
+       <rect>
+        <x>10</x>
+        <y>78</y>
+        <width>40</width>
+        <height>24</height>
+       </rect>
+      </property>
+      <property name="text">
+       <string>0</string>
+      </property>
+     </widget>
+     <widget class="QLabel" name="DotLightlabel">
+      <property name="geometry">
+       <rect>
+        <x>32</x>
+        <y>22</y>
+        <width>19</width>
+        <height>34</height>
+       </rect>
+      </property>
+      <property name="text">
+       <string/>
+      </property>
+     </widget>
+    </widget>
     <zorder>BackGround</zorder>
     <zorder>Operatewidget</zorder>
     <zorder>DatacomboBox</zorder>
     <zorder>LiveButton</zorder>
     <zorder>Toolbar</zorder>
-    <zorder>widget_6</zorder>
-    <zorder>widget_7</zorder>
-    <zorder>widget_8</zorder>
+    <zorder>RedLight</zorder>
+    <zorder>GreenLight</zorder>
+    <zorder>BlueLight</zorder>
     <zorder>line_2</zorder>
     <zorder>scrollArea</zorder>
+    <zorder>DotLight</zorder>
    </widget>
   </widget>
  </widget>

+ 141 - 15
OriginalWnd/MainAndSecondaryCamerasWnd.cpp

@@ -2,10 +2,10 @@
 #include "ui_MainAndSecondaryCamerasWnd.h"
 #include <QSettings>
 #include <QCloseEvent>
-#include "Group.h"
 #include <QVBoxLayout>
 #include <QTimer>
-#include "CameraImage/CameraImageHandler.h"
+#include "CameraMaterialGroupWnd/CameraImage/CameraImageHandler.h"
+#include <qDebug.h>
 
 MainAndSecondaryCamerasWnd::MainAndSecondaryCamerasWnd(QWidget *parent)
     : QMainWindow(parent)
@@ -42,12 +42,10 @@ void MainAndSecondaryCamerasWnd::initFrom()
     initSliders();
     initLineEdits();
 
-    connectSliderAndLineEdit(ui->verticalSlider, ui->lineEdit);
-    connectSliderAndLineEdit(ui->verticalSlider_2, ui->lineEdit_2);
-    connectSliderAndLineEdit(ui->verticalSlider_3, ui->lineEdit_3);
-    connectSliderAndLineEdit(ui->verticalSlider_4, ui->lineEdit_4);
-    connectSliderAndLineEdit(ui->verticalSlider_7, ui->lineEdit_7);
-    connectSliderAndLineEdit(ui->verticalSlider_8, ui->lineEdit_8);
+    connectSliderAndLineEdit(ui->RedLightverticalSlider_2, ui->RedLightlineEdit_2);
+    connectSliderAndLineEdit(ui->GreenLightverticalSlider_5, ui->GreenLightlineEdit_5);
+    connectSliderAndLineEdit(ui->BlueLightverticalSlider, ui->BlueLightlineEdit_2);
+    connectSliderAndLineEdit(ui->DotLightverticalSlider_2, ui->DotLightlineEdit_2);
 
     QWidget *viewport = ui->scrollArea->viewport();
     QWidget *container = new QWidget(viewport);
@@ -90,12 +88,18 @@ void MainAndSecondaryCamerasWnd::initFrom()
 
     ui->LeftOperatewidget->setMouseTracking(true);
     ui->RightOperatewidget->setMouseTracking(true);
+
+    QSettings settings2("YourOrganization", "YourApplication_lastWndType");
+    int lastWndType = settings2.value("LastWndType").toInt();
+    int LastGroup = settings2.value("LastGroup").toInt();
+    lastIndex = lastWndType;
+    lastGroupId = LastGroup;
 }
 
 void MainAndSecondaryCamerasWnd::initSliders() {
     QList<QSlider*> sliders = {
-        ui->verticalSlider, ui->verticalSlider_2, ui->verticalSlider_3,
-        ui->verticalSlider_4, ui->verticalSlider_7, ui->verticalSlider_8
+    ui->RedLightverticalSlider_2, ui->GreenLightverticalSlider_5,
+    ui->BlueLightverticalSlider, ui->DotLightverticalSlider_2
     };
     QList<int> initialValues = {11, 22, 9, 11, 0, 0};
 
@@ -108,8 +112,8 @@ void MainAndSecondaryCamerasWnd::initSliders() {
 
 void MainAndSecondaryCamerasWnd::initLineEdits() {
     QList<QLineEdit*> lineEdits = {
-        ui->lineEdit, ui->lineEdit_2, ui->lineEdit_3,
-        ui->lineEdit_4, ui->lineEdit_7, ui->lineEdit_8
+        ui->RedLightlineEdit_2, ui->GreenLightlineEdit_5,
+        ui->BlueLightlineEdit_2, ui->DotLightlineEdit_2
     };
 
     for (QLineEdit* lineEdit : lineEdits) {
@@ -144,9 +148,9 @@ void MainAndSecondaryCamerasWnd::checkSettings() {
     int index = settings.value("Index", 0).toInt();
 
     if (groupId != lastGroupId || index != lastIndex) {
+        loadSettings();
         lastGroupId = groupId;
         lastIndex = index;
-        loadSettings();
     }
 }
 
@@ -163,7 +167,7 @@ void MainAndSecondaryCamerasWnd::loadGroupSettings(int Id, int Index) {
     QSettings settings("YourOrganization", "YourApplication");
     settings.beginGroup(QString::number(Id));
     QString imagePath1 = settings.value("ImagePath1").toString();
-    QString imagePath2 = settings.value("ImagePath2").toString();
+    int materialWndType = settings.value("MaterialWndType").toInt();
     QStringList textList = settings.value("TextList").toStringList();
     settings.endGroup();
     QString lastRightImage = settings.value("LastRightImage").toString();
@@ -172,12 +176,67 @@ void MainAndSecondaryCamerasWnd::loadGroupSettings(int Id, int Index) {
     QSize size_right = ui->RightOperatewidget->size();
 
     QPixmap newPixmap;
+
     if (Index == 1) {
         newPixmap = QPixmap(imagePath1);
+        clearLayout(1);
+
+        if (lastIndex == 1) {
+            clearLayout(0);
+        } else if (lastIndex == 2) {
+            clearLayout(0);
+            if (lastGroupId == 1) {
+                WaferWidget(0);
+            } else if (lastGroupId == 2) {
+                WaffleWidget(0);
+            } else if (lastGroupId == 3) {
+                MaterialBoxWidget(0);
+            }
+        }
     } else if (Index == 2) {
-        newPixmap = QPixmap(imagePath2);
+        clearLayout(1);
+        clearLayout(0);
+
+        if (materialWndType == 1) {
+            if (lastIndex == 2) {
+                if (lastGroupId == 1) {
+                    WaferWidget(0);
+                } else if (lastGroupId == 2) {
+                    WaffleWidget(0);
+                } else if (lastGroupId == 3) {
+                    MaterialBoxWidget(0);
+                }
+            }
+            WaferWidget(1);
+        } else if (materialWndType == 2) {
+            if (lastIndex == 2) {
+                if (lastGroupId == 1) {
+                    WaferWidget(0);
+                } else if (lastGroupId == 2) {
+                    WaffleWidget(0);
+                } else if (lastGroupId == 3) {
+                    MaterialBoxWidget(0);
+                }
+            }
+            WaffleWidget(1);
+        } else if (materialWndType == 3) {
+            if (lastIndex == 2) {
+                if (lastGroupId == 1) {
+                    WaferWidget(0);
+                } else if (lastGroupId == 2) {
+                    WaffleWidget(0);
+                } else if (lastGroupId == 3) {
+                    MaterialBoxWidget(0);
+                }
+            }
+            MaterialBoxWidget(1);
+        }
     }
 
+    QSettings settings2("YourOrganization", "YourApplication_lastWndType");
+    settings2.setValue("LastWndType", lastIndex);
+    settings2.setValue("LastGroup", lastGroupId);
+
     QPixmap scaledPixmap_right = newPixmap.scaled(size_right, Qt::KeepAspectRatio, Qt::SmoothTransformation);
     ui->RightOperatewidget->setPixmap(scaledPixmap_right);
 
@@ -213,6 +272,73 @@ void MainAndSecondaryCamerasWnd::loadGroupSettings(int Id, int Index) {
     }
 }
 
+void MainAndSecondaryCamerasWnd::clearLayout(int flag) {
+    QWidget* widget = (flag == 1) ? ui->RightOperatewidget : ui->LeftOperatewidget;
+    QLayout* layout = widget->layout();
+
+    if (layout) {
+        QLayoutItem *child;
+        while ((child = layout->takeAt(0)) != nullptr) {
+            if (child->widget() != nullptr) {
+                delete child->widget();  // 删除控件
+            }
+            delete child;  // 删除布局项
+        }
+        delete layout;  // 删除布局本身
+    }
+}
+
+// 圆晶
+void MainAndSecondaryCamerasWnd::WaferWidget(int flag) {
+    QWidget *operatewidget = ui->LeftOperatewidget;
+
+    if (flag == 1) {
+        operatewidget = ui->RightOperatewidget;
+    }
+
+    QVBoxLayout *layout = new QVBoxLayout(operatewidget);
+    wafer = new Wafer(1, operatewidget);
+
+    layout->setContentsMargins(0, 0, 0, 0);
+    layout->addWidget(wafer);
+    operatewidget->setLayout(layout);
+    operatewidget->setFixedSize(480, 480);
+}
+
+// 华夫盒
+void MainAndSecondaryCamerasWnd::WaffleWidget(int flag) {
+    QWidget *operatewidget = ui->LeftOperatewidget;
+
+    if (flag == 1) {
+        operatewidget = ui->RightOperatewidget;
+    }
+
+    QVBoxLayout *layout = new QVBoxLayout(operatewidget);
+    waffle = new Waffle(1, operatewidget);
+
+    layout->setContentsMargins(0, 0, 0, 0);
+    layout->addWidget(waffle);
+    operatewidget->setLayout(layout);
+    operatewidget->setFixedSize(480, 480);
+}
+
+// 料盒
+void MainAndSecondaryCamerasWnd::MaterialBoxWidget(int flag) {
+    QWidget *operatewidget = ui->LeftOperatewidget;
+
+    if (flag == 1) {
+        operatewidget = ui->RightOperatewidget;
+    }
+
+    QVBoxLayout *layout = new QVBoxLayout(operatewidget);
+    materialbox = new MaterialBox(1, operatewidget);
+
+    layout->setContentsMargins(0, 0, 0, 0);
+    layout->addWidget(materialbox);
+    operatewidget->setLayout(layout);
+    operatewidget->setFixedSize(480, 480);
+}
+
 void MainAndSecondaryCamerasWnd::on_LeftZoomUpButton_clicked()
 {
     Left_scaleFactor *= 1.1;

+ 12 - 0
OriginalWnd/MainAndSecondaryCamerasWnd.h

@@ -4,6 +4,9 @@
 #include <QMainWindow>
 #include <QSlider>
 #include <QLineEdit>
+#include "CameraMaterialGroupWnd/MaterialWindow/Wafer.h"
+#include "CameraMaterialGroupWnd/MaterialWindow/Waffle.h"
+#include "CameraMaterialGroupWnd/MaterialWindow/MaterialBox.h"
 
 namespace Ui {
 class MainAndSecondaryCamerasWnd;
@@ -30,6 +33,11 @@ protected:
     void showEvent(QShowEvent *event) override;
     void hideEvent(QHideEvent *event) override;
 
+    void clearLayout(int flag); // 清除大窗口上当前的布局
+    void WaferWidget(int flag); // 圆晶
+    void WaffleWidget(int flag); // 华夫盒
+    void MaterialBoxWidget(int flag); // 料盒
+
 private slots:
     void on_LeftZoomUpButton_clicked();
 
@@ -57,6 +65,10 @@ private:
     QPixmap lastLastRightPixmap;  // 用于存储上一次的 lastRightPixmap
     QStringList lastLasttextList;
     bool isUpdatingSettings;
+
+    Wafer *wafer; // 声明Wafer指针
+    Waffle *waffle; // 声明Waffle指针
+    MaterialBox *materialbox; // 声明materialbox指针
 };
 
 #endif // MAINANDSECONDARYCAMERASWND_H

+ 83 - 189
OriginalWnd/MainAndSecondaryCamerasWnd.ui

@@ -436,32 +436,45 @@
      <enum>Qt::Horizontal</enum>
     </property>
    </widget>
-   <widget class="QWidget" name="widget_6" native="true">
+   <widget class="QScrollArea" name="scrollArea">
     <property name="geometry">
      <rect>
-      <x>582</x>
-      <y>845</y>
-      <width>114</width>
-      <height>114</height>
+      <x>20</x>
+      <y>652</y>
+      <width>1062</width>
+      <height>177</height>
      </rect>
     </property>
-    <widget class="QSlider" name="verticalSlider">
+    <property name="verticalScrollBarPolicy">
+     <enum>Qt::ScrollBarAsNeeded</enum>
+    </property>
+    <property name="widgetResizable">
+     <bool>true</bool>
+    </property>
+    <widget class="QWidget" name="scrollAreaWidgetContents">
      <property name="geometry">
       <rect>
-       <x>30</x>
-       <y>12</y>
-       <width>18</width>
-       <height>56</height>
+       <x>0</x>
+       <y>0</y>
+       <width>1060</width>
+       <height>175</height>
       </rect>
      </property>
-     <property name="orientation">
-      <enum>Qt::Vertical</enum>
-     </property>
     </widget>
-    <widget class="QSlider" name="verticalSlider_2">
+   </widget>
+   <widget class="QWidget" name="RedLight" native="true">
+    <property name="geometry">
+     <rect>
+      <x>582</x>
+      <y>845</y>
+      <width>61</width>
+      <height>114</height>
+     </rect>
+    </property>
+    <widget class="QSlider" name="RedLightverticalSlider_2">
      <property name="geometry">
       <rect>
-       <x>65</x>
+       <x>10</x>
        <y>12</y>
        <width>18</width>
        <height>56</height>
@@ -471,23 +484,10 @@
       <enum>Qt::Vertical</enum>
      </property>
     </widget>
-    <widget class="QLineEdit" name="lineEdit">
-     <property name="geometry">
-      <rect>
-       <x>6</x>
-       <y>78</y>
-       <width>40</width>
-       <height>24</height>
-      </rect>
-     </property>
-     <property name="text">
-      <string>11</string>
-     </property>
-    </widget>
-    <widget class="QLineEdit" name="lineEdit_2">
+    <widget class="QLineEdit" name="RedLightlineEdit_2">
      <property name="geometry">
       <rect>
-       <x>68</x>
+       <x>10</x>
        <y>78</y>
        <width>40</width>
        <height>24</height>
@@ -497,36 +497,10 @@
       <string>22</string>
      </property>
     </widget>
-    <widget class="QLabel" name="label">
+    <widget class="QLabel" name="RedLightlabel_2">
      <property name="geometry">
       <rect>
-       <x>50</x>
-       <y>83</y>
-       <width>14</width>
-       <height>14</height>
-      </rect>
-     </property>
-     <property name="text">
-      <string>%</string>
-     </property>
-    </widget>
-    <widget class="QLabel" name="label_4">
-     <property name="geometry">
-      <rect>
-       <x>12</x>
-       <y>22</y>
-       <width>10</width>
-       <height>34</height>
-      </rect>
-     </property>
-     <property name="text">
-      <string/>
-     </property>
-    </widget>
-    <widget class="QLabel" name="label_5">
-     <property name="geometry">
-      <rect>
-       <x>94</x>
+       <x>39</x>
        <y>22</y>
        <width>10</width>
        <height>34</height>
@@ -537,32 +511,19 @@
      </property>
     </widget>
    </widget>
-   <widget class="QWidget" name="widget_7" native="true">
+   <widget class="QWidget" name="GreenLight" native="true">
     <property name="geometry">
      <rect>
-      <x>712</x>
+      <x>671</x>
       <y>845</y>
-      <width>114</width>
+      <width>61</width>
       <height>114</height>
      </rect>
     </property>
-    <widget class="QSlider" name="verticalSlider_3">
-     <property name="geometry">
-      <rect>
-       <x>30</x>
-       <y>12</y>
-       <width>18</width>
-       <height>56</height>
-      </rect>
-     </property>
-     <property name="orientation">
-      <enum>Qt::Vertical</enum>
-     </property>
-    </widget>
-    <widget class="QSlider" name="verticalSlider_4">
+    <widget class="QSlider" name="GreenLightverticalSlider_5">
      <property name="geometry">
       <rect>
-       <x>65</x>
+       <x>10</x>
        <y>12</y>
        <width>18</width>
        <height>56</height>
@@ -572,23 +533,10 @@
       <enum>Qt::Vertical</enum>
      </property>
     </widget>
-    <widget class="QLineEdit" name="lineEdit_3">
+    <widget class="QLineEdit" name="GreenLightlineEdit_5">
      <property name="geometry">
       <rect>
-       <x>6</x>
-       <y>78</y>
-       <width>40</width>
-       <height>24</height>
-      </rect>
-     </property>
-     <property name="text">
-      <string>9</string>
-     </property>
-    </widget>
-    <widget class="QLineEdit" name="lineEdit_4">
-     <property name="geometry">
-      <rect>
-       <x>68</x>
+       <x>10</x>
        <y>78</y>
        <width>40</width>
        <height>24</height>
@@ -598,36 +546,10 @@
       <string>11</string>
      </property>
     </widget>
-    <widget class="QLabel" name="label_2">
+    <widget class="QLabel" name="GreenLightlabel_5">
      <property name="geometry">
       <rect>
-       <x>50</x>
-       <y>83</y>
-       <width>14</width>
-       <height>14</height>
-      </rect>
-     </property>
-     <property name="text">
-      <string>%</string>
-     </property>
-    </widget>
-    <widget class="QLabel" name="label_6">
-     <property name="geometry">
-      <rect>
-       <x>12</x>
-       <y>22</y>
-       <width>12</width>
-       <height>34</height>
-      </rect>
-     </property>
-     <property name="text">
-      <string/>
-     </property>
-    </widget>
-    <widget class="QLabel" name="label_7">
-     <property name="geometry">
-      <rect>
-       <x>91</x>
+       <x>36</x>
        <y>22</y>
        <width>12</width>
        <height>34</height>
@@ -638,32 +560,19 @@
      </property>
     </widget>
    </widget>
-   <widget class="QWidget" name="widget_8" native="true">
+   <widget class="QWidget" name="BlueLight" native="true">
     <property name="geometry">
      <rect>
-      <x>842</x>
+      <x>760</x>
       <y>845</y>
-      <width>114</width>
+      <width>61</width>
       <height>114</height>
      </rect>
     </property>
-    <widget class="QSlider" name="verticalSlider_7">
-     <property name="geometry">
-      <rect>
-       <x>30</x>
-       <y>12</y>
-       <width>18</width>
-       <height>56</height>
-      </rect>
-     </property>
-     <property name="orientation">
-      <enum>Qt::Vertical</enum>
-     </property>
-    </widget>
-    <widget class="QSlider" name="verticalSlider_8">
+    <widget class="QSlider" name="BlueLightverticalSlider">
      <property name="geometry">
       <rect>
-       <x>65</x>
+       <x>10</x>
        <y>12</y>
        <width>18</width>
        <height>56</height>
@@ -673,10 +582,10 @@
       <enum>Qt::Vertical</enum>
      </property>
     </widget>
-    <widget class="QLineEdit" name="lineEdit_7">
+    <widget class="QLineEdit" name="BlueLightlineEdit_2">
      <property name="geometry">
       <rect>
-       <x>6</x>
+       <x>10</x>
        <y>78</y>
        <width>40</width>
        <height>24</height>
@@ -686,49 +595,59 @@
       <string>0</string>
      </property>
     </widget>
-    <widget class="QLineEdit" name="lineEdit_8">
+    <widget class="QLabel" name="BlueLightlabel_2">
      <property name="geometry">
       <rect>
-       <x>68</x>
-       <y>78</y>
-       <width>40</width>
-       <height>24</height>
+       <x>32</x>
+       <y>22</y>
+       <width>19</width>
+       <height>34</height>
       </rect>
      </property>
      <property name="text">
-      <string>0</string>
+      <string/>
      </property>
     </widget>
-    <widget class="QLabel" name="label_10">
+   </widget>
+   <widget class="QWidget" name="DotLight" native="true">
+    <property name="geometry">
+     <rect>
+      <x>849</x>
+      <y>845</y>
+      <width>61</width>
+      <height>114</height>
+     </rect>
+    </property>
+    <widget class="QSlider" name="DotLightverticalSlider_2">
      <property name="geometry">
       <rect>
-       <x>50</x>
-       <y>83</y>
-       <width>14</width>
-       <height>14</height>
+       <x>10</x>
+       <y>12</y>
+       <width>18</width>
+       <height>56</height>
       </rect>
      </property>
-     <property name="text">
-      <string>%</string>
+     <property name="orientation">
+      <enum>Qt::Vertical</enum>
      </property>
     </widget>
-    <widget class="QLabel" name="label_11">
+    <widget class="QLineEdit" name="DotLightlineEdit_2">
      <property name="geometry">
       <rect>
-       <x>7</x>
-       <y>22</y>
-       <width>19</width>
-       <height>34</height>
+       <x>10</x>
+       <y>78</y>
+       <width>40</width>
+       <height>24</height>
       </rect>
      </property>
      <property name="text">
-      <string/>
+      <string>0</string>
      </property>
     </widget>
-    <widget class="QLabel" name="label_12">
+    <widget class="QLabel" name="DotLightlabel_2">
      <property name="geometry">
       <rect>
-       <x>87</x>
+       <x>32</x>
        <y>22</y>
        <width>19</width>
        <height>34</height>
@@ -739,32 +658,6 @@
      </property>
     </widget>
    </widget>
-   <widget class="QScrollArea" name="scrollArea">
-    <property name="geometry">
-     <rect>
-      <x>20</x>
-      <y>652</y>
-      <width>1062</width>
-      <height>177</height>
-     </rect>
-    </property>
-    <property name="verticalScrollBarPolicy">
-     <enum>Qt::ScrollBarAsNeeded</enum>
-    </property>
-    <property name="widgetResizable">
-     <bool>true</bool>
-    </property>
-    <widget class="QWidget" name="scrollAreaWidgetContents">
-     <property name="geometry">
-      <rect>
-       <x>0</x>
-       <y>0</y>
-       <width>1060</width>
-       <height>175</height>
-      </rect>
-     </property>
-    </widget>
-   </widget>
    <zorder>RightBackGround</zorder>
    <zorder>LeftBackGround</zorder>
    <zorder>LeftDataSources</zorder>
@@ -776,10 +669,11 @@
    <zorder>LeftLiveButton</zorder>
    <zorder>RightLiveButton</zorder>
    <zorder>line_16</zorder>
-   <zorder>widget_6</zorder>
-   <zorder>widget_7</zorder>
-   <zorder>widget_8</zorder>
    <zorder>scrollArea</zorder>
+   <zorder>RedLight</zorder>
+   <zorder>GreenLight</zorder>
+   <zorder>BlueLight</zorder>
+   <zorder>DotLight</zorder>
   </widget>
  </widget>
  <customwidgets>

+ 18 - 6
OriginalWnd/OriginalWnd.cpp

@@ -137,12 +137,10 @@ void OriginalWnd::initForm()
     connect(timer, &QTimer::timeout, this, &OriginalWnd::updateTime);
     timer->start(100);
 
-    ui->toolButton->setIcon(QIcon(":/images/light/stop.png"));
-    ui->toolButton_2->setIcon(QIcon(":/images/light/start.png"));
-    ui->toolButton->setToolButtonStyle(Qt::ToolButtonTextBesideIcon);
-    ui->toolButton_2->setToolButtonStyle(Qt::ToolButtonTextBesideIcon);
+    ui->stopButton->setIcon(QIcon(":/images/light/stop.png"));
+    ui->startButton->setIcon(QIcon(":/images/light/start.png"));
 
-    ui->label_userlogo->setPixmap(QPixmap(":/images/light/user.png").scaled(20, 20, Qt::KeepAspectRatio));
+    ui->label_userlogo->setPixmap(QPixmap(":/images/TopStatusBar/user.png").scaled(20, 20, Qt::KeepAspectRatio));
 
     QSettings settings("OrganizationName__", "ApplicationName__");
     int lastSavedIndex = settings.value("lastIndex", 1).toInt();
@@ -221,7 +219,6 @@ void OriginalWnd::on_DoubleImageButton_clicked()
     settings.setValue("lastIndex", 2);
 }
 
-
 void OriginalWnd::on_SingleImageButton_clicked()
 {
     SingleCameraOperationWnd *demo001_3 = new SingleCameraOperationWnd;
@@ -230,3 +227,18 @@ void OriginalWnd::on_SingleImageButton_clicked()
     QSettings settings("OrganizationName__", "ApplicationName__");
     settings.setValue("lastIndex", 3);
 }
+
+void OriginalWnd::on_startButton_clicked()
+{
+    QString styleSheet = "QToolButton:disabled { color: #808080; background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #F8FBFF, stop: 1 #E7ECF3); }"; // 设置禁用状态下的文本颜色为灰色
+    ui->startButton->setDisabled(true);
+    ui->startButton->setStyleSheet(styleSheet);
+}
+
+void OriginalWnd::on_stopButton_clicked()
+{
+    QString styleSheet1 = "QToolButton { background: #4AB832; color: #FFFFFF; }";
+    ui->startButton->setDisabled(false);
+    ui->startButton->setStyleSheet(styleSheet1);
+}
+

+ 4 - 0
OriginalWnd/OriginalWnd.h

@@ -42,6 +42,10 @@ private slots:
 
     void updateTime();
 
+    void on_startButton_clicked();
+
+    void on_stopButton_clicked();
+
 private:
     Ui::OriginalWnd *ui;
     TreeViewManager *treeViewManager; // 树视图管理器

+ 47 - 2
OriginalWnd/OriginalWnd.ui

@@ -49,7 +49,7 @@
       <height>988</height>
      </rect>
     </property>
-    <widget class="QToolButton" name="toolButton">
+    <widget class="QToolButton" name="stopButton">
      <property name="geometry">
       <rect>
        <x>16</x>
@@ -62,8 +62,26 @@
       <string>Stop
 production</string>
      </property>
+     <property name="iconSize">
+      <size>
+       <width>34</width>
+       <height>28</height>
+      </size>
+     </property>
+     <property name="checkable">
+      <bool>true</bool>
+     </property>
+     <property name="autoExclusive">
+      <bool>false</bool>
+     </property>
+     <property name="popupMode">
+      <enum>QToolButton::DelayedPopup</enum>
+     </property>
+     <property name="toolButtonStyle">
+      <enum>Qt::ToolButtonTextBesideIcon</enum>
+     </property>
     </widget>
-    <widget class="QToolButton" name="toolButton_2">
+    <widget class="QToolButton" name="startButton">
      <property name="geometry">
       <rect>
        <x>16</x>
@@ -72,10 +90,37 @@ production</string>
        <height>60</height>
       </rect>
      </property>
+     <property name="layoutDirection">
+      <enum>Qt::LeftToRight</enum>
+     </property>
      <property name="text">
       <string>Start of
 production</string>
      </property>
+     <property name="iconSize">
+      <size>
+       <width>34</width>
+       <height>28</height>
+      </size>
+     </property>
+     <property name="checkable">
+      <bool>true</bool>
+     </property>
+     <property name="autoExclusive">
+      <bool>false</bool>
+     </property>
+     <property name="popupMode">
+      <enum>QToolButton::InstantPopup</enum>
+     </property>
+     <property name="toolButtonStyle">
+      <enum>Qt::ToolButtonTextBesideIcon</enum>
+     </property>
+     <property name="autoRaise">
+      <bool>false</bool>
+     </property>
+     <property name="arrowType">
+      <enum>Qt::NoArrow</enum>
+     </property>
     </widget>
     <widget class="QPushButton" name="ChartButton">
      <property name="geometry">

+ 98 - 42
OriginalWnd/SingleCameraOperationWnd.cpp

@@ -2,11 +2,10 @@
 #include "ui_SingleCameraOperationWnd.h"
 #include <QSettings>
 #include <QCloseEvent>
-#include "Group.h"
 #include <QVBoxLayout>
 #include <QDebug>
 #include <QTimer>
-#include "CameraImage/CameraImageHandler.h"
+#include "CameraMaterialGroupWnd/CameraImage/CameraImageHandler.h"
 
 SingleCameraOperationWnd::SingleCameraOperationWnd(QWidget *parent)
     : QMainWindow(parent)
@@ -30,17 +29,16 @@ void SingleCameraOperationWnd::initFrom() {
     ui->label_Percentage->setAlignment(Qt::AlignCenter);
 
     // 设置右下部分
-    loadSliderStates();
+    // loadSliderStates();
 
     initSliders();
     initLineEdits();
 
-    connectSliderAndLineEdit(ui->verticalSlider, ui->lineEdit);
-    connectSliderAndLineEdit(ui->verticalSlider_2, ui->lineEdit_2);
-    connectSliderAndLineEdit(ui->verticalSlider_3, ui->lineEdit_3);
-    connectSliderAndLineEdit(ui->verticalSlider_4, ui->lineEdit_4);
-    connectSliderAndLineEdit(ui->verticalSlider_5, ui->lineEdit_5);
-    connectSliderAndLineEdit(ui->verticalSlider_6, ui->lineEdit_6);
+    connectSliderAndLineEdit(ui->RedLightverticalSlider, ui->RedLightlineEdit);
+    connectSliderAndLineEdit(ui->GreenLightverticalSlider, ui->GreenLightlineEdit);
+    connectSliderAndLineEdit(ui->BlueLightverticalSlider, ui->BlueLightlineEdit);
+    connectSliderAndLineEdit(ui->DotLightverticalSlider, ui->DotLightlineEdit);
+
 
     // 设置右上部分
     QWidget *viewport = ui->scrollArea->viewport();
@@ -84,7 +82,7 @@ void SingleCameraOperationWnd::initFrom() {
 
 void SingleCameraOperationWnd::closeEvent(QCloseEvent *event) {
     // 保存滑块状态
-    saveSliderStates();
+    // saveSliderStates();
 
     // 确保调用基类的 closeEvent 处理其他关闭逻辑
     QMainWindow::closeEvent(event);
@@ -92,10 +90,10 @@ void SingleCameraOperationWnd::closeEvent(QCloseEvent *event) {
 
 void SingleCameraOperationWnd::initSliders() {
     QList<QSlider*> sliders = {
-        ui->verticalSlider, ui->verticalSlider_2, ui->verticalSlider_3,
-        ui->verticalSlider_4, ui->verticalSlider_5, ui->verticalSlider_6
+        ui->RedLightverticalSlider, ui->GreenLightverticalSlider,
+        ui->BlueLightverticalSlider, ui->DotLightverticalSlider
     };
-    QList<int> initialValues = {11, 22, 9, 11, 0, 0};
+    QList<int> initialValues = {22, 11, 0, 0};
 
     for (int i = 0; i < sliders.size(); ++i) {
         sliders[i]->setMinimum(0);
@@ -106,8 +104,8 @@ void SingleCameraOperationWnd::initSliders() {
 
 void SingleCameraOperationWnd::initLineEdits() {
     QList<QLineEdit*> lineEdits = {
-        ui->lineEdit, ui->lineEdit_2, ui->lineEdit_3,
-        ui->lineEdit_4, ui->lineEdit_5, ui->lineEdit_6
+        ui->RedLightlineEdit, ui->GreenLightlineEdit,
+        ui->BlueLightlineEdit, ui->DotLightlineEdit,
     };
 
     for (QLineEdit* lineEdit : lineEdits) {
@@ -115,29 +113,29 @@ void SingleCameraOperationWnd::initLineEdits() {
     }
 }
 
-void SingleCameraOperationWnd::saveSliderStates() {
-    QSettings settings("YourCompany", "YourApp");
-    settings.beginGroup("SliderStates");
-    settings.setValue("verticalSlider", ui->verticalSlider->value());
-    settings.setValue("verticalSlider_2", ui->verticalSlider_2->value());
-    settings.setValue("verticalSlider_3", ui->verticalSlider_3->value());
-    settings.setValue("verticalSlider_4", ui->verticalSlider_4->value());
-    settings.setValue("verticalSlider_5", ui->verticalSlider_5->value());
-    settings.setValue("verticalSlider_6", ui->verticalSlider_6->value());
-    settings.endGroup();
-}
-
-void SingleCameraOperationWnd::loadSliderStates() {
-    QSettings settings("YourCompany", "YourApp");
-    settings.beginGroup("SliderStates");
-    ui->verticalSlider->setValue(settings.value("verticalSlider", 11).toInt());
-    ui->verticalSlider_2->setValue(settings.value("verticalSlider_2", 22).toInt());
-    ui->verticalSlider_3->setValue(settings.value("verticalSlider_3", 9).toInt());
-    ui->verticalSlider_4->setValue(settings.value("verticalSlider_4", 11).toInt());
-    ui->verticalSlider_5->setValue(settings.value("verticalSlider_5", 0).toInt());
-    ui->verticalSlider_6->setValue(settings.value("verticalSlider_6", 0).toInt());
-    settings.endGroup();
-}
+// void SingleCameraOperationWnd::saveSliderStates() {
+//     QSettings settings("YourCompany", "YourApp");
+//     settings.beginGroup("SliderStates");
+//     settings.setValue("verticalSlider", ui->verticalSlider->value());
+//     settings.setValue("verticalSlider_2", ui->verticalSlider_2->value());
+//     settings.setValue("verticalSlider_3", ui->verticalSlider_3->value());
+//     settings.setValue("verticalSlider_4", ui->verticalSlider_4->value());
+//     settings.setValue("verticalSlider_5", ui->verticalSlider_5->value());
+//     settings.setValue("verticalSlider_6", ui->verticalSlider_6->value());
+//     settings.endGroup();
+// }
+
+// void SingleCameraOperationWnd::loadSliderStates() {
+//     QSettings settings("YourCompany", "YourApp");
+//     settings.beginGroup("SliderStates");
+//     ui->verticalSlider->setValue(settings.value("verticalSlider", 11).toInt());
+//     ui->verticalSlider_2->setValue(settings.value("verticalSlider_2", 22).toInt());
+//     ui->verticalSlider_3->setValue(settings.value("verticalSlider_3", 9).toInt());
+//     ui->verticalSlider_4->setValue(settings.value("verticalSlider_4", 11).toInt());
+//     ui->verticalSlider_5->setValue(settings.value("verticalSlider_5", 0).toInt());
+//     ui->verticalSlider_6->setValue(settings.value("verticalSlider_6", 0).toInt());
+//     settings.endGroup();
+// }
 
 // QSlider 和 QLineEdit 的联动
 void SingleCameraOperationWnd::connectSliderAndLineEdit(QSlider* slider, QLineEdit* lineEdit)
@@ -185,19 +183,28 @@ void SingleCameraOperationWnd::loadGroupSettings(int Id, int Index) {
     QSettings settings("YourOrganization", "YourApplication");
     settings.beginGroup(QString::number(Id));
     QString imagePath1 = settings.value("ImagePath1").toString();
-    QString imagePath2 = settings.value("ImagePath2").toString();
+    int materialWndType = settings.value("MaterialWndType").toInt();
     QStringList textList = settings.value("TextList").toStringList();
     settings.endGroup();
 
     QSize size = ui->Operatewidget->size();
 
     QPixmap newPixmap;
+    // 判断是实时图片还是物料窗口
     if (Index == 1) {
         newPixmap = QPixmap(imagePath1);
+        clearLayout();
     } else if (Index == 2) {
-        newPixmap = QPixmap(imagePath2);
-    } else {
-        newPixmap = QPixmap(":/images/test_image/image.png");
+        if (materialWndType == 1) {
+            clearLayout();
+            WaferWidget();
+        } else if (materialWndType == 2) {
+            clearLayout();
+            WaffleWidget();
+        } else if (materialWndType == 3) {
+            clearLayout();
+            MaterialBoxWidget();
+        }
     }
 
     QPixmap scaledPixmap = newPixmap.scaled(size, Qt::KeepAspectRatio, Qt::SmoothTransformation);
@@ -214,6 +221,55 @@ void SingleCameraOperationWnd::loadGroupSettings(int Id, int Index) {
     // connect(ui->DatacomboBox, SIGNAL(currentIndexChanged(int)), this, SLOT(SingleCameraOperationWnd::onComboBoxIndexChanged(int)));
 }
 
+// 清除大窗口上当前的布局
+void SingleCameraOperationWnd::clearLayout() {
+    // 获取当前布局
+    QLayout* layout = ui->Operatewidget->layout();
+    if (layout) {
+        QLayoutItem *child;
+        while ((child = layout->takeAt(0)) != nullptr) {
+            if (child->widget() != nullptr) {
+                delete child->widget();  // 删除控件
+            }
+            delete child;  // 删除布局项
+        }
+        delete layout;  // 删除布局本身
+    }
+}
+
+// 圆晶
+void SingleCameraOperationWnd::WaferWidget() {
+    QVBoxLayout *layout = new QVBoxLayout(ui->Operatewidget);
+    wafer = new Wafer(2, ui->Operatewidget);
+
+    layout->setContentsMargins(0, 0, 0, 0);
+    layout->addWidget(wafer);
+    ui->Operatewidget->setLayout(layout);
+    ui->Operatewidget->setFixedSize(786, 786);
+}
+
+// 华夫盒
+void SingleCameraOperationWnd::WaffleWidget() {
+    QVBoxLayout *layout = new QVBoxLayout(ui->Operatewidget);
+    waffle = new Waffle(2, ui->Operatewidget);
+
+    layout->setContentsMargins(0, 0, 0, 0);
+    layout->addWidget(waffle);
+    ui->Operatewidget->setLayout(layout);
+    ui->Operatewidget->setFixedSize(786, 786);
+}
+
+// 料盒
+void SingleCameraOperationWnd::MaterialBoxWidget() {
+    QVBoxLayout *layout = new QVBoxLayout(ui->Operatewidget);
+    materialbox = new MaterialBox(2, ui->Operatewidget);
+
+    layout->setContentsMargins(0, 0, 0, 0);
+    layout->addWidget(materialbox);
+    ui->Operatewidget->setLayout(layout);
+    ui->Operatewidget->setFixedSize(786, 786);
+}
+
 void SingleCameraOperationWnd::on_ZoomUpButton_clicked() {
     scaleFactor *= 1.1;
 

+ 14 - 2
OriginalWnd/SingleCameraOperationWnd.h

@@ -4,6 +4,9 @@
 #include <QMainWindow>
 #include <QSlider>
 #include <QLineEdit>
+#include "CameraMaterialGroupWnd/MaterialWindow/Wafer.h"
+#include "CameraMaterialGroupWnd/MaterialWindow/Waffle.h"
+#include "CameraMaterialGroupWnd/MaterialWindow/MaterialBox.h"
 
 namespace Ui {
 class SingleCameraOperationWnd;
@@ -21,12 +24,17 @@ public:
     void connectSliderAndLineEdit(QSlider* slider, QLineEdit* lineEdit);
     void initSliders();
     void initLineEdits();
-    void saveSliderStates();
-    void loadSliderStates();
+    // void saveSliderStates();
+    // void loadSliderStates();
     void closeEvent(QCloseEvent *event);
 
     void loadGroupSettings(int Id, int Index);
 
+    void clearLayout(); // 清除大窗口上当前的布局
+    void WaferWidget(); // 圆晶
+    void WaffleWidget(); // 华夫盒
+    void MaterialBoxWidget(); // 料盒
+
 public slots: // 确保这里声明了槽函数
     void onComboBoxIndexChanged(int index); // 确保签名匹配
     QString getImagePathFromIndex(int index);
@@ -54,6 +62,10 @@ private:
     qreal scaleFactor;
     int lastGroupId = -1;
     int lastIndex = -1;
+
+    Wafer *wafer; // 声明Wafer指针
+    Waffle *waffle; // 声明Waffle指针
+    MaterialBox *materialbox; // 声明materialbox指针
 };
 
 #endif // SINGLECAMERAOPERATIONWND_H

+ 200 - 306
OriginalWnd/SingleCameraOperationWnd.ui

@@ -56,309 +56,6 @@
      <enum>Qt::Vertical</enum>
     </property>
    </widget>
-   <widget class="QWidget" name="widget_6" native="true">
-    <property name="geometry">
-     <rect>
-      <x>842</x>
-      <y>732</y>
-      <width>114</width>
-      <height>114</height>
-     </rect>
-    </property>
-    <widget class="QSlider" name="verticalSlider">
-     <property name="geometry">
-      <rect>
-       <x>30</x>
-       <y>12</y>
-       <width>18</width>
-       <height>56</height>
-      </rect>
-     </property>
-     <property name="orientation">
-      <enum>Qt::Vertical</enum>
-     </property>
-    </widget>
-    <widget class="QSlider" name="verticalSlider_2">
-     <property name="geometry">
-      <rect>
-       <x>65</x>
-       <y>12</y>
-       <width>18</width>
-       <height>56</height>
-      </rect>
-     </property>
-     <property name="orientation">
-      <enum>Qt::Vertical</enum>
-     </property>
-    </widget>
-    <widget class="QLineEdit" name="lineEdit">
-     <property name="geometry">
-      <rect>
-       <x>6</x>
-       <y>78</y>
-       <width>40</width>
-       <height>24</height>
-      </rect>
-     </property>
-     <property name="text">
-      <string>11</string>
-     </property>
-    </widget>
-    <widget class="QLineEdit" name="lineEdit_2">
-     <property name="geometry">
-      <rect>
-       <x>68</x>
-       <y>78</y>
-       <width>40</width>
-       <height>24</height>
-      </rect>
-     </property>
-     <property name="text">
-      <string>22</string>
-     </property>
-    </widget>
-    <widget class="QLabel" name="label">
-     <property name="geometry">
-      <rect>
-       <x>50</x>
-       <y>83</y>
-       <width>14</width>
-       <height>14</height>
-      </rect>
-     </property>
-     <property name="text">
-      <string>%</string>
-     </property>
-    </widget>
-    <widget class="QLabel" name="label_4">
-     <property name="geometry">
-      <rect>
-       <x>12</x>
-       <y>22</y>
-       <width>10</width>
-       <height>34</height>
-      </rect>
-     </property>
-     <property name="text">
-      <string/>
-     </property>
-    </widget>
-    <widget class="QLabel" name="label_5">
-     <property name="geometry">
-      <rect>
-       <x>94</x>
-       <y>22</y>
-       <width>10</width>
-       <height>34</height>
-      </rect>
-     </property>
-     <property name="text">
-      <string/>
-     </property>
-    </widget>
-   </widget>
-   <widget class="QWidget" name="widget_7" native="true">
-    <property name="geometry">
-     <rect>
-      <x>972</x>
-      <y>732</y>
-      <width>114</width>
-      <height>114</height>
-     </rect>
-    </property>
-    <widget class="QSlider" name="verticalSlider_3">
-     <property name="geometry">
-      <rect>
-       <x>30</x>
-       <y>12</y>
-       <width>18</width>
-       <height>56</height>
-      </rect>
-     </property>
-     <property name="orientation">
-      <enum>Qt::Vertical</enum>
-     </property>
-    </widget>
-    <widget class="QSlider" name="verticalSlider_4">
-     <property name="geometry">
-      <rect>
-       <x>65</x>
-       <y>12</y>
-       <width>18</width>
-       <height>56</height>
-      </rect>
-     </property>
-     <property name="orientation">
-      <enum>Qt::Vertical</enum>
-     </property>
-    </widget>
-    <widget class="QLineEdit" name="lineEdit_3">
-     <property name="geometry">
-      <rect>
-       <x>6</x>
-       <y>78</y>
-       <width>40</width>
-       <height>24</height>
-      </rect>
-     </property>
-     <property name="text">
-      <string>9</string>
-     </property>
-    </widget>
-    <widget class="QLineEdit" name="lineEdit_4">
-     <property name="geometry">
-      <rect>
-       <x>68</x>
-       <y>78</y>
-       <width>40</width>
-       <height>24</height>
-      </rect>
-     </property>
-     <property name="text">
-      <string>11</string>
-     </property>
-    </widget>
-    <widget class="QLabel" name="label_2">
-     <property name="geometry">
-      <rect>
-       <x>50</x>
-       <y>83</y>
-       <width>14</width>
-       <height>14</height>
-      </rect>
-     </property>
-     <property name="text">
-      <string>%</string>
-     </property>
-    </widget>
-    <widget class="QLabel" name="label_6">
-     <property name="geometry">
-      <rect>
-       <x>12</x>
-       <y>22</y>
-       <width>12</width>
-       <height>34</height>
-      </rect>
-     </property>
-     <property name="text">
-      <string/>
-     </property>
-    </widget>
-    <widget class="QLabel" name="label_7">
-     <property name="geometry">
-      <rect>
-       <x>91</x>
-       <y>22</y>
-       <width>12</width>
-       <height>34</height>
-      </rect>
-     </property>
-     <property name="text">
-      <string/>
-     </property>
-    </widget>
-   </widget>
-   <widget class="QWidget" name="widget_8" native="true">
-    <property name="geometry">
-     <rect>
-      <x>842</x>
-      <y>858</y>
-      <width>114</width>
-      <height>114</height>
-     </rect>
-    </property>
-    <widget class="QSlider" name="verticalSlider_5">
-     <property name="geometry">
-      <rect>
-       <x>30</x>
-       <y>12</y>
-       <width>18</width>
-       <height>56</height>
-      </rect>
-     </property>
-     <property name="orientation">
-      <enum>Qt::Vertical</enum>
-     </property>
-    </widget>
-    <widget class="QSlider" name="verticalSlider_6">
-     <property name="geometry">
-      <rect>
-       <x>65</x>
-       <y>12</y>
-       <width>18</width>
-       <height>56</height>
-      </rect>
-     </property>
-     <property name="orientation">
-      <enum>Qt::Vertical</enum>
-     </property>
-    </widget>
-    <widget class="QLineEdit" name="lineEdit_5">
-     <property name="geometry">
-      <rect>
-       <x>6</x>
-       <y>78</y>
-       <width>40</width>
-       <height>24</height>
-      </rect>
-     </property>
-     <property name="text">
-      <string>0</string>
-     </property>
-    </widget>
-    <widget class="QLineEdit" name="lineEdit_6">
-     <property name="geometry">
-      <rect>
-       <x>68</x>
-       <y>78</y>
-       <width>40</width>
-       <height>24</height>
-      </rect>
-     </property>
-     <property name="text">
-      <string>0</string>
-     </property>
-    </widget>
-    <widget class="QLabel" name="label_3">
-     <property name="geometry">
-      <rect>
-       <x>50</x>
-       <y>83</y>
-       <width>14</width>
-       <height>14</height>
-      </rect>
-     </property>
-     <property name="text">
-      <string>%</string>
-     </property>
-    </widget>
-    <widget class="QLabel" name="label_8">
-     <property name="geometry">
-      <rect>
-       <x>7</x>
-       <y>22</y>
-       <width>19</width>
-       <height>34</height>
-      </rect>
-     </property>
-     <property name="text">
-      <string/>
-     </property>
-    </widget>
-    <widget class="QLabel" name="label_9">
-     <property name="geometry">
-      <rect>
-       <x>87</x>
-       <y>22</y>
-       <width>19</width>
-       <height>34</height>
-      </rect>
-     </property>
-     <property name="text">
-      <string/>
-     </property>
-    </widget>
-   </widget>
    <widget class="QPushButton" name="LiveButton">
     <property name="geometry">
      <rect>
@@ -564,16 +261,213 @@
      </rect>
     </property>
    </widget>
+   <widget class="QWidget" name="RedLight" native="true">
+    <property name="geometry">
+     <rect>
+      <x>834</x>
+      <y>800</y>
+      <width>61</width>
+      <height>114</height>
+     </rect>
+    </property>
+    <widget class="QSlider" name="RedLightverticalSlider">
+     <property name="geometry">
+      <rect>
+       <x>10</x>
+       <y>12</y>
+       <width>18</width>
+       <height>56</height>
+      </rect>
+     </property>
+     <property name="orientation">
+      <enum>Qt::Vertical</enum>
+     </property>
+    </widget>
+    <widget class="QLineEdit" name="RedLightlineEdit">
+     <property name="geometry">
+      <rect>
+       <x>10</x>
+       <y>78</y>
+       <width>40</width>
+       <height>24</height>
+      </rect>
+     </property>
+     <property name="text">
+      <string>22</string>
+     </property>
+    </widget>
+    <widget class="QLabel" name="RedLightlabel">
+     <property name="geometry">
+      <rect>
+       <x>39</x>
+       <y>22</y>
+       <width>10</width>
+       <height>34</height>
+      </rect>
+     </property>
+     <property name="text">
+      <string/>
+     </property>
+    </widget>
+   </widget>
+   <widget class="QWidget" name="GreenLight" native="true">
+    <property name="geometry">
+     <rect>
+      <x>900</x>
+      <y>800</y>
+      <width>61</width>
+      <height>114</height>
+     </rect>
+    </property>
+    <widget class="QSlider" name="GreenLightverticalSlider">
+     <property name="geometry">
+      <rect>
+       <x>10</x>
+       <y>12</y>
+       <width>18</width>
+       <height>56</height>
+      </rect>
+     </property>
+     <property name="orientation">
+      <enum>Qt::Vertical</enum>
+     </property>
+    </widget>
+    <widget class="QLineEdit" name="GreenLightlineEdit">
+     <property name="geometry">
+      <rect>
+       <x>10</x>
+       <y>78</y>
+       <width>40</width>
+       <height>24</height>
+      </rect>
+     </property>
+     <property name="text">
+      <string>11</string>
+     </property>
+    </widget>
+    <widget class="QLabel" name="GreenLightlabel">
+     <property name="geometry">
+      <rect>
+       <x>36</x>
+       <y>22</y>
+       <width>12</width>
+       <height>34</height>
+      </rect>
+     </property>
+     <property name="text">
+      <string/>
+     </property>
+    </widget>
+   </widget>
+   <widget class="QWidget" name="BlueLight" native="true">
+    <property name="geometry">
+     <rect>
+      <x>966</x>
+      <y>800</y>
+      <width>61</width>
+      <height>114</height>
+     </rect>
+    </property>
+    <widget class="QSlider" name="BlueLightverticalSlider">
+     <property name="geometry">
+      <rect>
+       <x>10</x>
+       <y>12</y>
+       <width>18</width>
+       <height>56</height>
+      </rect>
+     </property>
+     <property name="orientation">
+      <enum>Qt::Vertical</enum>
+     </property>
+    </widget>
+    <widget class="QLineEdit" name="BlueLightlineEdit">
+     <property name="geometry">
+      <rect>
+       <x>10</x>
+       <y>78</y>
+       <width>40</width>
+       <height>24</height>
+      </rect>
+     </property>
+     <property name="text">
+      <string>0</string>
+     </property>
+    </widget>
+    <widget class="QLabel" name="BlueLightlabel">
+     <property name="geometry">
+      <rect>
+       <x>32</x>
+       <y>22</y>
+       <width>19</width>
+       <height>34</height>
+      </rect>
+     </property>
+     <property name="text">
+      <string/>
+     </property>
+    </widget>
+   </widget>
+   <widget class="QWidget" name="DotLight" native="true">
+    <property name="geometry">
+     <rect>
+      <x>1032</x>
+      <y>800</y>
+      <width>61</width>
+      <height>114</height>
+     </rect>
+    </property>
+    <widget class="QSlider" name="DotLightverticalSlider">
+     <property name="geometry">
+      <rect>
+       <x>10</x>
+       <y>12</y>
+       <width>18</width>
+       <height>56</height>
+      </rect>
+     </property>
+     <property name="orientation">
+      <enum>Qt::Vertical</enum>
+     </property>
+    </widget>
+    <widget class="QLineEdit" name="DotLightlineEdit">
+     <property name="geometry">
+      <rect>
+       <x>10</x>
+       <y>78</y>
+       <width>40</width>
+       <height>24</height>
+      </rect>
+     </property>
+     <property name="text">
+      <string>0</string>
+     </property>
+    </widget>
+    <widget class="QLabel" name="DotLightlabel">
+     <property name="geometry">
+      <rect>
+       <x>32</x>
+       <y>22</y>
+       <width>19</width>
+       <height>34</height>
+      </rect>
+     </property>
+     <property name="text">
+      <string/>
+     </property>
+    </widget>
+   </widget>
    <zorder>BackGround</zorder>
    <zorder>DatacomboBox</zorder>
    <zorder>Operatewidget</zorder>
    <zorder>line_2</zorder>
-   <zorder>widget_6</zorder>
-   <zorder>widget_7</zorder>
-   <zorder>widget_8</zorder>
    <zorder>LiveButton</zorder>
    <zorder>scrollArea</zorder>
    <zorder>Toolbar</zorder>
+   <zorder>RedLight</zorder>
+   <zorder>GreenLight</zorder>
+   <zorder>BlueLight</zorder>
+   <zorder>DotLight</zorder>
   </widget>
  </widget>
  <customwidgets>

+ 14 - 5
SBTdie-bonder-ui.pro

@@ -5,13 +5,18 @@ greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
 
 CONFIG += c++17
 
+LIBS += -L"D:\qt\Interface_1.1" -lInterface
+
 # You can make your code fail to compile if it uses deprecated APIs.
 # In order to do so, uncomment the following line.
 #DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000    # disables all the APIs deprecated before Qt 6.0.0
 
 SOURCES += \
-    CameraImage/CameraImageHandler.cpp \
-    Group.cpp \
+    CameraMaterialGroupWnd/CameraImage/CameraImageHandler.cpp \
+    CameraMaterialGroupWnd/Group.cpp \
+    CameraMaterialGroupWnd/MaterialWindow/MaterialBox.cpp \
+    CameraMaterialGroupWnd/MaterialWindow/Wafer.cpp \
+    CameraMaterialGroupWnd/MaterialWindow/Waffle.cpp \
     ImageWidget.cpp \
     ImageWidget_nodrag.cpp \
     Login.cpp \
@@ -25,8 +30,12 @@ SOURCES += \
     MainWnd.cpp \
 
 HEADERS += \
-    CameraImage/CameraImageHandler.h \
-    Group.h \
+    CInterface.h \
+    CameraMaterialGroupWnd/CameraImage/CameraImageHandler.h \
+    CameraMaterialGroupWnd/Group.h \
+    CameraMaterialGroupWnd/MaterialWindow/MaterialBox.h \
+    CameraMaterialGroupWnd/MaterialWindow/Wafer.h \
+    CameraMaterialGroupWnd/MaterialWindow/Waffle.h \
     ImageWidget.h \
     ImageWidget_nodrag.h \
     Login.h \
@@ -39,7 +48,7 @@ HEADERS += \
     OriginalWnd/treeviewmanager.h \
 
 FORMS += \
-    Group.ui \
+    CameraMaterialGroupWnd/Group.ui \
     ImageWidget.ui \
     ImageWidget_nodrag.ui \
     Login.ui \

+ 44 - 45
SBTdie-bonder-ui.pro.user

@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE QtCreatorProject>
-<!-- Written by QtCreator 14.0.2, 2025-01-09T11:28:53. -->
+<!-- Written by QtCreator 14.0.2, 2025-01-12T17:59:35. -->
 <qtcreator>
  <data>
   <variable>EnvironmentId</variable>
@@ -8,7 +8,7 @@
  </data>
  <data>
   <variable>ProjectExplorer.Project.ActiveTarget</variable>
-  <value type="qlonglong">1</value>
+  <value type="qlonglong">0</value>
  </data>
  <data>
   <variable>ProjectExplorer.Project.EditorSettings</variable>
@@ -94,16 +94,16 @@
   <variable>ProjectExplorer.Project.Target.0</variable>
   <valuemap type="QVariantMap">
    <value type="QString" key="DeviceType">Desktop</value>
-   <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Desktop Qt 5.15.2 MinGW 64-bit</value>
-   <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Desktop Qt 5.15.2 MinGW 64-bit</value>
-   <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">qt.qt5.5152.win64_mingw81_kit</value>
+   <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Desktop Qt 5.15.2 MSVC2019 64bit</value>
+   <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Desktop Qt 5.15.2 MSVC2019 64bit</value>
+   <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">qt.qt5.5152.win64_msvc2019_64_kit</value>
    <value type="qlonglong" key="ProjectExplorer.Target.ActiveBuildConfiguration">0</value>
    <value type="qlonglong" key="ProjectExplorer.Target.ActiveDeployConfiguration">0</value>
    <value type="qlonglong" key="ProjectExplorer.Target.ActiveRunConfiguration">0</value>
    <valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.0">
     <value type="int" key="EnableQmlDebugging">0</value>
-    <value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">D:\qt\234\die-bonder-ui\die-bonder-ui\build\Desktop_Qt_5_15_2_MinGW_64_bit-Debug</value>
-    <value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory.shadowDir">D:/qt/234/die-bonder-ui/die-bonder-ui/build/Desktop_Qt_5_15_2_MinGW_64_bit-Debug</value>
+    <value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">D:\qt\9998\die-bonder-ui\build\Desktop_Qt_5_15_2_MSVC2019_64bit-Debug</value>
+    <value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory.shadowDir">D:/qt/9998/die-bonder-ui/build/Desktop_Qt_5_15_2_MSVC2019_64bit-Debug</value>
     <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
      <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
       <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
@@ -141,8 +141,8 @@
     <value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">2</value>
    </valuemap>
    <valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.1">
-    <value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">D:\qt\3\die-bonder-ui\build\Desktop_Qt_5_15_2_MinGW_64_bit-Release</value>
-    <value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory.shadowDir">D:/qt/3/die-bonder-ui/build/Desktop_Qt_5_15_2_MinGW_64_bit-Release</value>
+    <value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">D:\qt\234\die-bonder-ui\die-bonder-ui\build\Desktop_Qt_5_15_2_MSVC2019_64bit-Release</value>
+    <value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory.shadowDir">D:/qt/234/die-bonder-ui/die-bonder-ui/build/Desktop_Qt_5_15_2_MSVC2019_64bit-Release</value>
     <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
      <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
       <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
@@ -182,8 +182,8 @@
    </valuemap>
    <valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.2">
     <value type="int" key="EnableQmlDebugging">0</value>
-    <value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">D:\qt\3\die-bonder-ui\build\Desktop_Qt_5_15_2_MinGW_64_bit-Profile</value>
-    <value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory.shadowDir">D:/qt/3/die-bonder-ui/build/Desktop_Qt_5_15_2_MinGW_64_bit-Profile</value>
+    <value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">D:\qt\234\die-bonder-ui\die-bonder-ui\build\Desktop_Qt_5_15_2_MSVC2019_64bit-Profile</value>
+    <value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory.shadowDir">D:/qt/234/die-bonder-ui/die-bonder-ui/build/Desktop_Qt_5_15_2_MSVC2019_64bit-Profile</value>
     <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
      <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
       <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
@@ -248,50 +248,31 @@
     <value type="bool" key="PE.EnvironmentAspect.PrintOnRun">false</value>
     <value type="QString" key="PerfRecordArgsId">-e cpu-cycles --call-graph &quot;dwarf,4096&quot; -F 250</value>
     <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">SBTdie-bonder-ui2</value>
-    <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4RunConfiguration:D:/qt/999/die-bonder-ui/SBTdie-bonder-ui.pro</value>
-    <value type="QString" key="ProjectExplorer.RunConfiguration.BuildKey">D:/qt/999/die-bonder-ui/SBTdie-bonder-ui.pro</value>
+    <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4RunConfiguration:D:/qt/9998/die-bonder-ui/SBTdie-bonder-ui.pro</value>
+    <value type="QString" key="ProjectExplorer.RunConfiguration.BuildKey">D:/qt/9998/die-bonder-ui/SBTdie-bonder-ui.pro</value>
     <value type="bool" key="ProjectExplorer.RunConfiguration.Customized">true</value>
     <value type="bool" key="RunConfiguration.UseCppDebuggerAuto">true</value>
     <value type="bool" key="RunConfiguration.UseLibrarySearchPath">true</value>
     <value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">true</value>
+    <value type="QString" key="RunConfiguration.WorkingDirectory.default">D:/qt/9998/die-bonder-ui/build/Desktop_Qt_5_15_2_MSVC2019_64bit-Debug</value>
    </valuemap>
-   <valuemap type="QVariantMap" key="ProjectExplorer.Target.RunConfiguration.1">
-    <value type="bool" key="Analyzer.Perf.Settings.UseGlobalSettings">true</value>
-    <value type="bool" key="Analyzer.QmlProfiler.Settings.UseGlobalSettings">true</value>
-    <value type="int" key="Analyzer.Valgrind.Callgrind.CostFormat">0</value>
-    <value type="bool" key="Analyzer.Valgrind.Settings.UseGlobalSettings">true</value>
-    <value type="QList&lt;int&gt;" key="Analyzer.Valgrind.VisibleErrorKinds"></value>
-    <valuelist type="QVariantList" key="CustomOutputParsers"/>
-    <value type="int" key="PE.EnvironmentAspect.Base">2</value>
-    <valuelist type="QVariantList" key="PE.EnvironmentAspect.Changes"/>
-    <value type="bool" key="PE.EnvironmentAspect.PrintOnRun">false</value>
-    <value type="QString" key="PerfRecordArgsId">-e cpu-cycles --call-graph &quot;dwarf,4096&quot; -F 250</value>
-    <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
-    <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4RunConfiguration:D:/qt/234/die-bonder-ui/die-bonder-ui/SBTdie-bonder-ui.pro</value>
-    <value type="QString" key="ProjectExplorer.RunConfiguration.BuildKey">D:/qt/234/die-bonder-ui/die-bonder-ui/SBTdie-bonder-ui.pro</value>
-    <value type="bool" key="ProjectExplorer.RunConfiguration.Customized">false</value>
-    <value type="bool" key="RunConfiguration.UseCppDebuggerAuto">true</value>
-    <value type="bool" key="RunConfiguration.UseLibrarySearchPath">true</value>
-    <value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">true</value>
-    <value type="QString" key="RunConfiguration.WorkingDirectory.default">D:/qt/234/die-bonder-ui/die-bonder-ui/build/Desktop_Qt_5_15_2_MinGW_64_bit-Debug</value>
-   </valuemap>
-   <value type="qlonglong" key="ProjectExplorer.Target.RunConfigurationCount">2</value>
+   <value type="qlonglong" key="ProjectExplorer.Target.RunConfigurationCount">1</value>
   </valuemap>
  </data>
  <data>
   <variable>ProjectExplorer.Project.Target.1</variable>
   <valuemap type="QVariantMap">
    <value type="QString" key="DeviceType">Desktop</value>
-   <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Desktop Qt 5.15.2 MSVC2019 64bit</value>
-   <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Desktop Qt 5.15.2 MSVC2019 64bit</value>
-   <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">qt.qt5.5152.win64_msvc2019_64_kit</value>
+   <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Desktop Qt 5.15.2 MinGW 64-bit</value>
+   <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Desktop Qt 5.15.2 MinGW 64-bit</value>
+   <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">qt.qt5.5152.win64_mingw81_kit</value>
    <value type="qlonglong" key="ProjectExplorer.Target.ActiveBuildConfiguration">0</value>
    <value type="qlonglong" key="ProjectExplorer.Target.ActiveDeployConfiguration">0</value>
    <value type="qlonglong" key="ProjectExplorer.Target.ActiveRunConfiguration">0</value>
    <valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.0">
     <value type="int" key="EnableQmlDebugging">0</value>
-    <value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">D:\qt\234\die-bonder-ui\die-bonder-ui\build\Desktop_Qt_5_15_2_MSVC2019_64bit-Debug</value>
-    <value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory.shadowDir">D:/qt/234/die-bonder-ui/die-bonder-ui/build/Desktop_Qt_5_15_2_MSVC2019_64bit-Debug</value>
+    <value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">D:\qt\234\die-bonder-ui\die-bonder-ui\build\Desktop_Qt_5_15_2_MinGW_64_bit-Debug</value>
+    <value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory.shadowDir">D:/qt/234/die-bonder-ui/die-bonder-ui/build/Desktop_Qt_5_15_2_MinGW_64_bit-Debug</value>
     <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
      <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
       <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
@@ -329,8 +310,8 @@
     <value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">2</value>
    </valuemap>
    <valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.1">
-    <value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">D:\qt\234\die-bonder-ui\die-bonder-ui\build\Desktop_Qt_5_15_2_MSVC2019_64bit-Release</value>
-    <value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory.shadowDir">D:/qt/234/die-bonder-ui/die-bonder-ui/build/Desktop_Qt_5_15_2_MSVC2019_64bit-Release</value>
+    <value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">D:\qt\3\die-bonder-ui\build\Desktop_Qt_5_15_2_MinGW_64_bit-Release</value>
+    <value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory.shadowDir">D:/qt/3/die-bonder-ui/build/Desktop_Qt_5_15_2_MinGW_64_bit-Release</value>
     <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
      <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
       <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
@@ -370,8 +351,8 @@
    </valuemap>
    <valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.2">
     <value type="int" key="EnableQmlDebugging">0</value>
-    <value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">D:\qt\234\die-bonder-ui\die-bonder-ui\build\Desktop_Qt_5_15_2_MSVC2019_64bit-Profile</value>
-    <value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory.shadowDir">D:/qt/234/die-bonder-ui/die-bonder-ui/build/Desktop_Qt_5_15_2_MSVC2019_64bit-Profile</value>
+    <value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">D:\qt\3\die-bonder-ui\build\Desktop_Qt_5_15_2_MinGW_64_bit-Profile</value>
+    <value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory.shadowDir">D:/qt/3/die-bonder-ui/build/Desktop_Qt_5_15_2_MinGW_64_bit-Profile</value>
     <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
      <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
       <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
@@ -425,6 +406,25 @@
    </valuemap>
    <value type="qlonglong" key="ProjectExplorer.Target.DeployConfigurationCount">1</value>
    <valuemap type="QVariantMap" key="ProjectExplorer.Target.RunConfiguration.0">
+    <value type="bool" key="Analyzer.Perf.Settings.UseGlobalSettings">true</value>
+    <value type="bool" key="Analyzer.QmlProfiler.Settings.UseGlobalSettings">true</value>
+    <value type="int" key="Analyzer.Valgrind.Callgrind.CostFormat">0</value>
+    <value type="bool" key="Analyzer.Valgrind.Settings.UseGlobalSettings">true</value>
+    <value type="QList&lt;int&gt;" key="Analyzer.Valgrind.VisibleErrorKinds"></value>
+    <valuelist type="QVariantList" key="CustomOutputParsers"/>
+    <value type="int" key="PE.EnvironmentAspect.Base">2</value>
+    <valuelist type="QVariantList" key="PE.EnvironmentAspect.Changes"/>
+    <value type="bool" key="PE.EnvironmentAspect.PrintOnRun">false</value>
+    <value type="QString" key="PerfRecordArgsId">-e cpu-cycles --call-graph &quot;dwarf,4096&quot; -F 250</value>
+    <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">SBTdie-bonder-ui2</value>
+    <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4RunConfiguration:D:/qt/999/die-bonder-ui/SBTdie-bonder-ui.pro</value>
+    <value type="QString" key="ProjectExplorer.RunConfiguration.BuildKey">D:/qt/999/die-bonder-ui/SBTdie-bonder-ui.pro</value>
+    <value type="bool" key="ProjectExplorer.RunConfiguration.Customized">true</value>
+    <value type="bool" key="RunConfiguration.UseCppDebuggerAuto">true</value>
+    <value type="bool" key="RunConfiguration.UseLibrarySearchPath">true</value>
+    <value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">true</value>
+   </valuemap>
+   <valuemap type="QVariantMap" key="ProjectExplorer.Target.RunConfiguration.1">
     <value type="bool" key="Analyzer.Perf.Settings.UseGlobalSettings">true</value>
     <value type="bool" key="Analyzer.QmlProfiler.Settings.UseGlobalSettings">true</value>
     <value type="int" key="Analyzer.Valgrind.Callgrind.CostFormat">0</value>
@@ -442,9 +442,8 @@
     <value type="bool" key="RunConfiguration.UseCppDebuggerAuto">true</value>
     <value type="bool" key="RunConfiguration.UseLibrarySearchPath">true</value>
     <value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">true</value>
-    <value type="QString" key="RunConfiguration.WorkingDirectory.default">D:/qt/234/die-bonder-ui/die-bonder-ui/build/Desktop_Qt_5_15_2_MSVC2019_64bit-Debug</value>
    </valuemap>
-   <value type="qlonglong" key="ProjectExplorer.Target.RunConfigurationCount">1</value>
+   <value type="qlonglong" key="ProjectExplorer.Target.RunConfigurationCount">2</value>
   </valuemap>
  </data>
  <data>

+ 0 - 0
images/unknown_4_2.png → images/LightGroup/BlueLight.png


BIN
images/LightGroup/DotLight.png


+ 0 - 0
images/unknown_3_2.png → images/LightGroup/GreenLight.png


+ 0 - 0
images/unknown_1.png → images/LightGroup/LightSwitch.png


+ 0 - 0
images/unknown_2_2.png → images/LightGroup/RedLight.png


+ 0 - 0
images/slider.png → images/LightGroup/slider.png


+ 0 - 0
images/light/4610@1x.png → images/TopStatusBar/HostStatus.png


+ 0 - 0
images/light/4611@1x.png → images/TopStatusBar/MachineLink.png


+ 0 - 0
images/light/user.png → images/TopStatusBar/user.png


BIN
images/light/start.png


BIN
images/light/stop.png


BIN
images/one.png


BIN
images/two.png


BIN
images/unknown_2.png


BIN
images/unknown_3_1.png


BIN
images/unknown_4_1.png


+ 38 - 49
light.qss

@@ -162,13 +162,13 @@ OriginalWnd QWidget#Toptitlebar QPushButton#CalibrationButton
 QWidget#Toptitlebar QPushButton#pushButton_2
 {
     background-color: transparent;
-    image: url(:/images/two.png);
+    image: url(:/images/TopStatusBar/MachineLink.png);
 }
 
 QWidget#Toptitlebar QPushButton#pushButton_3
 {
     background-color: transparent;
-    image: url(:/images/one.png);
+    image: url(:/images/TopStatusBar/HostStatus.png);
 }
 
 /*初始界面*/
@@ -180,22 +180,22 @@ OriginalWnd QWidget#widget
 }
 
 
-OriginalWnd QWidget#widget QToolButton#toolButton
+OriginalWnd QWidget#widget QToolButton#stopButton
 {
     border-radius: 6px;
     background: #F02962;
     color: #FFFFFF;
-    padding-bottom: 13px;
-    padding-left: 28px;
+    padding-bottom: 10px;
+    padding-left: 9px;
 }
 
-OriginalWnd QWidget#widget QToolButton#toolButton_2
+OriginalWnd QWidget#widget QToolButton#startButton
 {
     border-radius: 6px;
     background: #4AB832;
     color: #FFFFFF;
-    padding-bottom: 13px;
-    padding-left: 28px;
+    padding-bottom: 10px;
+    padding-left: 9px;
 }
 
 OriginalWnd QWidget#widget QPushButton#ChartButton:hover,
@@ -262,7 +262,7 @@ ChartsAndCamerasWnd QWidget#Rightwidget
 
 Group QPushButton#GroupButton
 {
-    image: url(:/images/unknown_1.png);
+    image: url(:/images/LightGroup/LightSwitch.png);
     border-radius: 6px;
     background:qlineargradient(spread:pad,x1:0,y1:0,x2:0,y2:1,stop:0 #949FE8,stop:1 #2D309B);
 }
@@ -277,15 +277,18 @@ ChartsAndCamerasWnd QPushButton#LiveButton
     background:qlineargradient(spread:pad,x1:0,y1:0,x2:0,y2:1,stop:0 #949FE8,stop:1 #2D309B);
 }
 
-SingleCameraOperationWnd QWidget#widget_6,
-SingleCameraOperationWnd QWidget#widget_7,
-SingleCameraOperationWnd QWidget#widget_8,
-MainAndSecondaryCamerasWnd QWidget#widget_6,
-MainAndSecondaryCamerasWnd QWidget#widget_7,
-MainAndSecondaryCamerasWnd QWidget#widget_8,
-ChartsAndCamerasWnd QWidget#widget_6,
-ChartsAndCamerasWnd QWidget#widget_7,
-ChartsAndCamerasWnd QWidget#widget_8
+SingleCameraOperationWnd QWidget#RedLight,
+SingleCameraOperationWnd QWidget#GreenLight,
+SingleCameraOperationWnd QWidget#BlueLight,
+SingleCameraOperationWnd QWidget#DotLight,
+MainAndSecondaryCamerasWnd QWidget#RedLight,
+MainAndSecondaryCamerasWnd QWidget#GreenLight,
+MainAndSecondaryCamerasWnd QWidget#BlueLight,
+MainAndSecondaryCamerasWnd QWidget#DotLight,
+ChartsAndCamerasWnd QWidget#RedLight,
+ChartsAndCamerasWnd QWidget#GreenLight,
+ChartsAndCamerasWnd QWidget#BlueLight,
+ChartsAndCamerasWnd QWidget#DotLight
 {
     background: #D6D8ED;
 }
@@ -308,46 +311,32 @@ ChartsAndCamerasWnd QWidget#BackGround
     border-radius: 0px;
 }
 
-SingleCameraOperationWnd QLabel#label_4,
-MainAndSecondaryCamerasWnd QLabel#label_4,
-ChartsAndCamerasWnd QLabel#label_4
+SingleCameraOperationWnd QLabel#RedLightlabel,
+MainAndSecondaryCamerasWnd QLabel#RedLightlabel_2,
+ChartsAndCamerasWnd QLabel#RedLightlabel
 {
-    image: url(:/images/unknown_2.png);
+    image: url(:/images/LightGroup/RedLight.png);
 }
 
-SingleCameraOperationWnd QLabel#label_5,
-MainAndSecondaryCamerasWnd QLabel#label_5,
-ChartsAndCamerasWnd QLabel#label_5
+SingleCameraOperationWnd QLabel#GreenLightlabel,
+MainAndSecondaryCamerasWnd QLabel#GreenLightlabel_5,
+ChartsAndCamerasWnd QLabel#GreenLightlabel
 {
-    image: url(:/images/unknown_2_2.png);
+    image: url(:/images/LightGroup/GreenLight.png);
 }
 
-SingleCameraOperationWnd QLabel#label_6,
-MainAndSecondaryCamerasWnd QLabel#label_6,
-ChartsAndCamerasWnd QLabel#label_6
+SingleCameraOperationWnd QLabel#BlueLightlabel,
+MainAndSecondaryCamerasWnd QLabel#BlueLightlabel_2,
+ChartsAndCamerasWnd QLabel#BlueLightlabel
 {
-    image: url(:/images/unknown_3_1.png);
+    image: url(:/images/LightGroup/BlueLight.png);
 }
 
-SingleCameraOperationWnd QLabel#label_7,
-MainAndSecondaryCamerasWnd QLabel#label_7,
-ChartsAndCamerasWnd QLabel#label_7
+SingleCameraOperationWnd QLabel#DotLightlabel,
+MainAndSecondaryCamerasWnd QLabel#DotLightlabel_2,
+ChartsAndCamerasWnd QLabel#DotLightlabel
 {
-    image: url(:/images/unknown_3_2.png);
-}
-
-SingleCameraOperationWnd QLabel#label_8,
-MainAndSecondaryCamerasWnd QLabel#label_11,
-ChartsAndCamerasWnd QLabel#label_11
-{
-    image: url(:/images/unknown_4_1.png);
-}
-
-SingleCameraOperationWnd QLabel#label_9,
-MainAndSecondaryCamerasWnd QLabel#label_12,
-ChartsAndCamerasWnd QLabel#label_12
-{
-    image: url(:/images/unknown_4_2.png);
+    image: url(:/images/LightGroup/DotLight.png);
 }
 
 /* 工具栏 */
@@ -453,7 +442,7 @@ QSlider::sub-page:vertical {
 }
 
 QSlider::handle:vertical {
-    border-image: url(:/images/slider.png);
+    border-image: url(:/images/LightGroup/slider.png);
     height: 6px;
     margin: 0px -5px 0px -5px;
     border-radius: 4px;

+ 9 - 11
res.qrc

@@ -10,9 +10,6 @@
         <file>images/light/Module.png</file>
         <file>images/light/Program.png</file>
         <file>images/light/System.png</file>
-        <file>images/one.png</file>
-        <file>images/two.png</file>
-        <file>images/light/user.png</file>
         <file>images/light/Demo001_1.png</file>
         <file>images/light/Demo001_2.png</file>
         <file>images/light/Demo001_3.png</file>
@@ -35,14 +32,6 @@
         <file>images/login_pass.png</file>
         <file>images/light/zoom up.png</file>
         <file>images/light/zoom out.png</file>
-        <file>images/slider.png</file>
-        <file>images/unknown_1.png</file>
-        <file>images/unknown_2.png</file>
-        <file>images/unknown_2_2.png</file>
-        <file>images/unknown_3_1.png</file>
-        <file>images/unknown_3_2.png</file>
-        <file>images/unknown_4_1.png</file>
-        <file>images/unknown_4_2.png</file>
         <file>images/test_image/image_1.png</file>
         <file>images/test_image/image_2.png</file>
         <file>images/test_image/image_4.png</file>
@@ -96,5 +85,14 @@
         <file>images/check_selected.png</file>
         <file>images/three_Selecte.png</file>
         <file>images/drop.png</file>
+        <file>images/LightGroup/BlueLight.png</file>
+        <file>images/LightGroup/GreenLight.png</file>
+        <file>images/LightGroup/LightSwitch.png</file>
+        <file>images/LightGroup/RedLight.png</file>
+        <file>images/LightGroup/slider.png</file>
+        <file>images/LightGroup/DotLight.png</file>
+        <file>images/TopStatusBar/HostStatus.png</file>
+        <file>images/TopStatusBar/MachineLink.png</file>
+        <file>images/TopStatusBar/user.png</file>
     </qresource>
 </RCC>