Sfoglia il codice sorgente

判断是否有Project文件,没有则创建

DESKTOP-55AB90D\user 2 anni fa
parent
commit
b486ca1fa0
4 ha cambiato i file con 33 aggiunte e 25 eliminazioni
  1. 2 1
      CGH_Printer.cpp
  2. 22 15
      CGH_Printer.ui
  3. 4 4
      CGH_Printer.vcxproj.user
  4. 5 5
      Include/ui_CGH_Printer.h

+ 2 - 1
CGH_Printer.cpp

@@ -200,7 +200,7 @@ void CGH_Printer::initConfigure()
     ReadConfigure();
 
     // 以下的语句出错,我暂时屏蔽了
-  //  loadHistory(); 
+    loadHistory(); 
 }
 
 void CGH_Printer::initSlots()
@@ -285,6 +285,7 @@ void CGH_Printer::ReadConfigure()
 
 void CGH_Printer::loadHistory()
 {
+    CreateDirectory(L".\\Project", NULL);//判断是否有Project文件,没有则创建
     _finddata_t data;
     auto handle = _findfirst((absProjectPath + "/*.*").c_str(), &data);// 读取第一文件或文件夹
     do

+ 22 - 15
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>6</number>
+       <number>0</number>
       </property>
       <property name="elideMode">
        <enum>Qt::ElideNone</enum>
@@ -614,7 +614,7 @@ QGroupBox{background-color:rgb(235, 235,235);border:1px solid rgb(179, 179, 179)
            <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
           </property>
           <layout class="QGridLayout" name="gridLayout_12">
-           <item row="2" column="0">
+           <item row="3" column="0">
             <widget class="QLabel" name="labelCGHDisplay">
              <property name="enabled">
               <bool>true</bool>
@@ -631,6 +631,12 @@ QGroupBox{background-color:rgb(235, 235,235);border:1px solid rgb(179, 179, 179)
                <height>0</height>
               </size>
              </property>
+             <property name="maximumSize">
+              <size>
+               <width>16777215</width>
+               <height>230</height>
+              </size>
+             </property>
              <property name="cursor">
               <cursorShape>UpArrowCursor</cursorShape>
              </property>
@@ -649,6 +655,19 @@ QGroupBox{background-color:rgb(235, 235,235);border:1px solid rgb(179, 179, 179)
             </widget>
            </item>
            <item row="1" column="0">
+            <spacer name="horizontalSpacer_2">
+             <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_18">
              <property name="spacing">
               <number>7</number>
@@ -685,19 +704,6 @@ QGroupBox{background-color:rgb(235, 235,235);border:1px solid rgb(179, 179, 179)
              </item>
             </layout>
            </item>
-           <item row="0" column="0">
-            <spacer name="horizontalSpacer_2">
-             <property name="orientation">
-              <enum>Qt::Horizontal</enum>
-             </property>
-             <property name="sizeHint" stdset="0">
-              <size>
-               <width>40</width>
-               <height>20</height>
-              </size>
-             </property>
-            </spacer>
-           </item>
           </layout>
          </widget>
         </item>
@@ -2692,6 +2698,7 @@ 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>

+ 4 - 4
CGH_Printer.vcxproj.user

@@ -2,15 +2,15 @@
 <Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
   <PropertyGroup />
   <PropertyGroup Label="QtSettings" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
-    <QtLastBackgroundBuild>2022-12-09T02:17:23.4108015Z</QtLastBackgroundBuild>
+    <QtLastBackgroundBuild>2022-12-13T04:58:40.6431131Z</QtLastBackgroundBuild>
   </PropertyGroup>
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="QtSettings">
-    <QtLastBackgroundBuild>2022-12-09T02:17:23.5278265Z</QtLastBackgroundBuild>
+    <QtLastBackgroundBuild>2022-12-13T04:58:40.7451358Z</QtLastBackgroundBuild>
   </PropertyGroup>
   <PropertyGroup Label="QtSettings" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
-    <QtLastBackgroundBuild>2022-12-09T02:17:23.6208475Z</QtLastBackgroundBuild>
+    <QtLastBackgroundBuild>2022-12-13T04:58:40.8331560Z</QtLastBackgroundBuild>
   </PropertyGroup>
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="QtSettings">
-    <QtLastBackgroundBuild>2022-12-09T02:17:23.7211259Z</QtLastBackgroundBuild>
+    <QtLastBackgroundBuild>2022-12-13T04:58:40.8901688Z</QtLastBackgroundBuild>
   </PropertyGroup>
 </Project>

+ 5 - 5
Include/ui_CGH_Printer.h

@@ -1,13 +1,13 @@
 /********************************************************************************
-** Form generated from reading UI file 'CGH_PrinteruiSosV.ui'
+** Form generated from reading UI file 'CGH_PrinterZLXzhV.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_PRINTERUISOSV_H
-#define CGH_PRINTERUISOSV_H
+#ifndef CGH_PRINTERZLXZHV_H
+#define CGH_PRINTERZLXZHV_H
 
 #include <CGH_TabWidget.h>
 #include <QtCore/QVariant>
@@ -1591,7 +1591,7 @@ public:
 
         retranslateUi(CGH_PrinterClass);
 
-        tabWidget->setCurrentIndex(1);
+        tabWidget->setCurrentIndex(0);
 
 
         QMetaObject::connectSlotsByName(CGH_PrinterClass);
@@ -1731,4 +1731,4 @@ namespace Ui {
 
 QT_END_NAMESPACE
 
-#endif // CGH_PRINTERUISOSV_H
+#endif // CGH_PRINTERZLXZHV_H