Sfoglia il codice sorgente

彩色打印同步控制

DESKTOP-55AB90D\user 10 mesi fa
parent
commit
6e431bc374

+ 337 - 6
CGH_Printer.cpp

@@ -17,6 +17,7 @@
 #include <stdlib.h>
 #include <time.h>
 #include <sstream>
+#include "LoopThread.h"
 
 
 #define FREEBUF(x) {if(x!=NULL){delete [] x;x=NULL;}}
@@ -30,7 +31,6 @@ CGH_Printer* gcam = NULL;// 线程函数中使用的全局变量
 CGH_Printer::CGH_Printer(QWidget* parent)
     : QMainWindow(parent)
 {
-
     ui.setupUi(this);
     //----------------------------------------修改tabwidget的颜色
     ////widget 背景色属性
@@ -54,7 +54,7 @@ CGH_Printer::CGH_Printer(QWidget* parent)
     initConfigure();
     initSlots();
 
-    timer_calendar->start(500);// 定时器的刷新间隔
+    timer_calendar->start(100);// 定时器的刷新间隔
     // CheckState->start();// 线程调用
     // Coordinate->start();// 线程调用
     
@@ -66,6 +66,8 @@ void CGH_Printer::initVariables()
     timer_calendar = new QTimer();
     timer_WorkState = new QTimer();// 工作状态检测
     timer_Expose = new QTimer();
+    timer_loop = new QTimer();
+    timer_loop->setSingleShot(true); // 设置为单次触发
     timer_Work = new QTimer();
     timer_Work->setInterval(100);
     timer_WorkState->setInterval(100);
@@ -74,7 +76,7 @@ void CGH_Printer::initVariables()
     // CheckState = new CGH_CheckStateThread(this);// 硬件状态检测线程的初始化
     m_Printer = new PrintThread(this);
     // Coordinate = new CGH_CoordinateThread(this);// 平移台坐标更新线程的初始化
-
+    //m_LoopThread = new LoopThread(this);//创建子线程对象
     // 状态检测的初始化
     icon_Red = new QImage();
     icon_Green = new QImage();
@@ -117,6 +119,8 @@ void CGH_Printer::initVariables()
     labelPrint = new QLabel();
 
     PRINTSTOP = FALSE;
+    //循环图片路径初始化
+    loopCGH = "CGH";
 }
 
 void CGH_Printer::initConfigure()
@@ -228,6 +232,7 @@ void CGH_Printer::initSlots()
     connect(ui.comboBoxDevice, SIGNAL(currentIndexChanged(int)), this, SLOT(ChangeDevice()));
     connect(ui.comboBoxFormat, SIGNAL(currentIndexChanged(int)), this, SLOT(ChangeFormat()));
     connect(ui.pushButtonLoad, SIGNAL(clicked()), this, SLOT(CGHLoad()));
+    connect(ui.pushButtonLoad_loop, SIGNAL(clicked()), this, SLOT(CGHLoad_loop()));
 
     // *** 电控平移台 *** //
     connect(ui.pushButtonUp, SIGNAL(clicked()), this, SLOT(MoveUp()));
@@ -240,11 +245,25 @@ void CGH_Printer::initSlots()
     // *** 电子快门 *** //
     connect(ui.pushButtonShutterExpose, SIGNAL(clicked()), this, SLOT(Expose()));
     connect(ui.pushButtonShutterStop, SIGNAL(clicked()), this, SLOT(ShutterStop()));
+    connect(ui.pushButtonShutterExpose_1, SIGNAL(clicked()), this, SLOT(Expose_1()));
+    //connect(ui.pushButtonShutterStop_1, SIGNAL(clicked()), this, SLOT(ShutterStop_1()));
+    connect(ui.pushButtonShutterExpose_2, SIGNAL(clicked()), this, SLOT(Expose_2()));
+    connect(ui.pushButtonShutterStop_2, SIGNAL(clicked()), this, SLOT(ShutterStop_2()));
+    connect(ui.pushButtonShutterExpose_3, SIGNAL(clicked()), this, SLOT(Expose_3()));
+    connect(ui.pushButtonShutterExpose_loop, SIGNAL(clicked()), this, SLOT(Expose_loop()));
+    //connect(ui.pushButtonShutterStop_3, SIGNAL(clicked()), this, SLOT(ShutterStop_3()));
+    connect(timer_loop, &QTimer::timeout, this, &CGH_Printer::SLMUpdate_loop);//定时器发出的信号
 
     // *** 配置保存 *** //
     connect(ui.pushButtonTempSaved, SIGNAL(clicked()), this, SLOT(TempSaved()));
     connect(ui.pushButtonPermSaved, SIGNAL(clicked()), this, SLOT(PermSaved()));
-    
+
+    //connect(this,&CGH_Printer::sendCGH, m_LoopThread,&LoopThread::setloopCGH);//将全息图地址传给子线程
+    //connect(this, &CGH_Printer::sendtime,m_LoopThread, &LoopThread::settime_num);//将时间传给子线程
+    //connect(m_LoopThread, &LoopThread::sendmessage, this, [=](QString CGHName) {
+    //    loopCGH = CGHName;
+    //    SLMUpdate_loop();
+    //    });//接收子线程的全息图地址
 }
 
 void CGH_Printer::ReadConfigure()
@@ -285,7 +304,7 @@ void CGH_Printer::ReadConfigure()
 
 void CGH_Printer::loadHistory()
 {
-    CreateDirectory(L".\\Project", NULL);//判断是否有Project文件,没有则创建
+    CreateDirectoryW(L".\\Project", NULL);//判断是否有Project文件,没有则创建
     _finddata_t data;
     auto handle = _findfirst((absProjectPath + "/*.*").c_str(), &data);// 读取第一文件或文件夹
     do
@@ -644,9 +663,225 @@ void CGH_Printer::Expose()
         QMessageBox::critical(this, tr("错误"), tr("电子快门未连接!"));
     }
 }
+void CGH_Printer::Expose_1()
+{
+    if (curShutterState)
+    {
+        BusyState();
+
+        int Ext = ui.lineEditShutter_1->text().toInt();// 快门曝光时间
+        timer_Expose->setInterval(Ext);
+
+        MyShutter->open_1();
+        curShutterWorkState = true;
+
+        timer_Expose->start();
+        timer_WorkState->start();
+    }
+    else
+    {
+        QMessageBox::critical(this, tr("错误"), tr("电子快门未连接!"));
+    }
+}
+void CGH_Printer::Expose_2()
+{
+    if (curShutterState)
+    {
+        BusyState();
+
+        int Ext = ui.lineEditShutter_2->text().toInt();// 快门曝光时间
+        timer_Expose->setInterval(Ext);
+
+        MyShutter->open_2();
+        curShutterWorkState = true;
+
+        timer_Expose->start();
+        timer_WorkState->start();
+    }
+    else
+    {
+        QMessageBox::critical(this, tr("错误"), tr("电子快门未连接!"));
+    }
+}
+void CGH_Printer::Expose_3()
+{
+    if (curShutterState)
+    {
+        BusyState();
+
+        int Ext = ui.lineEditShutter_3->text().toInt();// 快门曝光时间
+        timer_Expose->setInterval(Ext);
+
+        MyShutter->open_3();
+        curShutterWorkState = true;
+
+        timer_Expose->start();
+        timer_WorkState->start();
+    }
+    else
+    {
+        QMessageBox::critical(this, tr("错误"), tr("电子快门未连接!"));
+    }
+}
+void CGH_Printer::Expose_loop()
+{
 
+    BusyState();
+    int Ext_1 = ui.lineEditShutter_1->text().toInt();// 快门1曝光时间
+    int Ext_2 = ui.lineEditShutter_2->text().toInt();// 快门2曝光时间
+    int Ext_3 = ui.lineEditShutter_3->text().toInt();// 快门3曝光时间
+    int Cyc_loop = ui.lineEditShutter_loop->text().toInt();// 快门曝光循环次数
+    ui.label_looptime->setText(QString::number(((Ext_1 + Ext_2 + Ext_3) * Cyc_loop)));
+
+    // 获取新建项目路径
+    QString Fullfilename_1 = ui.lineEditCGHName_loop->text() + "1.bmp";
+    QString Fullfilename_2 = ui.lineEditCGHName_loop->text() + "2.bmp";
+    QString Fullfilename_3 = ui.lineEditCGHName_loop->text() + "3.bmp";
+    //emit sendCGH(Fullfilename_3);
+    //emit sendtime(Ext_1);
+    //m_LoopThread->start();
+
+   
+}
 
 
+
+//void CGH_Printer::Expose_loop()
+//{
+
+    //BusyState();
+    //int Ext_1 = ui.lineEditShutter_1->text().toInt();// 快门1曝光时间
+    //int Ext_2 = ui.lineEditShutter_2->text().toInt();// 快门2曝光时间
+    //int Ext_3 = ui.lineEditShutter_3->text().toInt();// 快门3曝光时间
+    //int Cyc_loop = ui.lineEditShutter_loop->text().toInt();// 快门曝光循环次数
+    //ui.label_looptime->setText(QString::number(((Ext_1+ Ext_2+ Ext_3)*Cyc_loop)));
+    ////timer_Expose->setInterval(Ext);
+    //
+    ////获取新建项目路径
+
+    //QString Fullfilename_1;
+    //QString Fullfilename_2;
+    //QString Fullfilename_3;
+    //Fullfilename_1 = ui.lineEditCGHName_loop->text()+"1.bmp";
+    //Fullfilename_2 = ui.lineEditCGHName_loop->text() + "2.bmp";
+    //Fullfilename_3 = ui.lineEditCGHName_loop->text() + "3.bmp";
+
+    //for (int i=0;i< Cyc_loop;i++)
+    //{
+    //    
+    //    ui.labelCGHDisplay_loop->clear();
+    //    ui.labelCGHDisplay_loop->setPixmap(QPixmap(Fullfilename_1));
+    //    ui.labelCGHDisplay_loop->update();
+
+    //    // labelPrint->setPixmap(QPixmap(Fullfilename));
+    //    if (Desktop->numScreens() == 2)
+    //    {
+    //        labelPrint->clear();
+    //        labelPrint->setPixmap(QPixmap(Fullfilename_1));
+    //    }
+    //    timer_Expose->setInterval(Ext_1);
+    //    curShutterWorkState = true;
+    //    timer_Expose->start();
+    //    timer_WorkState->start();
+    //    
+    //    ui.labelCGHDisplay_loop->clear();
+    //    ui.labelCGHDisplay_loop->setPixmap(QPixmap(Fullfilename_2));
+    //    ui.labelCGHDisplay_loop->update();
+
+    //    // labelPrint->setPixmap(QPixmap(Fullfilename));
+    //    if (Desktop->numScreens() == 2)
+    //    {
+    //        labelPrint->clear();
+    //        labelPrint->setPixmap(QPixmap(Fullfilename_2));
+    //    }
+    //    timer_Expose->setInterval(Ext_2);
+    //    curShutterWorkState = true;
+    //    timer_Expose->start();
+    //    timer_WorkState->start();
+    //   
+    //    ui.labelCGHDisplay_loop->clear();
+    //    ui.labelCGHDisplay_loop->setPixmap(QPixmap(Fullfilename_3));
+    //    ui.labelCGHDisplay_loop->update();
+
+    //    // labelPrint->setPixmap(QPixmap(Fullfilename));
+    //    if (Desktop->numScreens() == 2)
+    //    {
+    //        labelPrint->clear();
+    //        labelPrint->setPixmap(QPixmap(Fullfilename_3));
+    //    }
+    //    timer_Expose->setInterval(Ext_3);
+    //    curShutterWorkState = true;
+    //    timer_Expose->start();
+    //    timer_WorkState->start();
+    //}
+    //if (curShutterState)
+    //{
+
+    //    
+    //    BusyState();
+    //    int Ext_1 = ui.lineEditShutter_1->text().toInt();// 快门1曝光时间
+    //    int Ext_2 = ui.lineEditShutter_2->text().toInt();// 快门2曝光时间
+    //    int Ext_3 = ui.lineEditShutter_3->text().toInt();// 快门3曝光时间
+    //    int Cyc_loop = ui.lineEditShutter_loop->text().toInt();// 快门曝光循环次数
+    //    ui.label_looptime->setText(QString::number(((Ext_1+ Ext_2+ Ext_3)*Cyc_loop)));
+    //    //timer_Expose->setInterval(Ext);
+    //    Sleep(1000);// 静台
+    //    //获取新建项目路径
+ 
+    //    QString Fullfilename_1;
+    //    QString Fullfilename_2;
+    //    QString Fullfilename_3;
+    //    Fullfilename_1 = ui.lineEditCGHName_loop->text()+"1.bmp";
+    //    Fullfilename_2 = ui.lineEditCGHName_loop->text() + "2.bmp";
+    //    Fullfilename_3 = ui.lineEditCGHName_loop->text() + "3.bmp";
+
+
+    //    for (int i=0;i< Cyc_loop;i++)
+    //    {
+    //        MyShutter->open_1();
+    //        ui.labelCGHDisplay_loop->clear();
+    //        ui.labelCGHDisplay_loop->setPixmap(QPixmap(Fullfilename_1));
+    //        // labelPrint->setPixmap(QPixmap(Fullfilename));
+    //        if (Desktop->numScreens() == 2)
+    //        {
+    //            labelPrint->clear();
+    //            labelPrint->setPixmap(QPixmap(Fullfilename_1));
+    //        }
+    //        Sleep(Ext_1);
+    //        MyShutter->open_2();
+    //        ui.labelCGHDisplay_loop->clear();
+    //        ui.labelCGHDisplay_loop->setPixmap(QPixmap(Fullfilename_2));
+    //        // labelPrint->setPixmap(QPixmap(Fullfilename));
+    //        if (Desktop->numScreens() == 2)
+    //        {
+    //            labelPrint->clear();
+    //            labelPrint->setPixmap(QPixmap(Fullfilename_2));
+    //        }
+    //        Sleep(Ext_2);
+    //        MyShutter->open_3();
+    //        ui.labelCGHDisplay_loop->clear();
+    //        ui.labelCGHDisplay_loop->setPixmap(QPixmap(Fullfilename_3));
+    //        // labelPrint->setPixmap(QPixmap(Fullfilename));
+    //        if (Desktop->numScreens() == 2)
+    //        {
+    //            labelPrint->clear();
+    //            labelPrint->setPixmap(QPixmap(Fullfilename_3));
+    //        }
+    //        Sleep(Ext_3);
+    //    }
+    //   
+    //    MyShutter->close();
+    //    curShutterWorkState = false;
+
+    //    timer_Expose->stop();
+    //    timer_WorkState->start();
+    //}
+    //else
+    //{
+    //    QMessageBox::critical(this, tr("错误"), tr("电子快门未连接!"));
+    //}
+//}
+
 void CGH_Printer::ShutterStop()
 {
     if (curShutterState)
@@ -663,7 +898,51 @@ void CGH_Printer::ShutterStop()
     }
 }
 
+void CGH_Printer::ShutterStop_1()
+{
+    if (curShutterState)
+    {
+        MyShutter->close_1();
+        curShutterWorkState = false;
+
+        timer_Expose->stop();
+        timer_WorkState->start();
+    }
+    else
+    {
+        QMessageBox::critical(this, tr("错误"), tr("电子快门未连接!"));
+    }
+}
+void CGH_Printer::ShutterStop_2()
+{
+    if (curShutterState)
+    {
+        MyShutter->close_2();
+        curShutterWorkState = false;
+
+        timer_Expose->stop();
+        timer_WorkState->start();
+    }
+    else
+    {
+        QMessageBox::critical(this, tr("错误"), tr("电子快门未连接!"));
+    }
+}
+void CGH_Printer::ShutterStop_3()
+{
+    if (curShutterState)
+    {
+        MyShutter->close_3();
+        curShutterWorkState = false;
 
+        timer_Expose->stop();
+        timer_WorkState->start();
+    }
+    else
+    {
+        QMessageBox::critical(this, tr("错误"), tr("电子快门未连接!"));
+    }
+}
 
 void CGH_Printer::ExposeUpdate()
 {
@@ -1022,7 +1301,13 @@ void CGH_Printer::SLMUpdate(const QString& tempCGH)
     CurPrintName = QString::fromStdString(PrintName) + "(" + tempCGH + ")";
 	ui.lineEditPrintName->setText(tempCGH);
 }
-
+void CGH_Printer::SLMUpdate_loop()
+{
+    labelPrint->clear();
+    labelPrint->setPixmap(QPixmap(loopCGH));
+    ui.labelCGHDisplay_loop->clear();
+    ui.labelCGHDisplay_loop->setPixmap(QPixmap(loopCGH));
+}
 
 
 void CGH_Printer::PrintUpdate(int tempLL, int tempCC)
@@ -1178,7 +1463,53 @@ void CGH_Printer::CGHLoad()
     delete CGH_dialog;
     CGH_dialog = NULL;
 }
+void CGH_Printer::CGHLoad_loop()
+{
+    QFileDialog* CGH_dialog = new QFileDialog(this);
+    QString filefull;
+    QString Fullfilename;
+    QString Fullfilename_loop;
+    QFileInfo fileinfo;
+
+    QString curPath = QString::fromStdString(absResourcesPath);// 默认路径
+
+    // 路径不存在则创建路径
+    QDir dir(curPath);
+    if (!dir.exists(curPath))
+    {
+        dir.mkdir(curPath);
+    }
+
+    QString dlgTitle = "选择文件";// 对话框标题
+    QString filter = "Bmp Files(*.bmp)";// 文件过滤器
+    filefull = CGH_dialog->getOpenFileName(this, dlgTitle, curPath, filter);
 
+    QFileInfo file(filefull);
+    //点击确定按钮
+    if (file.isFile() && file.exists())
+    {
+        //获取新建项目路径
+        fileinfo = QFileInfo(filefull);
+        Fullfilename = fileinfo.absolutePath() + "/" + fileinfo.fileName();
+        Fullfilename_loop = fileinfo.absolutePath() + "/";
+        ui.labelCGHDisplay_loop->clear();
+        ui.labelCGHDisplay_loop->setPixmap(QPixmap(Fullfilename));
+        ui.lineEditCGHName_loop->setText(Fullfilename_loop);//设置路径栏
+        // labelPrint->setPixmap(QPixmap(Fullfilename));
+        if (Desktop->numScreens() == 2)
+        {
+            labelPrint->clear();
+            labelPrint->setPixmap(QPixmap(Fullfilename));
+        }
+    }
+    //点取消则返回
+    else
+    {
+        return;
+    }
+    delete CGH_dialog;
+    CGH_dialog = NULL;
+}
 
 
 // 视频预览

+ 882 - 4
CGH_Printer.ui

@@ -289,7 +289,7 @@ QGroupBox{background-color:rgb(235, 235,235);border:1px solid rgb(179, 179, 179)
        <enum>QTabWidget::Rounded</enum>
       </property>
       <property name="currentIndex">
-       <number>0</number>
+       <number>1</number>
       </property>
       <property name="elideMode">
        <enum>Qt::ElideNone</enum>
@@ -575,6 +575,885 @@ QGroupBox{background-color:rgb(235, 235,235);border:1px solid rgb(179, 179, 179)
         </item>
        </layout>
       </widget>
+      <widget class="QWidget" name="tab_2">
+       <attribute name="title">
+        <string>快门</string>
+       </attribute>
+       <widget class="QGroupBox" name="groupBox_2">
+        <property name="geometry">
+         <rect>
+          <x>490</x>
+          <y>10</y>
+          <width>321</width>
+          <height>391</height>
+         </rect>
+        </property>
+        <property name="title">
+         <string>电子快门控制</string>
+        </property>
+        <widget class="QGroupBox" name="groupBox_25">
+         <property name="geometry">
+          <rect>
+           <x>40</x>
+           <y>20</y>
+           <width>241</width>
+           <height>61</height>
+          </rect>
+         </property>
+         <property name="sizePolicy">
+          <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
+           <horstretch>0</horstretch>
+           <verstretch>0</verstretch>
+          </sizepolicy>
+         </property>
+         <property name="minimumSize">
+          <size>
+           <width>0</width>
+           <height>0</height>
+          </size>
+         </property>
+         <property name="title">
+          <string>电子快门-1</string>
+         </property>
+         <property name="alignment">
+          <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
+         </property>
+         <layout class="QHBoxLayout" name="horizontalLayout_24">
+          <item>
+           <widget class="QLabel" name="label_58">
+            <property name="minimumSize">
+             <size>
+              <width>0</width>
+              <height>0</height>
+             </size>
+            </property>
+            <property name="maximumSize">
+             <size>
+              <width>16777215</width>
+              <height>16777215</height>
+             </size>
+            </property>
+            <property name="font">
+             <font>
+              <pointsize>9</pointsize>
+             </font>
+            </property>
+            <property name="text">
+             <string>时间</string>
+            </property>
+            <property name="alignment">
+             <set>Qt::AlignCenter</set>
+            </property>
+           </widget>
+          </item>
+          <item>
+           <widget class="QLineEdit" name="lineEditShutter_1">
+            <property name="minimumSize">
+             <size>
+              <width>0</width>
+              <height>0</height>
+             </size>
+            </property>
+            <property name="maximumSize">
+             <size>
+              <width>16777215</width>
+              <height>16777215</height>
+             </size>
+            </property>
+            <property name="font">
+             <font>
+              <pointsize>9</pointsize>
+             </font>
+            </property>
+            <property name="layoutDirection">
+             <enum>Qt::LeftToRight</enum>
+            </property>
+            <property name="styleSheet">
+             <string notr="true"/>
+            </property>
+            <property name="text">
+             <string>0</string>
+            </property>
+            <property name="alignment">
+             <set>Qt::AlignCenter</set>
+            </property>
+           </widget>
+          </item>
+          <item>
+           <widget class="QLabel" name="label_59">
+            <property name="minimumSize">
+             <size>
+              <width>0</width>
+              <height>0</height>
+             </size>
+            </property>
+            <property name="maximumSize">
+             <size>
+              <width>16777215</width>
+              <height>16777215</height>
+             </size>
+            </property>
+            <property name="sizeIncrement">
+             <size>
+              <width>0</width>
+              <height>-1</height>
+             </size>
+            </property>
+            <property name="font">
+             <font>
+              <pointsize>9</pointsize>
+             </font>
+            </property>
+            <property name="text">
+             <string>ms</string>
+            </property>
+            <property name="alignment">
+             <set>Qt::AlignCenter</set>
+            </property>
+           </widget>
+          </item>
+          <item>
+           <layout class="QVBoxLayout" name="verticalLayout_14">
+            <item>
+             <widget class="QPushButton" name="pushButtonShutterExpose_1">
+              <property name="minimumSize">
+               <size>
+                <width>0</width>
+                <height>0</height>
+               </size>
+              </property>
+              <property name="maximumSize">
+               <size>
+                <width>16777215</width>
+                <height>16777215</height>
+               </size>
+              </property>
+              <property name="font">
+               <font>
+                <pointsize>9</pointsize>
+               </font>
+              </property>
+              <property name="text">
+               <string>曝光</string>
+              </property>
+              <property name="icon">
+               <iconset resource="CGH_Printer.qrc">
+                <normaloff>:/CGH_Printer/Configure/IMG/flashblue.png</normaloff>:/CGH_Printer/Configure/IMG/flashblue.png</iconset>
+              </property>
+              <property name="iconSize">
+               <size>
+                <width>20</width>
+                <height>20</height>
+               </size>
+              </property>
+              <property name="checkable">
+               <bool>false</bool>
+              </property>
+             </widget>
+            </item>
+           </layout>
+          </item>
+         </layout>
+        </widget>
+        <widget class="QGroupBox" name="groupBox_26">
+         <property name="geometry">
+          <rect>
+           <x>40</x>
+           <y>100</y>
+           <width>241</width>
+           <height>61</height>
+          </rect>
+         </property>
+         <property name="sizePolicy">
+          <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
+           <horstretch>0</horstretch>
+           <verstretch>0</verstretch>
+          </sizepolicy>
+         </property>
+         <property name="minimumSize">
+          <size>
+           <width>0</width>
+           <height>0</height>
+          </size>
+         </property>
+         <property name="title">
+          <string>电子快门-2</string>
+         </property>
+         <property name="alignment">
+          <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
+         </property>
+         <layout class="QHBoxLayout" name="horizontalLayout_25">
+          <item>
+           <widget class="QLabel" name="label_60">
+            <property name="minimumSize">
+             <size>
+              <width>0</width>
+              <height>0</height>
+             </size>
+            </property>
+            <property name="maximumSize">
+             <size>
+              <width>16777215</width>
+              <height>16777215</height>
+             </size>
+            </property>
+            <property name="font">
+             <font>
+              <pointsize>9</pointsize>
+             </font>
+            </property>
+            <property name="text">
+             <string>时间</string>
+            </property>
+            <property name="alignment">
+             <set>Qt::AlignCenter</set>
+            </property>
+           </widget>
+          </item>
+          <item>
+           <widget class="QLineEdit" name="lineEditShutter_2">
+            <property name="minimumSize">
+             <size>
+              <width>0</width>
+              <height>0</height>
+             </size>
+            </property>
+            <property name="maximumSize">
+             <size>
+              <width>16777215</width>
+              <height>16777215</height>
+             </size>
+            </property>
+            <property name="font">
+             <font>
+              <pointsize>9</pointsize>
+             </font>
+            </property>
+            <property name="layoutDirection">
+             <enum>Qt::LeftToRight</enum>
+            </property>
+            <property name="styleSheet">
+             <string notr="true"/>
+            </property>
+            <property name="text">
+             <string>0</string>
+            </property>
+            <property name="alignment">
+             <set>Qt::AlignCenter</set>
+            </property>
+           </widget>
+          </item>
+          <item>
+           <widget class="QLabel" name="label_61">
+            <property name="minimumSize">
+             <size>
+              <width>0</width>
+              <height>0</height>
+             </size>
+            </property>
+            <property name="maximumSize">
+             <size>
+              <width>16777215</width>
+              <height>16777215</height>
+             </size>
+            </property>
+            <property name="sizeIncrement">
+             <size>
+              <width>0</width>
+              <height>-1</height>
+             </size>
+            </property>
+            <property name="font">
+             <font>
+              <pointsize>9</pointsize>
+             </font>
+            </property>
+            <property name="text">
+             <string>ms</string>
+            </property>
+            <property name="alignment">
+             <set>Qt::AlignCenter</set>
+            </property>
+           </widget>
+          </item>
+          <item>
+           <layout class="QVBoxLayout" name="verticalLayout_15">
+            <item>
+             <widget class="QPushButton" name="pushButtonShutterExpose_2">
+              <property name="minimumSize">
+               <size>
+                <width>0</width>
+                <height>0</height>
+               </size>
+              </property>
+              <property name="maximumSize">
+               <size>
+                <width>16777215</width>
+                <height>16777215</height>
+               </size>
+              </property>
+              <property name="font">
+               <font>
+                <pointsize>9</pointsize>
+               </font>
+              </property>
+              <property name="text">
+               <string>曝光</string>
+              </property>
+              <property name="icon">
+               <iconset resource="CGH_Printer.qrc">
+                <normaloff>:/CGH_Printer/Configure/IMG/flashblue.png</normaloff>:/CGH_Printer/Configure/IMG/flashblue.png</iconset>
+              </property>
+              <property name="iconSize">
+               <size>
+                <width>20</width>
+                <height>20</height>
+               </size>
+              </property>
+              <property name="checkable">
+               <bool>false</bool>
+              </property>
+             </widget>
+            </item>
+           </layout>
+          </item>
+         </layout>
+        </widget>
+        <widget class="QGroupBox" name="groupBox_27">
+         <property name="geometry">
+          <rect>
+           <x>40</x>
+           <y>180</y>
+           <width>241</width>
+           <height>61</height>
+          </rect>
+         </property>
+         <property name="sizePolicy">
+          <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
+           <horstretch>0</horstretch>
+           <verstretch>0</verstretch>
+          </sizepolicy>
+         </property>
+         <property name="minimumSize">
+          <size>
+           <width>0</width>
+           <height>0</height>
+          </size>
+         </property>
+         <property name="title">
+          <string>电子快门-3</string>
+         </property>
+         <property name="alignment">
+          <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
+         </property>
+         <layout class="QHBoxLayout" name="horizontalLayout_26">
+          <item>
+           <widget class="QLabel" name="label_62">
+            <property name="minimumSize">
+             <size>
+              <width>0</width>
+              <height>0</height>
+             </size>
+            </property>
+            <property name="maximumSize">
+             <size>
+              <width>16777215</width>
+              <height>16777215</height>
+             </size>
+            </property>
+            <property name="font">
+             <font>
+              <pointsize>9</pointsize>
+             </font>
+            </property>
+            <property name="text">
+             <string>时间</string>
+            </property>
+            <property name="alignment">
+             <set>Qt::AlignCenter</set>
+            </property>
+           </widget>
+          </item>
+          <item>
+           <widget class="QLineEdit" name="lineEditShutter_3">
+            <property name="minimumSize">
+             <size>
+              <width>0</width>
+              <height>0</height>
+             </size>
+            </property>
+            <property name="maximumSize">
+             <size>
+              <width>16777215</width>
+              <height>16777215</height>
+             </size>
+            </property>
+            <property name="font">
+             <font>
+              <pointsize>9</pointsize>
+             </font>
+            </property>
+            <property name="layoutDirection">
+             <enum>Qt::LeftToRight</enum>
+            </property>
+            <property name="styleSheet">
+             <string notr="true"/>
+            </property>
+            <property name="text">
+             <string>0</string>
+            </property>
+            <property name="alignment">
+             <set>Qt::AlignCenter</set>
+            </property>
+           </widget>
+          </item>
+          <item>
+           <widget class="QLabel" name="label_63">
+            <property name="minimumSize">
+             <size>
+              <width>0</width>
+              <height>0</height>
+             </size>
+            </property>
+            <property name="maximumSize">
+             <size>
+              <width>16777215</width>
+              <height>16777215</height>
+             </size>
+            </property>
+            <property name="sizeIncrement">
+             <size>
+              <width>0</width>
+              <height>-1</height>
+             </size>
+            </property>
+            <property name="font">
+             <font>
+              <pointsize>9</pointsize>
+             </font>
+            </property>
+            <property name="text">
+             <string>ms</string>
+            </property>
+            <property name="alignment">
+             <set>Qt::AlignCenter</set>
+            </property>
+           </widget>
+          </item>
+          <item>
+           <layout class="QVBoxLayout" name="verticalLayout_16">
+            <item>
+             <widget class="QPushButton" name="pushButtonShutterExpose_3">
+              <property name="minimumSize">
+               <size>
+                <width>0</width>
+                <height>0</height>
+               </size>
+              </property>
+              <property name="maximumSize">
+               <size>
+                <width>16777215</width>
+                <height>16777215</height>
+               </size>
+              </property>
+              <property name="font">
+               <font>
+                <pointsize>9</pointsize>
+               </font>
+              </property>
+              <property name="text">
+               <string>曝光</string>
+              </property>
+              <property name="icon">
+               <iconset resource="CGH_Printer.qrc">
+                <normaloff>:/CGH_Printer/Configure/IMG/flashblue.png</normaloff>:/CGH_Printer/Configure/IMG/flashblue.png</iconset>
+              </property>
+              <property name="iconSize">
+               <size>
+                <width>20</width>
+                <height>20</height>
+               </size>
+              </property>
+              <property name="checkable">
+               <bool>false</bool>
+              </property>
+             </widget>
+            </item>
+           </layout>
+          </item>
+         </layout>
+        </widget>
+        <widget class="QPushButton" name="pushButtonShutterStop_2">
+         <property name="geometry">
+          <rect>
+           <x>170</x>
+           <y>340</y>
+           <width>80</width>
+           <height>26</height>
+          </rect>
+         </property>
+         <property name="text">
+          <string>停止</string>
+         </property>
+         <property name="icon">
+          <iconset resource="CGH_Printer.qrc">
+           <normaloff>:/CGH_Printer/Configure/IMG/stop1.png</normaloff>:/CGH_Printer/Configure/IMG/stop1.png</iconset>
+         </property>
+         <property name="iconSize">
+          <size>
+           <width>20</width>
+           <height>20</height>
+          </size>
+         </property>
+         <property name="checkable">
+          <bool>false</bool>
+         </property>
+        </widget>
+        <widget class="QLabel" name="label_looptime">
+         <property name="geometry">
+          <rect>
+           <x>180</x>
+           <y>300</y>
+           <width>71</width>
+           <height>21</height>
+          </rect>
+         </property>
+         <property name="minimumSize">
+          <size>
+           <width>0</width>
+           <height>0</height>
+          </size>
+         </property>
+         <property name="maximumSize">
+          <size>
+           <width>16777215</width>
+           <height>16777215</height>
+          </size>
+         </property>
+         <property name="font">
+          <font>
+           <pointsize>9</pointsize>
+          </font>
+         </property>
+         <property name="text">
+          <string>0</string>
+         </property>
+         <property name="alignment">
+          <set>Qt::AlignCenter</set>
+         </property>
+        </widget>
+        <widget class="QLabel" name="label_65">
+         <property name="geometry">
+          <rect>
+           <x>60</x>
+           <y>300</y>
+           <width>111</width>
+           <height>21</height>
+          </rect>
+         </property>
+         <property name="minimumSize">
+          <size>
+           <width>0</width>
+           <height>0</height>
+          </size>
+         </property>
+         <property name="maximumSize">
+          <size>
+           <width>16777215</width>
+           <height>16777215</height>
+          </size>
+         </property>
+         <property name="font">
+          <font>
+           <pointsize>9</pointsize>
+          </font>
+         </property>
+         <property name="text">
+          <string>总循环时间:</string>
+         </property>
+         <property name="alignment">
+          <set>Qt::AlignCenter</set>
+         </property>
+        </widget>
+        <widget class="QLabel" name="label_64">
+         <property name="geometry">
+          <rect>
+           <x>60</x>
+           <y>260</y>
+           <width>111</width>
+           <height>21</height>
+          </rect>
+         </property>
+         <property name="minimumSize">
+          <size>
+           <width>0</width>
+           <height>0</height>
+          </size>
+         </property>
+         <property name="maximumSize">
+          <size>
+           <width>16777215</width>
+           <height>16777215</height>
+          </size>
+         </property>
+         <property name="font">
+          <font>
+           <pointsize>9</pointsize>
+          </font>
+         </property>
+         <property name="text">
+          <string>循环次数:</string>
+         </property>
+         <property name="alignment">
+          <set>Qt::AlignCenter</set>
+         </property>
+        </widget>
+        <widget class="QPushButton" name="pushButtonShutterExpose_loop">
+         <property name="geometry">
+          <rect>
+           <x>80</x>
+           <y>340</y>
+           <width>80</width>
+           <height>26</height>
+          </rect>
+         </property>
+         <property name="minimumSize">
+          <size>
+           <width>0</width>
+           <height>0</height>
+          </size>
+         </property>
+         <property name="maximumSize">
+          <size>
+           <width>16777215</width>
+           <height>16777215</height>
+          </size>
+         </property>
+         <property name="font">
+          <font>
+           <pointsize>9</pointsize>
+          </font>
+         </property>
+         <property name="text">
+          <string>开始</string>
+         </property>
+         <property name="icon">
+          <iconset resource="CGH_Printer.qrc">
+           <normaloff>:/CGH_Printer/Configure/IMG/flashblue.png</normaloff>:/CGH_Printer/Configure/IMG/flashblue.png</iconset>
+         </property>
+         <property name="iconSize">
+          <size>
+           <width>20</width>
+           <height>20</height>
+          </size>
+         </property>
+         <property name="checkable">
+          <bool>false</bool>
+         </property>
+        </widget>
+        <widget class="QLineEdit" name="lineEditShutter_loop">
+         <property name="geometry">
+          <rect>
+           <x>170</x>
+           <y>260</y>
+           <width>81</width>
+           <height>22</height>
+          </rect>
+         </property>
+         <property name="minimumSize">
+          <size>
+           <width>0</width>
+           <height>0</height>
+          </size>
+         </property>
+         <property name="maximumSize">
+          <size>
+           <width>16777215</width>
+           <height>16777215</height>
+          </size>
+         </property>
+         <property name="font">
+          <font>
+           <pointsize>9</pointsize>
+          </font>
+         </property>
+         <property name="layoutDirection">
+          <enum>Qt::LeftToRight</enum>
+         </property>
+         <property name="styleSheet">
+          <string notr="true"/>
+         </property>
+         <property name="text">
+          <string>1</string>
+         </property>
+         <property name="alignment">
+          <set>Qt::AlignCenter</set>
+         </property>
+        </widget>
+        <widget class="QLabel" name="label_69">
+         <property name="geometry">
+          <rect>
+           <x>250</x>
+           <y>300</y>
+           <width>31</width>
+           <height>21</height>
+          </rect>
+         </property>
+         <property name="minimumSize">
+          <size>
+           <width>0</width>
+           <height>0</height>
+          </size>
+         </property>
+         <property name="maximumSize">
+          <size>
+           <width>16777215</width>
+           <height>16777215</height>
+          </size>
+         </property>
+         <property name="font">
+          <font>
+           <pointsize>9</pointsize>
+          </font>
+         </property>
+         <property name="text">
+          <string>ms</string>
+         </property>
+         <property name="alignment">
+          <set>Qt::AlignCenter</set>
+         </property>
+        </widget>
+       </widget>
+       <widget class="QGroupBox" name="groupBox_17">
+        <property name="geometry">
+         <rect>
+          <x>30</x>
+          <y>10</y>
+          <width>430</width>
+          <height>391</height>
+         </rect>
+        </property>
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="minimumSize">
+         <size>
+          <width>430</width>
+          <height>0</height>
+         </size>
+        </property>
+        <property name="maximumSize">
+         <size>
+          <width>0</width>
+          <height>16777215</height>
+         </size>
+        </property>
+        <property name="styleSheet">
+         <string notr="true"/>
+        </property>
+        <property name="title">
+         <string>全息图加载</string>
+        </property>
+        <property name="alignment">
+         <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
+        </property>
+        <layout class="QGridLayout" name="gridLayout_15">
+         <item row="3" column="0">
+          <widget class="QLabel" name="labelCGHDisplay_loop">
+           <property name="enabled">
+            <bool>true</bool>
+           </property>
+           <property name="sizePolicy">
+            <sizepolicy hsizetype="Preferred" vsizetype="Expanding">
+             <horstretch>0</horstretch>
+             <verstretch>0</verstretch>
+            </sizepolicy>
+           </property>
+           <property name="minimumSize">
+            <size>
+             <width>0</width>
+             <height>0</height>
+            </size>
+           </property>
+           <property name="maximumSize">
+            <size>
+             <width>16777215</width>
+             <height>230</height>
+            </size>
+           </property>
+           <property name="cursor">
+            <cursorShape>UpArrowCursor</cursorShape>
+           </property>
+           <property name="text">
+            <string/>
+           </property>
+           <property name="textFormat">
+            <enum>Qt::MarkdownText</enum>
+           </property>
+           <property name="scaledContents">
+            <bool>true</bool>
+           </property>
+           <property name="alignment">
+            <set>Qt::AlignCenter</set>
+           </property>
+          </widget>
+         </item>
+         <item row="1" column="0">
+          <spacer name="horizontalSpacer_6">
+           <property name="orientation">
+            <enum>Qt::Horizontal</enum>
+           </property>
+           <property name="sizeHint" stdset="0">
+            <size>
+             <width>40</width>
+             <height>20</height>
+            </size>
+           </property>
+          </spacer>
+         </item>
+         <item row="0" column="0">
+          <layout class="QHBoxLayout" name="horizontalLayout_19">
+           <property name="spacing">
+            <number>7</number>
+           </property>
+           <item>
+            <widget class="QLineEdit" name="lineEditCGHName_loop">
+             <property name="readOnly">
+              <bool>true</bool>
+             </property>
+            </widget>
+           </item>
+           <item>
+            <widget class="QPushButton" name="pushButtonLoad_loop">
+             <property name="sizePolicy">
+              <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
+               <horstretch>0</horstretch>
+               <verstretch>0</verstretch>
+              </sizepolicy>
+             </property>
+             <property name="maximumSize">
+              <size>
+               <width>93</width>
+               <height>28</height>
+              </size>
+             </property>
+             <property name="text">
+              <string>加载</string>
+             </property>
+             <property name="icon">
+              <iconset resource="CGH_Printer.qrc">
+               <normaloff>:/CGH_Printer/Configure/IMG/loadblue.png</normaloff>:/CGH_Printer/Configure/IMG/loadblue.png</iconset>
+             </property>
+            </widget>
+           </item>
+          </layout>
+         </item>
+        </layout>
+       </widget>
+      </widget>
       <widget class="QWidget" name="tab_7">
        <attribute name="icon">
         <iconset resource="CGH_Printer.qrc">
@@ -1287,8 +2166,8 @@ QGroupBox{background-color:rgb(235, 235,235);border:1px solid rgb(179, 179, 179)
                <rect>
                 <x>0</x>
                 <y>0</y>
-                <width>689</width>
-                <height>341</height>
+                <width>722</width>
+                <height>357</height>
                </rect>
               </property>
               <layout class="QVBoxLayout" name="verticalLayout">
@@ -2375,7 +3254,6 @@ QGroupBox{background-color:rgb(235, 235,235);border:1px solid rgb(179, 179, 179)
   <include location="CGH_Printer.qrc"/>
   <include location="CGH_Printer.qrc"/>
   <include location="CGH_Printer.qrc"/>
-  <include location="C:/Users/user/.designer/backup/CGH_Printer.qrc"/>
  </resources>
  <connections/>
 </ui>

+ 2 - 0
CGH_Printer.vcxproj

@@ -228,6 +228,7 @@
     <ClCompile Include="CGH_TabWidget.cpp" />
     <ClCompile Include="CGH_Project.cpp" />
     <ClCompile Include="CGH_ProjectView.cpp" />
+    <ClCompile Include="LoopThread.cpp" />
     <ClCompile Include="PrintThread.cpp" />
     <QtRcc Include="CGH_Printer.qrc" />
     <ClCompile Include="CGH_Printer.cpp" />
@@ -241,6 +242,7 @@
     <ClInclude Include="Include\SerialPort.h" />
     <ClInclude Include="Include\ui_CGH_Printer.h" />
     <ClInclude Include="Include\ui_CGH_ProjectView.h" />
+    <ClInclude Include="LoopThread.h" />
     <QtMoc Include="Include\CGH_CheckStateThread.h" />
     <QtMoc Include="Include\CGH_CoordinateThread.h" />
     <ClInclude Include="Include\CGH_Project.h" />

+ 6 - 0
CGH_Printer.vcxproj.filters

@@ -64,6 +64,9 @@
     <ClCompile Include="CGH_Relays.cpp">
       <Filter>Source Files</Filter>
     </ClCompile>
+    <ClCompile Include="LoopThread.cpp">
+      <Filter>Source Files</Filter>
+    </ClCompile>
   </ItemGroup>
   <ItemGroup>
     <QtMoc Include="Include\CGH_Printer.h">
@@ -119,6 +122,9 @@
     <ClInclude Include="Include\ui_CGH_Printer.h">
       <Filter>Header Files</Filter>
     </ClInclude>
+    <ClInclude Include="LoopThread.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
   </ItemGroup>
   <ItemGroup>
     <QtUic Include="CGH_Printer.ui">

+ 12 - 4
CGH_Printer.vcxproj.user

@@ -2,15 +2,23 @@
 <Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
   <PropertyGroup />
   <PropertyGroup Label="QtSettings" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
-    <QtLastBackgroundBuild>2023-02-11T07:33:38.2497108Z</QtLastBackgroundBuild>
+    <QtLastBackgroundBuild>2023-03-02T03:45:16.8069204Z</QtLastBackgroundBuild>
+    <QtTouchProperty>
+    </QtTouchProperty>
   </PropertyGroup>
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="QtSettings">
-    <QtLastBackgroundBuild>2023-02-11T07:33:38.3097240Z</QtLastBackgroundBuild>
+    <QtLastBackgroundBuild>2023-03-02T03:45:17.0629782Z</QtLastBackgroundBuild>
+    <QtTouchProperty>
+    </QtTouchProperty>
   </PropertyGroup>
   <PropertyGroup Label="QtSettings" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
-    <QtLastBackgroundBuild>2023-02-11T07:33:38.3652403Z</QtLastBackgroundBuild>
+    <QtLastBackgroundBuild>2023-03-02T03:45:17.1872533Z</QtLastBackgroundBuild>
+    <QtTouchProperty>
+    </QtTouchProperty>
   </PropertyGroup>
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="QtSettings">
-    <QtLastBackgroundBuild>2023-02-11T07:33:38.4212535Z</QtLastBackgroundBuild>
+    <QtLastBackgroundBuild>2023-03-02T03:45:17.2822745Z</QtLastBackgroundBuild>
+    <QtTouchProperty>
+    </QtTouchProperty>
   </PropertyGroup>
 </Project>

+ 83 - 1
CGH_Shutter.cpp

@@ -34,7 +34,51 @@ int CGH_Shutter::open()
     return 0;
 
 }
+int CGH_Shutter::open_1()
+{
+    if (!m_open)
+    {
+        return -1;
+    }
+    ULONG dlen = 2;
+    unsigned char* mBuf;
+    unsigned char  srcmBuf[3];
+    srcmBuf[0] = '8'; srcmBuf[1] = 'a'; srcmBuf[2] = '\0';
+    mBuf = mStrtoVal(srcmBuf, 4);
+    CH375WriteData(mIndex, &mBuf[0], &dlen);
+    return 0;
+
+}
+int CGH_Shutter::open_2()
+{
+    if (!m_open)
+    {
+        return -1;
+    }
+    ULONG dlen = 2;
+    unsigned char* mBuf;
+    unsigned char  srcmBuf[3];
+    srcmBuf[0] = '4'; srcmBuf[1] = 'a'; srcmBuf[2] = '\0';
+    mBuf = mStrtoVal(srcmBuf, 4);
+    CH375WriteData(mIndex, &mBuf[0], &dlen);
+    return 0;
+
+}
+int CGH_Shutter::open_3()
+{
+    if (!m_open)
+    {
+        return -1;
+    }
+    ULONG dlen = 2;
+    unsigned char* mBuf;
+    unsigned char  srcmBuf[3];
+    srcmBuf[0] = '2'; srcmBuf[1] = 'a'; srcmBuf[2] = '\0';
+    mBuf = mStrtoVal(srcmBuf, 4);
+    CH375WriteData(mIndex, &mBuf[0], &dlen);
+    return 0;
 
+}
 int CGH_Shutter::close() {
     if (!m_open)
     {
@@ -48,7 +92,45 @@ int CGH_Shutter::close() {
     CH375WriteData(mIndex, &mBuf[0], &dlen);
     return 0;
 }
-
+int CGH_Shutter::close_1() {
+    if (!m_open)
+    {
+        return -1;
+    }
+    ULONG dlen = 2;
+    unsigned char* mBuf;
+    unsigned char  srcmBuf[3];
+    srcmBuf[0] = '0'; srcmBuf[1] = 'a'; srcmBuf[2] = '\0';
+    mBuf = mStrtoVal(srcmBuf, 4);
+    CH375WriteData(mIndex, &mBuf[0], &dlen);
+    return 0;
+}
+int CGH_Shutter::close_2() {
+    if (!m_open)
+    {
+        return -1;
+    }
+    ULONG dlen = 2;
+    unsigned char* mBuf;
+    unsigned char  srcmBuf[3];
+    srcmBuf[0] = '0'; srcmBuf[1] = 'a'; srcmBuf[2] = '\0';
+    mBuf = mStrtoVal(srcmBuf, 4);
+    CH375WriteData(mIndex, &mBuf[0], &dlen);
+    return 0;
+}
+int CGH_Shutter::close_3() {
+    if (!m_open)
+    {
+        return -1;
+    }
+    ULONG dlen = 2;
+    unsigned char* mBuf;
+    unsigned char  srcmBuf[3];
+    srcmBuf[0] = '0'; srcmBuf[1] = 'a'; srcmBuf[2] = '\0';
+    mBuf = mStrtoVal(srcmBuf, 4);
+    CH375WriteData(mIndex, &mBuf[0], &dlen);
+    return 0;
+}
 CGH_Shutter::~CGH_Shutter() 
 {
 }

+ 19 - 2
Include/CGH_Printer.h

@@ -5,9 +5,11 @@
 #include <QTimer>
 #include <QList>
 #include "ui_CGH_Printer.h"
+//#include "LoopThread.h"
 //#include "CGH_CheckStateThread.h"
 #include "CGH_Shutter.h"
 #include "PrintThread.h"
+
 #include "PI_GCS2_DLL.h"
 #include "CGH_ProjectView.h"
 #include "CGH_Project.h"
@@ -28,6 +30,7 @@ const BOOL UNABLE = FALSE;
 const int BufferSize = 2048;
 
 class PrintThread;
+class LoopThread;
 // class CGH_CoordinateThread;
 class CGH_Printer : public QMainWindow
 {
@@ -155,6 +158,8 @@ public:
 signals:
     //void isDone(int);
     //void isDone(string);
+    void sendCGH(QString CGHName);//传递全息图地址到子线程中
+    void sendtime(int EXtime);//传递时间到子线程中
 
 public slots:
     void timerUpdate();
@@ -173,6 +178,7 @@ public slots:
     void ChangeFormat();
     // 全息图加载
     void CGHLoad();
+    void CGHLoad_loop();
 
     // 工作状态检测
     void WorkStateUpdate();
@@ -203,9 +209,16 @@ public slots:
     
     // 电子快门曝光
     void Expose();
+    void Expose_1();
+    void Expose_2();
+    void Expose_3();
+    void Expose_loop();
+
     // 电子快门停止
     void ShutterStop();
-
+    void ShutterStop_1();
+    void ShutterStop_2();
+    void ShutterStop_3();
     // 上料
     void Feed();
     // 下料
@@ -218,6 +231,7 @@ public slots:
 
     // 打印过程中更新空间光调制器
     void SLMUpdate(const QString& tempCGH);
+    void SLMUpdate_loop();//图片定时器的槽函数
     // 打印过程中更新打印进度
     void PrintUpdate(int tempLL, int tempCC);
 
@@ -233,6 +247,7 @@ private:
     string absPath, absConfigurePath, absProjectPath, absCapturePath, absResourcesPath;// 绝对路径
     string relConfigurePath, relProjectPath, relCapturePath, relResourcesPath;// 相对路径
     string ProjectType, ConfigureName;
+    QString loopCGH;//定义加载循环图片的变量
 
     // SLM显示
     QDesktopWidget* Desktop;
@@ -243,11 +258,13 @@ private:
     QTimer* timer_WorkState;
     QTimer* timer_Expose;
     QTimer* timer_Work;
+    QTimer* timer_loop;
+
 
     // CGH_CheckStateThread* CheckState;// 硬件状态检测线程对象
     // CGH_CoordinateThread* Coordinate;// 平移台坐标更新线程对象
     PrintThread* m_Printer;
-
+    LoopThread* m_LoopThread;
     // CCD相关变量
     QList<QCameraInfo> m_pCameraInfos;
     QCameraImageCapture* m_pCameraCapture;

+ 6 - 0
Include/CGH_Shutter.h

@@ -44,7 +44,13 @@ public:
     CGH_Shutter();
     ~CGH_Shutter();
     int open();
+    int open_1();
+    int open_2();
+    int open_3();
     int close();
+    int close_1();
+    int close_2();
+    int close_3();
     bool isconnected();
     void disconnected();
     // void connect();

+ 407 - 59
Include/ui_CGH_Printer.h

@@ -1,13 +1,13 @@
 /********************************************************************************
-** Form generated from reading UI file 'CGH_PrinterbJZujz.ui'
+** Form generated from reading UI file 'CGH_PrinterawMKPj.ui'
 **
 ** Created by: Qt User Interface Compiler version 5.15.2
 **
 ** WARNING! All changes made in this file will be lost when recompiling UI file!
 ********************************************************************************/
 
-#ifndef CGH_PRINTERBJZUJZ_H
-#define CGH_PRINTERBJZUJZ_H
+#ifndef CGH_PRINTERAWMKPJ_H
+#define CGH_PRINTERAWMKPJ_H
 
 #include <CGH_TabWidget.h>
 #include <QtCore/QVariant>
@@ -63,6 +63,43 @@ public:
     QLabel *labelCCD;
     QLabel *label_4;
     QLabel *labelEquipment;
+    QWidget *tab_2;
+    QGroupBox *groupBox_2;
+    QGroupBox *groupBox_25;
+    QHBoxLayout *horizontalLayout_24;
+    QLabel *label_58;
+    QLineEdit *lineEditShutter_1;
+    QLabel *label_59;
+    QVBoxLayout *verticalLayout_14;
+    QPushButton *pushButtonShutterExpose_1;
+    QGroupBox *groupBox_26;
+    QHBoxLayout *horizontalLayout_25;
+    QLabel *label_60;
+    QLineEdit *lineEditShutter_2;
+    QLabel *label_61;
+    QVBoxLayout *verticalLayout_15;
+    QPushButton *pushButtonShutterExpose_2;
+    QGroupBox *groupBox_27;
+    QHBoxLayout *horizontalLayout_26;
+    QLabel *label_62;
+    QLineEdit *lineEditShutter_3;
+    QLabel *label_63;
+    QVBoxLayout *verticalLayout_16;
+    QPushButton *pushButtonShutterExpose_3;
+    QPushButton *pushButtonShutterStop_2;
+    QLabel *label_looptime;
+    QLabel *label_65;
+    QLabel *label_64;
+    QPushButton *pushButtonShutterExpose_loop;
+    QLineEdit *lineEditShutter_loop;
+    QLabel *label_69;
+    QGroupBox *groupBox_17;
+    QGridLayout *gridLayout_15;
+    QLabel *labelCGHDisplay_loop;
+    QSpacerItem *horizontalSpacer_6;
+    QHBoxLayout *horizontalLayout_19;
+    QLineEdit *lineEditCGHName_loop;
+    QPushButton *pushButtonLoad_loop;
     QWidget *tab_7;
     QGridLayout *gridLayout_2;
     QGroupBox *groupBox_9;
@@ -459,6 +496,305 @@ public:
         QIcon icon;
         icon.addFile(QString::fromUtf8(":/CGH_Printer/Configure/IMG/home.png"), QSize(), QIcon::Normal, QIcon::Off);
         tabWidget->addTab(tab, icon, QString());
+        tab_2 = new QWidget();
+        tab_2->setObjectName(QString::fromUtf8("tab_2"));
+        groupBox_2 = new QGroupBox(tab_2);
+        groupBox_2->setObjectName(QString::fromUtf8("groupBox_2"));
+        groupBox_2->setGeometry(QRect(490, 10, 321, 391));
+        groupBox_25 = new QGroupBox(groupBox_2);
+        groupBox_25->setObjectName(QString::fromUtf8("groupBox_25"));
+        groupBox_25->setGeometry(QRect(40, 20, 241, 61));
+        QSizePolicy sizePolicy1(QSizePolicy::Preferred, QSizePolicy::Preferred);
+        sizePolicy1.setHorizontalStretch(0);
+        sizePolicy1.setVerticalStretch(0);
+        sizePolicy1.setHeightForWidth(groupBox_25->sizePolicy().hasHeightForWidth());
+        groupBox_25->setSizePolicy(sizePolicy1);
+        groupBox_25->setMinimumSize(QSize(0, 0));
+        groupBox_25->setAlignment(Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter);
+        horizontalLayout_24 = new QHBoxLayout(groupBox_25);
+        horizontalLayout_24->setSpacing(6);
+        horizontalLayout_24->setContentsMargins(11, 11, 11, 11);
+        horizontalLayout_24->setObjectName(QString::fromUtf8("horizontalLayout_24"));
+        label_58 = new QLabel(groupBox_25);
+        label_58->setObjectName(QString::fromUtf8("label_58"));
+        label_58->setMinimumSize(QSize(0, 0));
+        label_58->setMaximumSize(QSize(16777215, 16777215));
+        label_58->setFont(font);
+        label_58->setAlignment(Qt::AlignCenter);
+
+        horizontalLayout_24->addWidget(label_58);
+
+        lineEditShutter_1 = new QLineEdit(groupBox_25);
+        lineEditShutter_1->setObjectName(QString::fromUtf8("lineEditShutter_1"));
+        lineEditShutter_1->setMinimumSize(QSize(0, 0));
+        lineEditShutter_1->setMaximumSize(QSize(16777215, 16777215));
+        lineEditShutter_1->setFont(font);
+        lineEditShutter_1->setLayoutDirection(Qt::LeftToRight);
+        lineEditShutter_1->setStyleSheet(QString::fromUtf8(""));
+        lineEditShutter_1->setAlignment(Qt::AlignCenter);
+
+        horizontalLayout_24->addWidget(lineEditShutter_1);
+
+        label_59 = new QLabel(groupBox_25);
+        label_59->setObjectName(QString::fromUtf8("label_59"));
+        label_59->setMinimumSize(QSize(0, 0));
+        label_59->setMaximumSize(QSize(16777215, 16777215));
+        label_59->setSizeIncrement(QSize(0, -1));
+        label_59->setFont(font);
+        label_59->setAlignment(Qt::AlignCenter);
+
+        horizontalLayout_24->addWidget(label_59);
+
+        verticalLayout_14 = new QVBoxLayout();
+        verticalLayout_14->setSpacing(6);
+        verticalLayout_14->setObjectName(QString::fromUtf8("verticalLayout_14"));
+        pushButtonShutterExpose_1 = new QPushButton(groupBox_25);
+        pushButtonShutterExpose_1->setObjectName(QString::fromUtf8("pushButtonShutterExpose_1"));
+        pushButtonShutterExpose_1->setMinimumSize(QSize(0, 0));
+        pushButtonShutterExpose_1->setMaximumSize(QSize(16777215, 16777215));
+        pushButtonShutterExpose_1->setFont(font);
+        QIcon icon1;
+        icon1.addFile(QString::fromUtf8(":/CGH_Printer/Configure/IMG/flashblue.png"), QSize(), QIcon::Normal, QIcon::Off);
+        pushButtonShutterExpose_1->setIcon(icon1);
+        pushButtonShutterExpose_1->setIconSize(QSize(20, 20));
+        pushButtonShutterExpose_1->setCheckable(false);
+
+        verticalLayout_14->addWidget(pushButtonShutterExpose_1);
+
+
+        horizontalLayout_24->addLayout(verticalLayout_14);
+
+        groupBox_26 = new QGroupBox(groupBox_2);
+        groupBox_26->setObjectName(QString::fromUtf8("groupBox_26"));
+        groupBox_26->setGeometry(QRect(40, 100, 241, 61));
+        sizePolicy1.setHeightForWidth(groupBox_26->sizePolicy().hasHeightForWidth());
+        groupBox_26->setSizePolicy(sizePolicy1);
+        groupBox_26->setMinimumSize(QSize(0, 0));
+        groupBox_26->setAlignment(Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter);
+        horizontalLayout_25 = new QHBoxLayout(groupBox_26);
+        horizontalLayout_25->setSpacing(6);
+        horizontalLayout_25->setContentsMargins(11, 11, 11, 11);
+        horizontalLayout_25->setObjectName(QString::fromUtf8("horizontalLayout_25"));
+        label_60 = new QLabel(groupBox_26);
+        label_60->setObjectName(QString::fromUtf8("label_60"));
+        label_60->setMinimumSize(QSize(0, 0));
+        label_60->setMaximumSize(QSize(16777215, 16777215));
+        label_60->setFont(font);
+        label_60->setAlignment(Qt::AlignCenter);
+
+        horizontalLayout_25->addWidget(label_60);
+
+        lineEditShutter_2 = new QLineEdit(groupBox_26);
+        lineEditShutter_2->setObjectName(QString::fromUtf8("lineEditShutter_2"));
+        lineEditShutter_2->setMinimumSize(QSize(0, 0));
+        lineEditShutter_2->setMaximumSize(QSize(16777215, 16777215));
+        lineEditShutter_2->setFont(font);
+        lineEditShutter_2->setLayoutDirection(Qt::LeftToRight);
+        lineEditShutter_2->setStyleSheet(QString::fromUtf8(""));
+        lineEditShutter_2->setAlignment(Qt::AlignCenter);
+
+        horizontalLayout_25->addWidget(lineEditShutter_2);
+
+        label_61 = new QLabel(groupBox_26);
+        label_61->setObjectName(QString::fromUtf8("label_61"));
+        label_61->setMinimumSize(QSize(0, 0));
+        label_61->setMaximumSize(QSize(16777215, 16777215));
+        label_61->setSizeIncrement(QSize(0, -1));
+        label_61->setFont(font);
+        label_61->setAlignment(Qt::AlignCenter);
+
+        horizontalLayout_25->addWidget(label_61);
+
+        verticalLayout_15 = new QVBoxLayout();
+        verticalLayout_15->setSpacing(6);
+        verticalLayout_15->setObjectName(QString::fromUtf8("verticalLayout_15"));
+        pushButtonShutterExpose_2 = new QPushButton(groupBox_26);
+        pushButtonShutterExpose_2->setObjectName(QString::fromUtf8("pushButtonShutterExpose_2"));
+        pushButtonShutterExpose_2->setMinimumSize(QSize(0, 0));
+        pushButtonShutterExpose_2->setMaximumSize(QSize(16777215, 16777215));
+        pushButtonShutterExpose_2->setFont(font);
+        pushButtonShutterExpose_2->setIcon(icon1);
+        pushButtonShutterExpose_2->setIconSize(QSize(20, 20));
+        pushButtonShutterExpose_2->setCheckable(false);
+
+        verticalLayout_15->addWidget(pushButtonShutterExpose_2);
+
+
+        horizontalLayout_25->addLayout(verticalLayout_15);
+
+        groupBox_27 = new QGroupBox(groupBox_2);
+        groupBox_27->setObjectName(QString::fromUtf8("groupBox_27"));
+        groupBox_27->setGeometry(QRect(40, 180, 241, 61));
+        sizePolicy1.setHeightForWidth(groupBox_27->sizePolicy().hasHeightForWidth());
+        groupBox_27->setSizePolicy(sizePolicy1);
+        groupBox_27->setMinimumSize(QSize(0, 0));
+        groupBox_27->setAlignment(Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter);
+        horizontalLayout_26 = new QHBoxLayout(groupBox_27);
+        horizontalLayout_26->setSpacing(6);
+        horizontalLayout_26->setContentsMargins(11, 11, 11, 11);
+        horizontalLayout_26->setObjectName(QString::fromUtf8("horizontalLayout_26"));
+        label_62 = new QLabel(groupBox_27);
+        label_62->setObjectName(QString::fromUtf8("label_62"));
+        label_62->setMinimumSize(QSize(0, 0));
+        label_62->setMaximumSize(QSize(16777215, 16777215));
+        label_62->setFont(font);
+        label_62->setAlignment(Qt::AlignCenter);
+
+        horizontalLayout_26->addWidget(label_62);
+
+        lineEditShutter_3 = new QLineEdit(groupBox_27);
+        lineEditShutter_3->setObjectName(QString::fromUtf8("lineEditShutter_3"));
+        lineEditShutter_3->setMinimumSize(QSize(0, 0));
+        lineEditShutter_3->setMaximumSize(QSize(16777215, 16777215));
+        lineEditShutter_3->setFont(font);
+        lineEditShutter_3->setLayoutDirection(Qt::LeftToRight);
+        lineEditShutter_3->setStyleSheet(QString::fromUtf8(""));
+        lineEditShutter_3->setAlignment(Qt::AlignCenter);
+
+        horizontalLayout_26->addWidget(lineEditShutter_3);
+
+        label_63 = new QLabel(groupBox_27);
+        label_63->setObjectName(QString::fromUtf8("label_63"));
+        label_63->setMinimumSize(QSize(0, 0));
+        label_63->setMaximumSize(QSize(16777215, 16777215));
+        label_63->setSizeIncrement(QSize(0, -1));
+        label_63->setFont(font);
+        label_63->setAlignment(Qt::AlignCenter);
+
+        horizontalLayout_26->addWidget(label_63);
+
+        verticalLayout_16 = new QVBoxLayout();
+        verticalLayout_16->setSpacing(6);
+        verticalLayout_16->setObjectName(QString::fromUtf8("verticalLayout_16"));
+        pushButtonShutterExpose_3 = new QPushButton(groupBox_27);
+        pushButtonShutterExpose_3->setObjectName(QString::fromUtf8("pushButtonShutterExpose_3"));
+        pushButtonShutterExpose_3->setMinimumSize(QSize(0, 0));
+        pushButtonShutterExpose_3->setMaximumSize(QSize(16777215, 16777215));
+        pushButtonShutterExpose_3->setFont(font);
+        pushButtonShutterExpose_3->setIcon(icon1);
+        pushButtonShutterExpose_3->setIconSize(QSize(20, 20));
+        pushButtonShutterExpose_3->setCheckable(false);
+
+        verticalLayout_16->addWidget(pushButtonShutterExpose_3);
+
+
+        horizontalLayout_26->addLayout(verticalLayout_16);
+
+        pushButtonShutterStop_2 = new QPushButton(groupBox_2);
+        pushButtonShutterStop_2->setObjectName(QString::fromUtf8("pushButtonShutterStop_2"));
+        pushButtonShutterStop_2->setGeometry(QRect(170, 340, 80, 26));
+        QIcon icon2;
+        icon2.addFile(QString::fromUtf8(":/CGH_Printer/Configure/IMG/stop1.png"), QSize(), QIcon::Normal, QIcon::Off);
+        pushButtonShutterStop_2->setIcon(icon2);
+        pushButtonShutterStop_2->setIconSize(QSize(20, 20));
+        pushButtonShutterStop_2->setCheckable(false);
+        label_looptime = new QLabel(groupBox_2);
+        label_looptime->setObjectName(QString::fromUtf8("label_looptime"));
+        label_looptime->setGeometry(QRect(180, 300, 71, 21));
+        label_looptime->setMinimumSize(QSize(0, 0));
+        label_looptime->setMaximumSize(QSize(16777215, 16777215));
+        label_looptime->setFont(font);
+        label_looptime->setAlignment(Qt::AlignCenter);
+        label_65 = new QLabel(groupBox_2);
+        label_65->setObjectName(QString::fromUtf8("label_65"));
+        label_65->setGeometry(QRect(60, 300, 111, 21));
+        label_65->setMinimumSize(QSize(0, 0));
+        label_65->setMaximumSize(QSize(16777215, 16777215));
+        label_65->setFont(font);
+        label_65->setAlignment(Qt::AlignCenter);
+        label_64 = new QLabel(groupBox_2);
+        label_64->setObjectName(QString::fromUtf8("label_64"));
+        label_64->setGeometry(QRect(60, 260, 111, 21));
+        label_64->setMinimumSize(QSize(0, 0));
+        label_64->setMaximumSize(QSize(16777215, 16777215));
+        label_64->setFont(font);
+        label_64->setAlignment(Qt::AlignCenter);
+        pushButtonShutterExpose_loop = new QPushButton(groupBox_2);
+        pushButtonShutterExpose_loop->setObjectName(QString::fromUtf8("pushButtonShutterExpose_loop"));
+        pushButtonShutterExpose_loop->setGeometry(QRect(80, 340, 80, 26));
+        pushButtonShutterExpose_loop->setMinimumSize(QSize(0, 0));
+        pushButtonShutterExpose_loop->setMaximumSize(QSize(16777215, 16777215));
+        pushButtonShutterExpose_loop->setFont(font);
+        pushButtonShutterExpose_loop->setIcon(icon1);
+        pushButtonShutterExpose_loop->setIconSize(QSize(20, 20));
+        pushButtonShutterExpose_loop->setCheckable(false);
+        lineEditShutter_loop = new QLineEdit(groupBox_2);
+        lineEditShutter_loop->setObjectName(QString::fromUtf8("lineEditShutter_loop"));
+        lineEditShutter_loop->setGeometry(QRect(170, 260, 81, 22));
+        lineEditShutter_loop->setMinimumSize(QSize(0, 0));
+        lineEditShutter_loop->setMaximumSize(QSize(16777215, 16777215));
+        lineEditShutter_loop->setFont(font);
+        lineEditShutter_loop->setLayoutDirection(Qt::LeftToRight);
+        lineEditShutter_loop->setStyleSheet(QString::fromUtf8(""));
+        lineEditShutter_loop->setAlignment(Qt::AlignCenter);
+        label_69 = new QLabel(groupBox_2);
+        label_69->setObjectName(QString::fromUtf8("label_69"));
+        label_69->setGeometry(QRect(250, 300, 31, 21));
+        label_69->setMinimumSize(QSize(0, 0));
+        label_69->setMaximumSize(QSize(16777215, 16777215));
+        label_69->setFont(font);
+        label_69->setAlignment(Qt::AlignCenter);
+        groupBox_17 = new QGroupBox(tab_2);
+        groupBox_17->setObjectName(QString::fromUtf8("groupBox_17"));
+        groupBox_17->setGeometry(QRect(30, 10, 430, 391));
+        sizePolicy.setHeightForWidth(groupBox_17->sizePolicy().hasHeightForWidth());
+        groupBox_17->setSizePolicy(sizePolicy);
+        groupBox_17->setMinimumSize(QSize(430, 0));
+        groupBox_17->setMaximumSize(QSize(0, 16777215));
+        groupBox_17->setStyleSheet(QString::fromUtf8(""));
+        groupBox_17->setAlignment(Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter);
+        gridLayout_15 = new QGridLayout(groupBox_17);
+        gridLayout_15->setSpacing(6);
+        gridLayout_15->setContentsMargins(11, 11, 11, 11);
+        gridLayout_15->setObjectName(QString::fromUtf8("gridLayout_15"));
+        labelCGHDisplay_loop = new QLabel(groupBox_17);
+        labelCGHDisplay_loop->setObjectName(QString::fromUtf8("labelCGHDisplay_loop"));
+        labelCGHDisplay_loop->setEnabled(true);
+        QSizePolicy sizePolicy2(QSizePolicy::Preferred, QSizePolicy::Expanding);
+        sizePolicy2.setHorizontalStretch(0);
+        sizePolicy2.setVerticalStretch(0);
+        sizePolicy2.setHeightForWidth(labelCGHDisplay_loop->sizePolicy().hasHeightForWidth());
+        labelCGHDisplay_loop->setSizePolicy(sizePolicy2);
+        labelCGHDisplay_loop->setMinimumSize(QSize(0, 0));
+        labelCGHDisplay_loop->setMaximumSize(QSize(16777215, 230));
+        labelCGHDisplay_loop->setCursor(QCursor(Qt::UpArrowCursor));
+        labelCGHDisplay_loop->setTextFormat(Qt::MarkdownText);
+        labelCGHDisplay_loop->setScaledContents(true);
+        labelCGHDisplay_loop->setAlignment(Qt::AlignCenter);
+
+        gridLayout_15->addWidget(labelCGHDisplay_loop, 3, 0, 1, 1);
+
+        horizontalSpacer_6 = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum);
+
+        gridLayout_15->addItem(horizontalSpacer_6, 1, 0, 1, 1);
+
+        horizontalLayout_19 = new QHBoxLayout();
+        horizontalLayout_19->setSpacing(7);
+        horizontalLayout_19->setObjectName(QString::fromUtf8("horizontalLayout_19"));
+        lineEditCGHName_loop = new QLineEdit(groupBox_17);
+        lineEditCGHName_loop->setObjectName(QString::fromUtf8("lineEditCGHName_loop"));
+        lineEditCGHName_loop->setReadOnly(true);
+
+        horizontalLayout_19->addWidget(lineEditCGHName_loop);
+
+        pushButtonLoad_loop = new QPushButton(groupBox_17);
+        pushButtonLoad_loop->setObjectName(QString::fromUtf8("pushButtonLoad_loop"));
+        QSizePolicy sizePolicy3(QSizePolicy::Preferred, QSizePolicy::Fixed);
+        sizePolicy3.setHorizontalStretch(0);
+        sizePolicy3.setVerticalStretch(0);
+        sizePolicy3.setHeightForWidth(pushButtonLoad_loop->sizePolicy().hasHeightForWidth());
+        pushButtonLoad_loop->setSizePolicy(sizePolicy3);
+        pushButtonLoad_loop->setMaximumSize(QSize(93, 28));
+        QIcon icon3;
+        icon3.addFile(QString::fromUtf8(":/CGH_Printer/Configure/IMG/loadblue.png"), QSize(), QIcon::Normal, QIcon::Off);
+        pushButtonLoad_loop->setIcon(icon3);
+
+        horizontalLayout_19->addWidget(pushButtonLoad_loop);
+
+
+        gridLayout_15->addLayout(horizontalLayout_19, 0, 0, 1, 1);
+
+        tabWidget->addTab(tab_2, QString());
         tab_7 = new QWidget();
         tab_7->setObjectName(QString::fromUtf8("tab_7"));
         gridLayout_2 = new QGridLayout(tab_7);
@@ -480,11 +816,8 @@ public:
         labelCGHDisplay = new QLabel(groupBox_9);
         labelCGHDisplay->setObjectName(QString::fromUtf8("labelCGHDisplay"));
         labelCGHDisplay->setEnabled(true);
-        QSizePolicy sizePolicy1(QSizePolicy::Preferred, QSizePolicy::Expanding);
-        sizePolicy1.setHorizontalStretch(0);
-        sizePolicy1.setVerticalStretch(0);
-        sizePolicy1.setHeightForWidth(labelCGHDisplay->sizePolicy().hasHeightForWidth());
-        labelCGHDisplay->setSizePolicy(sizePolicy1);
+        sizePolicy2.setHeightForWidth(labelCGHDisplay->sizePolicy().hasHeightForWidth());
+        labelCGHDisplay->setSizePolicy(sizePolicy2);
         labelCGHDisplay->setMinimumSize(QSize(0, 0));
         labelCGHDisplay->setMaximumSize(QSize(16777215, 230));
         labelCGHDisplay->setCursor(QCursor(Qt::UpArrowCursor));
@@ -509,15 +842,10 @@ public:
 
         pushButtonLoad = new QPushButton(groupBox_9);
         pushButtonLoad->setObjectName(QString::fromUtf8("pushButtonLoad"));
-        QSizePolicy sizePolicy2(QSizePolicy::Preferred, QSizePolicy::Fixed);
-        sizePolicy2.setHorizontalStretch(0);
-        sizePolicy2.setVerticalStretch(0);
-        sizePolicy2.setHeightForWidth(pushButtonLoad->sizePolicy().hasHeightForWidth());
-        pushButtonLoad->setSizePolicy(sizePolicy2);
+        sizePolicy3.setHeightForWidth(pushButtonLoad->sizePolicy().hasHeightForWidth());
+        pushButtonLoad->setSizePolicy(sizePolicy3);
         pushButtonLoad->setMaximumSize(QSize(93, 28));
-        QIcon icon1;
-        icon1.addFile(QString::fromUtf8(":/CGH_Printer/Configure/IMG/loadblue.png"), QSize(), QIcon::Normal, QIcon::Off);
-        pushButtonLoad->setIcon(icon1);
+        pushButtonLoad->setIcon(icon3);
 
         horizontalLayout_18->addWidget(pushButtonLoad);
 
@@ -529,11 +857,11 @@ public:
 
         groupBox_Move_2 = new QGroupBox(tab_7);
         groupBox_Move_2->setObjectName(QString::fromUtf8("groupBox_Move_2"));
-        QSizePolicy sizePolicy3(QSizePolicy::Expanding, QSizePolicy::Preferred);
-        sizePolicy3.setHorizontalStretch(0);
-        sizePolicy3.setVerticalStretch(0);
-        sizePolicy3.setHeightForWidth(groupBox_Move_2->sizePolicy().hasHeightForWidth());
-        groupBox_Move_2->setSizePolicy(sizePolicy3);
+        QSizePolicy sizePolicy4(QSizePolicy::Expanding, QSizePolicy::Preferred);
+        sizePolicy4.setHorizontalStretch(0);
+        sizePolicy4.setVerticalStretch(0);
+        sizePolicy4.setHeightForWidth(groupBox_Move_2->sizePolicy().hasHeightForWidth());
+        groupBox_Move_2->setSizePolicy(sizePolicy4);
         QFont font2;
         font2.setPointSize(10);
         font2.setBold(false);
@@ -548,8 +876,8 @@ public:
         gridLayout_11->setObjectName(QString::fromUtf8("gridLayout_11"));
         line = new QFrame(groupBox_Move_2);
         line->setObjectName(QString::fromUtf8("line"));
-        sizePolicy2.setHeightForWidth(line->sizePolicy().hasHeightForWidth());
-        line->setSizePolicy(sizePolicy2);
+        sizePolicy3.setHeightForWidth(line->sizePolicy().hasHeightForWidth());
+        line->setSizePolicy(sizePolicy3);
         line->setFrameShape(QFrame::HLine);
         line->setFrameShadow(QFrame::Sunken);
 
@@ -570,8 +898,8 @@ public:
         gridLayout_18->setObjectName(QString::fromUtf8("gridLayout_18"));
         lineEditMove = new QLineEdit(groupBox_Move_2);
         lineEditMove->setObjectName(QString::fromUtf8("lineEditMove"));
-        sizePolicy2.setHeightForWidth(lineEditMove->sizePolicy().hasHeightForWidth());
-        lineEditMove->setSizePolicy(sizePolicy2);
+        sizePolicy3.setHeightForWidth(lineEditMove->sizePolicy().hasHeightForWidth());
+        lineEditMove->setSizePolicy(sizePolicy3);
         lineEditMove->setAlignment(Qt::AlignCenter);
 
         gridLayout_18->addWidget(lineEditMove, 0, 1, 1, 1);
@@ -596,9 +924,9 @@ public:
         pushButtonUp = new QPushButton(groupBox_Move_2);
         pushButtonUp->setObjectName(QString::fromUtf8("pushButtonUp"));
         pushButtonUp->setFocusPolicy(Qt::StrongFocus);
-        QIcon icon2;
-        icon2.addFile(QString::fromUtf8(":/CGH_Printer/Configure/IMG/upblue.png"), QSize(), QIcon::Normal, QIcon::Off);
-        pushButtonUp->setIcon(icon2);
+        QIcon icon4;
+        icon4.addFile(QString::fromUtf8(":/CGH_Printer/Configure/IMG/upblue.png"), QSize(), QIcon::Normal, QIcon::Off);
+        pushButtonUp->setIcon(icon4);
         pushButtonUp->setIconSize(QSize(25, 25));
         pushButtonUp->setFlat(false);
 
@@ -607,9 +935,9 @@ public:
         pushButtonLeft = new QPushButton(groupBox_Move_2);
         pushButtonLeft->setObjectName(QString::fromUtf8("pushButtonLeft"));
         pushButtonLeft->setFocusPolicy(Qt::StrongFocus);
-        QIcon icon3;
-        icon3.addFile(QString::fromUtf8(":/CGH_Printer/Configure/IMG/lblue.png"), QSize(), QIcon::Normal, QIcon::Off);
-        pushButtonLeft->setIcon(icon3);
+        QIcon icon5;
+        icon5.addFile(QString::fromUtf8(":/CGH_Printer/Configure/IMG/lblue.png"), QSize(), QIcon::Normal, QIcon::Off);
+        pushButtonLeft->setIcon(icon5);
         pushButtonLeft->setIconSize(QSize(25, 25));
         pushButtonLeft->setFlat(false);
 
@@ -618,9 +946,9 @@ public:
         pushButtonDown = new QPushButton(groupBox_Move_2);
         pushButtonDown->setObjectName(QString::fromUtf8("pushButtonDown"));
         pushButtonDown->setFocusPolicy(Qt::StrongFocus);
-        QIcon icon4;
-        icon4.addFile(QString::fromUtf8(":/CGH_Printer/Configure/IMG/dblue.png"), QSize(), QIcon::Normal, QIcon::Off);
-        pushButtonDown->setIcon(icon4);
+        QIcon icon6;
+        icon6.addFile(QString::fromUtf8(":/CGH_Printer/Configure/IMG/dblue.png"), QSize(), QIcon::Normal, QIcon::Off);
+        pushButtonDown->setIcon(icon6);
         pushButtonDown->setIconSize(QSize(25, 25));
         pushButtonDown->setFlat(false);
 
@@ -629,9 +957,9 @@ public:
         pushButtonRight = new QPushButton(groupBox_Move_2);
         pushButtonRight->setObjectName(QString::fromUtf8("pushButtonRight"));
         pushButtonRight->setFocusPolicy(Qt::StrongFocus);
-        QIcon icon5;
-        icon5.addFile(QString::fromUtf8(":/CGH_Printer/Configure/IMG/rblue.png"), QSize(), QIcon::Normal, QIcon::Off);
-        pushButtonRight->setIcon(icon5);
+        QIcon icon7;
+        icon7.addFile(QString::fromUtf8(":/CGH_Printer/Configure/IMG/rblue.png"), QSize(), QIcon::Normal, QIcon::Off);
+        pushButtonRight->setIcon(icon7);
         pushButtonRight->setIconSize(QSize(25, 25));
         pushButtonRight->setFlat(false);
 
@@ -645,9 +973,9 @@ public:
         gridLayout_19->setObjectName(QString::fromUtf8("gridLayout_19"));
         pushButtonBlank = new QPushButton(groupBox_Move_2);
         pushButtonBlank->setObjectName(QString::fromUtf8("pushButtonBlank"));
-        QIcon icon6;
-        icon6.addFile(QString::fromUtf8(":/CGH_Printer/Configure/IMG/zeroblue.png"), QSize(), QIcon::Normal, QIcon::Off);
-        pushButtonBlank->setIcon(icon6);
+        QIcon icon8;
+        icon8.addFile(QString::fromUtf8(":/CGH_Printer/Configure/IMG/zeroblue.png"), QSize(), QIcon::Normal, QIcon::Off);
+        pushButtonBlank->setIcon(icon8);
         pushButtonBlank->setIconSize(QSize(16, 20));
         pushButtonBlank->setCheckable(false);
 
@@ -655,9 +983,7 @@ public:
 
         pushButtonTranstableStop = new QPushButton(groupBox_Move_2);
         pushButtonTranstableStop->setObjectName(QString::fromUtf8("pushButtonTranstableStop"));
-        QIcon icon7;
-        icon7.addFile(QString::fromUtf8(":/CGH_Printer/Configure/IMG/stop1.png"), QSize(), QIcon::Normal, QIcon::Off);
-        pushButtonTranstableStop->setIcon(icon7);
+        pushButtonTranstableStop->setIcon(icon2);
         pushButtonTranstableStop->setIconSize(QSize(20, 20));
         pushButtonTranstableStop->setCheckable(false);
 
@@ -734,11 +1060,8 @@ public:
 
         groupBox_10 = new QGroupBox(tab_7);
         groupBox_10->setObjectName(QString::fromUtf8("groupBox_10"));
-        QSizePolicy sizePolicy4(QSizePolicy::Preferred, QSizePolicy::Preferred);
-        sizePolicy4.setHorizontalStretch(0);
-        sizePolicy4.setVerticalStretch(0);
-        sizePolicy4.setHeightForWidth(groupBox_10->sizePolicy().hasHeightForWidth());
-        groupBox_10->setSizePolicy(sizePolicy4);
+        sizePolicy1.setHeightForWidth(groupBox_10->sizePolicy().hasHeightForWidth());
+        groupBox_10->setSizePolicy(sizePolicy1);
         groupBox_10->setMinimumSize(QSize(0, 0));
         groupBox_10->setAlignment(Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter);
         horizontalLayout_6 = new QHBoxLayout(groupBox_10);
@@ -783,9 +1106,7 @@ public:
         pushButtonShutterExpose->setMinimumSize(QSize(0, 0));
         pushButtonShutterExpose->setMaximumSize(QSize(16777215, 16777215));
         pushButtonShutterExpose->setFont(font);
-        QIcon icon8;
-        icon8.addFile(QString::fromUtf8(":/CGH_Printer/Configure/IMG/flashblue.png"), QSize(), QIcon::Normal, QIcon::Off);
-        pushButtonShutterExpose->setIcon(icon8);
+        pushButtonShutterExpose->setIcon(icon1);
         pushButtonShutterExpose->setIconSize(QSize(20, 20));
         pushButtonShutterExpose->setCheckable(false);
 
@@ -793,7 +1114,7 @@ public:
 
         pushButtonShutterStop = new QPushButton(groupBox_10);
         pushButtonShutterStop->setObjectName(QString::fromUtf8("pushButtonShutterStop"));
-        pushButtonShutterStop->setIcon(icon7);
+        pushButtonShutterStop->setIcon(icon2);
         pushButtonShutterStop->setIconSize(QSize(20, 20));
         pushButtonShutterStop->setCheckable(false);
 
@@ -835,7 +1156,7 @@ public:
         scrollAreaWork->setAlignment(Qt::AlignCenter);
         scrollAreaWidgetContents = new QWidget();
         scrollAreaWidgetContents->setObjectName(QString::fromUtf8("scrollAreaWidgetContents"));
-        scrollAreaWidgetContents->setGeometry(QRect(0, 0, 689, 341));
+        scrollAreaWidgetContents->setGeometry(QRect(0, 0, 722, 357));
         verticalLayout = new QVBoxLayout(scrollAreaWidgetContents);
         verticalLayout->setSpacing(6);
         verticalLayout->setContentsMargins(11, 11, 11, 11);
@@ -928,7 +1249,7 @@ public:
         pushButtonPrint->setMinimumSize(QSize(0, 0));
         pushButtonPrint->setMaximumSize(QSize(16777215, 16777215));
         pushButtonPrint->setFont(font4);
-        pushButtonPrint->setIcon(icon1);
+        pushButtonPrint->setIcon(icon3);
 
         verticalLayout_4->addWidget(pushButtonPrint);
 
@@ -1186,8 +1507,8 @@ public:
 
         widgetCCD = new QWidget(tab_5);
         widgetCCD->setObjectName(QString::fromUtf8("widgetCCD"));
-        sizePolicy4.setHeightForWidth(widgetCCD->sizePolicy().hasHeightForWidth());
-        widgetCCD->setSizePolicy(sizePolicy4);
+        sizePolicy1.setHeightForWidth(widgetCCD->sizePolicy().hasHeightForWidth());
+        widgetCCD->setSizePolicy(sizePolicy1);
         widgetCCD->setMinimumSize(QSize(670, 409));
         widgetCCD->setMaximumSize(QSize(670, 409));
 
@@ -1372,7 +1693,7 @@ public:
 
         pushButtonTempSaved_7 = new QPushButton(groupBox_48);
         pushButtonTempSaved_7->setObjectName(QString::fromUtf8("pushButtonTempSaved_7"));
-        pushButtonTempSaved_7->setIcon(icon6);
+        pushButtonTempSaved_7->setIcon(icon8);
         pushButtonTempSaved_7->setIconSize(QSize(20, 20));
 
         horizontalLayout_7->addWidget(pushButtonTempSaved_7);
@@ -1390,7 +1711,7 @@ public:
 
         retranslateUi(CGH_PrinterClass);
 
-        tabWidget->setCurrentIndex(0);
+        tabWidget->setCurrentIndex(1);
 
 
         QMetaObject::connectSlotsByName(CGH_PrinterClass);
@@ -1416,6 +1737,33 @@ public:
         label_4->setText(QCoreApplication::translate("CGH_PrinterClass", "CCD\347\233\270\346\234\272", nullptr));
         labelEquipment->setText(QString());
         tabWidget->setTabText(tabWidget->indexOf(tab), QCoreApplication::translate("CGH_PrinterClass", "\344\270\273\351\241\265", nullptr));
+        groupBox_2->setTitle(QCoreApplication::translate("CGH_PrinterClass", "\347\224\265\345\255\220\345\277\253\351\227\250\346\216\247\345\210\266", nullptr));
+        groupBox_25->setTitle(QCoreApplication::translate("CGH_PrinterClass", "\347\224\265\345\255\220\345\277\253\351\227\250-1", nullptr));
+        label_58->setText(QCoreApplication::translate("CGH_PrinterClass", "\346\227\266\351\227\264", nullptr));
+        lineEditShutter_1->setText(QCoreApplication::translate("CGH_PrinterClass", "0", nullptr));
+        label_59->setText(QCoreApplication::translate("CGH_PrinterClass", "ms", nullptr));
+        pushButtonShutterExpose_1->setText(QCoreApplication::translate("CGH_PrinterClass", "\346\233\235\345\205\211", nullptr));
+        groupBox_26->setTitle(QCoreApplication::translate("CGH_PrinterClass", "\347\224\265\345\255\220\345\277\253\351\227\250-2", nullptr));
+        label_60->setText(QCoreApplication::translate("CGH_PrinterClass", "\346\227\266\351\227\264", nullptr));
+        lineEditShutter_2->setText(QCoreApplication::translate("CGH_PrinterClass", "0", nullptr));
+        label_61->setText(QCoreApplication::translate("CGH_PrinterClass", "ms", nullptr));
+        pushButtonShutterExpose_2->setText(QCoreApplication::translate("CGH_PrinterClass", "\346\233\235\345\205\211", nullptr));
+        groupBox_27->setTitle(QCoreApplication::translate("CGH_PrinterClass", "\347\224\265\345\255\220\345\277\253\351\227\250-3", nullptr));
+        label_62->setText(QCoreApplication::translate("CGH_PrinterClass", "\346\227\266\351\227\264", nullptr));
+        lineEditShutter_3->setText(QCoreApplication::translate("CGH_PrinterClass", "0", nullptr));
+        label_63->setText(QCoreApplication::translate("CGH_PrinterClass", "ms", nullptr));
+        pushButtonShutterExpose_3->setText(QCoreApplication::translate("CGH_PrinterClass", "\346\233\235\345\205\211", nullptr));
+        pushButtonShutterStop_2->setText(QCoreApplication::translate("CGH_PrinterClass", "\345\201\234\346\255\242", nullptr));
+        label_looptime->setText(QCoreApplication::translate("CGH_PrinterClass", "0", nullptr));
+        label_65->setText(QCoreApplication::translate("CGH_PrinterClass", "\346\200\273\345\276\252\347\216\257\346\227\266\351\227\264\357\274\232", nullptr));
+        label_64->setText(QCoreApplication::translate("CGH_PrinterClass", "\345\276\252\347\216\257\346\254\241\346\225\260\357\274\232", nullptr));
+        pushButtonShutterExpose_loop->setText(QCoreApplication::translate("CGH_PrinterClass", "\345\274\200\345\247\213", nullptr));
+        lineEditShutter_loop->setText(QCoreApplication::translate("CGH_PrinterClass", "1", nullptr));
+        label_69->setText(QCoreApplication::translate("CGH_PrinterClass", "ms", nullptr));
+        groupBox_17->setTitle(QCoreApplication::translate("CGH_PrinterClass", "\345\205\250\346\201\257\345\233\276\345\212\240\350\275\275", nullptr));
+        labelCGHDisplay_loop->setText(QString());
+        pushButtonLoad_loop->setText(QCoreApplication::translate("CGH_PrinterClass", "\345\212\240\350\275\275", nullptr));
+        tabWidget->setTabText(tabWidget->indexOf(tab_2), QCoreApplication::translate("CGH_PrinterClass", "\345\277\253\351\227\250", nullptr));
         groupBox_9->setTitle(QCoreApplication::translate("CGH_PrinterClass", "\345\205\250\346\201\257\345\233\276", nullptr));
         labelCGHDisplay->setText(QString());
         pushButtonLoad->setText(QCoreApplication::translate("CGH_PrinterClass", "\345\212\240\350\275\275", nullptr));
@@ -1507,4 +1855,4 @@ namespace Ui {
 
 QT_END_NAMESPACE
 
-#endif // CGH_PRINTERBJZUJZ_H
+#endif // CGH_PRINTERAWMKPJ_H

+ 26 - 0
LoopThread.cpp

@@ -0,0 +1,26 @@
+//#include "LoopThread.h"
+//
+//LoopThread::LoopThread(QObject *parent)
+//	: QThread(parent)
+//{}
+//
+////LoopThread::~LoopThread()
+////{}
+//void LoopThread::setloopCGH(QString loopCGH)
+//{
+//	m_loopCGH = loopCGH;
+//}
+//void LoopThread::settime_num(int num)
+//{
+//	time_num = num;
+//}
+//void LoopThread::sendmessage(QString CGHName)
+//{
+//	;
+//}
+//void LoopThread::run()
+//{
+//	sleep(time_num);
+//	emit sendmessage(m_loopCGH);
+//
+//}

+ 28 - 0
LoopThread.h

@@ -0,0 +1,28 @@
+//#ifndef LOOPTHREAD_H
+//#define LOOPTHREAD_H
+//#pragma once
+//#pragma execution_character_set("utf-8")
+//#include <QThread.h>
+//#include "CGH_Printer.h"
+//class CGH_Printer;
+//class LoopThread  : public QThread
+//{
+//	Q_OBJECT
+//
+//public:
+//	explicit LoopThread(QObject* parent = 0); 
+//    void setloopCGH(QString CGHName);
+//    void settime_num(int num);
+//protected:
+//    // QThread的虚函数
+//    // 线程处理函数
+//    // 不能直接调用,通过start()间接调用
+//    void run() override;
+//private:
+//    QString m_loopCGH;//定义加载循环图片的变量
+//    int time_num;
+//signals:
+//    void sendmessage(QString CGHName);
+//
+//};
+//#endif // LOOPTHREAD_H

+ 1 - 0
PrintThread.cpp

@@ -1,4 +1,5 @@
 #include "PrintThread.h"
+#include "LoopThread.h"
 
 PrintThread::PrintThread(QObject* parent) : m_Printer(dynamic_cast<CGH_Printer*>(parent))
 {

BIN
Resources/test/1.bmp


BIN
Resources/test/2.bmp


BIN
Resources/test/3.bmp


+ 1 - 1
main.cpp

@@ -31,7 +31,7 @@ int main(int argc, char *argv[])
 	//if (QT_VERSION >= QT_VERSION_CHECK(5, 6, 0))
 	//	QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
 	if (QT_VERSION >= QT_VERSION_CHECK(5, 6, 0))
-		QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
+		QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling,true);
     QApplication a(argc, argv);
 	//QWidget* widget = new QWidget();
 

File diff suppressed because it is too large
+ 1858 - 0
ui_CGH_Printer.h


File diff suppressed because it is too large
+ 1791 - 0
ui_CGH_Printer计时器第一版.h


File diff suppressed because it is too large
+ 1755 - 0
ui_CGH_Printer(20240527).h