DESKTOP-1PBHPQR\admin 2 vuotta sitten
vanhempi
commit
0d79f5e8e3
77 muutettua tiedostoa jossa 11078 lisäystä ja 0 poistoa
  1. 80 0
      CGH_CheckStateThread.cpp
  2. 29 0
      CGH_CoordinateThread.cpp
  3. BIN
      CGH_Printer.aps
  4. 1418 0
      CGH_Printer.cpp
  5. 72 0
      CGH_Printer.qrc
  6. 60 0
      CGH_Printer.rc
  7. 25 0
      CGH_Printer.sln
  8. 2957 0
      CGH_Printer.ui
  9. 176 0
      CGH_Printer.vcxproj
  10. 136 0
      CGH_Printer.vcxproj.filters
  11. 10 0
      CGH_Printer.vcxproj.user
  12. 183 0
      CGH_Project.cpp
  13. 5 0
      Configure/Configure.txt
  14. BIN
      Configure/IMG/Down.png
  15. BIN
      Configure/IMG/Down_1.png
  16. BIN
      Configure/IMG/Down_Hover.png
  17. BIN
      Configure/IMG/Equipment.png
  18. BIN
      Configure/IMG/Greenlight.png
  19. BIN
      Configure/IMG/Left.png
  20. BIN
      Configure/IMG/Left_1.png
  21. BIN
      Configure/IMG/Left_2.png
  22. BIN
      Configure/IMG/Left_Hover.png
  23. BIN
      Configure/IMG/Logo.png
  24. BIN
      Configure/IMG/Parallelogram_Green.png
  25. BIN
      Configure/IMG/Parallelogram_Red.png
  26. BIN
      Configure/IMG/Redlight.png
  27. BIN
      Configure/IMG/Right.png
  28. BIN
      Configure/IMG/change.png
  29. BIN
      Configure/IMG/changeblue.png
  30. BIN
      Configure/IMG/confirm.png
  31. BIN
      Configure/IMG/conform.png
  32. BIN
      Configure/IMG/dblue.png
  33. BIN
      Configure/IMG/delete.png
  34. BIN
      Configure/IMG/deleteblue.png
  35. BIN
      Configure/IMG/down_2.png
  36. BIN
      Configure/IMG/down_3.png
  37. BIN
      Configure/IMG/downblue.png
  38. BIN
      Configure/IMG/downm.png
  39. BIN
      Configure/IMG/flash.png
  40. BIN
      Configure/IMG/flashblue.png
  41. BIN
      Configure/IMG/hand.png
  42. BIN
      Configure/IMG/home.png
  43. BIN
      Configure/IMG/lblue.png
  44. BIN
      Configure/IMG/light.png
  45. BIN
      Configure/IMG/load.png
  46. BIN
      Configure/IMG/loadblue.png
  47. BIN
      Configure/IMG/new.png
  48. BIN
      Configure/IMG/newblue.png
  49. BIN
      Configure/IMG/pause.png
  50. BIN
      Configure/IMG/preview.png
  51. BIN
      Configure/IMG/previewblue.png
  52. BIN
      Configure/IMG/print.png
  53. BIN
      Configure/IMG/rblue.png
  54. BIN
      Configure/IMG/zero.png
  55. BIN
      Configure/IMG/zeroblue.png
  56. 10 0
      Configure/ReadMe.txt
  57. BIN
      Debug/HCamera.dll
  58. 60 0
      Include/CGH_CheckStateThread.h
  59. 38 0
      Include/CGH_CoordinateThread.h
  60. 309 0
      Include/CGH_Printer.h
  61. 53 0
      Include/CGH_Project.h
  62. 51 0
      Include/CGH_ProjectView.h
  63. 62 0
      Include/CGH_Relays.h
  64. 57 0
      Include/CGH_Shutter.h
  65. 23 0
      Include/CGH_State.h
  66. 42 0
      Include/CGH_TabBar.h
  67. 14 0
      Include/CGH_TabWidget.h
  68. 338 0
      Include/CH375DLL.H
  69. 2397 0
      Include/PI_GCS2_DLL.h
  70. 51 0
      Include/PrintThread.h
  71. 175 0
      Include/SerialPort.h
  72. 1873 0
      Include/ui_CGH_Printer.h
  73. 374 0
      Include/ui_CGH_ProjectView.h
  74. BIN
      Lib/CH375DLL.LIB
  75. BIN
      Lib/PI_GCS2_DLL.lib
  76. BIN
      Release/CH375DLL.DLL
  77. BIN
      Release/PI_GCS2_DLL.dll

+ 80 - 0
CGH_CheckStateThread.cpp

@@ -0,0 +1,80 @@
+#include "CGH_CheckStateThread.h"
+#include <qscreen.h>
+#include <QGuiApplication>
+#include "CGH_Printer.h"
+#include "CGH_Shutter.h"
+#include "CGH_State.h"
+
+
+CGH_CheckStateThread::CGH_CheckStateThread(QObject* parent) : MyPrinter_Temp(dynamic_cast<CGH_Printer*>(parent))
+{
+	connect(this, SIGNAL(isDone(int)), MyPrinter_Temp, SLOT(StateUpdate(int)));
+
+	//MyPrinter_Temp = new CGH_Printer();
+	// 初始化变量
+	SLMStateNum = 1;
+	curSLMState_Temp = false;
+
+	MyShutter_Temp = new CGH_Shutter();
+	curShutterState_Temp = false;
+	curShutterConnect = false;	
+
+	ControllerID_Temp = -1;
+	curTransTableState_Temp = false;
+	IsConnectedState = false;
+
+	CCDNum = 0;
+	curCCDState_Temp = false;
+}
+
+CGH_CheckStateThread::~CGH_CheckStateThread()
+{
+}
+
+void CGH_CheckStateThread::Check()
+{
+	// 电子快门工作状态检测
+	curShutterState_Temp = MyPrinter_Temp->get_ShutterState();
+	//MyShutter_Temp->connect();
+	curShutterConnect = MyShutter_Temp->isconnected();
+	if (!curShutterConnect && curShutterState_Temp)
+		isDone(SHUTTER_ERROR);
+	else if (curShutterConnect && !curShutterState_Temp)
+		isDone(SHUTTER_OK);
+
+	// SLM工作状态检测
+	curSLMState_Temp = MyPrinter_Temp->get_SLMState();
+	screen_list = QGuiApplication::screens();//获取屏幕列表
+	SLMStateNum = screen_list.size();//获取屏幕数量
+	if (SLMStateNum != 2 && curSLMState_Temp)
+		isDone(SLM_ERROR);
+	else if (SLMStateNum == 2 && !curSLMState_Temp)
+		isDone(SLM_OK);
+
+	// 平移台工作状态检测
+	curTransTableState_Temp = MyPrinter_Temp->get_TransTableState();
+	ControllerID_Temp = MyPrinter_Temp->get_ControllerID();
+	IsConnectedState = PI_IsConnected(ControllerID_Temp);
+	if (!IsConnectedState && curTransTableState_Temp)
+		isDone(TRANSTABLE_ERROR);
+	else if (IsConnectedState && !curTransTableState_Temp)
+		isDone(TRANSTABLE_OK);
+
+	// CCD工作状态检测
+	curCCDState_Temp = MyPrinter_Temp->get_CCDState();
+	m_pCameraInfos_Temp = QCameraInfo::availableCameras();
+	CCDNum = m_pCameraInfos_Temp.size();
+	if (CCDNum == 0 && curCCDState_Temp)
+		isDone(CCD_ERROR);
+	else if (CCDNum > 0 && !curCCDState_Temp)
+		isDone(CCD_OK);
+}
+
+void CGH_CheckStateThread::run()
+{
+	while (1) {
+		Check();
+		msleep(500);
+	}
+}
+

+ 29 - 0
CGH_CoordinateThread.cpp

@@ -0,0 +1,29 @@
+#include "CGH_CoordinateThread.h"
+#include "CGH_Printer.h"
+
+CGH_CoordinateThread::CGH_CoordinateThread(QObject* parent) : m_CGH_Printer_1(dynamic_cast<CGH_Printer*>(parent))
+{
+	PI_ID_Temp_1 = m_CGH_Printer_1->get_ControllerID();
+
+	connect(this, SIGNAL(isDone(int)), m_CGH_Printer_1, SLOT(CoordinateUpdate()));
+}
+
+CGH_CoordinateThread::~CGH_CoordinateThread()
+{
+}
+
+// »ñÈ¡Öá×ø±êλÖÃ
+void CGH_CoordinateThread::GetCoordinate()
+{
+	PI_qPOS(PI_ID_Temp_1, sAxis[0].c_str(), &x_temp);
+	PI_qPOS(PI_ID_Temp_1, sAxis[1].c_str(), &y_temp);
+	isDone(Update);
+}
+
+void CGH_CoordinateThread::run()
+{
+	while (1) {
+		GetCoordinate();
+		msleep(200);
+	}
+}

BIN
CGH_Printer.aps


Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 1418 - 0
CGH_Printer.cpp


+ 72 - 0
CGH_Printer.qrc

@@ -0,0 +1,72 @@
+<RCC>
+    <qresource prefix="/CGH_Printer">
+        <file>Configure/IMG/Down.png</file>
+        <file>Configure/IMG/Down_Hover.png</file>
+        <file>Configure/IMG/Equipment.png</file>
+        <file>Configure/IMG/Greenlight.png</file>
+        <file>Configure/IMG/Left.png</file>
+        <file>Configure/IMG/Left_Hover.png</file>
+        <file>Configure/IMG/Logo.png</file>
+        <file>Configure/IMG/Redlight.png</file>
+        <file>Configure/IMG/Right.png</file>
+        <file>Configure/IMG/Right_Hover.png</file>
+        <file>Configure/IMG/Shutter.png</file>
+        <file>Configure/IMG/Shutter_Hover.png</file>
+        <file>Configure/IMG/Shutter_Open.png</file>
+        <file>Configure/IMG/Up.png</file>
+        <file>Configure/IMG/Up_Hover.png</file>
+        <file>Configure/IMG/Parallelogram_Green.png</file>
+        <file>Configure/IMG/Parallelogram_Red.png</file>
+        <file>Configure/IMG/change.png</file>
+        <file>Configure/IMG/delete.png</file>
+        <file>Configure/IMG/load.png</file>
+        <file>Configure/IMG/new.png</file>
+        <file>Configure/IMG/pause.png</file>
+        <file>Configure/IMG/start.png</file>
+        <file>Configure/IMG/stop.png</file>
+        <file>Configure/IMG/stop1.png</file>
+        <file>Configure/IMG/downm.png</file>
+        <file>Configure/IMG/upm.png</file>
+        <file>Configure/IMG/save.png</file>
+        <file>Configure/IMG/save1.png</file>
+        <file>Configure/IMG/preview.png</file>
+        <file>Configure/IMG/Screenshots.png</file>
+        <file>Configure/IMG/flash.png</file>
+        <file>Configure/IMG/zero.png</file>
+        <file>Configure/IMG/conform.png</file>
+        <file>Configure/IMG/Down_1.png</file>
+        <file>Configure/IMG/Left_1.png</file>
+        <file>Configure/IMG/Right_1.png</file>
+        <file>Configure/IMG/Up_1.png</file>
+        <file>Configure/IMG/up_2.png</file>
+        <file>Configure/IMG/down_2.png</file>
+        <file>Configure/IMG/Right_2.png</file>
+        <file>Configure/IMG/down_3.png</file>
+        <file>Configure/IMG/Left_2.png</file>
+        <file>Configure/IMG/hand.png</file>
+        <file>Configure/IMG/home.png</file>
+        <file>Configure/IMG/light.png</file>
+        <file>Configure/IMG/print.png</file>
+        <file>Configure/IMG/set.png</file>
+        <file>Configure/IMG/work.png</file>
+        <file>Configure/IMG/work1.png</file>
+        <file>Configure/IMG/changeblue.png</file>
+        <file>Configure/IMG/confirm.png</file>
+        <file>Configure/IMG/dblue.png</file>
+        <file>Configure/IMG/deleteblue.png</file>
+        <file>Configure/IMG/downblue.png</file>
+        <file>Configure/IMG/flashblue.png</file>
+        <file>Configure/IMG/lblue.png</file>
+        <file>Configure/IMG/loadblue.png</file>
+        <file>Configure/IMG/newblue.png</file>
+        <file>Configure/IMG/previewblue.png</file>
+        <file>Configure/IMG/rblue.png</file>
+        <file>Configure/IMG/saveblue.png</file>
+        <file>Configure/IMG/Screenshotsblue.png</file>
+        <file>Configure/IMG/shot.png</file>
+        <file>Configure/IMG/upblue.png</file>
+        <file>Configure/IMG/upbule.png</file>
+        <file>Configure/IMG/zeroblue.png</file>
+    </qresource>
+    <qresource prefix="/QSS"/>
+</RCC>

+ 60 - 0
CGH_Printer.rc

@@ -0,0 +1,60 @@
+// Microsoft Visual C++ 生成的资源脚本。
+//
+
+#include "resource.h"
+
+#define APSTUDIO_READONLY_SYMBOLS
+/////////////////////////////////////////////////////////////////////////////
+//
+// 从 TEXTINCLUDE 2 资源生成。
+//
+#include "winres.h"
+
+/////////////////////////////////////////////////////////////////////////////
+#undef APSTUDIO_READONLY_SYMBOLS
+
+/////////////////////////////////////////////////////////////////////////////
+// 中文(简体,中国) 资源
+
+#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
+LANGUAGE 4, 2
+
+#ifdef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// TEXTINCLUDE
+//
+
+1 TEXTINCLUDE
+BEGIN
+    "resource.h\0"
+END
+
+2 TEXTINCLUDE  
+BEGIN
+    "#include ""winres.h""\r\n"
+    "\0"
+END
+
+3 TEXTINCLUDE  
+BEGIN
+    "\r\n"
+    "\0"
+END
+
+#endif    // APSTUDIO_INVOKED
+
+#endif    // 中文(简体,中国) 资源
+/////////////////////////////////////////////////////////////////////////////
+
+
+
+#ifndef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// 从 TEXTINCLUDE 3 资源生成。
+//
+
+
+/////////////////////////////////////////////////////////////////////////////
+#endif    // 不是 APSTUDIO_INVOKED

+ 25 - 0
CGH_Printer.sln

@@ -0,0 +1,25 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio Version 17
+VisualStudioVersion = 17.2.32616.157
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CGH_Printer", "CGH_Printer.vcxproj", "{827A668D-C219-4DD2-BB2D-4142D2C82BB6}"
+EndProject
+Global
+	GlobalSection(SolutionConfigurationPlatforms) = preSolution
+		Debug|x86 = Debug|x86
+		Release|x86 = Release|x86
+	EndGlobalSection
+	GlobalSection(ProjectConfigurationPlatforms) = postSolution
+		{827A668D-C219-4DD2-BB2D-4142D2C82BB6}.Debug|x86.ActiveCfg = Debug|Win32
+		{827A668D-C219-4DD2-BB2D-4142D2C82BB6}.Debug|x86.Build.0 = Debug|Win32
+		{827A668D-C219-4DD2-BB2D-4142D2C82BB6}.Release|x86.ActiveCfg = Release|Win32
+		{827A668D-C219-4DD2-BB2D-4142D2C82BB6}.Release|x86.Build.0 = Release|Win32
+	EndGlobalSection
+	GlobalSection(SolutionProperties) = preSolution
+		HideSolutionNode = FALSE
+	EndGlobalSection
+	GlobalSection(ExtensibilityGlobals) = postSolution
+		SolutionGuid = {0E0B883C-2F16-4188-812D-1491B53E058D}
+	EndGlobalSection
+EndGlobal

Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 2957 - 0
CGH_Printer.ui


+ 176 - 0
CGH_Printer.vcxproj

@@ -0,0 +1,176 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="16.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup Label="ProjectConfigurations">
+    <ProjectConfiguration Include="Debug|Win32">
+      <Configuration>Debug</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|Win32">
+      <Configuration>Release</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+  </ItemGroup>
+  <PropertyGroup Label="Globals">
+    <ProjectGuid>{827A668D-C219-4DD2-BB2D-4142D2C82BB6}</ProjectGuid>
+    <Keyword>QtVS_v304</Keyword>
+    <WindowsTargetPlatformVersion Condition="'$(Configuration)|$(Platform)' == 'Debug|Win32'">10.0</WindowsTargetPlatformVersion>
+    <WindowsTargetPlatformVersion Condition="'$(Configuration)|$(Platform)' == 'Release|Win32'">10.0</WindowsTargetPlatformVersion>
+    <QtMsBuild Condition="'$(QtMsBuild)'=='' OR !Exists('$(QtMsBuild)\qt.targets')">$(MSBuildProjectDirectory)\QtMsBuild</QtMsBuild>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|Win32'" Label="Configuration">
+    <ConfigurationType>Application</ConfigurationType>
+    <PlatformToolset>v143</PlatformToolset>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|Win32'" Label="Configuration">
+    <ConfigurationType>Application</ConfigurationType>
+    <PlatformToolset>v143</PlatformToolset>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+  <ImportGroup Condition="Exists('$(QtMsBuild)\qt_defaults.props')">
+    <Import Project="$(QtMsBuild)\qt_defaults.props" />
+  </ImportGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|Win32'" Label="QtSettings">
+    <QtInstall>5.15.2_msvc2019</QtInstall>
+    <QtModules>core;gui;multimedia;widgets;multimediawidgets</QtModules>
+    <QtBuildConfig>debug</QtBuildConfig>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|Win32'" Label="QtSettings">
+    <QtInstall>5.15.2_msvc2019</QtInstall>
+    <QtModules>core;network;gui;multimedia;widgets;multimediawidgets</QtModules>
+    <QtBuildConfig>release</QtBuildConfig>
+  </PropertyGroup>
+  <Target Name="QtMsBuildNotFound" BeforeTargets="CustomBuild;ClCompile" Condition="!Exists('$(QtMsBuild)\qt.targets') or !Exists('$(QtMsBuild)\qt.props')">
+    <Message Importance="High" Text="QtMsBuild: could not locate qt.targets, qt.props; project may not build correctly." />
+  </Target>
+  <ImportGroup Label="ExtensionSettings" />
+  <ImportGroup Label="Shared" />
+  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)' == 'Debug|Win32'">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+    <Import Project="$(QtMsBuild)\Qt.props" />
+  </ImportGroup>
+  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)' == 'Release|Win32'">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+    <Import Project="$(QtMsBuild)\Qt.props" />
+  </ImportGroup>
+  <PropertyGroup Label="UserMacros" />
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|Win32'">
+    <ExternalIncludePath>$(ExternalIncludePath)</ExternalIncludePath>
+    <LibraryPath>F:\CGH_Printer\Lib;G:\project file\CGH_Printer\Lib;$(LibraryPath)</LibraryPath>
+    <IncludePath>F:\CGH_Printer\Include;G:\project file\CGH_Printer\Include;$(IncludePath)</IncludePath>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|Win32'">
+    <ExternalIncludePath>F:\CGH_Printer\Include;G:\project file\CGH_Printer\Include;$(ExternalIncludePath)</ExternalIncludePath>
+    <LibraryPath>F:\CGH_Printer\Lib;G:\project file\CGH_Printer\Lib;$(LibraryPath)</LibraryPath>
+  </PropertyGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+    <Link>
+      <AdditionalDependencies>PI_GCS2_DLL.lib;CH375DLL.LIB;%(AdditionalDependencies)</AdditionalDependencies>
+      <AdditionalOptions>/SAFESEH:NO %(AdditionalOptions)</AdditionalOptions>
+      <AdditionalLibraryDirectories>F:\CGH_Printer\Lib;G:\project file\CGH_Printer\Lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+    </Link>
+    <Xdcmake>
+      <AdditionalOptions>/SAFESEH:NO %(AdditionalOptions)</AdditionalOptions>
+    </Xdcmake>
+    <ClCompile>
+      <AdditionalOptions>/SAFESEH:NO %(AdditionalOptions)</AdditionalOptions>
+      <AdditionalIncludeDirectories>F:\CGH_Printer\Include;G:\project file\CGH_Printer\Include;.\;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PrecompiledHeader>NotUsing</PrecompiledHeader>
+    </ClCompile>
+    <QtUic>
+      <Generator>G:\project file\CGH_Printer\Include\TabWidget.h</Generator>
+    </QtUic>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+    <Link>
+      <AdditionalDependencies>PI_GCS2_DLL.lib;CH375DLL.LIB;%(AdditionalDependencies)</AdditionalDependencies>
+      <ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers>
+      <AdditionalLibraryDirectories>F:\CGH_Printer\Lib;G:\project file\CGH_Printer\Lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+    </Link>
+    <ClCompile>
+      <AdditionalOptions>/SAFESEH:NO %(AdditionalOptions)</AdditionalOptions>
+      <AdditionalIncludeDirectories>F:\CGH_Printer\Include;G:\project file\CGH_Printer\Include;.\;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+    </ClCompile>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|Win32'" Label="Configuration">
+    <ClCompile>
+      <TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
+      <MultiProcessorCompilation>true</MultiProcessorCompilation>
+      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+      <Optimization>Disabled</Optimization>
+      <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+    </ClCompile>
+    <Link>
+      <SubSystem>Windows</SubSystem>
+      <GenerateDebugInformation>true</GenerateDebugInformation>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)' == 'Release|Win32'" Label="Configuration">
+    <ClCompile>
+      <TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
+      <MultiProcessorCompilation>true</MultiProcessorCompilation>
+      <DebugInformationFormat>None</DebugInformationFormat>
+      <Optimization>MaxSpeed</Optimization>
+      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+    </ClCompile>
+    <Link>
+      <SubSystem>Windows</SubSystem>
+      <GenerateDebugInformation>false</GenerateDebugInformation>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemGroup>
+    <ClCompile Include="CGH_CheckStateThread.cpp" />
+    <ClCompile Include="CGH_CoordinateThread.cpp" />
+    <ClCompile Include="CGH_Relays.cpp" />
+    <ClCompile Include="CGH_Shutter.cpp" />
+    <ClCompile Include="CGH_State.cpp" />
+    <ClCompile Include="CGH_TabBar.cpp" />
+    <ClCompile Include="CGH_TabWidget.cpp" />
+    <ClCompile Include="CGH_Project.cpp" />
+    <ClCompile Include="CGH_ProjectView.cpp" />
+    <ClCompile Include="PrintThread.cpp" />
+    <QtRcc Include="CGH_Printer.qrc" />
+    <ClCompile Include="CGH_Printer.cpp" />
+    <ClCompile Include="main.cpp" />
+  </ItemGroup>
+  <ItemGroup>
+    <QtMoc Include="Include\CGH_Printer.h" />
+  </ItemGroup>
+  <ItemGroup>
+    <ClInclude Include="Include\SerialPort.h" />
+    <ClInclude Include="Include\ui_CGH_Printer.h" />
+    <ClInclude Include="Include\ui_CGH_ProjectView.h" />
+    <ClInclude Include="resource.h" />
+    <QtMoc Include="Include\CGH_CheckStateThread.h" />
+    <QtMoc Include="Include\CGH_CoordinateThread.h" />
+    <ClInclude Include="Include\CGH_Project.h" />
+    <QtMoc Include="Include\CGH_ProjectView.h" />
+    <ClInclude Include="Include\CGH_Relays.h" />
+    <ClInclude Include="Include\CGH_TabWidget.h" />
+    <ClInclude Include="Include\PI_GCS2_DLL.h" />
+    <QtMoc Include="Include\PrintThread.h" />
+    <ClInclude Include="Include\CH375DLL.H" />
+    <ClInclude Include="Include\CGH_Shutter.h" />
+    <ClInclude Include="Include\CGH_State.h" />
+    <ClInclude Include="Include\CGH_TabBar.h" />
+  </ItemGroup>
+  <ItemGroup>
+    <QtUic Include="CGH_Printer.ui">
+      <FileType>Document</FileType>
+      <Include Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+      </Include>
+      <Generator Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+      </Generator>
+    </QtUic>
+    <QtUic Include="CGH_ProjectView.ui" />
+  </ItemGroup>
+  <ItemGroup>
+    <ResourceCompile Include="CGH_Printer.rc" />
+  </ItemGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+  <ImportGroup Condition="Exists('$(QtMsBuild)\qt.targets')">
+    <Import Project="$(QtMsBuild)\qt.targets" />
+  </ImportGroup>
+  <ImportGroup Label="ExtensionTargets">
+  </ImportGroup>
+</Project>

+ 136 - 0
CGH_Printer.vcxproj.filters

@@ -0,0 +1,136 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup>
+    <Filter Include="Source Files">
+      <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
+      <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
+    </Filter>
+    <Filter Include="Header Files">
+      <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
+      <Extensions>h;hh;hpp;hxx;hm;inl;inc;xsd</Extensions>
+    </Filter>
+    <Filter Include="Resource Files">
+      <UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
+      <Extensions>qrc;rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
+    </Filter>
+    <Filter Include="Form Files">
+      <UniqueIdentifier>{99349809-55BA-4b9d-BF79-8FDBB0286EB3}</UniqueIdentifier>
+      <Extensions>ui</Extensions>
+    </Filter>
+    <Filter Include="Translation Files">
+      <UniqueIdentifier>{639EADAA-A684-42e4-A9AD-28FC9BCB8F7C}</UniqueIdentifier>
+      <Extensions>ts</Extensions>
+    </Filter>
+  </ItemGroup>
+  <ItemGroup>
+    <QtRcc Include="CGH_Printer.qrc">
+      <Filter>Resource Files</Filter>
+    </QtRcc>
+    <ClCompile Include="CGH_Printer.cpp">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+  </ItemGroup>
+  <ItemGroup>
+    <ClCompile Include="main.cpp">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="CGH_Shutter.cpp">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="CGH_TabBar.cpp">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="CGH_TabWidget.cpp">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="CGH_State.cpp">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="CGH_CoordinateThread.cpp">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="CGH_ProjectView.cpp">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="CGH_Project.cpp">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="PrintThread.cpp">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="CGH_CheckStateThread.cpp">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="CGH_Relays.cpp">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+  </ItemGroup>
+  <ItemGroup>
+    <QtMoc Include="Include\CGH_Printer.h">
+      <Filter>Header Files</Filter>
+    </QtMoc>
+    <QtMoc Include="Include\CGH_CheckStateThread.h">
+      <Filter>Header Files</Filter>
+    </QtMoc>
+    <QtMoc Include="Include\PrintThread.h">
+      <Filter>Header Files</Filter>
+    </QtMoc>
+    <QtMoc Include="Include\CGH_CoordinateThread.h">
+      <Filter>Header Files</Filter>
+    </QtMoc>
+    <QtMoc Include="Include\CGH_ProjectView.h">
+      <Filter>Header Files</Filter>
+    </QtMoc>
+  </ItemGroup>
+  <ItemGroup>
+    <ClInclude Include="Include\CH375DLL.H">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="Include\CGH_Shutter.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="Include\CGH_State.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="Include\CGH_TabBar.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="Include\PI_GCS2_DLL.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="Include\CGH_Project.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="Include\CGH_Relays.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="Include\CGH_TabWidget.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="Include\ui_CGH_ProjectView.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="Include\ui_CGH_Printer.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="resource.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="Include\SerialPort.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+  </ItemGroup>
+  <ItemGroup>
+    <QtUic Include="CGH_Printer.ui">
+      <Filter>Form Files</Filter>
+    </QtUic>
+    <QtUic Include="CGH_ProjectView.ui">
+      <Filter>Form Files</Filter>
+    </QtUic>
+  </ItemGroup>
+  <ItemGroup>
+    <ResourceCompile Include="CGH_Printer.rc">
+      <Filter>Resource Files</Filter>
+    </ResourceCompile>
+  </ItemGroup>
+</Project>

+ 10 - 0
CGH_Printer.vcxproj.user

@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <PropertyGroup />
+  <PropertyGroup Label="QtSettings" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+    <QtLastBackgroundBuild>2022-06-16T06:46:31.0161586Z</QtLastBackgroundBuild>
+  </PropertyGroup>
+  <PropertyGroup Label="QtSettings" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+    <QtLastBackgroundBuild>2022-06-16T06:46:31.5458195Z</QtLastBackgroundBuild>
+  </PropertyGroup>
+</Project>

+ 183 - 0
CGH_Project.cpp

@@ -0,0 +1,183 @@
+#include "CGH_Project.h"
+#include <QFile>
+#include <QTextStream>
+#include <fstream>
+#include <QPushButton>
+#include <QCoreApplication>
+
+
+
+CGH_Project::CGH_Project()
+{
+	curabsPath = (QCoreApplication::applicationDirPath()).toStdString();
+	relproPath = "../Project";
+	absproPath = curabsPath + "/" + relproPath;
+}
+
+CGH_Project::CGH_Project(const string& filename)
+{
+	curabsPath = (QCoreApplication::applicationDirPath()).toStdString();
+	relproPath = "../Project";
+	absproPath = curabsPath + "/" + relproPath;
+	loadFromLocal(filename);
+}
+
+CGH_Project::~CGH_Project()
+{
+}
+
+string CGH_Project::getID()
+{
+	return WorkID;
+}
+
+string CGH_Project::getWorkName()
+{
+	return WorkName;
+}
+
+string CGH_Project::getWorkLSpacing()
+{
+	return WorkLSpacing;
+}
+
+string CGH_Project::getWorkCSpacing()
+{
+	return WorkCSpacing;
+}
+
+string CGH_Project::getWorkLine()
+{
+	return WorkLine;
+}
+
+string CGH_Project::getWorkColumn()
+{
+	return WorkColumn;
+}
+
+string CGH_Project::getWorkPrefix()
+{
+	return WorkPrefix;
+}
+
+string CGH_Project::getWorkExpose()
+{
+	return WorkExpose;
+}
+
+string CGH_Project::getWorkQuiet()
+{
+	return WorkQuiet;
+}
+
+string CGH_Project::getWorkResource()
+{
+	return WorkResource;
+}
+
+void CGH_Project::setID(const string& strWorkID)
+{
+	WorkID = strWorkID;
+}
+
+void CGH_Project::setWorkName(const string& strWorkName)
+{
+	WorkName = strWorkName;
+}
+
+void CGH_Project::setWorkLSpacing(const string& strWorkLSpacing)
+{
+	WorkLSpacing = strWorkLSpacing;
+}
+
+void CGH_Project::setWorkCSpacing(const string& strWorkCSpacing)
+{
+	WorkCSpacing = strWorkCSpacing;
+}
+
+void CGH_Project::setWorkLine(const string& strWorkLine)
+{
+	WorkLine = strWorkLine;
+}
+
+void CGH_Project::setWorkColumn(const string& strWorkColumn)
+{
+	WorkColumn = strWorkColumn;
+}
+
+void CGH_Project::setWorkPrefix(const string& strWorkPrefix)
+{
+	WorkPrefix = strWorkPrefix;
+}
+
+void CGH_Project::setWorkExpose(const string& strWorkExpose)
+{
+	WorkExpose = strWorkExpose;
+}
+
+void CGH_Project::setWorkQuiet(const string& strWorkQuiet)
+{
+	WorkQuiet = strWorkQuiet;
+}
+
+void CGH_Project::setWorkResource(const string& strWorkResource)
+{
+	WorkResource = strWorkResource;
+}
+
+void CGH_Project::saveToLocal()
+{
+	string fullProjectPath = absproPath + "/" + WorkName + ".pro";
+	QFile file(QString::fromStdString(fullProjectPath));
+	file.open(QIODevice::WriteOnly | QIODevice::Text);
+
+	QTextStream stream(&file);
+
+	stream << "WorkID: " << QString::fromStdString(WorkID) << "\n";
+	stream << "WorkName: " << QString::fromStdString(WorkName) << "\n";
+	stream << "WorkLSpacing: " << QString::fromStdString(WorkLSpacing) << "\n";
+	stream << "WorkCSpacing: " << QString::fromStdString(WorkCSpacing) << "\n";
+	stream << "WorkLine: " << QString::fromStdString(WorkLine) << "\n";
+	stream << "WorkColumn: " << QString::fromStdString(WorkColumn) << "\n";
+	stream << "WorkPrefix: " << QString::fromStdString(WorkPrefix) << "\n";
+	stream << "WorkExpose: " << QString::fromStdString(WorkExpose) << "\n";
+	stream << "WorkQuiet: " << QString::fromStdString(WorkQuiet) << "\n";
+	stream << "WorkResource: " << QString::fromStdString(WorkResource) << "\n";
+
+	file.close();
+}
+
+void CGH_Project::loadFromLocal(const string& filename)
+{
+	string sReadString;
+	string fullname = absproPath + "/" + filename;
+	fstream inputFile(fullname.c_str(), ios::in | ios::out);
+
+	if (inputFile)
+	{
+		getline(inputFile, sReadString);
+		WorkID = sReadString.substr(sReadString.find_first_of(' ') + 1, sReadString.size()).c_str();
+		getline(inputFile, sReadString);
+		WorkName = sReadString.substr(sReadString.find_first_of(' ') + 1, sReadString.size()).c_str();
+		getline(inputFile, sReadString);
+		WorkLSpacing = sReadString.substr(sReadString.find_first_of(' ') + 1, sReadString.size()).c_str();
+		getline(inputFile, sReadString);
+		WorkCSpacing = sReadString.substr(sReadString.find_first_of(' ') + 1, sReadString.size()).c_str();
+		getline(inputFile, sReadString);
+		WorkLine = sReadString.substr(sReadString.find_first_of(' ') + 1, sReadString.size()).c_str();
+		getline(inputFile, sReadString);
+		WorkColumn = sReadString.substr(sReadString.find_first_of(' ') + 1, sReadString.size()).c_str();
+		getline(inputFile, sReadString);
+		WorkPrefix = sReadString.substr(sReadString.find_first_of(' ') + 1, sReadString.size()).c_str();
+		getline(inputFile, sReadString);
+		WorkExpose = sReadString.substr(sReadString.find_first_of(' ') + 1, sReadString.size()).c_str();
+		getline(inputFile, sReadString);
+		WorkQuiet = sReadString.substr(sReadString.find_first_of(' ') + 1, sReadString.size()).c_str();
+		getline(inputFile, sReadString);
+		WorkResource = sReadString.substr(sReadString.find_first_of(' ') + 1, sReadString.size()).c_str();
+	}//end if (inputFile)
+
+	inputFile.close();
+}
+

+ 5 - 0
Configure/Configure.txt

@@ -0,0 +1,5 @@
+前 10.0000
+后 10.0000
+左 10.0000
+右 10.0000
+时间 10000

BIN
Configure/IMG/Down.png


BIN
Configure/IMG/Down_1.png


BIN
Configure/IMG/Down_Hover.png


BIN
Configure/IMG/Equipment.png


BIN
Configure/IMG/Greenlight.png


BIN
Configure/IMG/Left.png


BIN
Configure/IMG/Left_1.png


BIN
Configure/IMG/Left_2.png


BIN
Configure/IMG/Left_Hover.png


BIN
Configure/IMG/Logo.png


BIN
Configure/IMG/Parallelogram_Green.png


BIN
Configure/IMG/Parallelogram_Red.png


BIN
Configure/IMG/Redlight.png


BIN
Configure/IMG/Right.png


BIN
Configure/IMG/change.png


BIN
Configure/IMG/changeblue.png


BIN
Configure/IMG/confirm.png


BIN
Configure/IMG/conform.png


BIN
Configure/IMG/dblue.png


BIN
Configure/IMG/delete.png


BIN
Configure/IMG/deleteblue.png


BIN
Configure/IMG/down_2.png


BIN
Configure/IMG/down_3.png


BIN
Configure/IMG/downblue.png


BIN
Configure/IMG/downm.png


BIN
Configure/IMG/flash.png


BIN
Configure/IMG/flashblue.png


BIN
Configure/IMG/hand.png


BIN
Configure/IMG/home.png


BIN
Configure/IMG/lblue.png


BIN
Configure/IMG/light.png


BIN
Configure/IMG/load.png


BIN
Configure/IMG/loadblue.png


BIN
Configure/IMG/new.png


BIN
Configure/IMG/newblue.png


BIN
Configure/IMG/pause.png


BIN
Configure/IMG/preview.png


BIN
Configure/IMG/previewblue.png


BIN
Configure/IMG/print.png


BIN
Configure/IMG/rblue.png


BIN
Configure/IMG/zero.png


BIN
Configure/IMG/zeroblue.png


+ 10 - 0
Configure/ReadMe.txt

@@ -0,0 +1,10 @@
+/ *** 本文档是对程序细节的描述 *** /
+
+Configure文件:
+      包含前、后、左、右、时间预设参数设置。
+      示例:
+      前 10.0000
+      后 10.0000
+      左 10.0000
+      右 10.0000
+      时间 10000

BIN
Debug/HCamera.dll


+ 60 - 0
Include/CGH_CheckStateThread.h

@@ -0,0 +1,60 @@
+#pragma execution_character_set("utf-8")
+#include <qthread.h>
+#ifndef MYTHREAD_H
+#define MYTHREAD_H
+#include <QScreen>
+#include <QList>
+#include <QString>
+#include "CGH_Shutter.h"
+#include <QCameraInfo>
+
+
+class CGH_Printer;
+class CGH_CheckStateThread :
+    public QThread
+{
+    Q_OBJECT
+public:
+    explicit CGH_CheckStateThread(QObject* parent = 0);
+    ~CGH_CheckStateThread();
+    
+
+protected:
+    //QThread的虚函数
+    //线程处理函数
+    //不能直接调用,通过start()间接调用
+    void run();
+
+signals:
+    void isDone(int);
+
+public slots:
+    void Check();
+
+private:
+    CGH_Printer* MyPrinter_Temp;
+
+    // SLM状态监测相关变量
+    //QDesktopWidget* DesktopState;
+    int SLMStateNum;
+    QList<QScreen*> screen_list;
+    bool curSLMState_Temp;
+
+    // Shutter状态监测相关变量
+    CGH_Shutter* MyShutter_Temp;
+    bool curShutterState_Temp;
+    bool curShutterConnect;
+
+    // TransTable状态监测相关变量
+    int ControllerID_Temp;
+    bool curTransTableState_Temp;
+    bool IsConnectedState;
+
+    // CCD状态监测相关变量
+    int CCDNum;
+    QList<QCameraInfo> m_pCameraInfos_Temp;
+    bool curCCDState_Temp;
+};
+
+#endif // MYTHREAD_H
+

+ 38 - 0
Include/CGH_CoordinateThread.h

@@ -0,0 +1,38 @@
+#pragma once
+#pragma execution_character_set("utf-8")
+#include <qthread.h>
+#include <CGH_Printer.h>
+
+const BOOL Update = TRUE;
+
+class CGH_Printer;
+class CGH_CoordinateThread :
+    public QThread
+{
+    Q_OBJECT
+public:
+    explicit CGH_CoordinateThread(QObject* parent = 0);
+    ~CGH_CoordinateThread();
+    double Getx() { return x_temp; }
+    double Gety() { return y_temp; }
+    
+
+protected:
+    // QThread的虚函数
+    // 线程处理函数
+    // 不能直接调用,通过start()间接调用
+    void run();
+
+signals:
+    void isDone(int);
+
+public slots:
+    void GetCoordinate();
+
+private:
+    CGH_Printer* m_CGH_Printer_1;
+    const std::vector<std::string> sAxis{ "AXIS_1", "AXIS_2" };
+    double x_temp = 0;
+    double y_temp = 0;
+    int PI_ID_Temp_1 = -1;
+};

+ 309 - 0
Include/CGH_Printer.h

@@ -0,0 +1,309 @@
+#pragma once
+#pragma execution_character_set("utf-8")
+
+#include <QtWidgets/QMainWindow>
+#include <QTimer>
+#include <QList>
+#include "ui_CGH_Printer.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"
+#include <QDesktopWidget>
+#include <QCameraInfo>
+#include <QCamera>
+#include <QCameraImageCapture>
+#include <QCameraViewfinder>
+#include <QCloseEvent>
+#include <functional>
+#include "CGH_Shutter.h"
+
+
+const BOOL SERVO_ON = TRUE;
+const BOOL SERVO_OFF = FALSE;
+const BOOL ENABLE = TRUE;
+const BOOL UNABLE = FALSE;
+const int BufferSize = 2048;
+
+class PrintThread;
+// class CGH_CoordinateThread;
+class CGH_Printer : public QMainWindow
+{
+    Q_OBJECT
+
+public:
+    CGH_Printer(QWidget* parent = Q_NULLPTR);
+
+    // 变量初始化函数
+    void initVariables();
+    // 配置初始化函数
+    void initConfigure();
+    // 信号与槽绑定的初始化函数
+    void initSlots();
+    // 配置文件加载函数
+    void ReadConfigure();
+    // 工程文件加载函数
+    void loadHistory();
+    // 获取SLM当前状态
+    bool get_SLMState() {
+        return curSLMState;
+    }
+    // 获取Shutter当前状态
+    bool get_ShutterState() {
+        return curShutterState;
+    }
+    // 获取TransTable当前状态
+    bool get_TransTableState() {
+        return curTransTableState;
+    }
+    // 获取CCD当前状态
+    bool get_CCDState() {
+        return curCCDState;
+    }
+    // 获取ControllerID
+    int get_ControllerID() {
+        return ControllerID;
+    }
+    // 添加工程文件
+    void addProject(CGH_Project* pj);
+    void addProject(const string& name);
+
+    // 获取CCD数量函数
+    int GetCamerasNum() {
+        m_pCameraInfos = QCameraInfo::availableCameras();
+        return m_pCameraInfos.size();
+    }
+    // 获取显示器数量函数
+    /*int GetSLMNum() {
+        return SLM_Num;
+    }*/
+    // 设备
+    void ComboDevice();
+    // 格式和帧率
+    void ComboFormatandFramerate();
+    // 开启相机
+    void OpenCamera();
+    // 关闭相机
+    void CloseCamera();
+    // SLM显示弹窗设置
+    void SLMDisplay();
+    
+    /***平移台相关函数***/
+    // 平移台连接
+    void PITransTableInit();
+    // 平移台运动等待
+    // bool WaitForMotionDone(int ID, std::string axis);
+
+    // 工作状态
+    void BusyState();
+    void ReadyState();
+
+    // 读取平移台配置
+    void ReadTransTableConfigue();
+    
+    // 格式转换
+    string numberToString(int n, int l = 3);
+    string formatTime(long ss);
+
+    // 打印变量获取
+    double Get_PrintLSpacing() {
+        return PrintLSpacing;
+    }
+
+    double Get_PrintCSpacing() {
+        return PrintCSpacing;
+    }
+
+    int Get_PrintLine() {
+        return PrintLine;
+    }
+
+    int Get_PrintColumn() {
+        return PrintColumn;
+    }
+
+    string Get_PrintPrefix() {
+        return PrintPrefix;
+    }
+
+    int Get_PrintExpose() {
+        return PrintExpose;
+    }
+
+    int Get_PrintQuiet() {
+        return PrintQuiet;
+    }
+
+    string Get_PrintResource() {
+        return PrintResource;
+    }
+
+    vector<int> Get_Devices() {
+        return Devices;
+    }
+
+    string Get_sAxis() {
+        return sAxis;
+    }
+
+    bool Get_PRINTSTOP() {
+        return PRINTSTOP;
+    }
+
+signals:
+    //void isDone(int);
+    //void isDone(string);
+
+public slots:
+    void timerUpdate();
+    // void StateUpdate(int);
+    void CoordinateUpdate();
+    void NewProject();
+    void ModifyProject();
+    void DeleteProject();
+    void PrintTemp();
+    void Print();
+    void PrintProgress();
+
+    void Preview();
+    void Snapshot();
+    void ChangeDevice();
+    void ChangeFormat();
+    // 全息图加载
+    void CGHLoad();
+
+    // 工作状态检测
+    void WorkStateUpdate();
+    void ExposeUpdate();
+    void WorkTimeUpdate();
+	void PrintOKUpdate();
+    void PrintCancelUpdate();
+
+
+    // ***电控平移台*** //
+    
+    // 平移台前移
+    void MoveUp();
+    // 平移台后移
+    void MoveDown();
+    // 平移台左移
+    void MoveLeft();
+    // 平移台右移
+    void MoveRight();
+    // 平移台急停
+    void TranstableStop();
+    // 平移台回零
+    void MoveZero();
+    // 上料
+
+
+    // ***电子快门*** //
+    
+    // 电子快门曝光
+    void Expose();
+    // 电子快门停止
+    void ShutterStop();
+
+    // 上料
+    void Feed();
+    // 下料
+    void Underfeed();
+
+    // 暂时保存配置
+    void TempSaved();
+    // 永久保存配置
+    void PermSaved();
+
+    // 打印过程中更新空间光调制器
+    void SLMUpdate(const QString& tempCGH);
+    // 打印过程中更新打印进度
+    void PrintUpdate(int tempLL, int tempCC);
+
+    void PrintStop();
+
+private:
+    Ui::CGH_PrinterClass ui;
+
+    // 关闭程序
+    void closeEvent(QCloseEvent* event);
+
+    // 配置相关变量
+    string absPath, absConfigurePath, absProjectPath, absCapturePath, absResourcesPath;// 绝对路径
+    string relConfigurePath, relProjectPath, relCapturePath, relResourcesPath;// 相对路径
+    string ProjectType, ConfigureName;
+
+    // SLM显示
+    QDesktopWidget* Desktop;
+    QLabel* labelPrint;
+
+    // 定时器对象
+    QTimer* timer_calendar;
+    QTimer* timer_WorkState;
+    QTimer* timer_Expose;
+    QTimer* timer_Work;
+
+    // CGH_CheckStateThread* CheckState;// 硬件状态检测线程对象
+    // CGH_CoordinateThread* Coordinate;// 平移台坐标更新线程对象
+    PrintThread* m_Printer;
+
+    // CCD相关变量
+    QList<QCameraInfo> m_pCameraInfos;
+    QCameraImageCapture* m_pCameraCapture;
+    QCamera* m_pCamera;
+    QCameraViewfinder* m_pViewfinder;
+    int m_pCameraIndex;
+    BOOL m_pCameraOpen;
+
+    // 硬件连接状态检测相关变量
+    QImage* icon_Red;
+    QImage* icon_Green;
+    bool curSLMState;    // SLM当前连接状态
+    bool curShutterState;// 电子快门当前连接状态
+    bool curTransTableState;// 平移台当前连接状态
+    bool curCCDState;// CCD当前连接状态
+    bool curShutterWorkState;// 电子快门当前工作状态
+
+    // 平移台相关变量
+    int ControllerID;
+    int DeviceNum;
+    char* ControllerIDN;
+    vector<int> Devices;
+    string sAxis;
+
+    // 电子快门相关变量
+    // QElapsedTimer* t1;
+    CGH_Shutter* MyShutter;
+
+    QList<QString> error_messages{};
+
+
+    // 平移台轴坐标实时更新
+    double CoordinateX = 0;
+    double CoordinateY = 0;
+
+    QButtonGroup* pButtonGroup;    // 创建按钮组
+
+    // 工作变量
+    string PrintName;// 文件名
+    double PrintLSpacing, PrintCSpacing;// 横向、纵向
+    int PrintLine, PrintColumn;// 行、列
+    string PrintPrefix;// 前缀
+    int PrintExpose, PrintQuiet;// 曝光、静台
+    string PrintResource;// 资源
+    int PrintLL, PrintCC;// 打印进度行、列 
+    int CurProgress, FulProgress;// 当前打印进度和总打印进度
+    clock_t timePrintStart, timePrintCur;// 打印开始时间和当前时间
+    long Printtimed;//已打印时间
+
+    // 配置变量
+    double AccX, DecX, MaxvX;
+    double AccY, DecY, MaxvY;
+    const unsigned int Acc = 0xB;
+    const unsigned int Dec = 0xC;
+    const unsigned int Maxv = 0x49;
+
+    bool PRINTSTOP;
+};
+

+ 53 - 0
Include/CGH_Project.h

@@ -0,0 +1,53 @@
+#pragma once
+#pragma execution_character_set("utf-8")
+#include <iostream>
+#include <string>
+
+using namespace std;
+
+class CGH_Project
+{
+public:
+	CGH_Project();
+	CGH_Project(const string& filename);
+	~CGH_Project();
+
+
+	string getID();
+	string getWorkName();
+	string getWorkLSpacing();
+	string getWorkCSpacing();
+	string getWorkLine();
+	string getWorkColumn();
+	string getWorkPrefix();
+	string getWorkExpose();
+	string getWorkQuiet();
+	string getWorkResource();
+
+	void setID(const string& str);
+	void setWorkName(const string& str);
+	void setWorkLSpacing(const string& str);
+	void setWorkCSpacing(const string& str);
+	void setWorkLine(const string& str);
+	void setWorkColumn(const string& str);
+	void setWorkPrefix(const string& str);
+	void setWorkExpose(const string& str);
+	void setWorkQuiet(const string& str);
+	void setWorkResource(const string& str);
+
+	void saveToLocal();
+	void loadFromLocal(const string& filename);
+
+private:
+	string WorkID;
+	string WorkName;
+	string WorkLSpacing, WorkCSpacing;
+	string WorkLine, WorkColumn;
+	string WorkPrefix, WorkExpose, WorkQuiet;
+	string WorkResource;
+
+	string curabsPath;
+	string relproPath;
+	string absproPath;
+};
+

+ 51 - 0
Include/CGH_ProjectView.h

@@ -0,0 +1,51 @@
+#pragma once
+#pragma execution_character_set("utf-8")
+#include <QDialog>
+#include <iostream>
+#include <string>
+using namespace std;
+namespace Ui { class CGH_ProjectView; };
+
+class CGH_ProjectView : public QDialog
+{
+	Q_OBJECT
+
+public:
+	CGH_ProjectView(QWidget *parent = Q_NULLPTR);
+	~CGH_ProjectView();
+	void initSlots();
+	string getViewName();
+	string getViewLSpacing();
+	string getViewCSpacing();
+	string getViewLine();
+	string getViewColumn();
+	string getViewPrefix();
+	string getViewExpose();
+	string getViewQuiet();
+	string getViewResource();
+
+	void setViewName(const string& str);
+	void setViewLSpacing(const string& str);
+	void setViewCSpacing(const string& str);
+	void setViewLine(const string& str);
+	void setViewColumn(const string& str);
+	void setViewPrefix(const string& str);
+	void setViewExpose(const string& str);
+	void setViewQuiet(const string& str);
+	void setViewResource(const string& str);
+	// ´°¿Ú³õʼ»¯
+	void initWindow();
+
+public slots:
+	void ChooseResourcePath();
+	void OkNewProject();
+	void CancelNewProject();
+
+public:
+	Ui::CGH_ProjectView* ui;
+
+private:
+	string relproPath;
+	string curabsPath;
+	string absproPath;
+};

+ 62 - 0
Include/CGH_Relays.h

@@ -0,0 +1,62 @@
+#ifndef __CGH_Relays_H_
+#define __CGH_Relays_H_
+#include <Windows.h>
+#include <string>
+using namespace std;
+
+class CGH_Relays
+{
+private:
+	/* data */
+	HANDLE hCom;
+	string last_error;
+public:
+	CGH_Relays();
+	~CGH_Relays();
+public:
+	//同步方式打开串口,并配置默认信息
+	bool openSyn(string serial_name, unsigned char baud_rate, unsigned char parity, unsigned char byte_size, unsigned char stop_bits);
+	//同步方式打开串口(需自己配置串口参数)
+	bool openSyn(string serial_name);
+
+	//设置推荐的缓冲大小
+	bool setBufferSize(DWORD inputBuff, DWORD outBuffer);
+	//设置超时
+	bool setTimeouts(COMMTIMEOUTS& timeouts);
+	//设置串口信息
+	bool setDCB(DCB& dcb);
+
+	//刷新缓冲区
+	bool purgeBuff(DWORD flags);
+	//刷新缓冲区
+	bool flushBuff();
+	//写数据
+	DWORD writeData(char* buffer, int length);
+	//读数据
+	DWORD readData(char* buffer, int length);
+	//写字符串
+	DWORD writeStr(string str);
+	//关闭串口
+	void closeComm();
+	//判断串口是否打开
+	bool isOpened();
+	//得到最后一次失败的错误信息
+	string getSerialLastError();
+
+	// 打开第一路USB开关
+	bool OpenUSB1();
+	// 关闭第一路USB开关
+	bool CloseUSB1();
+	// 打开第二路USB开关
+	bool OpenUSB2();
+	// 关闭第二路USB开关
+	bool CloseUSB2();
+
+private:
+	//设置最后一次的错误信息
+	void setSerialLastError(string error_msg);
+	//清chu最后一次的错误信息
+	void clearSerialLastError();
+};
+
+#endif /*__CGH_Relays_H_*/

+ 57 - 0
Include/CGH_Shutter.h

@@ -0,0 +1,57 @@
+#ifndef Shutter_H
+#define Shutter_H
+#pragma execution_character_set("utf-8")
+#include "CH375DLL.H"
+//#pragma comment(lib, "CH375DLL.LIB")
+//#pragma comment(lib, "CH375DLLd.LIB")
+using namespace std;
+
+inline UCHAR mCharToBcd(UCHAR iChar)
+{
+    UCHAR	mBCD;
+    if (iChar >= '0' && iChar <= '9') mBCD = iChar - '0';
+    else if (iChar >= 'A' && iChar <= 'F') mBCD = iChar - 'A' + 0x0a;
+    else if (iChar >= 'a' && iChar <= 'f') mBCD = iChar - 'a' + 0x0a;
+    //	else mBCD = 0xff;
+    else mBCD = 0;
+    return(mBCD);
+}
+
+inline PUCHAR mStrtoVal(PUCHAR str, ULONG strlen)
+{
+    ULONG i, j;
+    ULONG len;
+    UCHAR strRev[mMAX_BUFFER_LENGTH];
+    if (strlen % 2 != 0)
+    {
+        str[strlen] = 0;
+        strlen += 1;
+    }
+    len = strlen / 2;
+    for (i = 0, j = 0; i < strlen; i++, j++)
+    {
+        strRev[j] = (UCHAR)((mCharToBcd(str[i]) << 4) + mCharToBcd(str[i + 1]));
+        i++;
+    }
+    strRev[j] = '\0';
+    memcpy(str, strRev, len);
+    return str;
+}
+
+class CGH_Shutter
+{
+public:
+    CGH_Shutter();
+    ~CGH_Shutter();
+    int open();
+    int close();
+    bool isconnected();
+    void disconnected();
+    // void connect();
+
+private:
+    bool m_open;
+    long int mIndex;
+};
+
+#endif // !Shutter_H

+ 23 - 0
Include/CGH_State.h

@@ -0,0 +1,23 @@
+#pragma once
+#pragma execution_character_set("utf-8")
+#include <QMap>
+
+const int SLM_OK = 0;
+const int SLM_ERROR = 1;
+const int SHUTTER_OK = 2;
+const int SHUTTER_ERROR = 3;
+const int TRANSTABLE_OK = 4;
+const int TRANSTABLE_ERROR = 5;
+const int CCD_OK = 6;
+const int CCD_ERROR = 7;
+
+const QString SLM_ERROR_MESSAGE = "警告:空间光调制器未连接,波前全息打印机无法正常工作,请检查空间光调制器与电脑的接口!";
+const QString SHUTTER_ERROR_MESSAGE = "警告:电子快门未连接,波前全息打印机无法正常工作,请检查电子快门的状态以及电子快门与电脑的接口!";
+const QString TRANSTABLE_ERROR_MESSAGE = "警告:电控平移台未连接,波前全息打印机无法正常工作,请检查电控平移台的状态以及电控平移台与电脑的接口!";
+const QString CCD_ERROR_MESSAGE = "警告:CCD相机未连接,波前全息打印机无法正常工作,请检查CCD工业相机的状态以及CCD工业相机与电脑的接口!";
+
+
+class CGH_State
+{
+};
+

+ 42 - 0
Include/CGH_TabBar.h

@@ -0,0 +1,42 @@
+#pragma once
+#pragma execution_character_set("utf-8")
+#include <QtWidgets\qtabbar.h>
+#include <QtWidgets\QStylePainter>
+#include <QtWidgets\QStyleOptionTab>
+
+class CGH_TabBar : public QTabBar {
+public:
+    QSize tabSizeHint(int index) const {
+        QSize s = QTabBar::tabSizeHint(index);
+        s.transpose();
+        return s;
+    }
+protected:
+    void paintEvent(QPaintEvent* /*event*/) {
+        QStylePainter painter(this);
+        QStyleOptionTab opt;
+
+        for (int i = 0; i < count(); i++)
+        {
+            initStyleOption(&opt, i);
+            painter.drawControl(QStyle::CE_TabBarTabShape, opt);
+            painter.save();
+
+            QSize s = opt.rect.size();
+            s.transpose();
+            QRect r(QPoint(), s);
+            r.moveCenter(opt.rect.center());
+            opt.rect = r;
+
+            QPoint c = tabRect(i).center();
+            painter.translate(c);
+            painter.rotate(90);
+            painter.translate(-c);
+            painter.drawControl(QStyle::CE_TabBarTabLabel, opt);
+            painter.restore();
+        }
+    }
+};
+
+
+

+ 14 - 0
Include/CGH_TabWidget.h

@@ -0,0 +1,14 @@
+#pragma once
+#pragma execution_character_set("utf-8")
+#include <qtabwidget.h>
+#include "CGH_TabBar.h"
+
+class CGH_TabWidget : public QTabWidget
+{
+public:
+    CGH_TabWidget(QWidget* parent = 0) :QTabWidget(parent) {
+        setTabBar(new CGH_TabBar);
+        setTabPosition(QTabWidget::West);
+        
+    }
+};

+ 338 - 0
Include/CH375DLL.H

@@ -0,0 +1,338 @@
+// 2003.09.08, 2003.12.28, 2004.10.15, 2004.12.05, 2004.12.10, 2005.01.20, 2005.02.23, 2005.07.15, 2005.08.17
+//****************************************
+//**  Copyright  (C)  W.ch  1999-2005   **
+//**  Web:  http://www.winchiphead.com  **
+//****************************************
+//**  DLL for USB interface chip CH375  **
+//**  C, VC5.0                          **
+//****************************************
+//
+// USB总线接口芯片CH375的应用层接口库  V2.2
+// 南京沁恒电子有限公司  作者: W.ch 2005.08
+// CH375-DLL  V2.2 , Support: Ctrl/Bulk/Int
+// 运行环境: Windows 98/ME, Windows 2000/XP
+// support USB chip: CH372/CH375
+//
+
+#ifndef		_CH375_DLL_H
+#define		_CH375_DLL_H
+#include "windows.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define		mOFFSET( s, m )			( (ULONG) & ( ( ( s * ) 0 ) -> m ) )	// 定义获取结构成员相对偏移地址的宏
+
+#ifndef		max
+#define		max( a, b )				( ( ( a ) > ( b ) ) ? ( a ) : ( b ) )	// 较大值
+#endif
+
+#ifndef		min
+#define		min( a, b )				( ( ( a ) < ( b ) ) ? ( a ) : ( b ) )	// 较小值
+#endif
+
+#ifdef		ExAllocatePool
+#undef		ExAllocatePool						// 删除带TAG的内存分配
+#endif
+
+#ifndef		NTSTATUS
+typedef		LONG	NTSTATUS;					// 返回状态
+#endif
+
+
+typedef	struct	_USB_SETUP_PKT {				// USB控制传输的建立阶段的数据请求包结构
+	UCHAR			mUspReqType;				// 00H 请求类型
+	UCHAR			mUspRequest;				// 01H 请求代码
+	union	{
+		struct	{
+			UCHAR	mUspValueLow;				// 02H 值参数低字节
+			UCHAR	mUspValueHigh;				// 03H 值参数高字节
+		};
+		USHORT		mUspValue;					// 02H-03H 值参数
+	};
+	union	{
+		struct	{
+			UCHAR	mUspIndexLow;				// 04H 索引参数低字节
+			UCHAR	mUspIndexHigh;				// 05H 索引参数高字节
+		};
+		USHORT		mUspIndex;					// 04H-05H 索引参数
+	};
+	USHORT			mLength;					// 06H-07H 数据阶段的数据长度
+} mUSB_SETUP_PKT, *mPUSB_SETUP_PKT;
+
+
+#define		mCH375_PACKET_LENGTH	64			// CH375支持的数据包的长度
+#define		mCH375_PKT_LEN_SHORT	8			// CH375支持的短数据包的长度
+
+
+typedef	struct	_WIN32_COMMAND {				// 定义WIN32命令接口结构
+	union	{
+		ULONG		mFunction;					// 输入时指定功能代码或者管道号
+		NTSTATUS	mStatus;					// 输出时返回操作状态
+	};
+	ULONG			mLength;					// 存取长度,返回后续数据的长度
+	union	{
+		mUSB_SETUP_PKT	mSetupPkt;				// USB控制传输的建立阶段的数据请求
+		UCHAR			mBuffer[ mCH375_PACKET_LENGTH ];	// 数据缓冲区,长度为0至255B
+	};
+} mWIN32_COMMAND, *mPWIN32_COMMAND;
+
+
+// WIN32应用层接口命令
+#define		IOCTL_CH375_COMMAND		( FILE_DEVICE_UNKNOWN << 16 | FILE_ANY_ACCESS << 14 | 0x0f37 << 2 | METHOD_BUFFERED )	// 专用接口
+
+#define		mWIN32_COMMAND_HEAD		mOFFSET( mWIN32_COMMAND, mBuffer )	// WIN32命令接口的头长度
+
+#define		mCH375_MAX_NUMBER		16			// 最多同时连接的CH375数
+
+#define		mMAX_BUFFER_LENGTH		0x1000		// 数据缓冲区最大长度4096
+
+#define		mMAX_COMMAND_LENGTH		( mWIN32_COMMAND_HEAD + mMAX_BUFFER_LENGTH )	// 最大数据长度加上命令结构头的长度
+
+#define		mDEFAULT_BUFFER_LEN		0x0400		// 数据缓冲区默认长度1024
+
+#define		mDEFAULT_COMMAND_LEN	( mWIN32_COMMAND_HEAD + mDEFAULT_BUFFER_LEN )	// 默认数据长度加上命令结构头的长度
+
+
+// CH375端点地址
+#define		mCH375_ENDP_INTER_UP	0x81		// CH375的中断数据上传端点的地址
+#define		mCH375_ENDP_AUX_DOWN	0x01		// CH375的辅助数据下传端点的地址
+#define		mCH375_ENDP_DATA_UP		0x82		// CH375的数据块上传端点的地址
+#define		mCH375_ENDP_DATA_DOWN	0x02		// CH375的数据块下传端点的地址
+
+
+// 设备层接口提供的管道操作命令
+#define		mPipeDeviceCtrl			0x00000004	// CH375的综合控制管道
+#define		mPipeInterUp			0x00000005	// CH375的中断数据上传管道
+#define		mPipeDataUp				0x00000006	// CH375的数据块上传管道
+#define		mPipeDataDown			0x00000007	// CH375的数据块下传管道
+#define		mPipeAuxDown			0x00000008	// CH375的辅助数据下传管道
+
+// 应用层接口的功能代码
+#define		mFuncNoOperation		0x00000000	// 无操作
+#define		mFuncGetVersion			0x00000001	// 获取驱动程序版本号
+#define		mFuncGetConfig			0x00000002	// 获取USB设备配置描述符
+#define		mFuncSetExclusive		0x0000000b	// 设置独占使用
+#define		mFuncResetDevice		0x0000000c	// 复位USB设备
+#define		mFuncResetPipe			0x0000000d	// 复位USB管道
+#define		mFuncAbortPipe			0x0000000e	// 取消USB管道的数据请求
+#define		mFuncSetTimeout			0x0000000f	// 设置USB通讯超时
+#define		mFuncBufferMode			0x00000010	// 设定缓冲上传模式及查询缓冲区中的数据长度
+#define		mFuncBufferModeDn		0x00000011	// 设定缓冲下传模式及查询缓冲区中的数据长度
+
+
+// USB设备标准请求代码
+#define		mUSB_CLR_FEATURE		0x01
+#define		mUSB_SET_FEATURE		0x03
+#define		mUSB_GET_STATUS			0x00
+#define		mUSB_SET_ADDRESS		0x05
+#define		mUSB_GET_DESCR			0x06
+#define		mUSB_SET_DESCR			0x07
+#define		mUSB_GET_CONFIG			0x08
+#define		mUSB_SET_CONFIG			0x09
+#define		mUSB_GET_INTERF			0x0a
+#define		mUSB_SET_INTERF			0x0b
+#define		mUSB_SYNC_FRAME			0x0c
+
+// CH375控制传输的厂商专用请求类型
+#define		mCH375_VENDOR_READ		0xc0		// 通过控制传输实现的CH375厂商专用读操作
+#define		mCH375_VENDOR_WRITE		0x40		// 通过控制传输实现的CH375厂商专用写操作
+
+// CH375控制传输的厂商专用请求代码
+#define		mCH375_SET_CONTROL		0x51		// 输出控制信号
+#define		mCH375_GET_STATUS		0x52		// 输入状态信号
+
+// 寄存器的位定义
+#define		mBitInputRxd			0x02		// 只读,RXD#引脚输入状态,1:高电平,0:低电平
+#define		mBitInputReq			0x04		// 只读,REQ#引脚输入状态,1:高电平,0:低电平
+
+
+// 直接输入的状态信号的位定义
+#define		mStateRXD				0x00000200	// RXD#引脚输入状态,1:高电平,0:低电平
+#define		mStateREQ				0x00000400	// REQ#引脚输入状态,1:高电平,0:低电平
+
+#define		MAX_DEVICE_PATH_SIZE	128			// 设备名称的最大字符数
+#define		MAX_DEVICE_ID_SIZE		64			// 设备ID的最大字符数
+
+
+typedef		VOID	( CALLBACK	* mPCH375_INT_ROUTINE ) (  // 中断服务回调程序
+	PUCHAR			iBuffer );  // 指向一个缓冲区,提供当前的中断特征数据
+
+
+HANDLE	WINAPI	CH375OpenDevice(  // 打开CH375设备,返回句柄,出错则无效
+	ULONG			iIndex );  // 指定CH375设备序号,0对应第一个设备,-1则自动搜索一个可以被打开的设备并返回序号
+
+
+VOID	WINAPI	CH375CloseDevice(  // 关闭CH375设备
+	ULONG			iIndex );  // 指定CH375设备序号
+
+
+ULONG	WINAPI	CH375GetVersion( );  // 获得DLL版本号,返回版本号
+
+
+ULONG	WINAPI	CH375DriverCommand(  // 直接传递命令给驱动程序,出错则返回0,否则返回数据长度
+	ULONG			iIndex,  // 指定CH375设备序号,V1.6以上DLL也可以是设备打开后的句柄
+	mPWIN32_COMMAND	ioCommand );  // 命令结构的指针
+// 该程序在调用后返回数据长度,并且仍然返回命令结构,如果是读操作,则数据返回在命令结构中,
+// 返回的数据长度在操作失败时为0,操作成功时为整个命令结构的长度,例如读一个字节,则返回mWIN32_COMMAND_HEAD+1,
+// 命令结构在调用前,分别提供:管道号或者命令功能代码,存取数据的长度(可选),数据(可选)
+// 命令结构在调用后,分别返回:操作状态代码,后续数据的长度(可选),
+//   操作状态代码是由WINDOWS定义的代码,可以参考NTSTATUS.H,
+//   后续数据的长度是指读操作返回的数据长度,数据存放在随后的缓冲区中,对于写操作一般为0
+
+
+ULONG	WINAPI	CH375GetDrvVersion( );  // 获得驱动程序版本号,返回版本号,出错则返回0
+
+
+BOOL	WINAPI	CH375ResetDevice(  // 复位USB设备
+	ULONG			iIndex );  // 指定CH375设备序号
+
+
+BOOL	WINAPI	CH375GetDeviceDescr(  // 读取设备描述符
+	ULONG			iIndex,  // 指定CH375设备序号
+	PVOID			oBuffer,  // 指向一个足够大的缓冲区,用于保存描述符
+	PULONG			ioLength );  // 指向长度单元,输入时为准备读取的长度,返回后为实际读取的长度
+
+
+BOOL	WINAPI	CH375GetConfigDescr(  // 读取配置描述符
+	ULONG			iIndex,  // 指定CH375设备序号
+	PVOID			oBuffer,  // 指向一个足够大的缓冲区,用于保存描述符
+	PULONG			ioLength );  // 指向长度单元,输入时为准备读取的长度,返回后为实际读取的长度
+
+
+BOOL	WINAPI	CH375SetIntRoutine(  // 设定中断服务程序
+	ULONG			iIndex,  // 指定CH375设备序号
+	mPCH375_INT_ROUTINE	iIntRoutine );  // 指定中断服务回调程序,为NULL则取消中断服务,否则在中断时调用该程序
+
+
+BOOL	WINAPI	CH375ReadInter(  // 读取中断数据
+	ULONG			iIndex,  // 指定CH375设备序号
+	PVOID			oBuffer,  // 指向一个足够大的缓冲区,用于保存读取的中断数据
+	PULONG			ioLength );  // 指向长度单元,输入时为准备读取的长度,返回后为实际读取的长度
+
+
+BOOL	WINAPI	CH375AbortInter(  // 放弃中断数据读操作
+	ULONG			iIndex );  // 指定CH375设备序号
+
+
+BOOL	WINAPI	CH375ReadData(  // 读取数据块
+	ULONG			iIndex,  // 指定CH375设备序号
+	PVOID			oBuffer,  // 指向一个足够大的缓冲区,用于保存读取的数据
+	PULONG			ioLength );  // 指向长度单元,输入时为准备读取的长度,返回后为实际读取的长度
+
+
+BOOL	WINAPI	CH375AbortRead(  // 放弃数据块读操作
+	ULONG			iIndex );  // 指定CH375设备序号
+
+
+BOOL	WINAPI	CH375WriteData(  // 写出数据块
+	ULONG			iIndex,  // 指定CH375设备序号
+	PVOID			iBuffer,  // 指向一个缓冲区,放置准备写出的数据
+	PULONG			ioLength );  // 指向长度单元,输入时为准备写出的长度,返回后为实际写出的长度
+
+
+BOOL	WINAPI	CH375AbortWrite(  // 放弃数据块写操作
+	ULONG			iIndex );  // 指定CH375设备序号
+
+
+BOOL	WINAPI	CH375WriteRead(  // 先写出标准的数据块(命令),再读取标准的数据块(应答)
+	ULONG			iIndex,  // 指定CH375设备序号
+	PVOID			iBuffer,  // 指向一个缓冲区,放置准备写出的数据,长度不大于mCH375_PACKET_LENGTH
+	PVOID			oBuffer,  // 指向一个足够大的缓冲区,长度不小于mCH375_PACKET_LENGTH,用于保存读取的数据
+	PULONG			ioLength );  // 指向长度单元,不大于mCH375_PACKET_LENGTH,输入时为准备写出的长度,返回后为实际读取的长度
+
+
+BOOL	WINAPI	CH375GetStatus(  // 通过CH375直接输入数据和状态
+	ULONG			iIndex,  // 指定CH375设备序号
+	PULONG			iStatus );  // 指向一个双字单元,用于保存状态数据
+// 位7-位0对应CH375的D7-D0引脚,位9对应CH375的RXD#引脚,位10对应CH375的REQ#引脚
+
+
+BOOL	WINAPI	CH375SetTimeout(  // 设置USB数据读写的超时
+	ULONG			iIndex,  // 指定CH375设备序号
+	ULONG			iWriteTimeout,  // 指定USB写出数据块的超时时间,以毫秒mS为单位,0xFFFFFFFF指定不超时(默认值)
+	ULONG			iReadTimeout );  // 指定USB读取数据块的超时时间,以毫秒mS为单位,0xFFFFFFFF指定不超时(默认值)
+
+
+BOOL	WINAPI	CH375WriteAuxData(  // 写出辅助数据
+	ULONG			iIndex,  // 指定CH375设备序号
+	PVOID			iBuffer,  // 指向一个缓冲区,放置准备写出的数据
+	PULONG			ioLength );  // 指向长度单元,输入时为准备写出的长度,返回后为实际写出的长度
+
+
+BOOL	WINAPI	CH375SetExclusive(  // 设置独占使用当前CH375设备
+	ULONG			iIndex,  // 指定CH375设备序号
+	ULONG			iExclusive );  // 为0则设备可以共享使用,非0则独占使用
+
+
+ULONG	WINAPI	CH375GetUsbID(  // 获取USB设备ID,返回数据中,低16位为厂商ID,高16位为产品ID,错误时返回全0(无效ID)
+	ULONG			iIndex );  // 指定CH375设备序号
+
+
+PVOID	WINAPI	CH375GetDeviceName(  // 返回指向CH375设备名称的缓冲区,出错则返回NULL
+	ULONG			iIndex );  // 指定CH375设备序号,0对应第一个设备
+
+
+BOOL	WINAPI	CH375SetBufUpload(  // 设定内部缓冲上传模式
+	ULONG			iIndex,  // 指定CH375设备序号,0对应第一个设备
+	ULONG			iEnableOrClear );  // 为0则禁止内部缓冲上传模式,使用直接上传,非0则启用内部缓冲上传模式并清除缓冲区中的已有数据
+// 如果启用内部缓冲上传模式,那么CH375驱动程序创建线程自动接收USB上传数据到内部缓冲区,同时清除缓冲区中的已有数据,当应用程序调用CH375ReadData后将立即返回缓冲区中的已有数据
+
+
+LONG	WINAPI	CH375QueryBufUpload(  // 查询内部上传缓冲区中的已有数据包个数,成功返回数据包个数,出错返回-1
+	ULONG			iIndex );  // 指定CH375设备序号,0对应第一个设备
+
+
+BOOL	WINAPI	CH375SetBufDownload(  // 设定内部缓冲下传模式
+	ULONG			iIndex,  // 指定CH375设备序号,0对应第一个设备
+	ULONG			iEnableOrClear );  // 为0则禁止内部缓冲下传模式,使用直接下传,非0则启用内部缓冲下传模式并清除缓冲区中的已有数据
+// 如果启用内部缓冲下传模式,那么当应用程序调用CH375WriteData后将仅仅是将USB下传数据放到内部缓冲区并立即返回,而由CH375驱动程序创建的线程自动发送直到完毕
+
+
+LONG	WINAPI	CH375QueryBufDownload(  // 查询内部下传缓冲区中的剩余数据包个数(尚未发送),成功返回数据包个数,出错返回-1
+	ULONG			iIndex );  // 指定CH375设备序号,0对应第一个设备
+
+
+BOOL	WINAPI	CH375ResetInter(  // 复位中断数据读操作
+	ULONG			iIndex );  // 指定CH375设备序号
+
+
+BOOL	WINAPI	CH375ResetAux(  // 复位辅助数据写操作
+	ULONG			iIndex );  // 指定CH375设备序号
+
+
+BOOL	WINAPI	CH375ResetRead(  // 复位数据块读操作
+	ULONG			iIndex );  // 指定CH375设备序号
+
+
+BOOL	WINAPI	CH375ResetWrite(  // 复位数据块写操作
+	ULONG			iIndex );  // 指定CH375设备序号
+
+
+typedef		VOID	( CALLBACK	* mPCH375_NOTIFY_ROUTINE ) (  // 设备事件通知回调程序
+	ULONG			iEventStatus );  // 设备事件和当前状态(在下行定义): 0=设备拔出事件, 3=设备插入事件
+
+#define		CH375_DEVICE_ARRIVAL		3		// 设备插入事件,已经插入
+#define		CH375_DEVICE_REMOVE_PEND	1		// 设备将要拔出
+#define		CH375_DEVICE_REMOVE			0		// 设备拔出事件,已经拔出
+
+
+BOOL	WINAPI	CH375SetDeviceNotify(  // 设定设备事件通知程序
+	ULONG					iIndex,  // 指定CH375设备序号,0对应第一个设备
+	PCHAR					iDeviceID,  // 可选参数,指向字符串,指定被监控的设备的ID,字符串以\0终止
+	mPCH375_NOTIFY_ROUTINE	iNotifyRoutine );  // 指定设备事件回调程序,为NULL则取消事件通知,否则在检测到事件时调用该程序
+
+
+BOOL	WINAPI	CH375SetTimeoutEx(  // 设置USB数据读写的超时
+	ULONG			iIndex,  // 指定CH375设备序号
+	ULONG			iWriteTimeout,  // 指定USB写出数据块的超时时间,以毫秒mS为单位,0xFFFFFFFF指定不超时(默认值)
+	ULONG			iReadTimeout,  // 指定USB读取数据块的超时时间,以毫秒mS为单位,0xFFFFFFFF指定不超时(默认值)
+	ULONG			iAuxTimeout,  // 指定USB辅助下传数据的超时时间,以毫秒mS为单位,0xFFFFFFFF指定不超时(默认值)
+	ULONG			iInterTimeout );  // 指定USB中断上传数据的超时时间,以毫秒mS为单位,0xFFFFFFFF指定不超时(默认值)
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif		// _CH375_DLL_H

Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 2397 - 0
Include/PI_GCS2_DLL.h


+ 51 - 0
Include/PrintThread.h

@@ -0,0 +1,51 @@
+#pragma once
+#pragma execution_character_set("utf-8")
+#include <qthread.h>
+#include "CGH_Printer.h"
+
+class CGH_Printer;
+class PrintThread :
+    public QThread
+{
+    Q_OBJECT
+public:
+    explicit PrintThread(QObject* parent = 0);
+    ~PrintThread();
+
+    string numberToString(int n, int l = 3);
+
+protected:
+    // QThread的虚函数
+    // 线程处理函数
+    // 不能直接调用,通过start()间接调用
+    void run();
+
+signals:
+    void TransCGH(const QString& tempCGH);
+    void TransPrintProgress(int tempLL, int tempCC);
+    void PrintOK();
+    void PrintCancel();
+
+public slots:
+    void Print();
+
+private:
+    CGH_Printer* m_Printer;
+
+    vector<int> Devices;
+    string sAxis;
+
+    double PrintLSpacing, PrintCSpacing;
+    int PrintLine, PrintColumn;
+    string PrintPrefix;
+    int PrintExpose, PrintQuiet;
+    string PrintResource;
+    double HoloLine, HoloColumn;
+    double initPrintX, initPrintY;
+    double OffsetX,OffsetY;
+
+    bool PRINTSTOP;
+
+    CGH_Shutter* MyShutter;
+};
+

+ 175 - 0
Include/SerialPort.h

@@ -0,0 +1,175 @@
+// @file    SerialPort.h    
+// @brief   串口通信类头文件  
+
+#ifndef SERIALPORT_H_  
+#define SERIALPORT_H_  
+
+#include <Windows.h>  
+
+/** 串口通信类
+*
+*  本类实现了对串口的基本操作
+*  例如监听发到指定串口的数据、发送指定数据到串口
+*/
+
+class CSerialPort
+{
+public:
+	CSerialPort(void);
+	~CSerialPort(void);
+
+public:
+	/** 初始化串口函数
+	*
+	*  @param:  UINT portNo 串口编号,默认值为1,即COM1,注意,尽量不要大于9
+	*  @param:  UINT baud   波特率,默认为9600
+	*  @param:  char parity 是否进行奇偶校验,'Y'表示需要奇偶校验,'N'表示不需要奇偶校验
+	*  @param:  UINT databits 数据位的个数,默认值为8个数据位
+	*  @param:  UINT stopsbits 停止位使用格式,默认值为1
+	*  @param:  DWORD dwCommEvents 默认为EV_RXCHAR,即只要收发任意一个字符,则产生一个事件
+	*  @return: bool  初始化是否成功
+	*  @note:   在使用其他本类提供的函数前,请先调用本函数进行串口的初始化
+	*        /n本函数提供了一些常用的串口参数设置,若需要自行设置详细的DCB参数,可使用重载函数
+	*           /n本串口类析构时会自动关闭串口,无需额外执行关闭串口
+	*  @see:
+	*/
+	bool InitPort(UINT  portNo = 1, UINT  baud = CBR_9600, char  parity = 'N', UINT  databits = 8, UINT  stopsbits = 1, DWORD dwCommEvents = EV_RXCHAR);
+
+
+
+	/** 串口初始化函数
+	*
+	*  本函数提供直接根据DCB参数设置串口参数
+	*  @param:  UINT portNo
+	*  @param:  const LPDCB & plDCB
+	*  @return: bool  初始化是否成功
+	*  @note:   本函数提供用户自定义地串口初始化参数
+	*  @see:
+	*/
+	bool InitPort(UINT  portNo, const LPDCB& plDCB);
+
+
+	/** 开启监听线程
+	*
+	*  本监听线程完成对串口数据的监听,并将接收到的数据打印到屏幕输出
+	*  @return: bool  操作是否成功
+	*  @note:   当线程已经处于开启状态时,返回flase
+	*  @see:
+	*/
+	bool OpenListenThread();
+
+
+
+	/** 关闭监听线程
+	*
+	*
+	*  @return: bool  操作是否成功
+	*  @note:   调用本函数后,监听串口的线程将会被关闭
+	*  @see:
+	*/
+	bool CloseListenTread();
+
+
+
+	/** 向串口写数据
+	*
+	*  将缓冲区中的数据写入到串口
+	*  @param:  unsigned char * pData 指向需要写入串口的数据缓冲区
+	*  @param:  unsigned int length 需要写入的数据长度
+	*  @return: bool  操作是否成功
+	*  @note:   length不要大于pData所指向缓冲区的大小
+	*  @see:
+	*/
+	bool WriteData(unsigned char* pData, unsigned int length);
+
+
+
+	/** 获取串口缓冲区中的字节数
+	*
+	*
+	*  @return: UINT  操作是否成功
+	*  @note:   当串口缓冲区中无数据时,返回0
+	*  @see:
+	*/
+	UINT GetBytesInCOM();
+
+
+
+	/** 读取串口接收缓冲区中一个字节的数据
+	*  @param:  char & cRecved 存放读取数据的字符变量
+	*  @return: bool  读取是否成功
+	*  @note:
+	*  @see:
+	*/
+	bool ReadChar(char& cRecved);
+
+
+
+	bool OpenUSB1();
+	bool CloseUSB1();
+	bool OpenUSB2();
+	bool CloseUSB2();
+
+private:
+
+
+	/** 打开串口
+	*
+	*
+	*  @param:  UINT portNo 串口设备号
+	*  @return: bool  打开是否成功
+	*  @note:
+	*  @see:
+	*/
+	bool openPort(UINT  portNo);
+
+
+
+	/** 关闭串口
+	*
+	*
+	*  @return: void  操作是否成功
+	*  @note:
+	*  @see:
+	*/
+	void ClosePort();
+
+
+
+	/** 串口监听线程
+	*
+	*  监听来自串口的数据和信息
+	*  @param:  void * pParam 线程参数
+	*  @return: UINT WINAPI 线程返回值
+	*  @note:
+	*  @see:
+	*/
+	static UINT WINAPI ListenThread(void* pParam);
+
+
+
+
+private:
+
+	/** 串口句柄 */
+	HANDLE  m_hComm;
+
+
+
+	/** 线程退出标志变量 */
+	static bool s_bExit;
+
+
+
+	/** 线程句柄 */
+	volatile HANDLE    m_hListenThread;
+
+
+
+	/** 同步互斥,临界区保护 */
+	CRITICAL_SECTION   m_csCommunicationSync;       //!< 互斥操作串口  
+
+};
+
+#endif //SERIALPORT_H_```
+

Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 1873 - 0
Include/ui_CGH_Printer.h


+ 374 - 0
Include/ui_CGH_ProjectView.h

@@ -0,0 +1,374 @@
+/********************************************************************************
+** Form generated from reading UI file 'CGH_ProjectViewjoNhWc.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_PROJECTVIEWJONHWC_H
+#define CGH_PROJECTVIEWJONHWC_H
+
+#include <QtCore/QVariant>
+#include <QtWidgets/QApplication>
+#include <QtWidgets/QDialog>
+#include <QtWidgets/QGridLayout>
+#include <QtWidgets/QGroupBox>
+#include <QtWidgets/QHBoxLayout>
+#include <QtWidgets/QLabel>
+#include <QtWidgets/QLineEdit>
+#include <QtWidgets/QPushButton>
+#include <QtWidgets/QSpacerItem>
+#include <QtWidgets/QVBoxLayout>
+
+QT_BEGIN_NAMESPACE
+
+class Ui_CGH_ProjectView
+{
+public:
+    QVBoxLayout *verticalLayout;
+    QGroupBox *groupBox_6;
+    QHBoxLayout *horizontalLayout;
+    QLabel *label_14;
+    QLineEdit *ViewName;
+    QGroupBox *groupBox;
+    QGridLayout *gridLayout_3;
+    QGroupBox *groupBox_2;
+    QGridLayout *gridLayout;
+    QLabel *label;
+    QLineEdit *ViewLSpacing;
+    QLabel *label_2;
+    QLabel *label_3;
+    QLineEdit *ViewCSpacing;
+    QLabel *label_4;
+    QGroupBox *groupBox_3;
+    QGridLayout *gridLayout_2;
+    QLabel *label_5;
+    QLineEdit *ViewLine;
+    QLabel *label_6;
+    QLineEdit *ViewColumn;
+    QGroupBox *groupBox_4;
+    QGridLayout *gridLayout_4;
+    QLabel *label_7;
+    QLineEdit *ViewPrefix;
+    QLabel *label_8;
+    QLineEdit *ViewExpose;
+    QLabel *label_10;
+    QLabel *label_9;
+    QLineEdit *ViewQuiet;
+    QLabel *label_11;
+    QGroupBox *groupBox_5;
+    QGridLayout *gridLayout_5;
+    QLabel *label_12;
+    QLabel *label_13;
+    QLineEdit *ViewResource;
+    QPushButton *ButtonViewResource;
+    QLineEdit *ViewSave;
+    QGroupBox *groupBox_7;
+    QHBoxLayout *horizontalLayout_2;
+    QSpacerItem *horizontalSpacer;
+    QPushButton *ButtonViewOk;
+    QPushButton *ButtonViewCancel;
+
+    void setupUi(QDialog *CGH_ProjectView)
+    {
+        if (CGH_ProjectView->objectName().isEmpty())
+            CGH_ProjectView->setObjectName(QString::fromUtf8("CGH_ProjectView"));
+        CGH_ProjectView->resize(400, 600);
+        CGH_ProjectView->setMinimumSize(QSize(400, 600));
+        CGH_ProjectView->setMaximumSize(QSize(400, 600));
+        verticalLayout = new QVBoxLayout(CGH_ProjectView);
+        verticalLayout->setSpacing(6);
+        verticalLayout->setContentsMargins(11, 11, 11, 11);
+        verticalLayout->setObjectName(QString::fromUtf8("verticalLayout"));
+        groupBox_6 = new QGroupBox(CGH_ProjectView);
+        groupBox_6->setObjectName(QString::fromUtf8("groupBox_6"));
+        horizontalLayout = new QHBoxLayout(groupBox_6);
+        horizontalLayout->setSpacing(6);
+        horizontalLayout->setContentsMargins(11, 11, 11, 11);
+        horizontalLayout->setObjectName(QString::fromUtf8("horizontalLayout"));
+        label_14 = new QLabel(groupBox_6);
+        label_14->setObjectName(QString::fromUtf8("label_14"));
+        label_14->setAlignment(Qt::AlignCenter);
+
+        horizontalLayout->addWidget(label_14);
+
+        ViewName = new QLineEdit(groupBox_6);
+        ViewName->setObjectName(QString::fromUtf8("ViewName"));
+        ViewName->setAlignment(Qt::AlignCenter);
+
+        horizontalLayout->addWidget(ViewName);
+
+
+        verticalLayout->addWidget(groupBox_6);
+
+        groupBox = new QGroupBox(CGH_ProjectView);
+        groupBox->setObjectName(QString::fromUtf8("groupBox"));
+        QFont font;
+        font.setPointSize(12);
+        groupBox->setFont(font);
+        gridLayout_3 = new QGridLayout(groupBox);
+        gridLayout_3->setSpacing(6);
+        gridLayout_3->setContentsMargins(11, 11, 11, 11);
+        gridLayout_3->setObjectName(QString::fromUtf8("gridLayout_3"));
+        groupBox_2 = new QGroupBox(groupBox);
+        groupBox_2->setObjectName(QString::fromUtf8("groupBox_2"));
+        QFont font1;
+        font1.setPointSize(9);
+        groupBox_2->setFont(font1);
+        gridLayout = new QGridLayout(groupBox_2);
+        gridLayout->setSpacing(6);
+        gridLayout->setContentsMargins(11, 11, 11, 11);
+        gridLayout->setObjectName(QString::fromUtf8("gridLayout"));
+        label = new QLabel(groupBox_2);
+        label->setObjectName(QString::fromUtf8("label"));
+        label->setAlignment(Qt::AlignCenter);
+
+        gridLayout->addWidget(label, 0, 0, 1, 1);
+
+        ViewLSpacing = new QLineEdit(groupBox_2);
+        ViewLSpacing->setObjectName(QString::fromUtf8("ViewLSpacing"));
+        ViewLSpacing->setAlignment(Qt::AlignCenter);
+
+        gridLayout->addWidget(ViewLSpacing, 0, 1, 1, 1);
+
+        label_2 = new QLabel(groupBox_2);
+        label_2->setObjectName(QString::fromUtf8("label_2"));
+        label_2->setAlignment(Qt::AlignCenter);
+
+        gridLayout->addWidget(label_2, 0, 2, 1, 1);
+
+        label_3 = new QLabel(groupBox_2);
+        label_3->setObjectName(QString::fromUtf8("label_3"));
+        label_3->setAlignment(Qt::AlignCenter);
+
+        gridLayout->addWidget(label_3, 1, 0, 1, 1);
+
+        ViewCSpacing = new QLineEdit(groupBox_2);
+        ViewCSpacing->setObjectName(QString::fromUtf8("ViewCSpacing"));
+        ViewCSpacing->setAlignment(Qt::AlignCenter);
+
+        gridLayout->addWidget(ViewCSpacing, 1, 1, 1, 1);
+
+        label_4 = new QLabel(groupBox_2);
+        label_4->setObjectName(QString::fromUtf8("label_4"));
+        label_4->setAlignment(Qt::AlignCenter);
+
+        gridLayout->addWidget(label_4, 1, 2, 1, 1);
+
+
+        gridLayout_3->addWidget(groupBox_2, 0, 0, 1, 1);
+
+        groupBox_3 = new QGroupBox(groupBox);
+        groupBox_3->setObjectName(QString::fromUtf8("groupBox_3"));
+        groupBox_3->setFont(font1);
+        gridLayout_2 = new QGridLayout(groupBox_3);
+        gridLayout_2->setSpacing(6);
+        gridLayout_2->setContentsMargins(11, 11, 11, 11);
+        gridLayout_2->setObjectName(QString::fromUtf8("gridLayout_2"));
+        label_5 = new QLabel(groupBox_3);
+        label_5->setObjectName(QString::fromUtf8("label_5"));
+        label_5->setAlignment(Qt::AlignCenter);
+
+        gridLayout_2->addWidget(label_5, 0, 0, 1, 1);
+
+        ViewLine = new QLineEdit(groupBox_3);
+        ViewLine->setObjectName(QString::fromUtf8("ViewLine"));
+        ViewLine->setAlignment(Qt::AlignCenter);
+
+        gridLayout_2->addWidget(ViewLine, 0, 1, 1, 1);
+
+        label_6 = new QLabel(groupBox_3);
+        label_6->setObjectName(QString::fromUtf8("label_6"));
+        label_6->setAlignment(Qt::AlignCenter);
+
+        gridLayout_2->addWidget(label_6, 1, 0, 1, 1);
+
+        ViewColumn = new QLineEdit(groupBox_3);
+        ViewColumn->setObjectName(QString::fromUtf8("ViewColumn"));
+        ViewColumn->setAlignment(Qt::AlignCenter);
+
+        gridLayout_2->addWidget(ViewColumn, 1, 1, 1, 1);
+
+
+        gridLayout_3->addWidget(groupBox_3, 0, 1, 1, 1);
+
+
+        verticalLayout->addWidget(groupBox);
+
+        groupBox_4 = new QGroupBox(CGH_ProjectView);
+        groupBox_4->setObjectName(QString::fromUtf8("groupBox_4"));
+        groupBox_4->setFont(font);
+        gridLayout_4 = new QGridLayout(groupBox_4);
+        gridLayout_4->setSpacing(6);
+        gridLayout_4->setContentsMargins(11, 11, 11, 11);
+        gridLayout_4->setObjectName(QString::fromUtf8("gridLayout_4"));
+        label_7 = new QLabel(groupBox_4);
+        label_7->setObjectName(QString::fromUtf8("label_7"));
+        label_7->setFont(font1);
+        label_7->setAlignment(Qt::AlignCenter);
+
+        gridLayout_4->addWidget(label_7, 0, 0, 1, 1);
+
+        ViewPrefix = new QLineEdit(groupBox_4);
+        ViewPrefix->setObjectName(QString::fromUtf8("ViewPrefix"));
+        ViewPrefix->setFont(font1);
+        ViewPrefix->setAlignment(Qt::AlignCenter);
+
+        gridLayout_4->addWidget(ViewPrefix, 0, 1, 1, 1);
+
+        label_8 = new QLabel(groupBox_4);
+        label_8->setObjectName(QString::fromUtf8("label_8"));
+        label_8->setFont(font1);
+        label_8->setAlignment(Qt::AlignCenter);
+
+        gridLayout_4->addWidget(label_8, 1, 0, 1, 1);
+
+        ViewExpose = new QLineEdit(groupBox_4);
+        ViewExpose->setObjectName(QString::fromUtf8("ViewExpose"));
+        ViewExpose->setFont(font1);
+        ViewExpose->setAlignment(Qt::AlignCenter);
+
+        gridLayout_4->addWidget(ViewExpose, 1, 1, 1, 1);
+
+        label_10 = new QLabel(groupBox_4);
+        label_10->setObjectName(QString::fromUtf8("label_10"));
+        label_10->setFont(font1);
+        label_10->setAlignment(Qt::AlignCenter);
+
+        gridLayout_4->addWidget(label_10, 1, 2, 1, 1);
+
+        label_9 = new QLabel(groupBox_4);
+        label_9->setObjectName(QString::fromUtf8("label_9"));
+        label_9->setFont(font1);
+        label_9->setAlignment(Qt::AlignCenter);
+
+        gridLayout_4->addWidget(label_9, 2, 0, 1, 1);
+
+        ViewQuiet = new QLineEdit(groupBox_4);
+        ViewQuiet->setObjectName(QString::fromUtf8("ViewQuiet"));
+        ViewQuiet->setFont(font1);
+        ViewQuiet->setAlignment(Qt::AlignCenter);
+
+        gridLayout_4->addWidget(ViewQuiet, 2, 1, 1, 1);
+
+        label_11 = new QLabel(groupBox_4);
+        label_11->setObjectName(QString::fromUtf8("label_11"));
+        label_11->setFont(font1);
+        label_11->setAlignment(Qt::AlignCenter);
+
+        gridLayout_4->addWidget(label_11, 2, 2, 1, 1);
+
+
+        verticalLayout->addWidget(groupBox_4);
+
+        groupBox_5 = new QGroupBox(CGH_ProjectView);
+        groupBox_5->setObjectName(QString::fromUtf8("groupBox_5"));
+        groupBox_5->setFont(font);
+        gridLayout_5 = new QGridLayout(groupBox_5);
+        gridLayout_5->setSpacing(6);
+        gridLayout_5->setContentsMargins(11, 11, 11, 11);
+        gridLayout_5->setObjectName(QString::fromUtf8("gridLayout_5"));
+        label_12 = new QLabel(groupBox_5);
+        label_12->setObjectName(QString::fromUtf8("label_12"));
+        label_12->setFont(font1);
+        label_12->setAlignment(Qt::AlignCenter);
+
+        gridLayout_5->addWidget(label_12, 0, 0, 1, 1);
+
+        label_13 = new QLabel(groupBox_5);
+        label_13->setObjectName(QString::fromUtf8("label_13"));
+        label_13->setFont(font1);
+        label_13->setAlignment(Qt::AlignCenter);
+
+        gridLayout_5->addWidget(label_13, 1, 0, 1, 1);
+
+        ViewResource = new QLineEdit(groupBox_5);
+        ViewResource->setObjectName(QString::fromUtf8("ViewResource"));
+        ViewResource->setFont(font1);
+
+        gridLayout_5->addWidget(ViewResource, 1, 1, 1, 1);
+
+        ButtonViewResource = new QPushButton(groupBox_5);
+        ButtonViewResource->setObjectName(QString::fromUtf8("ButtonViewResource"));
+        ButtonViewResource->setFont(font1);
+
+        gridLayout_5->addWidget(ButtonViewResource, 1, 2, 1, 1);
+
+        ViewSave = new QLineEdit(groupBox_5);
+        ViewSave->setObjectName(QString::fromUtf8("ViewSave"));
+        ViewSave->setFont(font1);
+        ViewSave->setReadOnly(true);
+
+        gridLayout_5->addWidget(ViewSave, 0, 1, 1, 2);
+
+
+        verticalLayout->addWidget(groupBox_5);
+
+        groupBox_7 = new QGroupBox(CGH_ProjectView);
+        groupBox_7->setObjectName(QString::fromUtf8("groupBox_7"));
+        horizontalLayout_2 = new QHBoxLayout(groupBox_7);
+        horizontalLayout_2->setSpacing(6);
+        horizontalLayout_2->setContentsMargins(11, 11, 11, 11);
+        horizontalLayout_2->setObjectName(QString::fromUtf8("horizontalLayout_2"));
+        horizontalSpacer = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum);
+
+        horizontalLayout_2->addItem(horizontalSpacer);
+
+        ButtonViewOk = new QPushButton(groupBox_7);
+        ButtonViewOk->setObjectName(QString::fromUtf8("ButtonViewOk"));
+
+        horizontalLayout_2->addWidget(ButtonViewOk);
+
+        ButtonViewCancel = new QPushButton(groupBox_7);
+        ButtonViewCancel->setObjectName(QString::fromUtf8("ButtonViewCancel"));
+
+        horizontalLayout_2->addWidget(ButtonViewCancel);
+
+
+        verticalLayout->addWidget(groupBox_7);
+
+
+        retranslateUi(CGH_ProjectView);
+
+        QMetaObject::connectSlotsByName(CGH_ProjectView);
+    } // setupUi
+
+    void retranslateUi(QDialog *CGH_ProjectView)
+    {
+        CGH_ProjectView->setWindowTitle(QCoreApplication::translate("CGH_ProjectView", "\345\210\233\345\273\272\345\267\245\347\250\213", nullptr));
+        groupBox_6->setTitle(QString());
+        label_14->setText(QCoreApplication::translate("CGH_ProjectView", "\346\226\207\344\273\266\345\220\215", nullptr));
+        groupBox->setTitle(QCoreApplication::translate("CGH_ProjectView", "\346\216\247\345\210\266\350\256\276\347\275\256", nullptr));
+        groupBox_2->setTitle(QCoreApplication::translate("CGH_ProjectView", "\346\255\245\350\277\233\344\275\215\347\247\273", nullptr));
+        label->setText(QCoreApplication::translate("CGH_ProjectView", "\350\241\214\350\267\235", nullptr));
+        label_2->setText(QCoreApplication::translate("CGH_ProjectView", "mm", nullptr));
+        label_3->setText(QCoreApplication::translate("CGH_ProjectView", "\345\210\227\350\267\235", nullptr));
+        label_4->setText(QCoreApplication::translate("CGH_ProjectView", "mm", nullptr));
+        groupBox_3->setTitle(QCoreApplication::translate("CGH_ProjectView", "\345\233\276\347\211\207\350\256\276\347\275\256", nullptr));
+        label_5->setText(QCoreApplication::translate("CGH_ProjectView", "\350\241\214\346\225\260", nullptr));
+        label_6->setText(QCoreApplication::translate("CGH_ProjectView", "\345\210\227\346\225\260", nullptr));
+        groupBox_4->setTitle(QCoreApplication::translate("CGH_ProjectView", "\346\233\235\345\205\211\350\256\276\347\275\256", nullptr));
+        label_7->setText(QCoreApplication::translate("CGH_ProjectView", "\345\211\215\347\274\200", nullptr));
+        label_8->setText(QCoreApplication::translate("CGH_ProjectView", "\346\233\235\345\205\211\346\227\266\351\227\264", nullptr));
+        label_10->setText(QCoreApplication::translate("CGH_ProjectView", "ms", nullptr));
+        label_9->setText(QCoreApplication::translate("CGH_ProjectView", "\351\235\231\345\217\260\346\227\266\351\227\264", nullptr));
+        label_11->setText(QCoreApplication::translate("CGH_ProjectView", "ms", nullptr));
+        groupBox_5->setTitle(QCoreApplication::translate("CGH_ProjectView", "\350\267\257\345\276\204\350\256\276\347\275\256", nullptr));
+        label_12->setText(QCoreApplication::translate("CGH_ProjectView", "\345\255\230\345\202\250\350\267\257\345\276\204", nullptr));
+        label_13->setText(QCoreApplication::translate("CGH_ProjectView", "\350\265\204\346\272\220\350\267\257\345\276\204", nullptr));
+        ButtonViewResource->setText(QCoreApplication::translate("CGH_ProjectView", "\351\200\211\346\213\251", nullptr));
+        groupBox_7->setTitle(QString());
+        ButtonViewOk->setText(QCoreApplication::translate("CGH_ProjectView", "\347\241\256\345\256\232", nullptr));
+        ButtonViewCancel->setText(QCoreApplication::translate("CGH_ProjectView", "\345\217\226\346\266\210", nullptr));
+    } // retranslateUi
+
+};
+
+namespace Ui {
+    class CGH_ProjectView: public Ui_CGH_ProjectView {};
+} // namespace Ui
+
+QT_END_NAMESPACE
+
+#endif // CGH_PROJECTVIEWJONHWC_H

BIN
Lib/CH375DLL.LIB


BIN
Lib/PI_GCS2_DLL.lib


BIN
Release/CH375DLL.DLL


BIN
Release/PI_GCS2_DLL.dll