diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user index ce0b2dc..373bbda 100644 --- a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user @@ -1,10 +1,10 @@ - + EnvironmentId - {c08df58c-84a7-4965-bca6-e98789474efa} + {2746248a-b112-4e0f-9ae0-9e61f2a42309} ProjectExplorer.Project.ActiveTarget @@ -71,7 +71,7 @@ 0 0 - C:/Users/admin/Desktop/SVN/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Debug + D:/dev/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Debug true @@ -119,7 +119,7 @@ 2 - C:/Users/admin/Desktop/SVN/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Release + D:/dev/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Release true @@ -167,7 +167,7 @@ 0 - C:/Users/admin/Desktop/SVN/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Profile + D:/dev/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Profile true @@ -287,8 +287,8 @@ 2 - Qt4ProjectManager.Qt4RunConfiguration:C:/Users/admin/Desktop/SVN/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro - C:/Users/admin/Desktop/SVN/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro + Qt4ProjectManager.Qt4RunConfiguration:D:/dev/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro + D:/dev/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro false @@ -299,7 +299,7 @@ false true - C:/Users/admin/Desktop/SVN/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Debug + D:/dev/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Debug 1 @@ -314,7 +314,7 @@ 0 0 - C:/Users/admin/Desktop/SVN/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug + D:/dev/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug true @@ -362,7 +362,7 @@ 2 - C:/Users/admin/Desktop/SVN/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Release + D:/dev/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Release true @@ -410,7 +410,7 @@ 0 - C:/Users/admin/Desktop/SVN/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Profile + D:/dev/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Profile true @@ -530,8 +530,8 @@ 2 - Qt4ProjectManager.Qt4RunConfiguration:C:/Users/admin/Desktop/SVN/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro - C:/Users/admin/Desktop/SVN/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro + Qt4ProjectManager.Qt4RunConfiguration:D:/dev/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro + D:/dev/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro false diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user index ce0b2dc..373bbda 100644 --- a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user @@ -1,10 +1,10 @@ - + EnvironmentId - {c08df58c-84a7-4965-bca6-e98789474efa} + {2746248a-b112-4e0f-9ae0-9e61f2a42309} ProjectExplorer.Project.ActiveTarget @@ -71,7 +71,7 @@ 0 0 - C:/Users/admin/Desktop/SVN/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Debug + D:/dev/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Debug true @@ -119,7 +119,7 @@ 2 - C:/Users/admin/Desktop/SVN/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Release + D:/dev/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Release true @@ -167,7 +167,7 @@ 0 - C:/Users/admin/Desktop/SVN/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Profile + D:/dev/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Profile true @@ -287,8 +287,8 @@ 2 - Qt4ProjectManager.Qt4RunConfiguration:C:/Users/admin/Desktop/SVN/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro - C:/Users/admin/Desktop/SVN/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro + Qt4ProjectManager.Qt4RunConfiguration:D:/dev/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro + D:/dev/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro false @@ -299,7 +299,7 @@ false true - C:/Users/admin/Desktop/SVN/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Debug + D:/dev/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Debug 1 @@ -314,7 +314,7 @@ 0 0 - C:/Users/admin/Desktop/SVN/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug + D:/dev/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug true @@ -362,7 +362,7 @@ 2 - C:/Users/admin/Desktop/SVN/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Release + D:/dev/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Release true @@ -410,7 +410,7 @@ 0 - C:/Users/admin/Desktop/SVN/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Profile + D:/dev/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Profile true @@ -530,8 +530,8 @@ 2 - Qt4ProjectManager.Qt4RunConfiguration:C:/Users/admin/Desktop/SVN/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro - C:/Users/admin/Desktop/SVN/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro + Qt4ProjectManager.Qt4RunConfiguration:D:/dev/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro + D:/dev/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro false diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user.c08df58 b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user.c08df58 new file mode 100644 index 0000000..803b854 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user.c08df58 @@ -0,0 +1,562 @@ + + + + + + EnvironmentId + {c08df58c-84a7-4965-bca6-e98789474efa} + + + ProjectExplorer.Project.ActiveTarget + 0 + + + ProjectExplorer.Project.EditorSettings + + true + false + true + + Cpp + + CppGlobal + + + + QmlJS + + QmlJSGlobal + + + 2 + UTF-8 + false + 4 + false + 80 + true + true + 1 + true + false + 0 + true + true + 0 + 8 + true + 1 + true + true + true + false + + + + ProjectExplorer.Project.PluginSettings + + + -fno-delayed-template-parsing + + true + + + + ProjectExplorer.Project.Target.0 + + Desktop Qt 5.14.2 MinGW 64-bit + Desktop Qt 5.14.2 MinGW 64-bit + qt.qt5.5142.win64_mingw73_kit + 0 + 0 + 0 + + C:/Users/admin/Desktop/SVN/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Debug + + + true + QtProjectManager.QMakeBuildStep + true + + false + false + false + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Debug + Qt4ProjectManager.Qt4BuildConfiguration + 2 + + + C:/Users/admin/Desktop/SVN/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Release + + + true + QtProjectManager.QMakeBuildStep + false + + false + false + true + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Release + Qt4ProjectManager.Qt4BuildConfiguration + 0 + + + C:/Users/admin/Desktop/SVN/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Profile + + + true + QtProjectManager.QMakeBuildStep + true + + false + true + true + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Profile + Qt4ProjectManager.Qt4BuildConfiguration + 0 + + 3 + + + 0 + Deploy + Deploy + ProjectExplorer.BuildSteps.Deploy + + 1 + ProjectExplorer.DefaultDeployConfiguration + + 1 + + + dwarf + + cpu-cycles + + + 250 + + -e + cpu-cycles + --call-graph + dwarf,4096 + -F + 250 + + -F + true + 4096 + false + false + 1000 + + true + + false + false + false + false + true + 0.01 + 10 + true + kcachegrind + 1 + 25 + + 1 + true + false + true + valgrind + + 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + + 2 + + Qt4ProjectManager.Qt4RunConfiguration:C:/Users/admin/Desktop/SVN/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro + C:/Users/admin/Desktop/SVN/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro + + false + + false + true + true + false + false + true + + C:/Users/admin/Desktop/SVN/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Debug + + 1 + + + + ProjectExplorer.Project.Target.1 + + Desktop Qt 5.14.2 MinGW 32-bit + Desktop Qt 5.14.2 MinGW 32-bit + qt.qt5.5142.win32_mingw73_kit + 0 + 0 + 0 + + C:/Users/admin/Desktop/SVN/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug + + + true + QtProjectManager.QMakeBuildStep + true + + false + false + false + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Debug + Qt4ProjectManager.Qt4BuildConfiguration + 2 + + + C:/Users/admin/Desktop/SVN/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Release + + + true + QtProjectManager.QMakeBuildStep + false + + false + false + true + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Release + Qt4ProjectManager.Qt4BuildConfiguration + 0 + + + C:/Users/admin/Desktop/SVN/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Profile + + + true + QtProjectManager.QMakeBuildStep + true + + false + true + true + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Profile + Qt4ProjectManager.Qt4BuildConfiguration + 0 + + 3 + + + 0 + Deploy + Deploy + ProjectExplorer.BuildSteps.Deploy + + 1 + ProjectExplorer.DefaultDeployConfiguration + + 1 + + + dwarf + + cpu-cycles + + + 250 + + -e + cpu-cycles + --call-graph + dwarf,4096 + -F + 250 + + -F + true + 4096 + false + false + 1000 + + true + + false + false + false + false + true + 0.01 + 10 + true + kcachegrind + 1 + 25 + + 1 + true + false + true + valgrind + + 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + + 2 + + Qt4ProjectManager.Qt4RunConfiguration:C:/Users/admin/Desktop/SVN/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro + C:/Users/admin/Desktop/SVN/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro + + false + + false + true + true + false + false + true + + + + 1 + + + + ProjectExplorer.Project.TargetCount + 2 + + + ProjectExplorer.Project.Updater.FileVersion + 22 + + + Version + 22 + + diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user index ce0b2dc..373bbda 100644 --- a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user @@ -1,10 +1,10 @@ - + EnvironmentId - {c08df58c-84a7-4965-bca6-e98789474efa} + {2746248a-b112-4e0f-9ae0-9e61f2a42309} ProjectExplorer.Project.ActiveTarget @@ -71,7 +71,7 @@ 0 0 - C:/Users/admin/Desktop/SVN/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Debug + D:/dev/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Debug true @@ -119,7 +119,7 @@ 2 - C:/Users/admin/Desktop/SVN/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Release + D:/dev/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Release true @@ -167,7 +167,7 @@ 0 - C:/Users/admin/Desktop/SVN/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Profile + D:/dev/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Profile true @@ -287,8 +287,8 @@ 2 - Qt4ProjectManager.Qt4RunConfiguration:C:/Users/admin/Desktop/SVN/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro - C:/Users/admin/Desktop/SVN/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro + Qt4ProjectManager.Qt4RunConfiguration:D:/dev/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro + D:/dev/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro false @@ -299,7 +299,7 @@ false true - C:/Users/admin/Desktop/SVN/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Debug + D:/dev/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Debug 1 @@ -314,7 +314,7 @@ 0 0 - C:/Users/admin/Desktop/SVN/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug + D:/dev/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug true @@ -362,7 +362,7 @@ 2 - C:/Users/admin/Desktop/SVN/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Release + D:/dev/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Release true @@ -410,7 +410,7 @@ 0 - C:/Users/admin/Desktop/SVN/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Profile + D:/dev/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Profile true @@ -530,8 +530,8 @@ 2 - Qt4ProjectManager.Qt4RunConfiguration:C:/Users/admin/Desktop/SVN/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro - C:/Users/admin/Desktop/SVN/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro + Qt4ProjectManager.Qt4RunConfiguration:D:/dev/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro + D:/dev/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro false diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user.c08df58 b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user.c08df58 new file mode 100644 index 0000000..803b854 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user.c08df58 @@ -0,0 +1,562 @@ + + + + + + EnvironmentId + {c08df58c-84a7-4965-bca6-e98789474efa} + + + ProjectExplorer.Project.ActiveTarget + 0 + + + ProjectExplorer.Project.EditorSettings + + true + false + true + + Cpp + + CppGlobal + + + + QmlJS + + QmlJSGlobal + + + 2 + UTF-8 + false + 4 + false + 80 + true + true + 1 + true + false + 0 + true + true + 0 + 8 + true + 1 + true + true + true + false + + + + ProjectExplorer.Project.PluginSettings + + + -fno-delayed-template-parsing + + true + + + + ProjectExplorer.Project.Target.0 + + Desktop Qt 5.14.2 MinGW 64-bit + Desktop Qt 5.14.2 MinGW 64-bit + qt.qt5.5142.win64_mingw73_kit + 0 + 0 + 0 + + C:/Users/admin/Desktop/SVN/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Debug + + + true + QtProjectManager.QMakeBuildStep + true + + false + false + false + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Debug + Qt4ProjectManager.Qt4BuildConfiguration + 2 + + + C:/Users/admin/Desktop/SVN/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Release + + + true + QtProjectManager.QMakeBuildStep + false + + false + false + true + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Release + Qt4ProjectManager.Qt4BuildConfiguration + 0 + + + C:/Users/admin/Desktop/SVN/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Profile + + + true + QtProjectManager.QMakeBuildStep + true + + false + true + true + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Profile + Qt4ProjectManager.Qt4BuildConfiguration + 0 + + 3 + + + 0 + Deploy + Deploy + ProjectExplorer.BuildSteps.Deploy + + 1 + ProjectExplorer.DefaultDeployConfiguration + + 1 + + + dwarf + + cpu-cycles + + + 250 + + -e + cpu-cycles + --call-graph + dwarf,4096 + -F + 250 + + -F + true + 4096 + false + false + 1000 + + true + + false + false + false + false + true + 0.01 + 10 + true + kcachegrind + 1 + 25 + + 1 + true + false + true + valgrind + + 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + + 2 + + Qt4ProjectManager.Qt4RunConfiguration:C:/Users/admin/Desktop/SVN/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro + C:/Users/admin/Desktop/SVN/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro + + false + + false + true + true + false + false + true + + C:/Users/admin/Desktop/SVN/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Debug + + 1 + + + + ProjectExplorer.Project.Target.1 + + Desktop Qt 5.14.2 MinGW 32-bit + Desktop Qt 5.14.2 MinGW 32-bit + qt.qt5.5142.win32_mingw73_kit + 0 + 0 + 0 + + C:/Users/admin/Desktop/SVN/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug + + + true + QtProjectManager.QMakeBuildStep + true + + false + false + false + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Debug + Qt4ProjectManager.Qt4BuildConfiguration + 2 + + + C:/Users/admin/Desktop/SVN/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Release + + + true + QtProjectManager.QMakeBuildStep + false + + false + false + true + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Release + Qt4ProjectManager.Qt4BuildConfiguration + 0 + + + C:/Users/admin/Desktop/SVN/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Profile + + + true + QtProjectManager.QMakeBuildStep + true + + false + true + true + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Profile + Qt4ProjectManager.Qt4BuildConfiguration + 0 + + 3 + + + 0 + Deploy + Deploy + ProjectExplorer.BuildSteps.Deploy + + 1 + ProjectExplorer.DefaultDeployConfiguration + + 1 + + + dwarf + + cpu-cycles + + + 250 + + -e + cpu-cycles + --call-graph + dwarf,4096 + -F + 250 + + -F + true + 4096 + false + false + 1000 + + true + + false + false + false + false + true + 0.01 + 10 + true + kcachegrind + 1 + 25 + + 1 + true + false + true + valgrind + + 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + + 2 + + Qt4ProjectManager.Qt4RunConfiguration:C:/Users/admin/Desktop/SVN/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro + C:/Users/admin/Desktop/SVN/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro + + false + + false + true + true + false + false + true + + + + 1 + + + + ProjectExplorer.Project.TargetCount + 2 + + + ProjectExplorer.Project.Updater.FileVersion + 22 + + + Version + 22 + + diff --git a/softwareDirectory/AutoVerScheme/basecommonapi.cpp b/softwareDirectory/AutoVerScheme/basecommonapi.cpp index 63fcb02..06ab274 100644 --- a/softwareDirectory/AutoVerScheme/basecommonapi.cpp +++ b/softwareDirectory/AutoVerScheme/basecommonapi.cpp @@ -1107,9 +1107,10 @@ bool BaseCommonApi::InsertInstructionLib(InstructionLib instructionLib) { QSqlQuery query; - query.prepare("INSERT INTO zd_instruction_library (id,device_id,device_name,instruct_config,instruct_read,type,verification_id,check_id,create_time,update_time) " + query.prepare("INSERT INTO zd_instruction_library (id,device_id,device_name,instruct_config,instruct_read,type,belong_vername,belong_checkname,create_time,update_time) " " VALUES (:id,:device_id,:device_name,:instruct_config,:instruct_read,:type,:belong_vername,:belong_checkname,:create_time,:update_time)"); - + QString formattedCreateDateTime = instructionLib.create_time.toString("yyyy-MM-dd HH:mm:ss"); + QString formattedUpdateDateTime = instructionLib.update_time.toString("yyyy-MM-dd HH:mm:ss"); query.bindValue(":id", instructionLib.id); query.bindValue(":device_id", instructionLib.device_id); query.bindValue(":device_name", instructionLib.device_name); @@ -1118,8 +1119,8 @@ query.bindValue(":type", instructionLib.type); query.bindValue(":belong_vername", instructionLib.belong_vername); query.bindValue(":belong_checkname", instructionLib.belong_checkname); - query.bindValue(":create_time", instructionLib.create_time); - query.bindValue(":update_time", instructionLib.update_time); + query.bindValue(":create_time", formattedCreateDateTime); + query.bindValue(":update_time", formattedUpdateDateTime); bool isSuccess = query.exec(); if (!isSuccess) { qDebug() << "InsertTaskBasic query failed: " << query.lastError().text(); diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user index ce0b2dc..373bbda 100644 --- a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user @@ -1,10 +1,10 @@ - + EnvironmentId - {c08df58c-84a7-4965-bca6-e98789474efa} + {2746248a-b112-4e0f-9ae0-9e61f2a42309} ProjectExplorer.Project.ActiveTarget @@ -71,7 +71,7 @@ 0 0 - C:/Users/admin/Desktop/SVN/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Debug + D:/dev/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Debug true @@ -119,7 +119,7 @@ 2 - C:/Users/admin/Desktop/SVN/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Release + D:/dev/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Release true @@ -167,7 +167,7 @@ 0 - C:/Users/admin/Desktop/SVN/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Profile + D:/dev/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Profile true @@ -287,8 +287,8 @@ 2 - Qt4ProjectManager.Qt4RunConfiguration:C:/Users/admin/Desktop/SVN/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro - C:/Users/admin/Desktop/SVN/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro + Qt4ProjectManager.Qt4RunConfiguration:D:/dev/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro + D:/dev/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro false @@ -299,7 +299,7 @@ false true - C:/Users/admin/Desktop/SVN/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Debug + D:/dev/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Debug 1 @@ -314,7 +314,7 @@ 0 0 - C:/Users/admin/Desktop/SVN/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug + D:/dev/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug true @@ -362,7 +362,7 @@ 2 - C:/Users/admin/Desktop/SVN/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Release + D:/dev/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Release true @@ -410,7 +410,7 @@ 0 - C:/Users/admin/Desktop/SVN/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Profile + D:/dev/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Profile true @@ -530,8 +530,8 @@ 2 - Qt4ProjectManager.Qt4RunConfiguration:C:/Users/admin/Desktop/SVN/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro - C:/Users/admin/Desktop/SVN/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro + Qt4ProjectManager.Qt4RunConfiguration:D:/dev/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro + D:/dev/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro false diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user.c08df58 b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user.c08df58 new file mode 100644 index 0000000..803b854 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user.c08df58 @@ -0,0 +1,562 @@ + + + + + + EnvironmentId + {c08df58c-84a7-4965-bca6-e98789474efa} + + + ProjectExplorer.Project.ActiveTarget + 0 + + + ProjectExplorer.Project.EditorSettings + + true + false + true + + Cpp + + CppGlobal + + + + QmlJS + + QmlJSGlobal + + + 2 + UTF-8 + false + 4 + false + 80 + true + true + 1 + true + false + 0 + true + true + 0 + 8 + true + 1 + true + true + true + false + + + + ProjectExplorer.Project.PluginSettings + + + -fno-delayed-template-parsing + + true + + + + ProjectExplorer.Project.Target.0 + + Desktop Qt 5.14.2 MinGW 64-bit + Desktop Qt 5.14.2 MinGW 64-bit + qt.qt5.5142.win64_mingw73_kit + 0 + 0 + 0 + + C:/Users/admin/Desktop/SVN/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Debug + + + true + QtProjectManager.QMakeBuildStep + true + + false + false + false + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Debug + Qt4ProjectManager.Qt4BuildConfiguration + 2 + + + C:/Users/admin/Desktop/SVN/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Release + + + true + QtProjectManager.QMakeBuildStep + false + + false + false + true + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Release + Qt4ProjectManager.Qt4BuildConfiguration + 0 + + + C:/Users/admin/Desktop/SVN/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Profile + + + true + QtProjectManager.QMakeBuildStep + true + + false + true + true + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Profile + Qt4ProjectManager.Qt4BuildConfiguration + 0 + + 3 + + + 0 + Deploy + Deploy + ProjectExplorer.BuildSteps.Deploy + + 1 + ProjectExplorer.DefaultDeployConfiguration + + 1 + + + dwarf + + cpu-cycles + + + 250 + + -e + cpu-cycles + --call-graph + dwarf,4096 + -F + 250 + + -F + true + 4096 + false + false + 1000 + + true + + false + false + false + false + true + 0.01 + 10 + true + kcachegrind + 1 + 25 + + 1 + true + false + true + valgrind + + 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + + 2 + + Qt4ProjectManager.Qt4RunConfiguration:C:/Users/admin/Desktop/SVN/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro + C:/Users/admin/Desktop/SVN/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro + + false + + false + true + true + false + false + true + + C:/Users/admin/Desktop/SVN/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Debug + + 1 + + + + ProjectExplorer.Project.Target.1 + + Desktop Qt 5.14.2 MinGW 32-bit + Desktop Qt 5.14.2 MinGW 32-bit + qt.qt5.5142.win32_mingw73_kit + 0 + 0 + 0 + + C:/Users/admin/Desktop/SVN/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug + + + true + QtProjectManager.QMakeBuildStep + true + + false + false + false + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Debug + Qt4ProjectManager.Qt4BuildConfiguration + 2 + + + C:/Users/admin/Desktop/SVN/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Release + + + true + QtProjectManager.QMakeBuildStep + false + + false + false + true + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Release + Qt4ProjectManager.Qt4BuildConfiguration + 0 + + + C:/Users/admin/Desktop/SVN/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Profile + + + true + QtProjectManager.QMakeBuildStep + true + + false + true + true + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Profile + Qt4ProjectManager.Qt4BuildConfiguration + 0 + + 3 + + + 0 + Deploy + Deploy + ProjectExplorer.BuildSteps.Deploy + + 1 + ProjectExplorer.DefaultDeployConfiguration + + 1 + + + dwarf + + cpu-cycles + + + 250 + + -e + cpu-cycles + --call-graph + dwarf,4096 + -F + 250 + + -F + true + 4096 + false + false + 1000 + + true + + false + false + false + false + true + 0.01 + 10 + true + kcachegrind + 1 + 25 + + 1 + true + false + true + valgrind + + 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + + 2 + + Qt4ProjectManager.Qt4RunConfiguration:C:/Users/admin/Desktop/SVN/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro + C:/Users/admin/Desktop/SVN/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro + + false + + false + true + true + false + false + true + + + + 1 + + + + ProjectExplorer.Project.TargetCount + 2 + + + ProjectExplorer.Project.Updater.FileVersion + 22 + + + Version + 22 + + diff --git a/softwareDirectory/AutoVerScheme/basecommonapi.cpp b/softwareDirectory/AutoVerScheme/basecommonapi.cpp index 63fcb02..06ab274 100644 --- a/softwareDirectory/AutoVerScheme/basecommonapi.cpp +++ b/softwareDirectory/AutoVerScheme/basecommonapi.cpp @@ -1107,9 +1107,10 @@ bool BaseCommonApi::InsertInstructionLib(InstructionLib instructionLib) { QSqlQuery query; - query.prepare("INSERT INTO zd_instruction_library (id,device_id,device_name,instruct_config,instruct_read,type,verification_id,check_id,create_time,update_time) " + query.prepare("INSERT INTO zd_instruction_library (id,device_id,device_name,instruct_config,instruct_read,type,belong_vername,belong_checkname,create_time,update_time) " " VALUES (:id,:device_id,:device_name,:instruct_config,:instruct_read,:type,:belong_vername,:belong_checkname,:create_time,:update_time)"); - + QString formattedCreateDateTime = instructionLib.create_time.toString("yyyy-MM-dd HH:mm:ss"); + QString formattedUpdateDateTime = instructionLib.update_time.toString("yyyy-MM-dd HH:mm:ss"); query.bindValue(":id", instructionLib.id); query.bindValue(":device_id", instructionLib.device_id); query.bindValue(":device_name", instructionLib.device_name); @@ -1118,8 +1119,8 @@ query.bindValue(":type", instructionLib.type); query.bindValue(":belong_vername", instructionLib.belong_vername); query.bindValue(":belong_checkname", instructionLib.belong_checkname); - query.bindValue(":create_time", instructionLib.create_time); - query.bindValue(":update_time", instructionLib.update_time); + query.bindValue(":create_time", formattedCreateDateTime); + query.bindValue(":update_time", formattedUpdateDateTime); bool isSuccess = query.exec(); if (!isSuccess) { qDebug() << "InsertTaskBasic query failed: " << query.lastError().text(); diff --git a/softwareDirectory/AutoVerScheme/checkmethodmanage.cpp b/softwareDirectory/AutoVerScheme/checkmethodmanage.cpp index b83b561..fca8ee7 100644 --- a/softwareDirectory/AutoVerScheme/checkmethodmanage.cpp +++ b/softwareDirectory/AutoVerScheme/checkmethodmanage.cpp @@ -92,7 +92,7 @@ //ui->tableWidget->setItem(row, 0, new QTableWidgetItem(dept.id)); ui->tableWidget_2->setItem(row, 1, new QTableWidgetItem(program.program_name)); //设置数据 ui->tableWidget_2->setItem(row, 2, new QTableWidgetItem(program.create_name)); //设置数据 - ui->tableWidget_2->setItem(row, 3, new QTableWidgetItem(program.create_time.toString())); //设置数据 + ui->tableWidget_2->setItem(row, 3, new QTableWidgetItem(program.create_time.toString("yyyy-MM-dd"))); //设置数据 ui->tableWidget_2->setItem(row, 4, new QTableWidgetItem(program.remark)); //设置数据 QPushButton *btn_1 = new QPushButton(); diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user index ce0b2dc..373bbda 100644 --- a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user @@ -1,10 +1,10 @@ - + EnvironmentId - {c08df58c-84a7-4965-bca6-e98789474efa} + {2746248a-b112-4e0f-9ae0-9e61f2a42309} ProjectExplorer.Project.ActiveTarget @@ -71,7 +71,7 @@ 0 0 - C:/Users/admin/Desktop/SVN/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Debug + D:/dev/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Debug true @@ -119,7 +119,7 @@ 2 - C:/Users/admin/Desktop/SVN/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Release + D:/dev/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Release true @@ -167,7 +167,7 @@ 0 - C:/Users/admin/Desktop/SVN/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Profile + D:/dev/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Profile true @@ -287,8 +287,8 @@ 2 - Qt4ProjectManager.Qt4RunConfiguration:C:/Users/admin/Desktop/SVN/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro - C:/Users/admin/Desktop/SVN/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro + Qt4ProjectManager.Qt4RunConfiguration:D:/dev/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro + D:/dev/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro false @@ -299,7 +299,7 @@ false true - C:/Users/admin/Desktop/SVN/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Debug + D:/dev/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Debug 1 @@ -314,7 +314,7 @@ 0 0 - C:/Users/admin/Desktop/SVN/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug + D:/dev/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug true @@ -362,7 +362,7 @@ 2 - C:/Users/admin/Desktop/SVN/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Release + D:/dev/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Release true @@ -410,7 +410,7 @@ 0 - C:/Users/admin/Desktop/SVN/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Profile + D:/dev/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Profile true @@ -530,8 +530,8 @@ 2 - Qt4ProjectManager.Qt4RunConfiguration:C:/Users/admin/Desktop/SVN/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro - C:/Users/admin/Desktop/SVN/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro + Qt4ProjectManager.Qt4RunConfiguration:D:/dev/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro + D:/dev/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro false diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user.c08df58 b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user.c08df58 new file mode 100644 index 0000000..803b854 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user.c08df58 @@ -0,0 +1,562 @@ + + + + + + EnvironmentId + {c08df58c-84a7-4965-bca6-e98789474efa} + + + ProjectExplorer.Project.ActiveTarget + 0 + + + ProjectExplorer.Project.EditorSettings + + true + false + true + + Cpp + + CppGlobal + + + + QmlJS + + QmlJSGlobal + + + 2 + UTF-8 + false + 4 + false + 80 + true + true + 1 + true + false + 0 + true + true + 0 + 8 + true + 1 + true + true + true + false + + + + ProjectExplorer.Project.PluginSettings + + + -fno-delayed-template-parsing + + true + + + + ProjectExplorer.Project.Target.0 + + Desktop Qt 5.14.2 MinGW 64-bit + Desktop Qt 5.14.2 MinGW 64-bit + qt.qt5.5142.win64_mingw73_kit + 0 + 0 + 0 + + C:/Users/admin/Desktop/SVN/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Debug + + + true + QtProjectManager.QMakeBuildStep + true + + false + false + false + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Debug + Qt4ProjectManager.Qt4BuildConfiguration + 2 + + + C:/Users/admin/Desktop/SVN/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Release + + + true + QtProjectManager.QMakeBuildStep + false + + false + false + true + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Release + Qt4ProjectManager.Qt4BuildConfiguration + 0 + + + C:/Users/admin/Desktop/SVN/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Profile + + + true + QtProjectManager.QMakeBuildStep + true + + false + true + true + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Profile + Qt4ProjectManager.Qt4BuildConfiguration + 0 + + 3 + + + 0 + Deploy + Deploy + ProjectExplorer.BuildSteps.Deploy + + 1 + ProjectExplorer.DefaultDeployConfiguration + + 1 + + + dwarf + + cpu-cycles + + + 250 + + -e + cpu-cycles + --call-graph + dwarf,4096 + -F + 250 + + -F + true + 4096 + false + false + 1000 + + true + + false + false + false + false + true + 0.01 + 10 + true + kcachegrind + 1 + 25 + + 1 + true + false + true + valgrind + + 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + + 2 + + Qt4ProjectManager.Qt4RunConfiguration:C:/Users/admin/Desktop/SVN/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro + C:/Users/admin/Desktop/SVN/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro + + false + + false + true + true + false + false + true + + C:/Users/admin/Desktop/SVN/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Debug + + 1 + + + + ProjectExplorer.Project.Target.1 + + Desktop Qt 5.14.2 MinGW 32-bit + Desktop Qt 5.14.2 MinGW 32-bit + qt.qt5.5142.win32_mingw73_kit + 0 + 0 + 0 + + C:/Users/admin/Desktop/SVN/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug + + + true + QtProjectManager.QMakeBuildStep + true + + false + false + false + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Debug + Qt4ProjectManager.Qt4BuildConfiguration + 2 + + + C:/Users/admin/Desktop/SVN/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Release + + + true + QtProjectManager.QMakeBuildStep + false + + false + false + true + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Release + Qt4ProjectManager.Qt4BuildConfiguration + 0 + + + C:/Users/admin/Desktop/SVN/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Profile + + + true + QtProjectManager.QMakeBuildStep + true + + false + true + true + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Profile + Qt4ProjectManager.Qt4BuildConfiguration + 0 + + 3 + + + 0 + Deploy + Deploy + ProjectExplorer.BuildSteps.Deploy + + 1 + ProjectExplorer.DefaultDeployConfiguration + + 1 + + + dwarf + + cpu-cycles + + + 250 + + -e + cpu-cycles + --call-graph + dwarf,4096 + -F + 250 + + -F + true + 4096 + false + false + 1000 + + true + + false + false + false + false + true + 0.01 + 10 + true + kcachegrind + 1 + 25 + + 1 + true + false + true + valgrind + + 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + + 2 + + Qt4ProjectManager.Qt4RunConfiguration:C:/Users/admin/Desktop/SVN/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro + C:/Users/admin/Desktop/SVN/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro + + false + + false + true + true + false + false + true + + + + 1 + + + + ProjectExplorer.Project.TargetCount + 2 + + + ProjectExplorer.Project.Updater.FileVersion + 22 + + + Version + 22 + + diff --git a/softwareDirectory/AutoVerScheme/basecommonapi.cpp b/softwareDirectory/AutoVerScheme/basecommonapi.cpp index 63fcb02..06ab274 100644 --- a/softwareDirectory/AutoVerScheme/basecommonapi.cpp +++ b/softwareDirectory/AutoVerScheme/basecommonapi.cpp @@ -1107,9 +1107,10 @@ bool BaseCommonApi::InsertInstructionLib(InstructionLib instructionLib) { QSqlQuery query; - query.prepare("INSERT INTO zd_instruction_library (id,device_id,device_name,instruct_config,instruct_read,type,verification_id,check_id,create_time,update_time) " + query.prepare("INSERT INTO zd_instruction_library (id,device_id,device_name,instruct_config,instruct_read,type,belong_vername,belong_checkname,create_time,update_time) " " VALUES (:id,:device_id,:device_name,:instruct_config,:instruct_read,:type,:belong_vername,:belong_checkname,:create_time,:update_time)"); - + QString formattedCreateDateTime = instructionLib.create_time.toString("yyyy-MM-dd HH:mm:ss"); + QString formattedUpdateDateTime = instructionLib.update_time.toString("yyyy-MM-dd HH:mm:ss"); query.bindValue(":id", instructionLib.id); query.bindValue(":device_id", instructionLib.device_id); query.bindValue(":device_name", instructionLib.device_name); @@ -1118,8 +1119,8 @@ query.bindValue(":type", instructionLib.type); query.bindValue(":belong_vername", instructionLib.belong_vername); query.bindValue(":belong_checkname", instructionLib.belong_checkname); - query.bindValue(":create_time", instructionLib.create_time); - query.bindValue(":update_time", instructionLib.update_time); + query.bindValue(":create_time", formattedCreateDateTime); + query.bindValue(":update_time", formattedUpdateDateTime); bool isSuccess = query.exec(); if (!isSuccess) { qDebug() << "InsertTaskBasic query failed: " << query.lastError().text(); diff --git a/softwareDirectory/AutoVerScheme/checkmethodmanage.cpp b/softwareDirectory/AutoVerScheme/checkmethodmanage.cpp index b83b561..fca8ee7 100644 --- a/softwareDirectory/AutoVerScheme/checkmethodmanage.cpp +++ b/softwareDirectory/AutoVerScheme/checkmethodmanage.cpp @@ -92,7 +92,7 @@ //ui->tableWidget->setItem(row, 0, new QTableWidgetItem(dept.id)); ui->tableWidget_2->setItem(row, 1, new QTableWidgetItem(program.program_name)); //设置数据 ui->tableWidget_2->setItem(row, 2, new QTableWidgetItem(program.create_name)); //设置数据 - ui->tableWidget_2->setItem(row, 3, new QTableWidgetItem(program.create_time.toString())); //设置数据 + ui->tableWidget_2->setItem(row, 3, new QTableWidgetItem(program.create_time.toString("yyyy-MM-dd"))); //设置数据 ui->tableWidget_2->setItem(row, 4, new QTableWidgetItem(program.remark)); //设置数据 QPushButton *btn_1 = new QPushButton(); diff --git a/softwareDirectory/AutoVerScheme/formaddrsetting.cpp b/softwareDirectory/AutoVerScheme/formaddrsetting.cpp index e0fb33a..62d0dc1 100644 --- a/softwareDirectory/AutoVerScheme/formaddrsetting.cpp +++ b/softwareDirectory/AutoVerScheme/formaddrsetting.cpp @@ -1,14 +1,223 @@ #include "formaddrsetting.h" #include "ui_formaddrsetting.h" +#include -FormAddrSetting::FormAddrSetting(QWidget *parent,int type,QString id) : +FormAddrSetting::FormAddrSetting(QWidget *parent,int type,QString id,QString deviceId) : QWidget(parent), + iType(type), + sId(id), + sDeviceId(deviceId), ui(new Ui::FormAddrSetting) { ui->setupUi(this); + //ui->tableWidgetMethod->setColumnCount(7); + initCmdTable(); +} +void FormAddrSetting::initCmdTable() +{ + ui->tableWidget->verticalHeader()->setParent(nullptr); + for(int i=1;i<4;i++) + ui->tableWidget->horizontalHeader()->setSectionResizeMode(i,QHeaderView::Stretch); + ui->tableWidget->setColumnWidth(0, 60); + ui->tableWidget->setColumnWidth(4, 100); + cmdList = BaseCommonApi::getInstructionLib(sId); + int rowCount = 0; + int row=0; + QString State; + for (const InstructionLib& cmd : cmdList) { + rowCount = ui->tableWidget->rowCount(); + + ui->tableWidget->insertRow(rowCount); + updateRow(row,cmd); + row++; + } + QStringList headlist; + QList caliList =BaseCommonApi::Search_CalibrationTable(sDeviceId,&headlist); + for (const QStringList& item : caliList){ + this->ui->comboBox->addItem(item[1]); + } +} + +void FormAddrSetting::updateRow(int row,InstructionLib cmd) +{ + ui->tableWidget->setItem(row, 0, new QTableWidgetItem(QString::number(row+1))); + /*if(cmd.type==0) + ui->tableWidget->setItem(row, 1, new QTableWidgetItem(cmd.belong_vername)); //设置数据 + else + ui->tableWidget->setItem(row, 1, new QTableWidgetItem(cmd.belong_checkname));*/ + ui->tableWidget->setItem(row, 1, new QTableWidgetItem(cmd.belong_vername)); + ui->tableWidget->setItem(row, 2, new QTableWidgetItem(cmd.instruct_config)); //设置数据 + ui->tableWidget->setItem(row, 3, new QTableWidgetItem(cmd.instruct_read)); //设置数据 + QPushButton *btn_1 = new QPushButton(); + btn_1->setText(tr("编辑")); + btn_1->setStyleSheet("QPushButton{" + "background-color:rgba(255,255,255,0);" + "color:rgba(92,170,54,100);" + "text-decoration:underline;" + "}"); + btn_1->setCursor(Qt::PointingHandCursor); + connect(btn_1,SIGNAL(clicked()),this,SLOT(on_editButton_clicked())); + + btn_1->setIconSize(QSize(16,16)); + btn_1->setIcon(QIcon(":/image/Index/u2324.svg")); + /*QPushButton *btn_2 = new QPushButton(); + btn_2->setText(tr("删除")); + btn_2->setStyleSheet("QPushButton{" + "background-color:rgba(255,255,255,0);" + "color:rgba(170,17,17,100);" + "text-decoration:underline;" + "}"); + btn_2->setCursor(Qt::PointingHandCursor); + connect(btn_2,SIGNAL(clicked()),this,SLOT(on_deleteButton_clicked())); + btn_2->setIconSize(QSize(16,16)); + btn_2->setIcon(QIcon(":/image/Index/u2325.svg"));*/ + QWidget *tmp_widget = new QWidget(); + QHBoxLayout *tmp_layout = new QHBoxLayout(tmp_widget); + tmp_layout->addWidget(btn_1); + //tmp_layout->addWidget(btn_2); + tmp_layout->setMargin(0); + ui->tableWidget->setCellWidget(row,4,tmp_widget); } FormAddrSetting::~FormAddrSetting() { + cmdList.clear(); delete ui; } + +void FormAddrSetting::on_pushButton_15_clicked() +{ + editIdx=-1; + if(this->ui->comboBox->count()>0) + this->ui->comboBox->setCurrentIndex(0); + this->ui->textEdit->setText(""); + this->ui->textEdit_2->setText(""); + this->ui->stackedWidget->setCurrentIndex(1); +} + +void FormAddrSetting::on_pushButton_14_clicked() +{ + this->close(); +} + +void FormAddrSetting::on_pushButton_18_clicked() +{ + if(editIdx==-1){ + QString sName = ""; + if(iType==0){ + QList result = BaseCommonApi::getTestedCatDevice(sId); + if(result.length()>0){ + sName = result[0].equipment_name; + } + }else{ + QList result = BaseCommonApi::getCatDeviceInfor(sId); + if(result.length()>0){ + sName = result[0].equipment_name; + } + } + InstructionLib cmd; + BaseCommonApi baseApi; + qint64 id = baseApi.generateId(); + cmd.id = QString::number(id); + cmd.device_id = sId; + cmd.device_name = sName; + cmd.type = iType; + cmd.belong_vername = this->ui->comboBox->currentText(); + cmd.instruct_config = this->ui->textEdit->toPlainText(); + cmd.instruct_read = this->ui->textEdit_2->toPlainText(); + cmd.create_time = QDateTime::currentDateTime(); + cmd.update_time = QDateTime::currentDateTime(); + BaseCommonApi::InsertInstructionLib(cmd); + cmdList.append(cmd); + int rowCount = ui->tableWidget->rowCount(); + ui->tableWidget->insertRow(rowCount); + updateRow(rowCount,cmd); + }else{ + InstructionLib cmd = cmdList[editIdx]; + cmd.belong_vername = this->ui->comboBox->currentText(); + cmd.instruct_config = this->ui->textEdit->toPlainText(); + cmd.instruct_read = this->ui->textEdit_2->toPlainText(); + cmd.update_time = QDateTime::currentDateTime(); + BaseCommonApi::UpdateInstructionLib(cmd); + updateRow(editIdx,cmd); + } + this->ui->stackedWidget->setCurrentIndex(0); +} + +void FormAddrSetting::on_editButton_clicked() +{ + QPushButton *pushButton_ = dynamic_cast(this->sender()); + if(NULL == pushButton_) + { + return; + } + // 获取按钮的x坐标和y坐标 + int x = pushButton_->parentWidget()->frameGeometry().x(); + int y = pushButton_->parentWidget()->frameGeometry().y(); + // 根据按钮的x和y坐标来定位对应的单元格 + QModelIndex index = ui->tableWidget->indexAt(QPoint(x, y)); + // 获取该按钮所在表格的行号和列号 + int row = index.row(); + //int column = index.column(); + //QString sId = cmdList[row].id; + editIdx = row; + InstructionLib cmd = cmdList[row]; + + this->ui->comboBox->setCurrentText(cmd.belong_vername); + this->ui->textEdit->setText(cmd.instruct_config); + this->ui->textEdit_2->setText(cmd.instruct_read); + this->ui->stackedWidget->setCurrentIndex(1); +} + +void FormAddrSetting::on_deleteButton_clicked() +{ + QPushButton *pushButton_ = dynamic_cast(this->sender()); + if(NULL == pushButton_) + { + return; + } + // 获取按钮的x坐标和y坐标 + int x = pushButton_->parentWidget()->frameGeometry().x(); + int y = pushButton_->parentWidget()->frameGeometry().y(); + // 根据按钮的x和y坐标来定位对应的单元格 + QModelIndex index = ui->tableWidget->indexAt(QPoint(x, y)); + // 获取该按钮所在表格的行号和列号 + int row = index.row(); + //int column = index.column(); + if(QMessageBox::question(this, "确认", "确认删除吗?", QMessageBox::Yes | QMessageBox::No, QMessageBox::Yes)==QMessageBox::Yes) + { + if(BaseCommonApi::DeleteInstructionLib(cmdList[row].id)) + { + cmdList.removeAt(row); + ui->tableWidget->removeRow(row); + } + } +} + +void FormAddrSetting::on_pushButton_3_clicked() +{ + if(QMessageBox::question(this, "确认", "确认删除吗?", QMessageBox::Yes | QMessageBox::No, QMessageBox::Yes)==QMessageBox::Yes) + { + if(BaseCommonApi::DeleteInstructionLib(sId)) + { + cmdList.clear(); + ui->tableWidget->clearContents(); + ui->tableWidget->setRowCount(0); + } + } +} + +void FormAddrSetting::on_pushButton_2_clicked() +{ + +} + +void FormAddrSetting::on_pushButton_clicked() +{ + +} + +void FormAddrSetting::on_pushButton_4_clicked() +{ + this->ui->stackedWidget->setCurrentIndex(0); +} diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user index ce0b2dc..373bbda 100644 --- a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user @@ -1,10 +1,10 @@ - + EnvironmentId - {c08df58c-84a7-4965-bca6-e98789474efa} + {2746248a-b112-4e0f-9ae0-9e61f2a42309} ProjectExplorer.Project.ActiveTarget @@ -71,7 +71,7 @@ 0 0 - C:/Users/admin/Desktop/SVN/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Debug + D:/dev/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Debug true @@ -119,7 +119,7 @@ 2 - C:/Users/admin/Desktop/SVN/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Release + D:/dev/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Release true @@ -167,7 +167,7 @@ 0 - C:/Users/admin/Desktop/SVN/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Profile + D:/dev/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Profile true @@ -287,8 +287,8 @@ 2 - Qt4ProjectManager.Qt4RunConfiguration:C:/Users/admin/Desktop/SVN/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro - C:/Users/admin/Desktop/SVN/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro + Qt4ProjectManager.Qt4RunConfiguration:D:/dev/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro + D:/dev/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro false @@ -299,7 +299,7 @@ false true - C:/Users/admin/Desktop/SVN/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Debug + D:/dev/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Debug 1 @@ -314,7 +314,7 @@ 0 0 - C:/Users/admin/Desktop/SVN/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug + D:/dev/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug true @@ -362,7 +362,7 @@ 2 - C:/Users/admin/Desktop/SVN/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Release + D:/dev/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Release true @@ -410,7 +410,7 @@ 0 - C:/Users/admin/Desktop/SVN/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Profile + D:/dev/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Profile true @@ -530,8 +530,8 @@ 2 - Qt4ProjectManager.Qt4RunConfiguration:C:/Users/admin/Desktop/SVN/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro - C:/Users/admin/Desktop/SVN/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro + Qt4ProjectManager.Qt4RunConfiguration:D:/dev/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro + D:/dev/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro false diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user.c08df58 b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user.c08df58 new file mode 100644 index 0000000..803b854 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user.c08df58 @@ -0,0 +1,562 @@ + + + + + + EnvironmentId + {c08df58c-84a7-4965-bca6-e98789474efa} + + + ProjectExplorer.Project.ActiveTarget + 0 + + + ProjectExplorer.Project.EditorSettings + + true + false + true + + Cpp + + CppGlobal + + + + QmlJS + + QmlJSGlobal + + + 2 + UTF-8 + false + 4 + false + 80 + true + true + 1 + true + false + 0 + true + true + 0 + 8 + true + 1 + true + true + true + false + + + + ProjectExplorer.Project.PluginSettings + + + -fno-delayed-template-parsing + + true + + + + ProjectExplorer.Project.Target.0 + + Desktop Qt 5.14.2 MinGW 64-bit + Desktop Qt 5.14.2 MinGW 64-bit + qt.qt5.5142.win64_mingw73_kit + 0 + 0 + 0 + + C:/Users/admin/Desktop/SVN/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Debug + + + true + QtProjectManager.QMakeBuildStep + true + + false + false + false + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Debug + Qt4ProjectManager.Qt4BuildConfiguration + 2 + + + C:/Users/admin/Desktop/SVN/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Release + + + true + QtProjectManager.QMakeBuildStep + false + + false + false + true + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Release + Qt4ProjectManager.Qt4BuildConfiguration + 0 + + + C:/Users/admin/Desktop/SVN/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Profile + + + true + QtProjectManager.QMakeBuildStep + true + + false + true + true + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Profile + Qt4ProjectManager.Qt4BuildConfiguration + 0 + + 3 + + + 0 + Deploy + Deploy + ProjectExplorer.BuildSteps.Deploy + + 1 + ProjectExplorer.DefaultDeployConfiguration + + 1 + + + dwarf + + cpu-cycles + + + 250 + + -e + cpu-cycles + --call-graph + dwarf,4096 + -F + 250 + + -F + true + 4096 + false + false + 1000 + + true + + false + false + false + false + true + 0.01 + 10 + true + kcachegrind + 1 + 25 + + 1 + true + false + true + valgrind + + 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + + 2 + + Qt4ProjectManager.Qt4RunConfiguration:C:/Users/admin/Desktop/SVN/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro + C:/Users/admin/Desktop/SVN/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro + + false + + false + true + true + false + false + true + + C:/Users/admin/Desktop/SVN/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Debug + + 1 + + + + ProjectExplorer.Project.Target.1 + + Desktop Qt 5.14.2 MinGW 32-bit + Desktop Qt 5.14.2 MinGW 32-bit + qt.qt5.5142.win32_mingw73_kit + 0 + 0 + 0 + + C:/Users/admin/Desktop/SVN/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug + + + true + QtProjectManager.QMakeBuildStep + true + + false + false + false + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Debug + Qt4ProjectManager.Qt4BuildConfiguration + 2 + + + C:/Users/admin/Desktop/SVN/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Release + + + true + QtProjectManager.QMakeBuildStep + false + + false + false + true + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Release + Qt4ProjectManager.Qt4BuildConfiguration + 0 + + + C:/Users/admin/Desktop/SVN/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Profile + + + true + QtProjectManager.QMakeBuildStep + true + + false + true + true + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Profile + Qt4ProjectManager.Qt4BuildConfiguration + 0 + + 3 + + + 0 + Deploy + Deploy + ProjectExplorer.BuildSteps.Deploy + + 1 + ProjectExplorer.DefaultDeployConfiguration + + 1 + + + dwarf + + cpu-cycles + + + 250 + + -e + cpu-cycles + --call-graph + dwarf,4096 + -F + 250 + + -F + true + 4096 + false + false + 1000 + + true + + false + false + false + false + true + 0.01 + 10 + true + kcachegrind + 1 + 25 + + 1 + true + false + true + valgrind + + 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + + 2 + + Qt4ProjectManager.Qt4RunConfiguration:C:/Users/admin/Desktop/SVN/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro + C:/Users/admin/Desktop/SVN/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro + + false + + false + true + true + false + false + true + + + + 1 + + + + ProjectExplorer.Project.TargetCount + 2 + + + ProjectExplorer.Project.Updater.FileVersion + 22 + + + Version + 22 + + diff --git a/softwareDirectory/AutoVerScheme/basecommonapi.cpp b/softwareDirectory/AutoVerScheme/basecommonapi.cpp index 63fcb02..06ab274 100644 --- a/softwareDirectory/AutoVerScheme/basecommonapi.cpp +++ b/softwareDirectory/AutoVerScheme/basecommonapi.cpp @@ -1107,9 +1107,10 @@ bool BaseCommonApi::InsertInstructionLib(InstructionLib instructionLib) { QSqlQuery query; - query.prepare("INSERT INTO zd_instruction_library (id,device_id,device_name,instruct_config,instruct_read,type,verification_id,check_id,create_time,update_time) " + query.prepare("INSERT INTO zd_instruction_library (id,device_id,device_name,instruct_config,instruct_read,type,belong_vername,belong_checkname,create_time,update_time) " " VALUES (:id,:device_id,:device_name,:instruct_config,:instruct_read,:type,:belong_vername,:belong_checkname,:create_time,:update_time)"); - + QString formattedCreateDateTime = instructionLib.create_time.toString("yyyy-MM-dd HH:mm:ss"); + QString formattedUpdateDateTime = instructionLib.update_time.toString("yyyy-MM-dd HH:mm:ss"); query.bindValue(":id", instructionLib.id); query.bindValue(":device_id", instructionLib.device_id); query.bindValue(":device_name", instructionLib.device_name); @@ -1118,8 +1119,8 @@ query.bindValue(":type", instructionLib.type); query.bindValue(":belong_vername", instructionLib.belong_vername); query.bindValue(":belong_checkname", instructionLib.belong_checkname); - query.bindValue(":create_time", instructionLib.create_time); - query.bindValue(":update_time", instructionLib.update_time); + query.bindValue(":create_time", formattedCreateDateTime); + query.bindValue(":update_time", formattedUpdateDateTime); bool isSuccess = query.exec(); if (!isSuccess) { qDebug() << "InsertTaskBasic query failed: " << query.lastError().text(); diff --git a/softwareDirectory/AutoVerScheme/checkmethodmanage.cpp b/softwareDirectory/AutoVerScheme/checkmethodmanage.cpp index b83b561..fca8ee7 100644 --- a/softwareDirectory/AutoVerScheme/checkmethodmanage.cpp +++ b/softwareDirectory/AutoVerScheme/checkmethodmanage.cpp @@ -92,7 +92,7 @@ //ui->tableWidget->setItem(row, 0, new QTableWidgetItem(dept.id)); ui->tableWidget_2->setItem(row, 1, new QTableWidgetItem(program.program_name)); //设置数据 ui->tableWidget_2->setItem(row, 2, new QTableWidgetItem(program.create_name)); //设置数据 - ui->tableWidget_2->setItem(row, 3, new QTableWidgetItem(program.create_time.toString())); //设置数据 + ui->tableWidget_2->setItem(row, 3, new QTableWidgetItem(program.create_time.toString("yyyy-MM-dd"))); //设置数据 ui->tableWidget_2->setItem(row, 4, new QTableWidgetItem(program.remark)); //设置数据 QPushButton *btn_1 = new QPushButton(); diff --git a/softwareDirectory/AutoVerScheme/formaddrsetting.cpp b/softwareDirectory/AutoVerScheme/formaddrsetting.cpp index e0fb33a..62d0dc1 100644 --- a/softwareDirectory/AutoVerScheme/formaddrsetting.cpp +++ b/softwareDirectory/AutoVerScheme/formaddrsetting.cpp @@ -1,14 +1,223 @@ #include "formaddrsetting.h" #include "ui_formaddrsetting.h" +#include -FormAddrSetting::FormAddrSetting(QWidget *parent,int type,QString id) : +FormAddrSetting::FormAddrSetting(QWidget *parent,int type,QString id,QString deviceId) : QWidget(parent), + iType(type), + sId(id), + sDeviceId(deviceId), ui(new Ui::FormAddrSetting) { ui->setupUi(this); + //ui->tableWidgetMethod->setColumnCount(7); + initCmdTable(); +} +void FormAddrSetting::initCmdTable() +{ + ui->tableWidget->verticalHeader()->setParent(nullptr); + for(int i=1;i<4;i++) + ui->tableWidget->horizontalHeader()->setSectionResizeMode(i,QHeaderView::Stretch); + ui->tableWidget->setColumnWidth(0, 60); + ui->tableWidget->setColumnWidth(4, 100); + cmdList = BaseCommonApi::getInstructionLib(sId); + int rowCount = 0; + int row=0; + QString State; + for (const InstructionLib& cmd : cmdList) { + rowCount = ui->tableWidget->rowCount(); + + ui->tableWidget->insertRow(rowCount); + updateRow(row,cmd); + row++; + } + QStringList headlist; + QList caliList =BaseCommonApi::Search_CalibrationTable(sDeviceId,&headlist); + for (const QStringList& item : caliList){ + this->ui->comboBox->addItem(item[1]); + } +} + +void FormAddrSetting::updateRow(int row,InstructionLib cmd) +{ + ui->tableWidget->setItem(row, 0, new QTableWidgetItem(QString::number(row+1))); + /*if(cmd.type==0) + ui->tableWidget->setItem(row, 1, new QTableWidgetItem(cmd.belong_vername)); //设置数据 + else + ui->tableWidget->setItem(row, 1, new QTableWidgetItem(cmd.belong_checkname));*/ + ui->tableWidget->setItem(row, 1, new QTableWidgetItem(cmd.belong_vername)); + ui->tableWidget->setItem(row, 2, new QTableWidgetItem(cmd.instruct_config)); //设置数据 + ui->tableWidget->setItem(row, 3, new QTableWidgetItem(cmd.instruct_read)); //设置数据 + QPushButton *btn_1 = new QPushButton(); + btn_1->setText(tr("编辑")); + btn_1->setStyleSheet("QPushButton{" + "background-color:rgba(255,255,255,0);" + "color:rgba(92,170,54,100);" + "text-decoration:underline;" + "}"); + btn_1->setCursor(Qt::PointingHandCursor); + connect(btn_1,SIGNAL(clicked()),this,SLOT(on_editButton_clicked())); + + btn_1->setIconSize(QSize(16,16)); + btn_1->setIcon(QIcon(":/image/Index/u2324.svg")); + /*QPushButton *btn_2 = new QPushButton(); + btn_2->setText(tr("删除")); + btn_2->setStyleSheet("QPushButton{" + "background-color:rgba(255,255,255,0);" + "color:rgba(170,17,17,100);" + "text-decoration:underline;" + "}"); + btn_2->setCursor(Qt::PointingHandCursor); + connect(btn_2,SIGNAL(clicked()),this,SLOT(on_deleteButton_clicked())); + btn_2->setIconSize(QSize(16,16)); + btn_2->setIcon(QIcon(":/image/Index/u2325.svg"));*/ + QWidget *tmp_widget = new QWidget(); + QHBoxLayout *tmp_layout = new QHBoxLayout(tmp_widget); + tmp_layout->addWidget(btn_1); + //tmp_layout->addWidget(btn_2); + tmp_layout->setMargin(0); + ui->tableWidget->setCellWidget(row,4,tmp_widget); } FormAddrSetting::~FormAddrSetting() { + cmdList.clear(); delete ui; } + +void FormAddrSetting::on_pushButton_15_clicked() +{ + editIdx=-1; + if(this->ui->comboBox->count()>0) + this->ui->comboBox->setCurrentIndex(0); + this->ui->textEdit->setText(""); + this->ui->textEdit_2->setText(""); + this->ui->stackedWidget->setCurrentIndex(1); +} + +void FormAddrSetting::on_pushButton_14_clicked() +{ + this->close(); +} + +void FormAddrSetting::on_pushButton_18_clicked() +{ + if(editIdx==-1){ + QString sName = ""; + if(iType==0){ + QList result = BaseCommonApi::getTestedCatDevice(sId); + if(result.length()>0){ + sName = result[0].equipment_name; + } + }else{ + QList result = BaseCommonApi::getCatDeviceInfor(sId); + if(result.length()>0){ + sName = result[0].equipment_name; + } + } + InstructionLib cmd; + BaseCommonApi baseApi; + qint64 id = baseApi.generateId(); + cmd.id = QString::number(id); + cmd.device_id = sId; + cmd.device_name = sName; + cmd.type = iType; + cmd.belong_vername = this->ui->comboBox->currentText(); + cmd.instruct_config = this->ui->textEdit->toPlainText(); + cmd.instruct_read = this->ui->textEdit_2->toPlainText(); + cmd.create_time = QDateTime::currentDateTime(); + cmd.update_time = QDateTime::currentDateTime(); + BaseCommonApi::InsertInstructionLib(cmd); + cmdList.append(cmd); + int rowCount = ui->tableWidget->rowCount(); + ui->tableWidget->insertRow(rowCount); + updateRow(rowCount,cmd); + }else{ + InstructionLib cmd = cmdList[editIdx]; + cmd.belong_vername = this->ui->comboBox->currentText(); + cmd.instruct_config = this->ui->textEdit->toPlainText(); + cmd.instruct_read = this->ui->textEdit_2->toPlainText(); + cmd.update_time = QDateTime::currentDateTime(); + BaseCommonApi::UpdateInstructionLib(cmd); + updateRow(editIdx,cmd); + } + this->ui->stackedWidget->setCurrentIndex(0); +} + +void FormAddrSetting::on_editButton_clicked() +{ + QPushButton *pushButton_ = dynamic_cast(this->sender()); + if(NULL == pushButton_) + { + return; + } + // 获取按钮的x坐标和y坐标 + int x = pushButton_->parentWidget()->frameGeometry().x(); + int y = pushButton_->parentWidget()->frameGeometry().y(); + // 根据按钮的x和y坐标来定位对应的单元格 + QModelIndex index = ui->tableWidget->indexAt(QPoint(x, y)); + // 获取该按钮所在表格的行号和列号 + int row = index.row(); + //int column = index.column(); + //QString sId = cmdList[row].id; + editIdx = row; + InstructionLib cmd = cmdList[row]; + + this->ui->comboBox->setCurrentText(cmd.belong_vername); + this->ui->textEdit->setText(cmd.instruct_config); + this->ui->textEdit_2->setText(cmd.instruct_read); + this->ui->stackedWidget->setCurrentIndex(1); +} + +void FormAddrSetting::on_deleteButton_clicked() +{ + QPushButton *pushButton_ = dynamic_cast(this->sender()); + if(NULL == pushButton_) + { + return; + } + // 获取按钮的x坐标和y坐标 + int x = pushButton_->parentWidget()->frameGeometry().x(); + int y = pushButton_->parentWidget()->frameGeometry().y(); + // 根据按钮的x和y坐标来定位对应的单元格 + QModelIndex index = ui->tableWidget->indexAt(QPoint(x, y)); + // 获取该按钮所在表格的行号和列号 + int row = index.row(); + //int column = index.column(); + if(QMessageBox::question(this, "确认", "确认删除吗?", QMessageBox::Yes | QMessageBox::No, QMessageBox::Yes)==QMessageBox::Yes) + { + if(BaseCommonApi::DeleteInstructionLib(cmdList[row].id)) + { + cmdList.removeAt(row); + ui->tableWidget->removeRow(row); + } + } +} + +void FormAddrSetting::on_pushButton_3_clicked() +{ + if(QMessageBox::question(this, "确认", "确认删除吗?", QMessageBox::Yes | QMessageBox::No, QMessageBox::Yes)==QMessageBox::Yes) + { + if(BaseCommonApi::DeleteInstructionLib(sId)) + { + cmdList.clear(); + ui->tableWidget->clearContents(); + ui->tableWidget->setRowCount(0); + } + } +} + +void FormAddrSetting::on_pushButton_2_clicked() +{ + +} + +void FormAddrSetting::on_pushButton_clicked() +{ + +} + +void FormAddrSetting::on_pushButton_4_clicked() +{ + this->ui->stackedWidget->setCurrentIndex(0); +} diff --git a/softwareDirectory/AutoVerScheme/formaddrsetting.h b/softwareDirectory/AutoVerScheme/formaddrsetting.h index 6392d44..3243cc8 100644 --- a/softwareDirectory/AutoVerScheme/formaddrsetting.h +++ b/softwareDirectory/AutoVerScheme/formaddrsetting.h @@ -2,6 +2,7 @@ #define FORMADDRSETTING_H #include +#include "basecommonapi.h" namespace Ui { class FormAddrSetting; @@ -12,11 +13,35 @@ Q_OBJECT public: - explicit FormAddrSetting(QWidget *parent = nullptr,int type=1,QString id=""); + explicit FormAddrSetting(QWidget *parent = nullptr,int type=1,QString id="",QString deviceId=""); ~FormAddrSetting(); +private: + void initCmdTable(); + void updateRow(int row,InstructionLib cmd); + +private slots: + void on_pushButton_15_clicked(); + + void on_pushButton_14_clicked(); + + void on_pushButton_18_clicked(); + void on_editButton_clicked(); + void on_deleteButton_clicked(); + void on_pushButton_3_clicked(); + + void on_pushButton_2_clicked(); + + void on_pushButton_clicked(); + + void on_pushButton_4_clicked(); private: Ui::FormAddrSetting *ui; + QList cmdList; + QString sId; + QString sDeviceId; + int iType=0; + int editIdx=-1; }; #endif // FORMADDRSETTING_H diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user index ce0b2dc..373bbda 100644 --- a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user @@ -1,10 +1,10 @@ - + EnvironmentId - {c08df58c-84a7-4965-bca6-e98789474efa} + {2746248a-b112-4e0f-9ae0-9e61f2a42309} ProjectExplorer.Project.ActiveTarget @@ -71,7 +71,7 @@ 0 0 - C:/Users/admin/Desktop/SVN/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Debug + D:/dev/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Debug true @@ -119,7 +119,7 @@ 2 - C:/Users/admin/Desktop/SVN/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Release + D:/dev/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Release true @@ -167,7 +167,7 @@ 0 - C:/Users/admin/Desktop/SVN/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Profile + D:/dev/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Profile true @@ -287,8 +287,8 @@ 2 - Qt4ProjectManager.Qt4RunConfiguration:C:/Users/admin/Desktop/SVN/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro - C:/Users/admin/Desktop/SVN/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro + Qt4ProjectManager.Qt4RunConfiguration:D:/dev/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro + D:/dev/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro false @@ -299,7 +299,7 @@ false true - C:/Users/admin/Desktop/SVN/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Debug + D:/dev/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Debug 1 @@ -314,7 +314,7 @@ 0 0 - C:/Users/admin/Desktop/SVN/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug + D:/dev/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug true @@ -362,7 +362,7 @@ 2 - C:/Users/admin/Desktop/SVN/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Release + D:/dev/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Release true @@ -410,7 +410,7 @@ 0 - C:/Users/admin/Desktop/SVN/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Profile + D:/dev/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Profile true @@ -530,8 +530,8 @@ 2 - Qt4ProjectManager.Qt4RunConfiguration:C:/Users/admin/Desktop/SVN/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro - C:/Users/admin/Desktop/SVN/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro + Qt4ProjectManager.Qt4RunConfiguration:D:/dev/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro + D:/dev/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro false diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user.c08df58 b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user.c08df58 new file mode 100644 index 0000000..803b854 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user.c08df58 @@ -0,0 +1,562 @@ + + + + + + EnvironmentId + {c08df58c-84a7-4965-bca6-e98789474efa} + + + ProjectExplorer.Project.ActiveTarget + 0 + + + ProjectExplorer.Project.EditorSettings + + true + false + true + + Cpp + + CppGlobal + + + + QmlJS + + QmlJSGlobal + + + 2 + UTF-8 + false + 4 + false + 80 + true + true + 1 + true + false + 0 + true + true + 0 + 8 + true + 1 + true + true + true + false + + + + ProjectExplorer.Project.PluginSettings + + + -fno-delayed-template-parsing + + true + + + + ProjectExplorer.Project.Target.0 + + Desktop Qt 5.14.2 MinGW 64-bit + Desktop Qt 5.14.2 MinGW 64-bit + qt.qt5.5142.win64_mingw73_kit + 0 + 0 + 0 + + C:/Users/admin/Desktop/SVN/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Debug + + + true + QtProjectManager.QMakeBuildStep + true + + false + false + false + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Debug + Qt4ProjectManager.Qt4BuildConfiguration + 2 + + + C:/Users/admin/Desktop/SVN/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Release + + + true + QtProjectManager.QMakeBuildStep + false + + false + false + true + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Release + Qt4ProjectManager.Qt4BuildConfiguration + 0 + + + C:/Users/admin/Desktop/SVN/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Profile + + + true + QtProjectManager.QMakeBuildStep + true + + false + true + true + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Profile + Qt4ProjectManager.Qt4BuildConfiguration + 0 + + 3 + + + 0 + Deploy + Deploy + ProjectExplorer.BuildSteps.Deploy + + 1 + ProjectExplorer.DefaultDeployConfiguration + + 1 + + + dwarf + + cpu-cycles + + + 250 + + -e + cpu-cycles + --call-graph + dwarf,4096 + -F + 250 + + -F + true + 4096 + false + false + 1000 + + true + + false + false + false + false + true + 0.01 + 10 + true + kcachegrind + 1 + 25 + + 1 + true + false + true + valgrind + + 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + + 2 + + Qt4ProjectManager.Qt4RunConfiguration:C:/Users/admin/Desktop/SVN/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro + C:/Users/admin/Desktop/SVN/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro + + false + + false + true + true + false + false + true + + C:/Users/admin/Desktop/SVN/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Debug + + 1 + + + + ProjectExplorer.Project.Target.1 + + Desktop Qt 5.14.2 MinGW 32-bit + Desktop Qt 5.14.2 MinGW 32-bit + qt.qt5.5142.win32_mingw73_kit + 0 + 0 + 0 + + C:/Users/admin/Desktop/SVN/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug + + + true + QtProjectManager.QMakeBuildStep + true + + false + false + false + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Debug + Qt4ProjectManager.Qt4BuildConfiguration + 2 + + + C:/Users/admin/Desktop/SVN/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Release + + + true + QtProjectManager.QMakeBuildStep + false + + false + false + true + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Release + Qt4ProjectManager.Qt4BuildConfiguration + 0 + + + C:/Users/admin/Desktop/SVN/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Profile + + + true + QtProjectManager.QMakeBuildStep + true + + false + true + true + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Profile + Qt4ProjectManager.Qt4BuildConfiguration + 0 + + 3 + + + 0 + Deploy + Deploy + ProjectExplorer.BuildSteps.Deploy + + 1 + ProjectExplorer.DefaultDeployConfiguration + + 1 + + + dwarf + + cpu-cycles + + + 250 + + -e + cpu-cycles + --call-graph + dwarf,4096 + -F + 250 + + -F + true + 4096 + false + false + 1000 + + true + + false + false + false + false + true + 0.01 + 10 + true + kcachegrind + 1 + 25 + + 1 + true + false + true + valgrind + + 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + + 2 + + Qt4ProjectManager.Qt4RunConfiguration:C:/Users/admin/Desktop/SVN/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro + C:/Users/admin/Desktop/SVN/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro + + false + + false + true + true + false + false + true + + + + 1 + + + + ProjectExplorer.Project.TargetCount + 2 + + + ProjectExplorer.Project.Updater.FileVersion + 22 + + + Version + 22 + + diff --git a/softwareDirectory/AutoVerScheme/basecommonapi.cpp b/softwareDirectory/AutoVerScheme/basecommonapi.cpp index 63fcb02..06ab274 100644 --- a/softwareDirectory/AutoVerScheme/basecommonapi.cpp +++ b/softwareDirectory/AutoVerScheme/basecommonapi.cpp @@ -1107,9 +1107,10 @@ bool BaseCommonApi::InsertInstructionLib(InstructionLib instructionLib) { QSqlQuery query; - query.prepare("INSERT INTO zd_instruction_library (id,device_id,device_name,instruct_config,instruct_read,type,verification_id,check_id,create_time,update_time) " + query.prepare("INSERT INTO zd_instruction_library (id,device_id,device_name,instruct_config,instruct_read,type,belong_vername,belong_checkname,create_time,update_time) " " VALUES (:id,:device_id,:device_name,:instruct_config,:instruct_read,:type,:belong_vername,:belong_checkname,:create_time,:update_time)"); - + QString formattedCreateDateTime = instructionLib.create_time.toString("yyyy-MM-dd HH:mm:ss"); + QString formattedUpdateDateTime = instructionLib.update_time.toString("yyyy-MM-dd HH:mm:ss"); query.bindValue(":id", instructionLib.id); query.bindValue(":device_id", instructionLib.device_id); query.bindValue(":device_name", instructionLib.device_name); @@ -1118,8 +1119,8 @@ query.bindValue(":type", instructionLib.type); query.bindValue(":belong_vername", instructionLib.belong_vername); query.bindValue(":belong_checkname", instructionLib.belong_checkname); - query.bindValue(":create_time", instructionLib.create_time); - query.bindValue(":update_time", instructionLib.update_time); + query.bindValue(":create_time", formattedCreateDateTime); + query.bindValue(":update_time", formattedUpdateDateTime); bool isSuccess = query.exec(); if (!isSuccess) { qDebug() << "InsertTaskBasic query failed: " << query.lastError().text(); diff --git a/softwareDirectory/AutoVerScheme/checkmethodmanage.cpp b/softwareDirectory/AutoVerScheme/checkmethodmanage.cpp index b83b561..fca8ee7 100644 --- a/softwareDirectory/AutoVerScheme/checkmethodmanage.cpp +++ b/softwareDirectory/AutoVerScheme/checkmethodmanage.cpp @@ -92,7 +92,7 @@ //ui->tableWidget->setItem(row, 0, new QTableWidgetItem(dept.id)); ui->tableWidget_2->setItem(row, 1, new QTableWidgetItem(program.program_name)); //设置数据 ui->tableWidget_2->setItem(row, 2, new QTableWidgetItem(program.create_name)); //设置数据 - ui->tableWidget_2->setItem(row, 3, new QTableWidgetItem(program.create_time.toString())); //设置数据 + ui->tableWidget_2->setItem(row, 3, new QTableWidgetItem(program.create_time.toString("yyyy-MM-dd"))); //设置数据 ui->tableWidget_2->setItem(row, 4, new QTableWidgetItem(program.remark)); //设置数据 QPushButton *btn_1 = new QPushButton(); diff --git a/softwareDirectory/AutoVerScheme/formaddrsetting.cpp b/softwareDirectory/AutoVerScheme/formaddrsetting.cpp index e0fb33a..62d0dc1 100644 --- a/softwareDirectory/AutoVerScheme/formaddrsetting.cpp +++ b/softwareDirectory/AutoVerScheme/formaddrsetting.cpp @@ -1,14 +1,223 @@ #include "formaddrsetting.h" #include "ui_formaddrsetting.h" +#include -FormAddrSetting::FormAddrSetting(QWidget *parent,int type,QString id) : +FormAddrSetting::FormAddrSetting(QWidget *parent,int type,QString id,QString deviceId) : QWidget(parent), + iType(type), + sId(id), + sDeviceId(deviceId), ui(new Ui::FormAddrSetting) { ui->setupUi(this); + //ui->tableWidgetMethod->setColumnCount(7); + initCmdTable(); +} +void FormAddrSetting::initCmdTable() +{ + ui->tableWidget->verticalHeader()->setParent(nullptr); + for(int i=1;i<4;i++) + ui->tableWidget->horizontalHeader()->setSectionResizeMode(i,QHeaderView::Stretch); + ui->tableWidget->setColumnWidth(0, 60); + ui->tableWidget->setColumnWidth(4, 100); + cmdList = BaseCommonApi::getInstructionLib(sId); + int rowCount = 0; + int row=0; + QString State; + for (const InstructionLib& cmd : cmdList) { + rowCount = ui->tableWidget->rowCount(); + + ui->tableWidget->insertRow(rowCount); + updateRow(row,cmd); + row++; + } + QStringList headlist; + QList caliList =BaseCommonApi::Search_CalibrationTable(sDeviceId,&headlist); + for (const QStringList& item : caliList){ + this->ui->comboBox->addItem(item[1]); + } +} + +void FormAddrSetting::updateRow(int row,InstructionLib cmd) +{ + ui->tableWidget->setItem(row, 0, new QTableWidgetItem(QString::number(row+1))); + /*if(cmd.type==0) + ui->tableWidget->setItem(row, 1, new QTableWidgetItem(cmd.belong_vername)); //设置数据 + else + ui->tableWidget->setItem(row, 1, new QTableWidgetItem(cmd.belong_checkname));*/ + ui->tableWidget->setItem(row, 1, new QTableWidgetItem(cmd.belong_vername)); + ui->tableWidget->setItem(row, 2, new QTableWidgetItem(cmd.instruct_config)); //设置数据 + ui->tableWidget->setItem(row, 3, new QTableWidgetItem(cmd.instruct_read)); //设置数据 + QPushButton *btn_1 = new QPushButton(); + btn_1->setText(tr("编辑")); + btn_1->setStyleSheet("QPushButton{" + "background-color:rgba(255,255,255,0);" + "color:rgba(92,170,54,100);" + "text-decoration:underline;" + "}"); + btn_1->setCursor(Qt::PointingHandCursor); + connect(btn_1,SIGNAL(clicked()),this,SLOT(on_editButton_clicked())); + + btn_1->setIconSize(QSize(16,16)); + btn_1->setIcon(QIcon(":/image/Index/u2324.svg")); + /*QPushButton *btn_2 = new QPushButton(); + btn_2->setText(tr("删除")); + btn_2->setStyleSheet("QPushButton{" + "background-color:rgba(255,255,255,0);" + "color:rgba(170,17,17,100);" + "text-decoration:underline;" + "}"); + btn_2->setCursor(Qt::PointingHandCursor); + connect(btn_2,SIGNAL(clicked()),this,SLOT(on_deleteButton_clicked())); + btn_2->setIconSize(QSize(16,16)); + btn_2->setIcon(QIcon(":/image/Index/u2325.svg"));*/ + QWidget *tmp_widget = new QWidget(); + QHBoxLayout *tmp_layout = new QHBoxLayout(tmp_widget); + tmp_layout->addWidget(btn_1); + //tmp_layout->addWidget(btn_2); + tmp_layout->setMargin(0); + ui->tableWidget->setCellWidget(row,4,tmp_widget); } FormAddrSetting::~FormAddrSetting() { + cmdList.clear(); delete ui; } + +void FormAddrSetting::on_pushButton_15_clicked() +{ + editIdx=-1; + if(this->ui->comboBox->count()>0) + this->ui->comboBox->setCurrentIndex(0); + this->ui->textEdit->setText(""); + this->ui->textEdit_2->setText(""); + this->ui->stackedWidget->setCurrentIndex(1); +} + +void FormAddrSetting::on_pushButton_14_clicked() +{ + this->close(); +} + +void FormAddrSetting::on_pushButton_18_clicked() +{ + if(editIdx==-1){ + QString sName = ""; + if(iType==0){ + QList result = BaseCommonApi::getTestedCatDevice(sId); + if(result.length()>0){ + sName = result[0].equipment_name; + } + }else{ + QList result = BaseCommonApi::getCatDeviceInfor(sId); + if(result.length()>0){ + sName = result[0].equipment_name; + } + } + InstructionLib cmd; + BaseCommonApi baseApi; + qint64 id = baseApi.generateId(); + cmd.id = QString::number(id); + cmd.device_id = sId; + cmd.device_name = sName; + cmd.type = iType; + cmd.belong_vername = this->ui->comboBox->currentText(); + cmd.instruct_config = this->ui->textEdit->toPlainText(); + cmd.instruct_read = this->ui->textEdit_2->toPlainText(); + cmd.create_time = QDateTime::currentDateTime(); + cmd.update_time = QDateTime::currentDateTime(); + BaseCommonApi::InsertInstructionLib(cmd); + cmdList.append(cmd); + int rowCount = ui->tableWidget->rowCount(); + ui->tableWidget->insertRow(rowCount); + updateRow(rowCount,cmd); + }else{ + InstructionLib cmd = cmdList[editIdx]; + cmd.belong_vername = this->ui->comboBox->currentText(); + cmd.instruct_config = this->ui->textEdit->toPlainText(); + cmd.instruct_read = this->ui->textEdit_2->toPlainText(); + cmd.update_time = QDateTime::currentDateTime(); + BaseCommonApi::UpdateInstructionLib(cmd); + updateRow(editIdx,cmd); + } + this->ui->stackedWidget->setCurrentIndex(0); +} + +void FormAddrSetting::on_editButton_clicked() +{ + QPushButton *pushButton_ = dynamic_cast(this->sender()); + if(NULL == pushButton_) + { + return; + } + // 获取按钮的x坐标和y坐标 + int x = pushButton_->parentWidget()->frameGeometry().x(); + int y = pushButton_->parentWidget()->frameGeometry().y(); + // 根据按钮的x和y坐标来定位对应的单元格 + QModelIndex index = ui->tableWidget->indexAt(QPoint(x, y)); + // 获取该按钮所在表格的行号和列号 + int row = index.row(); + //int column = index.column(); + //QString sId = cmdList[row].id; + editIdx = row; + InstructionLib cmd = cmdList[row]; + + this->ui->comboBox->setCurrentText(cmd.belong_vername); + this->ui->textEdit->setText(cmd.instruct_config); + this->ui->textEdit_2->setText(cmd.instruct_read); + this->ui->stackedWidget->setCurrentIndex(1); +} + +void FormAddrSetting::on_deleteButton_clicked() +{ + QPushButton *pushButton_ = dynamic_cast(this->sender()); + if(NULL == pushButton_) + { + return; + } + // 获取按钮的x坐标和y坐标 + int x = pushButton_->parentWidget()->frameGeometry().x(); + int y = pushButton_->parentWidget()->frameGeometry().y(); + // 根据按钮的x和y坐标来定位对应的单元格 + QModelIndex index = ui->tableWidget->indexAt(QPoint(x, y)); + // 获取该按钮所在表格的行号和列号 + int row = index.row(); + //int column = index.column(); + if(QMessageBox::question(this, "确认", "确认删除吗?", QMessageBox::Yes | QMessageBox::No, QMessageBox::Yes)==QMessageBox::Yes) + { + if(BaseCommonApi::DeleteInstructionLib(cmdList[row].id)) + { + cmdList.removeAt(row); + ui->tableWidget->removeRow(row); + } + } +} + +void FormAddrSetting::on_pushButton_3_clicked() +{ + if(QMessageBox::question(this, "确认", "确认删除吗?", QMessageBox::Yes | QMessageBox::No, QMessageBox::Yes)==QMessageBox::Yes) + { + if(BaseCommonApi::DeleteInstructionLib(sId)) + { + cmdList.clear(); + ui->tableWidget->clearContents(); + ui->tableWidget->setRowCount(0); + } + } +} + +void FormAddrSetting::on_pushButton_2_clicked() +{ + +} + +void FormAddrSetting::on_pushButton_clicked() +{ + +} + +void FormAddrSetting::on_pushButton_4_clicked() +{ + this->ui->stackedWidget->setCurrentIndex(0); +} diff --git a/softwareDirectory/AutoVerScheme/formaddrsetting.h b/softwareDirectory/AutoVerScheme/formaddrsetting.h index 6392d44..3243cc8 100644 --- a/softwareDirectory/AutoVerScheme/formaddrsetting.h +++ b/softwareDirectory/AutoVerScheme/formaddrsetting.h @@ -2,6 +2,7 @@ #define FORMADDRSETTING_H #include +#include "basecommonapi.h" namespace Ui { class FormAddrSetting; @@ -12,11 +13,35 @@ Q_OBJECT public: - explicit FormAddrSetting(QWidget *parent = nullptr,int type=1,QString id=""); + explicit FormAddrSetting(QWidget *parent = nullptr,int type=1,QString id="",QString deviceId=""); ~FormAddrSetting(); +private: + void initCmdTable(); + void updateRow(int row,InstructionLib cmd); + +private slots: + void on_pushButton_15_clicked(); + + void on_pushButton_14_clicked(); + + void on_pushButton_18_clicked(); + void on_editButton_clicked(); + void on_deleteButton_clicked(); + void on_pushButton_3_clicked(); + + void on_pushButton_2_clicked(); + + void on_pushButton_clicked(); + + void on_pushButton_4_clicked(); private: Ui::FormAddrSetting *ui; + QList cmdList; + QString sId; + QString sDeviceId; + int iType=0; + int editIdx=-1; }; #endif // FORMADDRSETTING_H diff --git a/softwareDirectory/AutoVerScheme/formaddrsetting.ui b/softwareDirectory/AutoVerScheme/formaddrsetting.ui index 9f73632..fdc95da 100644 --- a/softwareDirectory/AutoVerScheme/formaddrsetting.ui +++ b/softwareDirectory/AutoVerScheme/formaddrsetting.ui @@ -16,7 +16,7 @@ background-color: rgb(242, 242, 242); - + @@ -75,133 +75,484 @@ - - - - - - 20 - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - 1 - 0 - - - - - 72 - 26 - - - - - 12 - 75 - true - - - - color: rgb(255, 255, 255); + + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + 1 + 0 + + + + + 72 + 26 + + + + + 12 + 75 + true + + + + color: rgb(255, 255, 255); background-color: rgb(74, 102, 186); border-radius:5px; - - - 新增 - - - - - - - - 1 - 0 - - - - - 72 - 26 - - - - - 12 - 75 - true - - - - color: rgb(255, 255, 255); + + + 新增 + + + + + + + + 72 + 26 + + + + + 12 + 75 + true + + + + color: rgb(255, 255, 255); +background-color: rgb(170, 17, 17); +border-radius:5px; + + + 删除 + + + + + + + + 72 + 26 + + + + + 12 + 75 + true + + + + color: rgb(255, 255, 255); background-color: rgb(74, 102, 186); border-radius:5px; - - - 删除 - - - - - - - - 1 - 0 - - - - - 72 - 26 - - - - - 12 - 75 - true - - - - color: rgb(255, 255, 255); + + + 导入 + + + + + + + + 72 + 26 + + + + + 12 + 75 + true + + + + color: rgb(255, 255, 255); background-color: rgb(74, 102, 186); border-radius:5px; + + + 导出 + + + + + + + + + + 序号 + + + + 12 + + + + + + 项目名称 + + + + 12 + + + + + + 配置命令 + + + + 12 + + + + + + 读数命令 + + + + 12 + + + + + + 操作 + + + + 12 + + + + + + + + + + + 20 - - 保存 - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + 0 + 0 + + + + + 12 + + + + 项目名称 + + + + + + + + 0 + 0 + + + + + 12 + + + + true + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + 0 + 0 + + + + + 12 + + + + 配置命令 + + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop + + + + + + + + 12 + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + 0 + 0 + + + + + 12 + + + + 读数命令 + + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop + + + + + + + + 12 + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + Qt::Vertical + + + + 20 + 119 + + + + + + + + 20 + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + 1 + 0 + + + + + 72 + 26 + + + + + 12 + 75 + true + + + + color: rgb(255, 255, 255); +background-color: rgb(74, 102, 186); +border-radius:5px; + + + 保存 + + + + + + + + 72 + 26 + + + + + 12 + 75 + true + + + + color: rgb(255, 255, 255); +background-color: rgb(170, 17, 17); +border-radius:5px; + + + 取消 + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user index ce0b2dc..373bbda 100644 --- a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user @@ -1,10 +1,10 @@ - + EnvironmentId - {c08df58c-84a7-4965-bca6-e98789474efa} + {2746248a-b112-4e0f-9ae0-9e61f2a42309} ProjectExplorer.Project.ActiveTarget @@ -71,7 +71,7 @@ 0 0 - C:/Users/admin/Desktop/SVN/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Debug + D:/dev/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Debug true @@ -119,7 +119,7 @@ 2 - C:/Users/admin/Desktop/SVN/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Release + D:/dev/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Release true @@ -167,7 +167,7 @@ 0 - C:/Users/admin/Desktop/SVN/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Profile + D:/dev/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Profile true @@ -287,8 +287,8 @@ 2 - Qt4ProjectManager.Qt4RunConfiguration:C:/Users/admin/Desktop/SVN/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro - C:/Users/admin/Desktop/SVN/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro + Qt4ProjectManager.Qt4RunConfiguration:D:/dev/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro + D:/dev/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro false @@ -299,7 +299,7 @@ false true - C:/Users/admin/Desktop/SVN/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Debug + D:/dev/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Debug 1 @@ -314,7 +314,7 @@ 0 0 - C:/Users/admin/Desktop/SVN/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug + D:/dev/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug true @@ -362,7 +362,7 @@ 2 - C:/Users/admin/Desktop/SVN/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Release + D:/dev/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Release true @@ -410,7 +410,7 @@ 0 - C:/Users/admin/Desktop/SVN/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Profile + D:/dev/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Profile true @@ -530,8 +530,8 @@ 2 - Qt4ProjectManager.Qt4RunConfiguration:C:/Users/admin/Desktop/SVN/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro - C:/Users/admin/Desktop/SVN/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro + Qt4ProjectManager.Qt4RunConfiguration:D:/dev/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro + D:/dev/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro false diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user.c08df58 b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user.c08df58 new file mode 100644 index 0000000..803b854 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user.c08df58 @@ -0,0 +1,562 @@ + + + + + + EnvironmentId + {c08df58c-84a7-4965-bca6-e98789474efa} + + + ProjectExplorer.Project.ActiveTarget + 0 + + + ProjectExplorer.Project.EditorSettings + + true + false + true + + Cpp + + CppGlobal + + + + QmlJS + + QmlJSGlobal + + + 2 + UTF-8 + false + 4 + false + 80 + true + true + 1 + true + false + 0 + true + true + 0 + 8 + true + 1 + true + true + true + false + + + + ProjectExplorer.Project.PluginSettings + + + -fno-delayed-template-parsing + + true + + + + ProjectExplorer.Project.Target.0 + + Desktop Qt 5.14.2 MinGW 64-bit + Desktop Qt 5.14.2 MinGW 64-bit + qt.qt5.5142.win64_mingw73_kit + 0 + 0 + 0 + + C:/Users/admin/Desktop/SVN/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Debug + + + true + QtProjectManager.QMakeBuildStep + true + + false + false + false + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Debug + Qt4ProjectManager.Qt4BuildConfiguration + 2 + + + C:/Users/admin/Desktop/SVN/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Release + + + true + QtProjectManager.QMakeBuildStep + false + + false + false + true + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Release + Qt4ProjectManager.Qt4BuildConfiguration + 0 + + + C:/Users/admin/Desktop/SVN/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Profile + + + true + QtProjectManager.QMakeBuildStep + true + + false + true + true + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Profile + Qt4ProjectManager.Qt4BuildConfiguration + 0 + + 3 + + + 0 + Deploy + Deploy + ProjectExplorer.BuildSteps.Deploy + + 1 + ProjectExplorer.DefaultDeployConfiguration + + 1 + + + dwarf + + cpu-cycles + + + 250 + + -e + cpu-cycles + --call-graph + dwarf,4096 + -F + 250 + + -F + true + 4096 + false + false + 1000 + + true + + false + false + false + false + true + 0.01 + 10 + true + kcachegrind + 1 + 25 + + 1 + true + false + true + valgrind + + 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + + 2 + + Qt4ProjectManager.Qt4RunConfiguration:C:/Users/admin/Desktop/SVN/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro + C:/Users/admin/Desktop/SVN/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro + + false + + false + true + true + false + false + true + + C:/Users/admin/Desktop/SVN/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Debug + + 1 + + + + ProjectExplorer.Project.Target.1 + + Desktop Qt 5.14.2 MinGW 32-bit + Desktop Qt 5.14.2 MinGW 32-bit + qt.qt5.5142.win32_mingw73_kit + 0 + 0 + 0 + + C:/Users/admin/Desktop/SVN/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug + + + true + QtProjectManager.QMakeBuildStep + true + + false + false + false + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Debug + Qt4ProjectManager.Qt4BuildConfiguration + 2 + + + C:/Users/admin/Desktop/SVN/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Release + + + true + QtProjectManager.QMakeBuildStep + false + + false + false + true + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Release + Qt4ProjectManager.Qt4BuildConfiguration + 0 + + + C:/Users/admin/Desktop/SVN/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Profile + + + true + QtProjectManager.QMakeBuildStep + true + + false + true + true + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Profile + Qt4ProjectManager.Qt4BuildConfiguration + 0 + + 3 + + + 0 + Deploy + Deploy + ProjectExplorer.BuildSteps.Deploy + + 1 + ProjectExplorer.DefaultDeployConfiguration + + 1 + + + dwarf + + cpu-cycles + + + 250 + + -e + cpu-cycles + --call-graph + dwarf,4096 + -F + 250 + + -F + true + 4096 + false + false + 1000 + + true + + false + false + false + false + true + 0.01 + 10 + true + kcachegrind + 1 + 25 + + 1 + true + false + true + valgrind + + 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + + 2 + + Qt4ProjectManager.Qt4RunConfiguration:C:/Users/admin/Desktop/SVN/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro + C:/Users/admin/Desktop/SVN/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro + + false + + false + true + true + false + false + true + + + + 1 + + + + ProjectExplorer.Project.TargetCount + 2 + + + ProjectExplorer.Project.Updater.FileVersion + 22 + + + Version + 22 + + diff --git a/softwareDirectory/AutoVerScheme/basecommonapi.cpp b/softwareDirectory/AutoVerScheme/basecommonapi.cpp index 63fcb02..06ab274 100644 --- a/softwareDirectory/AutoVerScheme/basecommonapi.cpp +++ b/softwareDirectory/AutoVerScheme/basecommonapi.cpp @@ -1107,9 +1107,10 @@ bool BaseCommonApi::InsertInstructionLib(InstructionLib instructionLib) { QSqlQuery query; - query.prepare("INSERT INTO zd_instruction_library (id,device_id,device_name,instruct_config,instruct_read,type,verification_id,check_id,create_time,update_time) " + query.prepare("INSERT INTO zd_instruction_library (id,device_id,device_name,instruct_config,instruct_read,type,belong_vername,belong_checkname,create_time,update_time) " " VALUES (:id,:device_id,:device_name,:instruct_config,:instruct_read,:type,:belong_vername,:belong_checkname,:create_time,:update_time)"); - + QString formattedCreateDateTime = instructionLib.create_time.toString("yyyy-MM-dd HH:mm:ss"); + QString formattedUpdateDateTime = instructionLib.update_time.toString("yyyy-MM-dd HH:mm:ss"); query.bindValue(":id", instructionLib.id); query.bindValue(":device_id", instructionLib.device_id); query.bindValue(":device_name", instructionLib.device_name); @@ -1118,8 +1119,8 @@ query.bindValue(":type", instructionLib.type); query.bindValue(":belong_vername", instructionLib.belong_vername); query.bindValue(":belong_checkname", instructionLib.belong_checkname); - query.bindValue(":create_time", instructionLib.create_time); - query.bindValue(":update_time", instructionLib.update_time); + query.bindValue(":create_time", formattedCreateDateTime); + query.bindValue(":update_time", formattedUpdateDateTime); bool isSuccess = query.exec(); if (!isSuccess) { qDebug() << "InsertTaskBasic query failed: " << query.lastError().text(); diff --git a/softwareDirectory/AutoVerScheme/checkmethodmanage.cpp b/softwareDirectory/AutoVerScheme/checkmethodmanage.cpp index b83b561..fca8ee7 100644 --- a/softwareDirectory/AutoVerScheme/checkmethodmanage.cpp +++ b/softwareDirectory/AutoVerScheme/checkmethodmanage.cpp @@ -92,7 +92,7 @@ //ui->tableWidget->setItem(row, 0, new QTableWidgetItem(dept.id)); ui->tableWidget_2->setItem(row, 1, new QTableWidgetItem(program.program_name)); //设置数据 ui->tableWidget_2->setItem(row, 2, new QTableWidgetItem(program.create_name)); //设置数据 - ui->tableWidget_2->setItem(row, 3, new QTableWidgetItem(program.create_time.toString())); //设置数据 + ui->tableWidget_2->setItem(row, 3, new QTableWidgetItem(program.create_time.toString("yyyy-MM-dd"))); //设置数据 ui->tableWidget_2->setItem(row, 4, new QTableWidgetItem(program.remark)); //设置数据 QPushButton *btn_1 = new QPushButton(); diff --git a/softwareDirectory/AutoVerScheme/formaddrsetting.cpp b/softwareDirectory/AutoVerScheme/formaddrsetting.cpp index e0fb33a..62d0dc1 100644 --- a/softwareDirectory/AutoVerScheme/formaddrsetting.cpp +++ b/softwareDirectory/AutoVerScheme/formaddrsetting.cpp @@ -1,14 +1,223 @@ #include "formaddrsetting.h" #include "ui_formaddrsetting.h" +#include -FormAddrSetting::FormAddrSetting(QWidget *parent,int type,QString id) : +FormAddrSetting::FormAddrSetting(QWidget *parent,int type,QString id,QString deviceId) : QWidget(parent), + iType(type), + sId(id), + sDeviceId(deviceId), ui(new Ui::FormAddrSetting) { ui->setupUi(this); + //ui->tableWidgetMethod->setColumnCount(7); + initCmdTable(); +} +void FormAddrSetting::initCmdTable() +{ + ui->tableWidget->verticalHeader()->setParent(nullptr); + for(int i=1;i<4;i++) + ui->tableWidget->horizontalHeader()->setSectionResizeMode(i,QHeaderView::Stretch); + ui->tableWidget->setColumnWidth(0, 60); + ui->tableWidget->setColumnWidth(4, 100); + cmdList = BaseCommonApi::getInstructionLib(sId); + int rowCount = 0; + int row=0; + QString State; + for (const InstructionLib& cmd : cmdList) { + rowCount = ui->tableWidget->rowCount(); + + ui->tableWidget->insertRow(rowCount); + updateRow(row,cmd); + row++; + } + QStringList headlist; + QList caliList =BaseCommonApi::Search_CalibrationTable(sDeviceId,&headlist); + for (const QStringList& item : caliList){ + this->ui->comboBox->addItem(item[1]); + } +} + +void FormAddrSetting::updateRow(int row,InstructionLib cmd) +{ + ui->tableWidget->setItem(row, 0, new QTableWidgetItem(QString::number(row+1))); + /*if(cmd.type==0) + ui->tableWidget->setItem(row, 1, new QTableWidgetItem(cmd.belong_vername)); //设置数据 + else + ui->tableWidget->setItem(row, 1, new QTableWidgetItem(cmd.belong_checkname));*/ + ui->tableWidget->setItem(row, 1, new QTableWidgetItem(cmd.belong_vername)); + ui->tableWidget->setItem(row, 2, new QTableWidgetItem(cmd.instruct_config)); //设置数据 + ui->tableWidget->setItem(row, 3, new QTableWidgetItem(cmd.instruct_read)); //设置数据 + QPushButton *btn_1 = new QPushButton(); + btn_1->setText(tr("编辑")); + btn_1->setStyleSheet("QPushButton{" + "background-color:rgba(255,255,255,0);" + "color:rgba(92,170,54,100);" + "text-decoration:underline;" + "}"); + btn_1->setCursor(Qt::PointingHandCursor); + connect(btn_1,SIGNAL(clicked()),this,SLOT(on_editButton_clicked())); + + btn_1->setIconSize(QSize(16,16)); + btn_1->setIcon(QIcon(":/image/Index/u2324.svg")); + /*QPushButton *btn_2 = new QPushButton(); + btn_2->setText(tr("删除")); + btn_2->setStyleSheet("QPushButton{" + "background-color:rgba(255,255,255,0);" + "color:rgba(170,17,17,100);" + "text-decoration:underline;" + "}"); + btn_2->setCursor(Qt::PointingHandCursor); + connect(btn_2,SIGNAL(clicked()),this,SLOT(on_deleteButton_clicked())); + btn_2->setIconSize(QSize(16,16)); + btn_2->setIcon(QIcon(":/image/Index/u2325.svg"));*/ + QWidget *tmp_widget = new QWidget(); + QHBoxLayout *tmp_layout = new QHBoxLayout(tmp_widget); + tmp_layout->addWidget(btn_1); + //tmp_layout->addWidget(btn_2); + tmp_layout->setMargin(0); + ui->tableWidget->setCellWidget(row,4,tmp_widget); } FormAddrSetting::~FormAddrSetting() { + cmdList.clear(); delete ui; } + +void FormAddrSetting::on_pushButton_15_clicked() +{ + editIdx=-1; + if(this->ui->comboBox->count()>0) + this->ui->comboBox->setCurrentIndex(0); + this->ui->textEdit->setText(""); + this->ui->textEdit_2->setText(""); + this->ui->stackedWidget->setCurrentIndex(1); +} + +void FormAddrSetting::on_pushButton_14_clicked() +{ + this->close(); +} + +void FormAddrSetting::on_pushButton_18_clicked() +{ + if(editIdx==-1){ + QString sName = ""; + if(iType==0){ + QList result = BaseCommonApi::getTestedCatDevice(sId); + if(result.length()>0){ + sName = result[0].equipment_name; + } + }else{ + QList result = BaseCommonApi::getCatDeviceInfor(sId); + if(result.length()>0){ + sName = result[0].equipment_name; + } + } + InstructionLib cmd; + BaseCommonApi baseApi; + qint64 id = baseApi.generateId(); + cmd.id = QString::number(id); + cmd.device_id = sId; + cmd.device_name = sName; + cmd.type = iType; + cmd.belong_vername = this->ui->comboBox->currentText(); + cmd.instruct_config = this->ui->textEdit->toPlainText(); + cmd.instruct_read = this->ui->textEdit_2->toPlainText(); + cmd.create_time = QDateTime::currentDateTime(); + cmd.update_time = QDateTime::currentDateTime(); + BaseCommonApi::InsertInstructionLib(cmd); + cmdList.append(cmd); + int rowCount = ui->tableWidget->rowCount(); + ui->tableWidget->insertRow(rowCount); + updateRow(rowCount,cmd); + }else{ + InstructionLib cmd = cmdList[editIdx]; + cmd.belong_vername = this->ui->comboBox->currentText(); + cmd.instruct_config = this->ui->textEdit->toPlainText(); + cmd.instruct_read = this->ui->textEdit_2->toPlainText(); + cmd.update_time = QDateTime::currentDateTime(); + BaseCommonApi::UpdateInstructionLib(cmd); + updateRow(editIdx,cmd); + } + this->ui->stackedWidget->setCurrentIndex(0); +} + +void FormAddrSetting::on_editButton_clicked() +{ + QPushButton *pushButton_ = dynamic_cast(this->sender()); + if(NULL == pushButton_) + { + return; + } + // 获取按钮的x坐标和y坐标 + int x = pushButton_->parentWidget()->frameGeometry().x(); + int y = pushButton_->parentWidget()->frameGeometry().y(); + // 根据按钮的x和y坐标来定位对应的单元格 + QModelIndex index = ui->tableWidget->indexAt(QPoint(x, y)); + // 获取该按钮所在表格的行号和列号 + int row = index.row(); + //int column = index.column(); + //QString sId = cmdList[row].id; + editIdx = row; + InstructionLib cmd = cmdList[row]; + + this->ui->comboBox->setCurrentText(cmd.belong_vername); + this->ui->textEdit->setText(cmd.instruct_config); + this->ui->textEdit_2->setText(cmd.instruct_read); + this->ui->stackedWidget->setCurrentIndex(1); +} + +void FormAddrSetting::on_deleteButton_clicked() +{ + QPushButton *pushButton_ = dynamic_cast(this->sender()); + if(NULL == pushButton_) + { + return; + } + // 获取按钮的x坐标和y坐标 + int x = pushButton_->parentWidget()->frameGeometry().x(); + int y = pushButton_->parentWidget()->frameGeometry().y(); + // 根据按钮的x和y坐标来定位对应的单元格 + QModelIndex index = ui->tableWidget->indexAt(QPoint(x, y)); + // 获取该按钮所在表格的行号和列号 + int row = index.row(); + //int column = index.column(); + if(QMessageBox::question(this, "确认", "确认删除吗?", QMessageBox::Yes | QMessageBox::No, QMessageBox::Yes)==QMessageBox::Yes) + { + if(BaseCommonApi::DeleteInstructionLib(cmdList[row].id)) + { + cmdList.removeAt(row); + ui->tableWidget->removeRow(row); + } + } +} + +void FormAddrSetting::on_pushButton_3_clicked() +{ + if(QMessageBox::question(this, "确认", "确认删除吗?", QMessageBox::Yes | QMessageBox::No, QMessageBox::Yes)==QMessageBox::Yes) + { + if(BaseCommonApi::DeleteInstructionLib(sId)) + { + cmdList.clear(); + ui->tableWidget->clearContents(); + ui->tableWidget->setRowCount(0); + } + } +} + +void FormAddrSetting::on_pushButton_2_clicked() +{ + +} + +void FormAddrSetting::on_pushButton_clicked() +{ + +} + +void FormAddrSetting::on_pushButton_4_clicked() +{ + this->ui->stackedWidget->setCurrentIndex(0); +} diff --git a/softwareDirectory/AutoVerScheme/formaddrsetting.h b/softwareDirectory/AutoVerScheme/formaddrsetting.h index 6392d44..3243cc8 100644 --- a/softwareDirectory/AutoVerScheme/formaddrsetting.h +++ b/softwareDirectory/AutoVerScheme/formaddrsetting.h @@ -2,6 +2,7 @@ #define FORMADDRSETTING_H #include +#include "basecommonapi.h" namespace Ui { class FormAddrSetting; @@ -12,11 +13,35 @@ Q_OBJECT public: - explicit FormAddrSetting(QWidget *parent = nullptr,int type=1,QString id=""); + explicit FormAddrSetting(QWidget *parent = nullptr,int type=1,QString id="",QString deviceId=""); ~FormAddrSetting(); +private: + void initCmdTable(); + void updateRow(int row,InstructionLib cmd); + +private slots: + void on_pushButton_15_clicked(); + + void on_pushButton_14_clicked(); + + void on_pushButton_18_clicked(); + void on_editButton_clicked(); + void on_deleteButton_clicked(); + void on_pushButton_3_clicked(); + + void on_pushButton_2_clicked(); + + void on_pushButton_clicked(); + + void on_pushButton_4_clicked(); private: Ui::FormAddrSetting *ui; + QList cmdList; + QString sId; + QString sDeviceId; + int iType=0; + int editIdx=-1; }; #endif // FORMADDRSETTING_H diff --git a/softwareDirectory/AutoVerScheme/formaddrsetting.ui b/softwareDirectory/AutoVerScheme/formaddrsetting.ui index 9f73632..fdc95da 100644 --- a/softwareDirectory/AutoVerScheme/formaddrsetting.ui +++ b/softwareDirectory/AutoVerScheme/formaddrsetting.ui @@ -16,7 +16,7 @@ background-color: rgb(242, 242, 242); - + @@ -75,133 +75,484 @@ - - - - - - 20 - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - 1 - 0 - - - - - 72 - 26 - - - - - 12 - 75 - true - - - - color: rgb(255, 255, 255); + + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + 1 + 0 + + + + + 72 + 26 + + + + + 12 + 75 + true + + + + color: rgb(255, 255, 255); background-color: rgb(74, 102, 186); border-radius:5px; - - - 新增 - - - - - - - - 1 - 0 - - - - - 72 - 26 - - - - - 12 - 75 - true - - - - color: rgb(255, 255, 255); + + + 新增 + + + + + + + + 72 + 26 + + + + + 12 + 75 + true + + + + color: rgb(255, 255, 255); +background-color: rgb(170, 17, 17); +border-radius:5px; + + + 删除 + + + + + + + + 72 + 26 + + + + + 12 + 75 + true + + + + color: rgb(255, 255, 255); background-color: rgb(74, 102, 186); border-radius:5px; - - - 删除 - - - - - - - - 1 - 0 - - - - - 72 - 26 - - - - - 12 - 75 - true - - - - color: rgb(255, 255, 255); + + + 导入 + + + + + + + + 72 + 26 + + + + + 12 + 75 + true + + + + color: rgb(255, 255, 255); background-color: rgb(74, 102, 186); border-radius:5px; + + + 导出 + + + + + + + + + + 序号 + + + + 12 + + + + + + 项目名称 + + + + 12 + + + + + + 配置命令 + + + + 12 + + + + + + 读数命令 + + + + 12 + + + + + + 操作 + + + + 12 + + + + + + + + + + + 20 - - 保存 - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + 0 + 0 + + + + + 12 + + + + 项目名称 + + + + + + + + 0 + 0 + + + + + 12 + + + + true + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + 0 + 0 + + + + + 12 + + + + 配置命令 + + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop + + + + + + + + 12 + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + 0 + 0 + + + + + 12 + + + + 读数命令 + + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop + + + + + + + + 12 + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + Qt::Vertical + + + + 20 + 119 + + + + + + + + 20 + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + 1 + 0 + + + + + 72 + 26 + + + + + 12 + 75 + true + + + + color: rgb(255, 255, 255); +background-color: rgb(74, 102, 186); +border-radius:5px; + + + 保存 + + + + + + + + 72 + 26 + + + + + 12 + 75 + true + + + + color: rgb(255, 255, 255); +background-color: rgb(170, 17, 17); +border-radius:5px; + + + 取消 + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/formcommsetting.cpp b/softwareDirectory/AutoVerScheme/formcommsetting.cpp index 26d7cb6..f5c4f9d 100644 --- a/softwareDirectory/AutoVerScheme/formcommsetting.cpp +++ b/softwareDirectory/AutoVerScheme/formcommsetting.cpp @@ -3,12 +3,74 @@ FormCommSetting::FormCommSetting(QWidget *parent,int type,QString id) : QWidget(parent), + deviceId(id), ui(new Ui::FormCommSetting) { ui->setupUi(this); + if(deviceId!=""){ + addrList = BaseCommonApi::getVerificationProgramConfigInterface(deviceId); + if(addrList.length()>0){ + VerificationProgramConfigInterface addr = addrList[0]; + if(addr.communication_type == "SerialPort") + ui->radioButton->setChecked(true); + else + ui->radioButton_2->setChecked(true); + ui->comboBox_9->setCurrentText(addr.visa); + if(addr.serial_port!=""){ + QStringList sList = addr.serial_port.split(";"); + if(sList.length()==5){ + ui->comboBox->setCurrentText(sList[0]); + ui->comboBox_3->setCurrentText(sList[1]); + ui->comboBox_4->setCurrentText(sList[2]); + ui->comboBox_7->setCurrentText(sList[3]); + ui->comboBox_8->setCurrentText(sList[4]); + } + } + } + } } FormCommSetting::~FormCommSetting() { delete ui; } + +void FormCommSetting::on_pushButton_14_clicked() +{ + if(addrList.length()>0){ + VerificationProgramConfigInterface addr = addrList[0]; + if(ui->radioButton->isChecked()) + addr.communication_type = "SerialPort"; + else + addr.communication_type = "Visa"; + addr.serial_port = QString("%1;%2;%3;%4;%5").arg(ui->comboBox->currentText()).arg(ui->comboBox_3->currentText()).arg(ui->comboBox_4->currentText()) + .arg(ui->comboBox_7->currentText()).arg(ui->comboBox_8->currentText()); + addr.visa = ui->comboBox_9->currentText(); + BaseCommonApi::UpdateVerificationProgramConfigInterface(addr); + }else{ + VerificationProgramConfigInterface addr; + BaseCommonApi baseApi; + qint64 id = baseApi.generateId(); + addr.id = QString::number(id); + addr.device_id = deviceId; + if(ui->radioButton->isChecked()) + addr.communication_type = "SerialPort"; + else + addr.communication_type = "Visa"; + addr.serial_port = QString("%1;%2;%3;%4;%5").arg(ui->comboBox->currentText()).arg(ui->comboBox_3->currentText()).arg(ui->comboBox_4->currentText()) + .arg(ui->comboBox_7->currentText()).arg(ui->comboBox_8->currentText()); + addr.visa = ui->comboBox_9->currentText(); + BaseCommonApi::InsertVerificationProgramConfigInterface(addr); + } + this->close(); +} + +void FormCommSetting::on_radioButton_toggled(bool checked) +{ + ui->radioButton_2->setChecked(!ui->radioButton->isChecked()); +} + +void FormCommSetting::on_radioButton_2_toggled(bool checked) +{ + ui->radioButton->setChecked(!ui->radioButton_2->isChecked()); +} diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user index ce0b2dc..373bbda 100644 --- a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user @@ -1,10 +1,10 @@ - + EnvironmentId - {c08df58c-84a7-4965-bca6-e98789474efa} + {2746248a-b112-4e0f-9ae0-9e61f2a42309} ProjectExplorer.Project.ActiveTarget @@ -71,7 +71,7 @@ 0 0 - C:/Users/admin/Desktop/SVN/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Debug + D:/dev/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Debug true @@ -119,7 +119,7 @@ 2 - C:/Users/admin/Desktop/SVN/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Release + D:/dev/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Release true @@ -167,7 +167,7 @@ 0 - C:/Users/admin/Desktop/SVN/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Profile + D:/dev/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Profile true @@ -287,8 +287,8 @@ 2 - Qt4ProjectManager.Qt4RunConfiguration:C:/Users/admin/Desktop/SVN/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro - C:/Users/admin/Desktop/SVN/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro + Qt4ProjectManager.Qt4RunConfiguration:D:/dev/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro + D:/dev/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro false @@ -299,7 +299,7 @@ false true - C:/Users/admin/Desktop/SVN/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Debug + D:/dev/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Debug 1 @@ -314,7 +314,7 @@ 0 0 - C:/Users/admin/Desktop/SVN/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug + D:/dev/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug true @@ -362,7 +362,7 @@ 2 - C:/Users/admin/Desktop/SVN/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Release + D:/dev/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Release true @@ -410,7 +410,7 @@ 0 - C:/Users/admin/Desktop/SVN/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Profile + D:/dev/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Profile true @@ -530,8 +530,8 @@ 2 - Qt4ProjectManager.Qt4RunConfiguration:C:/Users/admin/Desktop/SVN/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro - C:/Users/admin/Desktop/SVN/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro + Qt4ProjectManager.Qt4RunConfiguration:D:/dev/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro + D:/dev/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro false diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user.c08df58 b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user.c08df58 new file mode 100644 index 0000000..803b854 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user.c08df58 @@ -0,0 +1,562 @@ + + + + + + EnvironmentId + {c08df58c-84a7-4965-bca6-e98789474efa} + + + ProjectExplorer.Project.ActiveTarget + 0 + + + ProjectExplorer.Project.EditorSettings + + true + false + true + + Cpp + + CppGlobal + + + + QmlJS + + QmlJSGlobal + + + 2 + UTF-8 + false + 4 + false + 80 + true + true + 1 + true + false + 0 + true + true + 0 + 8 + true + 1 + true + true + true + false + + + + ProjectExplorer.Project.PluginSettings + + + -fno-delayed-template-parsing + + true + + + + ProjectExplorer.Project.Target.0 + + Desktop Qt 5.14.2 MinGW 64-bit + Desktop Qt 5.14.2 MinGW 64-bit + qt.qt5.5142.win64_mingw73_kit + 0 + 0 + 0 + + C:/Users/admin/Desktop/SVN/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Debug + + + true + QtProjectManager.QMakeBuildStep + true + + false + false + false + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Debug + Qt4ProjectManager.Qt4BuildConfiguration + 2 + + + C:/Users/admin/Desktop/SVN/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Release + + + true + QtProjectManager.QMakeBuildStep + false + + false + false + true + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Release + Qt4ProjectManager.Qt4BuildConfiguration + 0 + + + C:/Users/admin/Desktop/SVN/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Profile + + + true + QtProjectManager.QMakeBuildStep + true + + false + true + true + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Profile + Qt4ProjectManager.Qt4BuildConfiguration + 0 + + 3 + + + 0 + Deploy + Deploy + ProjectExplorer.BuildSteps.Deploy + + 1 + ProjectExplorer.DefaultDeployConfiguration + + 1 + + + dwarf + + cpu-cycles + + + 250 + + -e + cpu-cycles + --call-graph + dwarf,4096 + -F + 250 + + -F + true + 4096 + false + false + 1000 + + true + + false + false + false + false + true + 0.01 + 10 + true + kcachegrind + 1 + 25 + + 1 + true + false + true + valgrind + + 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + + 2 + + Qt4ProjectManager.Qt4RunConfiguration:C:/Users/admin/Desktop/SVN/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro + C:/Users/admin/Desktop/SVN/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro + + false + + false + true + true + false + false + true + + C:/Users/admin/Desktop/SVN/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Debug + + 1 + + + + ProjectExplorer.Project.Target.1 + + Desktop Qt 5.14.2 MinGW 32-bit + Desktop Qt 5.14.2 MinGW 32-bit + qt.qt5.5142.win32_mingw73_kit + 0 + 0 + 0 + + C:/Users/admin/Desktop/SVN/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug + + + true + QtProjectManager.QMakeBuildStep + true + + false + false + false + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Debug + Qt4ProjectManager.Qt4BuildConfiguration + 2 + + + C:/Users/admin/Desktop/SVN/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Release + + + true + QtProjectManager.QMakeBuildStep + false + + false + false + true + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Release + Qt4ProjectManager.Qt4BuildConfiguration + 0 + + + C:/Users/admin/Desktop/SVN/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Profile + + + true + QtProjectManager.QMakeBuildStep + true + + false + true + true + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Profile + Qt4ProjectManager.Qt4BuildConfiguration + 0 + + 3 + + + 0 + Deploy + Deploy + ProjectExplorer.BuildSteps.Deploy + + 1 + ProjectExplorer.DefaultDeployConfiguration + + 1 + + + dwarf + + cpu-cycles + + + 250 + + -e + cpu-cycles + --call-graph + dwarf,4096 + -F + 250 + + -F + true + 4096 + false + false + 1000 + + true + + false + false + false + false + true + 0.01 + 10 + true + kcachegrind + 1 + 25 + + 1 + true + false + true + valgrind + + 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + + 2 + + Qt4ProjectManager.Qt4RunConfiguration:C:/Users/admin/Desktop/SVN/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro + C:/Users/admin/Desktop/SVN/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro + + false + + false + true + true + false + false + true + + + + 1 + + + + ProjectExplorer.Project.TargetCount + 2 + + + ProjectExplorer.Project.Updater.FileVersion + 22 + + + Version + 22 + + diff --git a/softwareDirectory/AutoVerScheme/basecommonapi.cpp b/softwareDirectory/AutoVerScheme/basecommonapi.cpp index 63fcb02..06ab274 100644 --- a/softwareDirectory/AutoVerScheme/basecommonapi.cpp +++ b/softwareDirectory/AutoVerScheme/basecommonapi.cpp @@ -1107,9 +1107,10 @@ bool BaseCommonApi::InsertInstructionLib(InstructionLib instructionLib) { QSqlQuery query; - query.prepare("INSERT INTO zd_instruction_library (id,device_id,device_name,instruct_config,instruct_read,type,verification_id,check_id,create_time,update_time) " + query.prepare("INSERT INTO zd_instruction_library (id,device_id,device_name,instruct_config,instruct_read,type,belong_vername,belong_checkname,create_time,update_time) " " VALUES (:id,:device_id,:device_name,:instruct_config,:instruct_read,:type,:belong_vername,:belong_checkname,:create_time,:update_time)"); - + QString formattedCreateDateTime = instructionLib.create_time.toString("yyyy-MM-dd HH:mm:ss"); + QString formattedUpdateDateTime = instructionLib.update_time.toString("yyyy-MM-dd HH:mm:ss"); query.bindValue(":id", instructionLib.id); query.bindValue(":device_id", instructionLib.device_id); query.bindValue(":device_name", instructionLib.device_name); @@ -1118,8 +1119,8 @@ query.bindValue(":type", instructionLib.type); query.bindValue(":belong_vername", instructionLib.belong_vername); query.bindValue(":belong_checkname", instructionLib.belong_checkname); - query.bindValue(":create_time", instructionLib.create_time); - query.bindValue(":update_time", instructionLib.update_time); + query.bindValue(":create_time", formattedCreateDateTime); + query.bindValue(":update_time", formattedUpdateDateTime); bool isSuccess = query.exec(); if (!isSuccess) { qDebug() << "InsertTaskBasic query failed: " << query.lastError().text(); diff --git a/softwareDirectory/AutoVerScheme/checkmethodmanage.cpp b/softwareDirectory/AutoVerScheme/checkmethodmanage.cpp index b83b561..fca8ee7 100644 --- a/softwareDirectory/AutoVerScheme/checkmethodmanage.cpp +++ b/softwareDirectory/AutoVerScheme/checkmethodmanage.cpp @@ -92,7 +92,7 @@ //ui->tableWidget->setItem(row, 0, new QTableWidgetItem(dept.id)); ui->tableWidget_2->setItem(row, 1, new QTableWidgetItem(program.program_name)); //设置数据 ui->tableWidget_2->setItem(row, 2, new QTableWidgetItem(program.create_name)); //设置数据 - ui->tableWidget_2->setItem(row, 3, new QTableWidgetItem(program.create_time.toString())); //设置数据 + ui->tableWidget_2->setItem(row, 3, new QTableWidgetItem(program.create_time.toString("yyyy-MM-dd"))); //设置数据 ui->tableWidget_2->setItem(row, 4, new QTableWidgetItem(program.remark)); //设置数据 QPushButton *btn_1 = new QPushButton(); diff --git a/softwareDirectory/AutoVerScheme/formaddrsetting.cpp b/softwareDirectory/AutoVerScheme/formaddrsetting.cpp index e0fb33a..62d0dc1 100644 --- a/softwareDirectory/AutoVerScheme/formaddrsetting.cpp +++ b/softwareDirectory/AutoVerScheme/formaddrsetting.cpp @@ -1,14 +1,223 @@ #include "formaddrsetting.h" #include "ui_formaddrsetting.h" +#include -FormAddrSetting::FormAddrSetting(QWidget *parent,int type,QString id) : +FormAddrSetting::FormAddrSetting(QWidget *parent,int type,QString id,QString deviceId) : QWidget(parent), + iType(type), + sId(id), + sDeviceId(deviceId), ui(new Ui::FormAddrSetting) { ui->setupUi(this); + //ui->tableWidgetMethod->setColumnCount(7); + initCmdTable(); +} +void FormAddrSetting::initCmdTable() +{ + ui->tableWidget->verticalHeader()->setParent(nullptr); + for(int i=1;i<4;i++) + ui->tableWidget->horizontalHeader()->setSectionResizeMode(i,QHeaderView::Stretch); + ui->tableWidget->setColumnWidth(0, 60); + ui->tableWidget->setColumnWidth(4, 100); + cmdList = BaseCommonApi::getInstructionLib(sId); + int rowCount = 0; + int row=0; + QString State; + for (const InstructionLib& cmd : cmdList) { + rowCount = ui->tableWidget->rowCount(); + + ui->tableWidget->insertRow(rowCount); + updateRow(row,cmd); + row++; + } + QStringList headlist; + QList caliList =BaseCommonApi::Search_CalibrationTable(sDeviceId,&headlist); + for (const QStringList& item : caliList){ + this->ui->comboBox->addItem(item[1]); + } +} + +void FormAddrSetting::updateRow(int row,InstructionLib cmd) +{ + ui->tableWidget->setItem(row, 0, new QTableWidgetItem(QString::number(row+1))); + /*if(cmd.type==0) + ui->tableWidget->setItem(row, 1, new QTableWidgetItem(cmd.belong_vername)); //设置数据 + else + ui->tableWidget->setItem(row, 1, new QTableWidgetItem(cmd.belong_checkname));*/ + ui->tableWidget->setItem(row, 1, new QTableWidgetItem(cmd.belong_vername)); + ui->tableWidget->setItem(row, 2, new QTableWidgetItem(cmd.instruct_config)); //设置数据 + ui->tableWidget->setItem(row, 3, new QTableWidgetItem(cmd.instruct_read)); //设置数据 + QPushButton *btn_1 = new QPushButton(); + btn_1->setText(tr("编辑")); + btn_1->setStyleSheet("QPushButton{" + "background-color:rgba(255,255,255,0);" + "color:rgba(92,170,54,100);" + "text-decoration:underline;" + "}"); + btn_1->setCursor(Qt::PointingHandCursor); + connect(btn_1,SIGNAL(clicked()),this,SLOT(on_editButton_clicked())); + + btn_1->setIconSize(QSize(16,16)); + btn_1->setIcon(QIcon(":/image/Index/u2324.svg")); + /*QPushButton *btn_2 = new QPushButton(); + btn_2->setText(tr("删除")); + btn_2->setStyleSheet("QPushButton{" + "background-color:rgba(255,255,255,0);" + "color:rgba(170,17,17,100);" + "text-decoration:underline;" + "}"); + btn_2->setCursor(Qt::PointingHandCursor); + connect(btn_2,SIGNAL(clicked()),this,SLOT(on_deleteButton_clicked())); + btn_2->setIconSize(QSize(16,16)); + btn_2->setIcon(QIcon(":/image/Index/u2325.svg"));*/ + QWidget *tmp_widget = new QWidget(); + QHBoxLayout *tmp_layout = new QHBoxLayout(tmp_widget); + tmp_layout->addWidget(btn_1); + //tmp_layout->addWidget(btn_2); + tmp_layout->setMargin(0); + ui->tableWidget->setCellWidget(row,4,tmp_widget); } FormAddrSetting::~FormAddrSetting() { + cmdList.clear(); delete ui; } + +void FormAddrSetting::on_pushButton_15_clicked() +{ + editIdx=-1; + if(this->ui->comboBox->count()>0) + this->ui->comboBox->setCurrentIndex(0); + this->ui->textEdit->setText(""); + this->ui->textEdit_2->setText(""); + this->ui->stackedWidget->setCurrentIndex(1); +} + +void FormAddrSetting::on_pushButton_14_clicked() +{ + this->close(); +} + +void FormAddrSetting::on_pushButton_18_clicked() +{ + if(editIdx==-1){ + QString sName = ""; + if(iType==0){ + QList result = BaseCommonApi::getTestedCatDevice(sId); + if(result.length()>0){ + sName = result[0].equipment_name; + } + }else{ + QList result = BaseCommonApi::getCatDeviceInfor(sId); + if(result.length()>0){ + sName = result[0].equipment_name; + } + } + InstructionLib cmd; + BaseCommonApi baseApi; + qint64 id = baseApi.generateId(); + cmd.id = QString::number(id); + cmd.device_id = sId; + cmd.device_name = sName; + cmd.type = iType; + cmd.belong_vername = this->ui->comboBox->currentText(); + cmd.instruct_config = this->ui->textEdit->toPlainText(); + cmd.instruct_read = this->ui->textEdit_2->toPlainText(); + cmd.create_time = QDateTime::currentDateTime(); + cmd.update_time = QDateTime::currentDateTime(); + BaseCommonApi::InsertInstructionLib(cmd); + cmdList.append(cmd); + int rowCount = ui->tableWidget->rowCount(); + ui->tableWidget->insertRow(rowCount); + updateRow(rowCount,cmd); + }else{ + InstructionLib cmd = cmdList[editIdx]; + cmd.belong_vername = this->ui->comboBox->currentText(); + cmd.instruct_config = this->ui->textEdit->toPlainText(); + cmd.instruct_read = this->ui->textEdit_2->toPlainText(); + cmd.update_time = QDateTime::currentDateTime(); + BaseCommonApi::UpdateInstructionLib(cmd); + updateRow(editIdx,cmd); + } + this->ui->stackedWidget->setCurrentIndex(0); +} + +void FormAddrSetting::on_editButton_clicked() +{ + QPushButton *pushButton_ = dynamic_cast(this->sender()); + if(NULL == pushButton_) + { + return; + } + // 获取按钮的x坐标和y坐标 + int x = pushButton_->parentWidget()->frameGeometry().x(); + int y = pushButton_->parentWidget()->frameGeometry().y(); + // 根据按钮的x和y坐标来定位对应的单元格 + QModelIndex index = ui->tableWidget->indexAt(QPoint(x, y)); + // 获取该按钮所在表格的行号和列号 + int row = index.row(); + //int column = index.column(); + //QString sId = cmdList[row].id; + editIdx = row; + InstructionLib cmd = cmdList[row]; + + this->ui->comboBox->setCurrentText(cmd.belong_vername); + this->ui->textEdit->setText(cmd.instruct_config); + this->ui->textEdit_2->setText(cmd.instruct_read); + this->ui->stackedWidget->setCurrentIndex(1); +} + +void FormAddrSetting::on_deleteButton_clicked() +{ + QPushButton *pushButton_ = dynamic_cast(this->sender()); + if(NULL == pushButton_) + { + return; + } + // 获取按钮的x坐标和y坐标 + int x = pushButton_->parentWidget()->frameGeometry().x(); + int y = pushButton_->parentWidget()->frameGeometry().y(); + // 根据按钮的x和y坐标来定位对应的单元格 + QModelIndex index = ui->tableWidget->indexAt(QPoint(x, y)); + // 获取该按钮所在表格的行号和列号 + int row = index.row(); + //int column = index.column(); + if(QMessageBox::question(this, "确认", "确认删除吗?", QMessageBox::Yes | QMessageBox::No, QMessageBox::Yes)==QMessageBox::Yes) + { + if(BaseCommonApi::DeleteInstructionLib(cmdList[row].id)) + { + cmdList.removeAt(row); + ui->tableWidget->removeRow(row); + } + } +} + +void FormAddrSetting::on_pushButton_3_clicked() +{ + if(QMessageBox::question(this, "确认", "确认删除吗?", QMessageBox::Yes | QMessageBox::No, QMessageBox::Yes)==QMessageBox::Yes) + { + if(BaseCommonApi::DeleteInstructionLib(sId)) + { + cmdList.clear(); + ui->tableWidget->clearContents(); + ui->tableWidget->setRowCount(0); + } + } +} + +void FormAddrSetting::on_pushButton_2_clicked() +{ + +} + +void FormAddrSetting::on_pushButton_clicked() +{ + +} + +void FormAddrSetting::on_pushButton_4_clicked() +{ + this->ui->stackedWidget->setCurrentIndex(0); +} diff --git a/softwareDirectory/AutoVerScheme/formaddrsetting.h b/softwareDirectory/AutoVerScheme/formaddrsetting.h index 6392d44..3243cc8 100644 --- a/softwareDirectory/AutoVerScheme/formaddrsetting.h +++ b/softwareDirectory/AutoVerScheme/formaddrsetting.h @@ -2,6 +2,7 @@ #define FORMADDRSETTING_H #include +#include "basecommonapi.h" namespace Ui { class FormAddrSetting; @@ -12,11 +13,35 @@ Q_OBJECT public: - explicit FormAddrSetting(QWidget *parent = nullptr,int type=1,QString id=""); + explicit FormAddrSetting(QWidget *parent = nullptr,int type=1,QString id="",QString deviceId=""); ~FormAddrSetting(); +private: + void initCmdTable(); + void updateRow(int row,InstructionLib cmd); + +private slots: + void on_pushButton_15_clicked(); + + void on_pushButton_14_clicked(); + + void on_pushButton_18_clicked(); + void on_editButton_clicked(); + void on_deleteButton_clicked(); + void on_pushButton_3_clicked(); + + void on_pushButton_2_clicked(); + + void on_pushButton_clicked(); + + void on_pushButton_4_clicked(); private: Ui::FormAddrSetting *ui; + QList cmdList; + QString sId; + QString sDeviceId; + int iType=0; + int editIdx=-1; }; #endif // FORMADDRSETTING_H diff --git a/softwareDirectory/AutoVerScheme/formaddrsetting.ui b/softwareDirectory/AutoVerScheme/formaddrsetting.ui index 9f73632..fdc95da 100644 --- a/softwareDirectory/AutoVerScheme/formaddrsetting.ui +++ b/softwareDirectory/AutoVerScheme/formaddrsetting.ui @@ -16,7 +16,7 @@ background-color: rgb(242, 242, 242); - + @@ -75,133 +75,484 @@ - - - - - - 20 - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - 1 - 0 - - - - - 72 - 26 - - - - - 12 - 75 - true - - - - color: rgb(255, 255, 255); + + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + 1 + 0 + + + + + 72 + 26 + + + + + 12 + 75 + true + + + + color: rgb(255, 255, 255); background-color: rgb(74, 102, 186); border-radius:5px; - - - 新增 - - - - - - - - 1 - 0 - - - - - 72 - 26 - - - - - 12 - 75 - true - - - - color: rgb(255, 255, 255); + + + 新增 + + + + + + + + 72 + 26 + + + + + 12 + 75 + true + + + + color: rgb(255, 255, 255); +background-color: rgb(170, 17, 17); +border-radius:5px; + + + 删除 + + + + + + + + 72 + 26 + + + + + 12 + 75 + true + + + + color: rgb(255, 255, 255); background-color: rgb(74, 102, 186); border-radius:5px; - - - 删除 - - - - - - - - 1 - 0 - - - - - 72 - 26 - - - - - 12 - 75 - true - - - - color: rgb(255, 255, 255); + + + 导入 + + + + + + + + 72 + 26 + + + + + 12 + 75 + true + + + + color: rgb(255, 255, 255); background-color: rgb(74, 102, 186); border-radius:5px; + + + 导出 + + + + + + + + + + 序号 + + + + 12 + + + + + + 项目名称 + + + + 12 + + + + + + 配置命令 + + + + 12 + + + + + + 读数命令 + + + + 12 + + + + + + 操作 + + + + 12 + + + + + + + + + + + 20 - - 保存 - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + 0 + 0 + + + + + 12 + + + + 项目名称 + + + + + + + + 0 + 0 + + + + + 12 + + + + true + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + 0 + 0 + + + + + 12 + + + + 配置命令 + + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop + + + + + + + + 12 + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + 0 + 0 + + + + + 12 + + + + 读数命令 + + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop + + + + + + + + 12 + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + Qt::Vertical + + + + 20 + 119 + + + + + + + + 20 + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + 1 + 0 + + + + + 72 + 26 + + + + + 12 + 75 + true + + + + color: rgb(255, 255, 255); +background-color: rgb(74, 102, 186); +border-radius:5px; + + + 保存 + + + + + + + + 72 + 26 + + + + + 12 + 75 + true + + + + color: rgb(255, 255, 255); +background-color: rgb(170, 17, 17); +border-radius:5px; + + + 取消 + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/formcommsetting.cpp b/softwareDirectory/AutoVerScheme/formcommsetting.cpp index 26d7cb6..f5c4f9d 100644 --- a/softwareDirectory/AutoVerScheme/formcommsetting.cpp +++ b/softwareDirectory/AutoVerScheme/formcommsetting.cpp @@ -3,12 +3,74 @@ FormCommSetting::FormCommSetting(QWidget *parent,int type,QString id) : QWidget(parent), + deviceId(id), ui(new Ui::FormCommSetting) { ui->setupUi(this); + if(deviceId!=""){ + addrList = BaseCommonApi::getVerificationProgramConfigInterface(deviceId); + if(addrList.length()>0){ + VerificationProgramConfigInterface addr = addrList[0]; + if(addr.communication_type == "SerialPort") + ui->radioButton->setChecked(true); + else + ui->radioButton_2->setChecked(true); + ui->comboBox_9->setCurrentText(addr.visa); + if(addr.serial_port!=""){ + QStringList sList = addr.serial_port.split(";"); + if(sList.length()==5){ + ui->comboBox->setCurrentText(sList[0]); + ui->comboBox_3->setCurrentText(sList[1]); + ui->comboBox_4->setCurrentText(sList[2]); + ui->comboBox_7->setCurrentText(sList[3]); + ui->comboBox_8->setCurrentText(sList[4]); + } + } + } + } } FormCommSetting::~FormCommSetting() { delete ui; } + +void FormCommSetting::on_pushButton_14_clicked() +{ + if(addrList.length()>0){ + VerificationProgramConfigInterface addr = addrList[0]; + if(ui->radioButton->isChecked()) + addr.communication_type = "SerialPort"; + else + addr.communication_type = "Visa"; + addr.serial_port = QString("%1;%2;%3;%4;%5").arg(ui->comboBox->currentText()).arg(ui->comboBox_3->currentText()).arg(ui->comboBox_4->currentText()) + .arg(ui->comboBox_7->currentText()).arg(ui->comboBox_8->currentText()); + addr.visa = ui->comboBox_9->currentText(); + BaseCommonApi::UpdateVerificationProgramConfigInterface(addr); + }else{ + VerificationProgramConfigInterface addr; + BaseCommonApi baseApi; + qint64 id = baseApi.generateId(); + addr.id = QString::number(id); + addr.device_id = deviceId; + if(ui->radioButton->isChecked()) + addr.communication_type = "SerialPort"; + else + addr.communication_type = "Visa"; + addr.serial_port = QString("%1;%2;%3;%4;%5").arg(ui->comboBox->currentText()).arg(ui->comboBox_3->currentText()).arg(ui->comboBox_4->currentText()) + .arg(ui->comboBox_7->currentText()).arg(ui->comboBox_8->currentText()); + addr.visa = ui->comboBox_9->currentText(); + BaseCommonApi::InsertVerificationProgramConfigInterface(addr); + } + this->close(); +} + +void FormCommSetting::on_radioButton_toggled(bool checked) +{ + ui->radioButton_2->setChecked(!ui->radioButton->isChecked()); +} + +void FormCommSetting::on_radioButton_2_toggled(bool checked) +{ + ui->radioButton->setChecked(!ui->radioButton_2->isChecked()); +} diff --git a/softwareDirectory/AutoVerScheme/formcommsetting.h b/softwareDirectory/AutoVerScheme/formcommsetting.h index 40cdb59..f307e67 100644 --- a/softwareDirectory/AutoVerScheme/formcommsetting.h +++ b/softwareDirectory/AutoVerScheme/formcommsetting.h @@ -2,6 +2,7 @@ #define FORMCOMMSETTING_H #include +#include "basecommonapi.h" namespace Ui { class FormCommSetting; @@ -15,8 +16,17 @@ explicit FormCommSetting(QWidget *parent = nullptr,int type=1,QString id=""); ~FormCommSetting(); +private slots: + void on_pushButton_14_clicked(); + + void on_radioButton_toggled(bool checked); + + void on_radioButton_2_toggled(bool checked); + private: Ui::FormCommSetting *ui; + QList addrList; + QString deviceId; }; #endif // FORMCOMMSETTING_H diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user index ce0b2dc..373bbda 100644 --- a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user @@ -1,10 +1,10 @@ - + EnvironmentId - {c08df58c-84a7-4965-bca6-e98789474efa} + {2746248a-b112-4e0f-9ae0-9e61f2a42309} ProjectExplorer.Project.ActiveTarget @@ -71,7 +71,7 @@ 0 0 - C:/Users/admin/Desktop/SVN/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Debug + D:/dev/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Debug true @@ -119,7 +119,7 @@ 2 - C:/Users/admin/Desktop/SVN/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Release + D:/dev/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Release true @@ -167,7 +167,7 @@ 0 - C:/Users/admin/Desktop/SVN/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Profile + D:/dev/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Profile true @@ -287,8 +287,8 @@ 2 - Qt4ProjectManager.Qt4RunConfiguration:C:/Users/admin/Desktop/SVN/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro - C:/Users/admin/Desktop/SVN/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro + Qt4ProjectManager.Qt4RunConfiguration:D:/dev/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro + D:/dev/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro false @@ -299,7 +299,7 @@ false true - C:/Users/admin/Desktop/SVN/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Debug + D:/dev/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Debug 1 @@ -314,7 +314,7 @@ 0 0 - C:/Users/admin/Desktop/SVN/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug + D:/dev/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug true @@ -362,7 +362,7 @@ 2 - C:/Users/admin/Desktop/SVN/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Release + D:/dev/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Release true @@ -410,7 +410,7 @@ 0 - C:/Users/admin/Desktop/SVN/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Profile + D:/dev/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Profile true @@ -530,8 +530,8 @@ 2 - Qt4ProjectManager.Qt4RunConfiguration:C:/Users/admin/Desktop/SVN/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro - C:/Users/admin/Desktop/SVN/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro + Qt4ProjectManager.Qt4RunConfiguration:D:/dev/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro + D:/dev/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro false diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user.c08df58 b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user.c08df58 new file mode 100644 index 0000000..803b854 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user.c08df58 @@ -0,0 +1,562 @@ + + + + + + EnvironmentId + {c08df58c-84a7-4965-bca6-e98789474efa} + + + ProjectExplorer.Project.ActiveTarget + 0 + + + ProjectExplorer.Project.EditorSettings + + true + false + true + + Cpp + + CppGlobal + + + + QmlJS + + QmlJSGlobal + + + 2 + UTF-8 + false + 4 + false + 80 + true + true + 1 + true + false + 0 + true + true + 0 + 8 + true + 1 + true + true + true + false + + + + ProjectExplorer.Project.PluginSettings + + + -fno-delayed-template-parsing + + true + + + + ProjectExplorer.Project.Target.0 + + Desktop Qt 5.14.2 MinGW 64-bit + Desktop Qt 5.14.2 MinGW 64-bit + qt.qt5.5142.win64_mingw73_kit + 0 + 0 + 0 + + C:/Users/admin/Desktop/SVN/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Debug + + + true + QtProjectManager.QMakeBuildStep + true + + false + false + false + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Debug + Qt4ProjectManager.Qt4BuildConfiguration + 2 + + + C:/Users/admin/Desktop/SVN/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Release + + + true + QtProjectManager.QMakeBuildStep + false + + false + false + true + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Release + Qt4ProjectManager.Qt4BuildConfiguration + 0 + + + C:/Users/admin/Desktop/SVN/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Profile + + + true + QtProjectManager.QMakeBuildStep + true + + false + true + true + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Profile + Qt4ProjectManager.Qt4BuildConfiguration + 0 + + 3 + + + 0 + Deploy + Deploy + ProjectExplorer.BuildSteps.Deploy + + 1 + ProjectExplorer.DefaultDeployConfiguration + + 1 + + + dwarf + + cpu-cycles + + + 250 + + -e + cpu-cycles + --call-graph + dwarf,4096 + -F + 250 + + -F + true + 4096 + false + false + 1000 + + true + + false + false + false + false + true + 0.01 + 10 + true + kcachegrind + 1 + 25 + + 1 + true + false + true + valgrind + + 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + + 2 + + Qt4ProjectManager.Qt4RunConfiguration:C:/Users/admin/Desktop/SVN/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro + C:/Users/admin/Desktop/SVN/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro + + false + + false + true + true + false + false + true + + C:/Users/admin/Desktop/SVN/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Debug + + 1 + + + + ProjectExplorer.Project.Target.1 + + Desktop Qt 5.14.2 MinGW 32-bit + Desktop Qt 5.14.2 MinGW 32-bit + qt.qt5.5142.win32_mingw73_kit + 0 + 0 + 0 + + C:/Users/admin/Desktop/SVN/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug + + + true + QtProjectManager.QMakeBuildStep + true + + false + false + false + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Debug + Qt4ProjectManager.Qt4BuildConfiguration + 2 + + + C:/Users/admin/Desktop/SVN/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Release + + + true + QtProjectManager.QMakeBuildStep + false + + false + false + true + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Release + Qt4ProjectManager.Qt4BuildConfiguration + 0 + + + C:/Users/admin/Desktop/SVN/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Profile + + + true + QtProjectManager.QMakeBuildStep + true + + false + true + true + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Profile + Qt4ProjectManager.Qt4BuildConfiguration + 0 + + 3 + + + 0 + Deploy + Deploy + ProjectExplorer.BuildSteps.Deploy + + 1 + ProjectExplorer.DefaultDeployConfiguration + + 1 + + + dwarf + + cpu-cycles + + + 250 + + -e + cpu-cycles + --call-graph + dwarf,4096 + -F + 250 + + -F + true + 4096 + false + false + 1000 + + true + + false + false + false + false + true + 0.01 + 10 + true + kcachegrind + 1 + 25 + + 1 + true + false + true + valgrind + + 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + + 2 + + Qt4ProjectManager.Qt4RunConfiguration:C:/Users/admin/Desktop/SVN/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro + C:/Users/admin/Desktop/SVN/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro + + false + + false + true + true + false + false + true + + + + 1 + + + + ProjectExplorer.Project.TargetCount + 2 + + + ProjectExplorer.Project.Updater.FileVersion + 22 + + + Version + 22 + + diff --git a/softwareDirectory/AutoVerScheme/basecommonapi.cpp b/softwareDirectory/AutoVerScheme/basecommonapi.cpp index 63fcb02..06ab274 100644 --- a/softwareDirectory/AutoVerScheme/basecommonapi.cpp +++ b/softwareDirectory/AutoVerScheme/basecommonapi.cpp @@ -1107,9 +1107,10 @@ bool BaseCommonApi::InsertInstructionLib(InstructionLib instructionLib) { QSqlQuery query; - query.prepare("INSERT INTO zd_instruction_library (id,device_id,device_name,instruct_config,instruct_read,type,verification_id,check_id,create_time,update_time) " + query.prepare("INSERT INTO zd_instruction_library (id,device_id,device_name,instruct_config,instruct_read,type,belong_vername,belong_checkname,create_time,update_time) " " VALUES (:id,:device_id,:device_name,:instruct_config,:instruct_read,:type,:belong_vername,:belong_checkname,:create_time,:update_time)"); - + QString formattedCreateDateTime = instructionLib.create_time.toString("yyyy-MM-dd HH:mm:ss"); + QString formattedUpdateDateTime = instructionLib.update_time.toString("yyyy-MM-dd HH:mm:ss"); query.bindValue(":id", instructionLib.id); query.bindValue(":device_id", instructionLib.device_id); query.bindValue(":device_name", instructionLib.device_name); @@ -1118,8 +1119,8 @@ query.bindValue(":type", instructionLib.type); query.bindValue(":belong_vername", instructionLib.belong_vername); query.bindValue(":belong_checkname", instructionLib.belong_checkname); - query.bindValue(":create_time", instructionLib.create_time); - query.bindValue(":update_time", instructionLib.update_time); + query.bindValue(":create_time", formattedCreateDateTime); + query.bindValue(":update_time", formattedUpdateDateTime); bool isSuccess = query.exec(); if (!isSuccess) { qDebug() << "InsertTaskBasic query failed: " << query.lastError().text(); diff --git a/softwareDirectory/AutoVerScheme/checkmethodmanage.cpp b/softwareDirectory/AutoVerScheme/checkmethodmanage.cpp index b83b561..fca8ee7 100644 --- a/softwareDirectory/AutoVerScheme/checkmethodmanage.cpp +++ b/softwareDirectory/AutoVerScheme/checkmethodmanage.cpp @@ -92,7 +92,7 @@ //ui->tableWidget->setItem(row, 0, new QTableWidgetItem(dept.id)); ui->tableWidget_2->setItem(row, 1, new QTableWidgetItem(program.program_name)); //设置数据 ui->tableWidget_2->setItem(row, 2, new QTableWidgetItem(program.create_name)); //设置数据 - ui->tableWidget_2->setItem(row, 3, new QTableWidgetItem(program.create_time.toString())); //设置数据 + ui->tableWidget_2->setItem(row, 3, new QTableWidgetItem(program.create_time.toString("yyyy-MM-dd"))); //设置数据 ui->tableWidget_2->setItem(row, 4, new QTableWidgetItem(program.remark)); //设置数据 QPushButton *btn_1 = new QPushButton(); diff --git a/softwareDirectory/AutoVerScheme/formaddrsetting.cpp b/softwareDirectory/AutoVerScheme/formaddrsetting.cpp index e0fb33a..62d0dc1 100644 --- a/softwareDirectory/AutoVerScheme/formaddrsetting.cpp +++ b/softwareDirectory/AutoVerScheme/formaddrsetting.cpp @@ -1,14 +1,223 @@ #include "formaddrsetting.h" #include "ui_formaddrsetting.h" +#include -FormAddrSetting::FormAddrSetting(QWidget *parent,int type,QString id) : +FormAddrSetting::FormAddrSetting(QWidget *parent,int type,QString id,QString deviceId) : QWidget(parent), + iType(type), + sId(id), + sDeviceId(deviceId), ui(new Ui::FormAddrSetting) { ui->setupUi(this); + //ui->tableWidgetMethod->setColumnCount(7); + initCmdTable(); +} +void FormAddrSetting::initCmdTable() +{ + ui->tableWidget->verticalHeader()->setParent(nullptr); + for(int i=1;i<4;i++) + ui->tableWidget->horizontalHeader()->setSectionResizeMode(i,QHeaderView::Stretch); + ui->tableWidget->setColumnWidth(0, 60); + ui->tableWidget->setColumnWidth(4, 100); + cmdList = BaseCommonApi::getInstructionLib(sId); + int rowCount = 0; + int row=0; + QString State; + for (const InstructionLib& cmd : cmdList) { + rowCount = ui->tableWidget->rowCount(); + + ui->tableWidget->insertRow(rowCount); + updateRow(row,cmd); + row++; + } + QStringList headlist; + QList caliList =BaseCommonApi::Search_CalibrationTable(sDeviceId,&headlist); + for (const QStringList& item : caliList){ + this->ui->comboBox->addItem(item[1]); + } +} + +void FormAddrSetting::updateRow(int row,InstructionLib cmd) +{ + ui->tableWidget->setItem(row, 0, new QTableWidgetItem(QString::number(row+1))); + /*if(cmd.type==0) + ui->tableWidget->setItem(row, 1, new QTableWidgetItem(cmd.belong_vername)); //设置数据 + else + ui->tableWidget->setItem(row, 1, new QTableWidgetItem(cmd.belong_checkname));*/ + ui->tableWidget->setItem(row, 1, new QTableWidgetItem(cmd.belong_vername)); + ui->tableWidget->setItem(row, 2, new QTableWidgetItem(cmd.instruct_config)); //设置数据 + ui->tableWidget->setItem(row, 3, new QTableWidgetItem(cmd.instruct_read)); //设置数据 + QPushButton *btn_1 = new QPushButton(); + btn_1->setText(tr("编辑")); + btn_1->setStyleSheet("QPushButton{" + "background-color:rgba(255,255,255,0);" + "color:rgba(92,170,54,100);" + "text-decoration:underline;" + "}"); + btn_1->setCursor(Qt::PointingHandCursor); + connect(btn_1,SIGNAL(clicked()),this,SLOT(on_editButton_clicked())); + + btn_1->setIconSize(QSize(16,16)); + btn_1->setIcon(QIcon(":/image/Index/u2324.svg")); + /*QPushButton *btn_2 = new QPushButton(); + btn_2->setText(tr("删除")); + btn_2->setStyleSheet("QPushButton{" + "background-color:rgba(255,255,255,0);" + "color:rgba(170,17,17,100);" + "text-decoration:underline;" + "}"); + btn_2->setCursor(Qt::PointingHandCursor); + connect(btn_2,SIGNAL(clicked()),this,SLOT(on_deleteButton_clicked())); + btn_2->setIconSize(QSize(16,16)); + btn_2->setIcon(QIcon(":/image/Index/u2325.svg"));*/ + QWidget *tmp_widget = new QWidget(); + QHBoxLayout *tmp_layout = new QHBoxLayout(tmp_widget); + tmp_layout->addWidget(btn_1); + //tmp_layout->addWidget(btn_2); + tmp_layout->setMargin(0); + ui->tableWidget->setCellWidget(row,4,tmp_widget); } FormAddrSetting::~FormAddrSetting() { + cmdList.clear(); delete ui; } + +void FormAddrSetting::on_pushButton_15_clicked() +{ + editIdx=-1; + if(this->ui->comboBox->count()>0) + this->ui->comboBox->setCurrentIndex(0); + this->ui->textEdit->setText(""); + this->ui->textEdit_2->setText(""); + this->ui->stackedWidget->setCurrentIndex(1); +} + +void FormAddrSetting::on_pushButton_14_clicked() +{ + this->close(); +} + +void FormAddrSetting::on_pushButton_18_clicked() +{ + if(editIdx==-1){ + QString sName = ""; + if(iType==0){ + QList result = BaseCommonApi::getTestedCatDevice(sId); + if(result.length()>0){ + sName = result[0].equipment_name; + } + }else{ + QList result = BaseCommonApi::getCatDeviceInfor(sId); + if(result.length()>0){ + sName = result[0].equipment_name; + } + } + InstructionLib cmd; + BaseCommonApi baseApi; + qint64 id = baseApi.generateId(); + cmd.id = QString::number(id); + cmd.device_id = sId; + cmd.device_name = sName; + cmd.type = iType; + cmd.belong_vername = this->ui->comboBox->currentText(); + cmd.instruct_config = this->ui->textEdit->toPlainText(); + cmd.instruct_read = this->ui->textEdit_2->toPlainText(); + cmd.create_time = QDateTime::currentDateTime(); + cmd.update_time = QDateTime::currentDateTime(); + BaseCommonApi::InsertInstructionLib(cmd); + cmdList.append(cmd); + int rowCount = ui->tableWidget->rowCount(); + ui->tableWidget->insertRow(rowCount); + updateRow(rowCount,cmd); + }else{ + InstructionLib cmd = cmdList[editIdx]; + cmd.belong_vername = this->ui->comboBox->currentText(); + cmd.instruct_config = this->ui->textEdit->toPlainText(); + cmd.instruct_read = this->ui->textEdit_2->toPlainText(); + cmd.update_time = QDateTime::currentDateTime(); + BaseCommonApi::UpdateInstructionLib(cmd); + updateRow(editIdx,cmd); + } + this->ui->stackedWidget->setCurrentIndex(0); +} + +void FormAddrSetting::on_editButton_clicked() +{ + QPushButton *pushButton_ = dynamic_cast(this->sender()); + if(NULL == pushButton_) + { + return; + } + // 获取按钮的x坐标和y坐标 + int x = pushButton_->parentWidget()->frameGeometry().x(); + int y = pushButton_->parentWidget()->frameGeometry().y(); + // 根据按钮的x和y坐标来定位对应的单元格 + QModelIndex index = ui->tableWidget->indexAt(QPoint(x, y)); + // 获取该按钮所在表格的行号和列号 + int row = index.row(); + //int column = index.column(); + //QString sId = cmdList[row].id; + editIdx = row; + InstructionLib cmd = cmdList[row]; + + this->ui->comboBox->setCurrentText(cmd.belong_vername); + this->ui->textEdit->setText(cmd.instruct_config); + this->ui->textEdit_2->setText(cmd.instruct_read); + this->ui->stackedWidget->setCurrentIndex(1); +} + +void FormAddrSetting::on_deleteButton_clicked() +{ + QPushButton *pushButton_ = dynamic_cast(this->sender()); + if(NULL == pushButton_) + { + return; + } + // 获取按钮的x坐标和y坐标 + int x = pushButton_->parentWidget()->frameGeometry().x(); + int y = pushButton_->parentWidget()->frameGeometry().y(); + // 根据按钮的x和y坐标来定位对应的单元格 + QModelIndex index = ui->tableWidget->indexAt(QPoint(x, y)); + // 获取该按钮所在表格的行号和列号 + int row = index.row(); + //int column = index.column(); + if(QMessageBox::question(this, "确认", "确认删除吗?", QMessageBox::Yes | QMessageBox::No, QMessageBox::Yes)==QMessageBox::Yes) + { + if(BaseCommonApi::DeleteInstructionLib(cmdList[row].id)) + { + cmdList.removeAt(row); + ui->tableWidget->removeRow(row); + } + } +} + +void FormAddrSetting::on_pushButton_3_clicked() +{ + if(QMessageBox::question(this, "确认", "确认删除吗?", QMessageBox::Yes | QMessageBox::No, QMessageBox::Yes)==QMessageBox::Yes) + { + if(BaseCommonApi::DeleteInstructionLib(sId)) + { + cmdList.clear(); + ui->tableWidget->clearContents(); + ui->tableWidget->setRowCount(0); + } + } +} + +void FormAddrSetting::on_pushButton_2_clicked() +{ + +} + +void FormAddrSetting::on_pushButton_clicked() +{ + +} + +void FormAddrSetting::on_pushButton_4_clicked() +{ + this->ui->stackedWidget->setCurrentIndex(0); +} diff --git a/softwareDirectory/AutoVerScheme/formaddrsetting.h b/softwareDirectory/AutoVerScheme/formaddrsetting.h index 6392d44..3243cc8 100644 --- a/softwareDirectory/AutoVerScheme/formaddrsetting.h +++ b/softwareDirectory/AutoVerScheme/formaddrsetting.h @@ -2,6 +2,7 @@ #define FORMADDRSETTING_H #include +#include "basecommonapi.h" namespace Ui { class FormAddrSetting; @@ -12,11 +13,35 @@ Q_OBJECT public: - explicit FormAddrSetting(QWidget *parent = nullptr,int type=1,QString id=""); + explicit FormAddrSetting(QWidget *parent = nullptr,int type=1,QString id="",QString deviceId=""); ~FormAddrSetting(); +private: + void initCmdTable(); + void updateRow(int row,InstructionLib cmd); + +private slots: + void on_pushButton_15_clicked(); + + void on_pushButton_14_clicked(); + + void on_pushButton_18_clicked(); + void on_editButton_clicked(); + void on_deleteButton_clicked(); + void on_pushButton_3_clicked(); + + void on_pushButton_2_clicked(); + + void on_pushButton_clicked(); + + void on_pushButton_4_clicked(); private: Ui::FormAddrSetting *ui; + QList cmdList; + QString sId; + QString sDeviceId; + int iType=0; + int editIdx=-1; }; #endif // FORMADDRSETTING_H diff --git a/softwareDirectory/AutoVerScheme/formaddrsetting.ui b/softwareDirectory/AutoVerScheme/formaddrsetting.ui index 9f73632..fdc95da 100644 --- a/softwareDirectory/AutoVerScheme/formaddrsetting.ui +++ b/softwareDirectory/AutoVerScheme/formaddrsetting.ui @@ -16,7 +16,7 @@ background-color: rgb(242, 242, 242); - + @@ -75,133 +75,484 @@ - - - - - - 20 - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - 1 - 0 - - - - - 72 - 26 - - - - - 12 - 75 - true - - - - color: rgb(255, 255, 255); + + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + 1 + 0 + + + + + 72 + 26 + + + + + 12 + 75 + true + + + + color: rgb(255, 255, 255); background-color: rgb(74, 102, 186); border-radius:5px; - - - 新增 - - - - - - - - 1 - 0 - - - - - 72 - 26 - - - - - 12 - 75 - true - - - - color: rgb(255, 255, 255); + + + 新增 + + + + + + + + 72 + 26 + + + + + 12 + 75 + true + + + + color: rgb(255, 255, 255); +background-color: rgb(170, 17, 17); +border-radius:5px; + + + 删除 + + + + + + + + 72 + 26 + + + + + 12 + 75 + true + + + + color: rgb(255, 255, 255); background-color: rgb(74, 102, 186); border-radius:5px; - - - 删除 - - - - - - - - 1 - 0 - - - - - 72 - 26 - - - - - 12 - 75 - true - - - - color: rgb(255, 255, 255); + + + 导入 + + + + + + + + 72 + 26 + + + + + 12 + 75 + true + + + + color: rgb(255, 255, 255); background-color: rgb(74, 102, 186); border-radius:5px; + + + 导出 + + + + + + + + + + 序号 + + + + 12 + + + + + + 项目名称 + + + + 12 + + + + + + 配置命令 + + + + 12 + + + + + + 读数命令 + + + + 12 + + + + + + 操作 + + + + 12 + + + + + + + + + + + 20 - - 保存 - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + 0 + 0 + + + + + 12 + + + + 项目名称 + + + + + + + + 0 + 0 + + + + + 12 + + + + true + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + 0 + 0 + + + + + 12 + + + + 配置命令 + + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop + + + + + + + + 12 + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + 0 + 0 + + + + + 12 + + + + 读数命令 + + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop + + + + + + + + 12 + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + Qt::Vertical + + + + 20 + 119 + + + + + + + + 20 + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + 1 + 0 + + + + + 72 + 26 + + + + + 12 + 75 + true + + + + color: rgb(255, 255, 255); +background-color: rgb(74, 102, 186); +border-radius:5px; + + + 保存 + + + + + + + + 72 + 26 + + + + + 12 + 75 + true + + + + color: rgb(255, 255, 255); +background-color: rgb(170, 17, 17); +border-radius:5px; + + + 取消 + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/formcommsetting.cpp b/softwareDirectory/AutoVerScheme/formcommsetting.cpp index 26d7cb6..f5c4f9d 100644 --- a/softwareDirectory/AutoVerScheme/formcommsetting.cpp +++ b/softwareDirectory/AutoVerScheme/formcommsetting.cpp @@ -3,12 +3,74 @@ FormCommSetting::FormCommSetting(QWidget *parent,int type,QString id) : QWidget(parent), + deviceId(id), ui(new Ui::FormCommSetting) { ui->setupUi(this); + if(deviceId!=""){ + addrList = BaseCommonApi::getVerificationProgramConfigInterface(deviceId); + if(addrList.length()>0){ + VerificationProgramConfigInterface addr = addrList[0]; + if(addr.communication_type == "SerialPort") + ui->radioButton->setChecked(true); + else + ui->radioButton_2->setChecked(true); + ui->comboBox_9->setCurrentText(addr.visa); + if(addr.serial_port!=""){ + QStringList sList = addr.serial_port.split(";"); + if(sList.length()==5){ + ui->comboBox->setCurrentText(sList[0]); + ui->comboBox_3->setCurrentText(sList[1]); + ui->comboBox_4->setCurrentText(sList[2]); + ui->comboBox_7->setCurrentText(sList[3]); + ui->comboBox_8->setCurrentText(sList[4]); + } + } + } + } } FormCommSetting::~FormCommSetting() { delete ui; } + +void FormCommSetting::on_pushButton_14_clicked() +{ + if(addrList.length()>0){ + VerificationProgramConfigInterface addr = addrList[0]; + if(ui->radioButton->isChecked()) + addr.communication_type = "SerialPort"; + else + addr.communication_type = "Visa"; + addr.serial_port = QString("%1;%2;%3;%4;%5").arg(ui->comboBox->currentText()).arg(ui->comboBox_3->currentText()).arg(ui->comboBox_4->currentText()) + .arg(ui->comboBox_7->currentText()).arg(ui->comboBox_8->currentText()); + addr.visa = ui->comboBox_9->currentText(); + BaseCommonApi::UpdateVerificationProgramConfigInterface(addr); + }else{ + VerificationProgramConfigInterface addr; + BaseCommonApi baseApi; + qint64 id = baseApi.generateId(); + addr.id = QString::number(id); + addr.device_id = deviceId; + if(ui->radioButton->isChecked()) + addr.communication_type = "SerialPort"; + else + addr.communication_type = "Visa"; + addr.serial_port = QString("%1;%2;%3;%4;%5").arg(ui->comboBox->currentText()).arg(ui->comboBox_3->currentText()).arg(ui->comboBox_4->currentText()) + .arg(ui->comboBox_7->currentText()).arg(ui->comboBox_8->currentText()); + addr.visa = ui->comboBox_9->currentText(); + BaseCommonApi::InsertVerificationProgramConfigInterface(addr); + } + this->close(); +} + +void FormCommSetting::on_radioButton_toggled(bool checked) +{ + ui->radioButton_2->setChecked(!ui->radioButton->isChecked()); +} + +void FormCommSetting::on_radioButton_2_toggled(bool checked) +{ + ui->radioButton->setChecked(!ui->radioButton_2->isChecked()); +} diff --git a/softwareDirectory/AutoVerScheme/formcommsetting.h b/softwareDirectory/AutoVerScheme/formcommsetting.h index 40cdb59..f307e67 100644 --- a/softwareDirectory/AutoVerScheme/formcommsetting.h +++ b/softwareDirectory/AutoVerScheme/formcommsetting.h @@ -2,6 +2,7 @@ #define FORMCOMMSETTING_H #include +#include "basecommonapi.h" namespace Ui { class FormCommSetting; @@ -15,8 +16,17 @@ explicit FormCommSetting(QWidget *parent = nullptr,int type=1,QString id=""); ~FormCommSetting(); +private slots: + void on_pushButton_14_clicked(); + + void on_radioButton_toggled(bool checked); + + void on_radioButton_2_toggled(bool checked); + private: Ui::FormCommSetting *ui; + QList addrList; + QString deviceId; }; #endif // FORMCOMMSETTING_H diff --git a/softwareDirectory/AutoVerScheme/formcommsetting.ui b/softwareDirectory/AutoVerScheme/formcommsetting.ui index 35ab9d1..2b7784c 100644 --- a/softwareDirectory/AutoVerScheme/formcommsetting.ui +++ b/softwareDirectory/AutoVerScheme/formcommsetting.ui @@ -79,192 +79,215 @@ background-color: rgb(255, 255, 255); - - - 6 - - - 12 - - - - - - 12 - - - - 串口 - - - - - - - - 12 - - - - 端口号: - - - - - - - - 12 - - - - - - - - - 12 - - - - 设备地址: - - - - - - - - 12 - - - - - - - - - 12 - - - - 波特率: - - - - - - - - 12 - - - - - - - - - 12 - - - - 校验位: - - - - - - - - 12 - - - - - - - - - 12 - - - - 数据位: - - - - - - - - 12 - - - - - - - - - 12 - - - - 停止位: - - - - - - - - 12 - - - - - - - - - 12 - - - - 模式: - - - - - - - - 12 - - - - - - - - - 12 - - - - 流控: - - - - - - - - 12 - - - + + + + + + + + 12 + + + + 串口 + + + + + + + + 12 + + + + 端口号: + + + + + + + + 12 + + + + true + + + + + + + + 12 + + + + 波特率: + + + + + + + + 12 + + + + true + + + 9600 + + + 1 + + + + 4800 + + + + + 9600 + + + + + 14400 + + + + + 19200 + + + + + 38400 + + + + + + + + + 12 + + + + 校验位: + + + + + + + + 12 + + + + + None + + + + + Odd + + + + + Even + + + + + + + + + 12 + + + + 数据位: + + + + + + + + 12 + + + + 1 + + + + 7 + + + + + 8 + + + + + + + + + 12 + + + + 停止位: + + + + + + + + 12 + + + + 1 + + + + None + + + + + One + + + + + Two + + + + + OnePointFive + + + + + @@ -285,6 +308,9 @@ VISA + + true + @@ -317,6 +343,9 @@ 12 + + true + diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user index ce0b2dc..373bbda 100644 --- a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user @@ -1,10 +1,10 @@ - + EnvironmentId - {c08df58c-84a7-4965-bca6-e98789474efa} + {2746248a-b112-4e0f-9ae0-9e61f2a42309} ProjectExplorer.Project.ActiveTarget @@ -71,7 +71,7 @@ 0 0 - C:/Users/admin/Desktop/SVN/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Debug + D:/dev/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Debug true @@ -119,7 +119,7 @@ 2 - C:/Users/admin/Desktop/SVN/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Release + D:/dev/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Release true @@ -167,7 +167,7 @@ 0 - C:/Users/admin/Desktop/SVN/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Profile + D:/dev/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Profile true @@ -287,8 +287,8 @@ 2 - Qt4ProjectManager.Qt4RunConfiguration:C:/Users/admin/Desktop/SVN/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro - C:/Users/admin/Desktop/SVN/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro + Qt4ProjectManager.Qt4RunConfiguration:D:/dev/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro + D:/dev/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro false @@ -299,7 +299,7 @@ false true - C:/Users/admin/Desktop/SVN/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Debug + D:/dev/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Debug 1 @@ -314,7 +314,7 @@ 0 0 - C:/Users/admin/Desktop/SVN/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug + D:/dev/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug true @@ -362,7 +362,7 @@ 2 - C:/Users/admin/Desktop/SVN/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Release + D:/dev/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Release true @@ -410,7 +410,7 @@ 0 - C:/Users/admin/Desktop/SVN/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Profile + D:/dev/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Profile true @@ -530,8 +530,8 @@ 2 - Qt4ProjectManager.Qt4RunConfiguration:C:/Users/admin/Desktop/SVN/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro - C:/Users/admin/Desktop/SVN/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro + Qt4ProjectManager.Qt4RunConfiguration:D:/dev/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro + D:/dev/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro false diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user.c08df58 b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user.c08df58 new file mode 100644 index 0000000..803b854 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user.c08df58 @@ -0,0 +1,562 @@ + + + + + + EnvironmentId + {c08df58c-84a7-4965-bca6-e98789474efa} + + + ProjectExplorer.Project.ActiveTarget + 0 + + + ProjectExplorer.Project.EditorSettings + + true + false + true + + Cpp + + CppGlobal + + + + QmlJS + + QmlJSGlobal + + + 2 + UTF-8 + false + 4 + false + 80 + true + true + 1 + true + false + 0 + true + true + 0 + 8 + true + 1 + true + true + true + false + + + + ProjectExplorer.Project.PluginSettings + + + -fno-delayed-template-parsing + + true + + + + ProjectExplorer.Project.Target.0 + + Desktop Qt 5.14.2 MinGW 64-bit + Desktop Qt 5.14.2 MinGW 64-bit + qt.qt5.5142.win64_mingw73_kit + 0 + 0 + 0 + + C:/Users/admin/Desktop/SVN/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Debug + + + true + QtProjectManager.QMakeBuildStep + true + + false + false + false + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Debug + Qt4ProjectManager.Qt4BuildConfiguration + 2 + + + C:/Users/admin/Desktop/SVN/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Release + + + true + QtProjectManager.QMakeBuildStep + false + + false + false + true + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Release + Qt4ProjectManager.Qt4BuildConfiguration + 0 + + + C:/Users/admin/Desktop/SVN/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Profile + + + true + QtProjectManager.QMakeBuildStep + true + + false + true + true + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Profile + Qt4ProjectManager.Qt4BuildConfiguration + 0 + + 3 + + + 0 + Deploy + Deploy + ProjectExplorer.BuildSteps.Deploy + + 1 + ProjectExplorer.DefaultDeployConfiguration + + 1 + + + dwarf + + cpu-cycles + + + 250 + + -e + cpu-cycles + --call-graph + dwarf,4096 + -F + 250 + + -F + true + 4096 + false + false + 1000 + + true + + false + false + false + false + true + 0.01 + 10 + true + kcachegrind + 1 + 25 + + 1 + true + false + true + valgrind + + 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + + 2 + + Qt4ProjectManager.Qt4RunConfiguration:C:/Users/admin/Desktop/SVN/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro + C:/Users/admin/Desktop/SVN/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro + + false + + false + true + true + false + false + true + + C:/Users/admin/Desktop/SVN/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Debug + + 1 + + + + ProjectExplorer.Project.Target.1 + + Desktop Qt 5.14.2 MinGW 32-bit + Desktop Qt 5.14.2 MinGW 32-bit + qt.qt5.5142.win32_mingw73_kit + 0 + 0 + 0 + + C:/Users/admin/Desktop/SVN/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug + + + true + QtProjectManager.QMakeBuildStep + true + + false + false + false + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Debug + Qt4ProjectManager.Qt4BuildConfiguration + 2 + + + C:/Users/admin/Desktop/SVN/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Release + + + true + QtProjectManager.QMakeBuildStep + false + + false + false + true + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Release + Qt4ProjectManager.Qt4BuildConfiguration + 0 + + + C:/Users/admin/Desktop/SVN/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Profile + + + true + QtProjectManager.QMakeBuildStep + true + + false + true + true + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Profile + Qt4ProjectManager.Qt4BuildConfiguration + 0 + + 3 + + + 0 + Deploy + Deploy + ProjectExplorer.BuildSteps.Deploy + + 1 + ProjectExplorer.DefaultDeployConfiguration + + 1 + + + dwarf + + cpu-cycles + + + 250 + + -e + cpu-cycles + --call-graph + dwarf,4096 + -F + 250 + + -F + true + 4096 + false + false + 1000 + + true + + false + false + false + false + true + 0.01 + 10 + true + kcachegrind + 1 + 25 + + 1 + true + false + true + valgrind + + 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + + 2 + + Qt4ProjectManager.Qt4RunConfiguration:C:/Users/admin/Desktop/SVN/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro + C:/Users/admin/Desktop/SVN/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro + + false + + false + true + true + false + false + true + + + + 1 + + + + ProjectExplorer.Project.TargetCount + 2 + + + ProjectExplorer.Project.Updater.FileVersion + 22 + + + Version + 22 + + diff --git a/softwareDirectory/AutoVerScheme/basecommonapi.cpp b/softwareDirectory/AutoVerScheme/basecommonapi.cpp index 63fcb02..06ab274 100644 --- a/softwareDirectory/AutoVerScheme/basecommonapi.cpp +++ b/softwareDirectory/AutoVerScheme/basecommonapi.cpp @@ -1107,9 +1107,10 @@ bool BaseCommonApi::InsertInstructionLib(InstructionLib instructionLib) { QSqlQuery query; - query.prepare("INSERT INTO zd_instruction_library (id,device_id,device_name,instruct_config,instruct_read,type,verification_id,check_id,create_time,update_time) " + query.prepare("INSERT INTO zd_instruction_library (id,device_id,device_name,instruct_config,instruct_read,type,belong_vername,belong_checkname,create_time,update_time) " " VALUES (:id,:device_id,:device_name,:instruct_config,:instruct_read,:type,:belong_vername,:belong_checkname,:create_time,:update_time)"); - + QString formattedCreateDateTime = instructionLib.create_time.toString("yyyy-MM-dd HH:mm:ss"); + QString formattedUpdateDateTime = instructionLib.update_time.toString("yyyy-MM-dd HH:mm:ss"); query.bindValue(":id", instructionLib.id); query.bindValue(":device_id", instructionLib.device_id); query.bindValue(":device_name", instructionLib.device_name); @@ -1118,8 +1119,8 @@ query.bindValue(":type", instructionLib.type); query.bindValue(":belong_vername", instructionLib.belong_vername); query.bindValue(":belong_checkname", instructionLib.belong_checkname); - query.bindValue(":create_time", instructionLib.create_time); - query.bindValue(":update_time", instructionLib.update_time); + query.bindValue(":create_time", formattedCreateDateTime); + query.bindValue(":update_time", formattedUpdateDateTime); bool isSuccess = query.exec(); if (!isSuccess) { qDebug() << "InsertTaskBasic query failed: " << query.lastError().text(); diff --git a/softwareDirectory/AutoVerScheme/checkmethodmanage.cpp b/softwareDirectory/AutoVerScheme/checkmethodmanage.cpp index b83b561..fca8ee7 100644 --- a/softwareDirectory/AutoVerScheme/checkmethodmanage.cpp +++ b/softwareDirectory/AutoVerScheme/checkmethodmanage.cpp @@ -92,7 +92,7 @@ //ui->tableWidget->setItem(row, 0, new QTableWidgetItem(dept.id)); ui->tableWidget_2->setItem(row, 1, new QTableWidgetItem(program.program_name)); //设置数据 ui->tableWidget_2->setItem(row, 2, new QTableWidgetItem(program.create_name)); //设置数据 - ui->tableWidget_2->setItem(row, 3, new QTableWidgetItem(program.create_time.toString())); //设置数据 + ui->tableWidget_2->setItem(row, 3, new QTableWidgetItem(program.create_time.toString("yyyy-MM-dd"))); //设置数据 ui->tableWidget_2->setItem(row, 4, new QTableWidgetItem(program.remark)); //设置数据 QPushButton *btn_1 = new QPushButton(); diff --git a/softwareDirectory/AutoVerScheme/formaddrsetting.cpp b/softwareDirectory/AutoVerScheme/formaddrsetting.cpp index e0fb33a..62d0dc1 100644 --- a/softwareDirectory/AutoVerScheme/formaddrsetting.cpp +++ b/softwareDirectory/AutoVerScheme/formaddrsetting.cpp @@ -1,14 +1,223 @@ #include "formaddrsetting.h" #include "ui_formaddrsetting.h" +#include -FormAddrSetting::FormAddrSetting(QWidget *parent,int type,QString id) : +FormAddrSetting::FormAddrSetting(QWidget *parent,int type,QString id,QString deviceId) : QWidget(parent), + iType(type), + sId(id), + sDeviceId(deviceId), ui(new Ui::FormAddrSetting) { ui->setupUi(this); + //ui->tableWidgetMethod->setColumnCount(7); + initCmdTable(); +} +void FormAddrSetting::initCmdTable() +{ + ui->tableWidget->verticalHeader()->setParent(nullptr); + for(int i=1;i<4;i++) + ui->tableWidget->horizontalHeader()->setSectionResizeMode(i,QHeaderView::Stretch); + ui->tableWidget->setColumnWidth(0, 60); + ui->tableWidget->setColumnWidth(4, 100); + cmdList = BaseCommonApi::getInstructionLib(sId); + int rowCount = 0; + int row=0; + QString State; + for (const InstructionLib& cmd : cmdList) { + rowCount = ui->tableWidget->rowCount(); + + ui->tableWidget->insertRow(rowCount); + updateRow(row,cmd); + row++; + } + QStringList headlist; + QList caliList =BaseCommonApi::Search_CalibrationTable(sDeviceId,&headlist); + for (const QStringList& item : caliList){ + this->ui->comboBox->addItem(item[1]); + } +} + +void FormAddrSetting::updateRow(int row,InstructionLib cmd) +{ + ui->tableWidget->setItem(row, 0, new QTableWidgetItem(QString::number(row+1))); + /*if(cmd.type==0) + ui->tableWidget->setItem(row, 1, new QTableWidgetItem(cmd.belong_vername)); //设置数据 + else + ui->tableWidget->setItem(row, 1, new QTableWidgetItem(cmd.belong_checkname));*/ + ui->tableWidget->setItem(row, 1, new QTableWidgetItem(cmd.belong_vername)); + ui->tableWidget->setItem(row, 2, new QTableWidgetItem(cmd.instruct_config)); //设置数据 + ui->tableWidget->setItem(row, 3, new QTableWidgetItem(cmd.instruct_read)); //设置数据 + QPushButton *btn_1 = new QPushButton(); + btn_1->setText(tr("编辑")); + btn_1->setStyleSheet("QPushButton{" + "background-color:rgba(255,255,255,0);" + "color:rgba(92,170,54,100);" + "text-decoration:underline;" + "}"); + btn_1->setCursor(Qt::PointingHandCursor); + connect(btn_1,SIGNAL(clicked()),this,SLOT(on_editButton_clicked())); + + btn_1->setIconSize(QSize(16,16)); + btn_1->setIcon(QIcon(":/image/Index/u2324.svg")); + /*QPushButton *btn_2 = new QPushButton(); + btn_2->setText(tr("删除")); + btn_2->setStyleSheet("QPushButton{" + "background-color:rgba(255,255,255,0);" + "color:rgba(170,17,17,100);" + "text-decoration:underline;" + "}"); + btn_2->setCursor(Qt::PointingHandCursor); + connect(btn_2,SIGNAL(clicked()),this,SLOT(on_deleteButton_clicked())); + btn_2->setIconSize(QSize(16,16)); + btn_2->setIcon(QIcon(":/image/Index/u2325.svg"));*/ + QWidget *tmp_widget = new QWidget(); + QHBoxLayout *tmp_layout = new QHBoxLayout(tmp_widget); + tmp_layout->addWidget(btn_1); + //tmp_layout->addWidget(btn_2); + tmp_layout->setMargin(0); + ui->tableWidget->setCellWidget(row,4,tmp_widget); } FormAddrSetting::~FormAddrSetting() { + cmdList.clear(); delete ui; } + +void FormAddrSetting::on_pushButton_15_clicked() +{ + editIdx=-1; + if(this->ui->comboBox->count()>0) + this->ui->comboBox->setCurrentIndex(0); + this->ui->textEdit->setText(""); + this->ui->textEdit_2->setText(""); + this->ui->stackedWidget->setCurrentIndex(1); +} + +void FormAddrSetting::on_pushButton_14_clicked() +{ + this->close(); +} + +void FormAddrSetting::on_pushButton_18_clicked() +{ + if(editIdx==-1){ + QString sName = ""; + if(iType==0){ + QList result = BaseCommonApi::getTestedCatDevice(sId); + if(result.length()>0){ + sName = result[0].equipment_name; + } + }else{ + QList result = BaseCommonApi::getCatDeviceInfor(sId); + if(result.length()>0){ + sName = result[0].equipment_name; + } + } + InstructionLib cmd; + BaseCommonApi baseApi; + qint64 id = baseApi.generateId(); + cmd.id = QString::number(id); + cmd.device_id = sId; + cmd.device_name = sName; + cmd.type = iType; + cmd.belong_vername = this->ui->comboBox->currentText(); + cmd.instruct_config = this->ui->textEdit->toPlainText(); + cmd.instruct_read = this->ui->textEdit_2->toPlainText(); + cmd.create_time = QDateTime::currentDateTime(); + cmd.update_time = QDateTime::currentDateTime(); + BaseCommonApi::InsertInstructionLib(cmd); + cmdList.append(cmd); + int rowCount = ui->tableWidget->rowCount(); + ui->tableWidget->insertRow(rowCount); + updateRow(rowCount,cmd); + }else{ + InstructionLib cmd = cmdList[editIdx]; + cmd.belong_vername = this->ui->comboBox->currentText(); + cmd.instruct_config = this->ui->textEdit->toPlainText(); + cmd.instruct_read = this->ui->textEdit_2->toPlainText(); + cmd.update_time = QDateTime::currentDateTime(); + BaseCommonApi::UpdateInstructionLib(cmd); + updateRow(editIdx,cmd); + } + this->ui->stackedWidget->setCurrentIndex(0); +} + +void FormAddrSetting::on_editButton_clicked() +{ + QPushButton *pushButton_ = dynamic_cast(this->sender()); + if(NULL == pushButton_) + { + return; + } + // 获取按钮的x坐标和y坐标 + int x = pushButton_->parentWidget()->frameGeometry().x(); + int y = pushButton_->parentWidget()->frameGeometry().y(); + // 根据按钮的x和y坐标来定位对应的单元格 + QModelIndex index = ui->tableWidget->indexAt(QPoint(x, y)); + // 获取该按钮所在表格的行号和列号 + int row = index.row(); + //int column = index.column(); + //QString sId = cmdList[row].id; + editIdx = row; + InstructionLib cmd = cmdList[row]; + + this->ui->comboBox->setCurrentText(cmd.belong_vername); + this->ui->textEdit->setText(cmd.instruct_config); + this->ui->textEdit_2->setText(cmd.instruct_read); + this->ui->stackedWidget->setCurrentIndex(1); +} + +void FormAddrSetting::on_deleteButton_clicked() +{ + QPushButton *pushButton_ = dynamic_cast(this->sender()); + if(NULL == pushButton_) + { + return; + } + // 获取按钮的x坐标和y坐标 + int x = pushButton_->parentWidget()->frameGeometry().x(); + int y = pushButton_->parentWidget()->frameGeometry().y(); + // 根据按钮的x和y坐标来定位对应的单元格 + QModelIndex index = ui->tableWidget->indexAt(QPoint(x, y)); + // 获取该按钮所在表格的行号和列号 + int row = index.row(); + //int column = index.column(); + if(QMessageBox::question(this, "确认", "确认删除吗?", QMessageBox::Yes | QMessageBox::No, QMessageBox::Yes)==QMessageBox::Yes) + { + if(BaseCommonApi::DeleteInstructionLib(cmdList[row].id)) + { + cmdList.removeAt(row); + ui->tableWidget->removeRow(row); + } + } +} + +void FormAddrSetting::on_pushButton_3_clicked() +{ + if(QMessageBox::question(this, "确认", "确认删除吗?", QMessageBox::Yes | QMessageBox::No, QMessageBox::Yes)==QMessageBox::Yes) + { + if(BaseCommonApi::DeleteInstructionLib(sId)) + { + cmdList.clear(); + ui->tableWidget->clearContents(); + ui->tableWidget->setRowCount(0); + } + } +} + +void FormAddrSetting::on_pushButton_2_clicked() +{ + +} + +void FormAddrSetting::on_pushButton_clicked() +{ + +} + +void FormAddrSetting::on_pushButton_4_clicked() +{ + this->ui->stackedWidget->setCurrentIndex(0); +} diff --git a/softwareDirectory/AutoVerScheme/formaddrsetting.h b/softwareDirectory/AutoVerScheme/formaddrsetting.h index 6392d44..3243cc8 100644 --- a/softwareDirectory/AutoVerScheme/formaddrsetting.h +++ b/softwareDirectory/AutoVerScheme/formaddrsetting.h @@ -2,6 +2,7 @@ #define FORMADDRSETTING_H #include +#include "basecommonapi.h" namespace Ui { class FormAddrSetting; @@ -12,11 +13,35 @@ Q_OBJECT public: - explicit FormAddrSetting(QWidget *parent = nullptr,int type=1,QString id=""); + explicit FormAddrSetting(QWidget *parent = nullptr,int type=1,QString id="",QString deviceId=""); ~FormAddrSetting(); +private: + void initCmdTable(); + void updateRow(int row,InstructionLib cmd); + +private slots: + void on_pushButton_15_clicked(); + + void on_pushButton_14_clicked(); + + void on_pushButton_18_clicked(); + void on_editButton_clicked(); + void on_deleteButton_clicked(); + void on_pushButton_3_clicked(); + + void on_pushButton_2_clicked(); + + void on_pushButton_clicked(); + + void on_pushButton_4_clicked(); private: Ui::FormAddrSetting *ui; + QList cmdList; + QString sId; + QString sDeviceId; + int iType=0; + int editIdx=-1; }; #endif // FORMADDRSETTING_H diff --git a/softwareDirectory/AutoVerScheme/formaddrsetting.ui b/softwareDirectory/AutoVerScheme/formaddrsetting.ui index 9f73632..fdc95da 100644 --- a/softwareDirectory/AutoVerScheme/formaddrsetting.ui +++ b/softwareDirectory/AutoVerScheme/formaddrsetting.ui @@ -16,7 +16,7 @@ background-color: rgb(242, 242, 242); - + @@ -75,133 +75,484 @@ - - - - - - 20 - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - 1 - 0 - - - - - 72 - 26 - - - - - 12 - 75 - true - - - - color: rgb(255, 255, 255); + + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + 1 + 0 + + + + + 72 + 26 + + + + + 12 + 75 + true + + + + color: rgb(255, 255, 255); background-color: rgb(74, 102, 186); border-radius:5px; - - - 新增 - - - - - - - - 1 - 0 - - - - - 72 - 26 - - - - - 12 - 75 - true - - - - color: rgb(255, 255, 255); + + + 新增 + + + + + + + + 72 + 26 + + + + + 12 + 75 + true + + + + color: rgb(255, 255, 255); +background-color: rgb(170, 17, 17); +border-radius:5px; + + + 删除 + + + + + + + + 72 + 26 + + + + + 12 + 75 + true + + + + color: rgb(255, 255, 255); background-color: rgb(74, 102, 186); border-radius:5px; - - - 删除 - - - - - - - - 1 - 0 - - - - - 72 - 26 - - - - - 12 - 75 - true - - - - color: rgb(255, 255, 255); + + + 导入 + + + + + + + + 72 + 26 + + + + + 12 + 75 + true + + + + color: rgb(255, 255, 255); background-color: rgb(74, 102, 186); border-radius:5px; + + + 导出 + + + + + + + + + + 序号 + + + + 12 + + + + + + 项目名称 + + + + 12 + + + + + + 配置命令 + + + + 12 + + + + + + 读数命令 + + + + 12 + + + + + + 操作 + + + + 12 + + + + + + + + + + + 20 - - 保存 - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + 0 + 0 + + + + + 12 + + + + 项目名称 + + + + + + + + 0 + 0 + + + + + 12 + + + + true + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + 0 + 0 + + + + + 12 + + + + 配置命令 + + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop + + + + + + + + 12 + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + 0 + 0 + + + + + 12 + + + + 读数命令 + + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop + + + + + + + + 12 + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + Qt::Vertical + + + + 20 + 119 + + + + + + + + 20 + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + 1 + 0 + + + + + 72 + 26 + + + + + 12 + 75 + true + + + + color: rgb(255, 255, 255); +background-color: rgb(74, 102, 186); +border-radius:5px; + + + 保存 + + + + + + + + 72 + 26 + + + + + 12 + 75 + true + + + + color: rgb(255, 255, 255); +background-color: rgb(170, 17, 17); +border-radius:5px; + + + 取消 + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/formcommsetting.cpp b/softwareDirectory/AutoVerScheme/formcommsetting.cpp index 26d7cb6..f5c4f9d 100644 --- a/softwareDirectory/AutoVerScheme/formcommsetting.cpp +++ b/softwareDirectory/AutoVerScheme/formcommsetting.cpp @@ -3,12 +3,74 @@ FormCommSetting::FormCommSetting(QWidget *parent,int type,QString id) : QWidget(parent), + deviceId(id), ui(new Ui::FormCommSetting) { ui->setupUi(this); + if(deviceId!=""){ + addrList = BaseCommonApi::getVerificationProgramConfigInterface(deviceId); + if(addrList.length()>0){ + VerificationProgramConfigInterface addr = addrList[0]; + if(addr.communication_type == "SerialPort") + ui->radioButton->setChecked(true); + else + ui->radioButton_2->setChecked(true); + ui->comboBox_9->setCurrentText(addr.visa); + if(addr.serial_port!=""){ + QStringList sList = addr.serial_port.split(";"); + if(sList.length()==5){ + ui->comboBox->setCurrentText(sList[0]); + ui->comboBox_3->setCurrentText(sList[1]); + ui->comboBox_4->setCurrentText(sList[2]); + ui->comboBox_7->setCurrentText(sList[3]); + ui->comboBox_8->setCurrentText(sList[4]); + } + } + } + } } FormCommSetting::~FormCommSetting() { delete ui; } + +void FormCommSetting::on_pushButton_14_clicked() +{ + if(addrList.length()>0){ + VerificationProgramConfigInterface addr = addrList[0]; + if(ui->radioButton->isChecked()) + addr.communication_type = "SerialPort"; + else + addr.communication_type = "Visa"; + addr.serial_port = QString("%1;%2;%3;%4;%5").arg(ui->comboBox->currentText()).arg(ui->comboBox_3->currentText()).arg(ui->comboBox_4->currentText()) + .arg(ui->comboBox_7->currentText()).arg(ui->comboBox_8->currentText()); + addr.visa = ui->comboBox_9->currentText(); + BaseCommonApi::UpdateVerificationProgramConfigInterface(addr); + }else{ + VerificationProgramConfigInterface addr; + BaseCommonApi baseApi; + qint64 id = baseApi.generateId(); + addr.id = QString::number(id); + addr.device_id = deviceId; + if(ui->radioButton->isChecked()) + addr.communication_type = "SerialPort"; + else + addr.communication_type = "Visa"; + addr.serial_port = QString("%1;%2;%3;%4;%5").arg(ui->comboBox->currentText()).arg(ui->comboBox_3->currentText()).arg(ui->comboBox_4->currentText()) + .arg(ui->comboBox_7->currentText()).arg(ui->comboBox_8->currentText()); + addr.visa = ui->comboBox_9->currentText(); + BaseCommonApi::InsertVerificationProgramConfigInterface(addr); + } + this->close(); +} + +void FormCommSetting::on_radioButton_toggled(bool checked) +{ + ui->radioButton_2->setChecked(!ui->radioButton->isChecked()); +} + +void FormCommSetting::on_radioButton_2_toggled(bool checked) +{ + ui->radioButton->setChecked(!ui->radioButton_2->isChecked()); +} diff --git a/softwareDirectory/AutoVerScheme/formcommsetting.h b/softwareDirectory/AutoVerScheme/formcommsetting.h index 40cdb59..f307e67 100644 --- a/softwareDirectory/AutoVerScheme/formcommsetting.h +++ b/softwareDirectory/AutoVerScheme/formcommsetting.h @@ -2,6 +2,7 @@ #define FORMCOMMSETTING_H #include +#include "basecommonapi.h" namespace Ui { class FormCommSetting; @@ -15,8 +16,17 @@ explicit FormCommSetting(QWidget *parent = nullptr,int type=1,QString id=""); ~FormCommSetting(); +private slots: + void on_pushButton_14_clicked(); + + void on_radioButton_toggled(bool checked); + + void on_radioButton_2_toggled(bool checked); + private: Ui::FormCommSetting *ui; + QList addrList; + QString deviceId; }; #endif // FORMCOMMSETTING_H diff --git a/softwareDirectory/AutoVerScheme/formcommsetting.ui b/softwareDirectory/AutoVerScheme/formcommsetting.ui index 35ab9d1..2b7784c 100644 --- a/softwareDirectory/AutoVerScheme/formcommsetting.ui +++ b/softwareDirectory/AutoVerScheme/formcommsetting.ui @@ -79,192 +79,215 @@ background-color: rgb(255, 255, 255); - - - 6 - - - 12 - - - - - - 12 - - - - 串口 - - - - - - - - 12 - - - - 端口号: - - - - - - - - 12 - - - - - - - - - 12 - - - - 设备地址: - - - - - - - - 12 - - - - - - - - - 12 - - - - 波特率: - - - - - - - - 12 - - - - - - - - - 12 - - - - 校验位: - - - - - - - - 12 - - - - - - - - - 12 - - - - 数据位: - - - - - - - - 12 - - - - - - - - - 12 - - - - 停止位: - - - - - - - - 12 - - - - - - - - - 12 - - - - 模式: - - - - - - - - 12 - - - - - - - - - 12 - - - - 流控: - - - - - - - - 12 - - - + + + + + + + + 12 + + + + 串口 + + + + + + + + 12 + + + + 端口号: + + + + + + + + 12 + + + + true + + + + + + + + 12 + + + + 波特率: + + + + + + + + 12 + + + + true + + + 9600 + + + 1 + + + + 4800 + + + + + 9600 + + + + + 14400 + + + + + 19200 + + + + + 38400 + + + + + + + + + 12 + + + + 校验位: + + + + + + + + 12 + + + + + None + + + + + Odd + + + + + Even + + + + + + + + + 12 + + + + 数据位: + + + + + + + + 12 + + + + 1 + + + + 7 + + + + + 8 + + + + + + + + + 12 + + + + 停止位: + + + + + + + + 12 + + + + 1 + + + + None + + + + + One + + + + + Two + + + + + OnePointFive + + + + + @@ -285,6 +308,9 @@ VISA + + true + @@ -317,6 +343,9 @@ 12 + + true + diff --git a/softwareDirectory/AutoVerScheme/newcheckmethod.cpp b/softwareDirectory/AutoVerScheme/newcheckmethod.cpp index 0f04030..fe671b1 100644 --- a/softwareDirectory/AutoVerScheme/newcheckmethod.cpp +++ b/softwareDirectory/AutoVerScheme/newcheckmethod.cpp @@ -134,7 +134,7 @@ void NewCheckMethod::on_cmdButton_clicked(int type,QString id) { //qDebug() << "cmd click:" << type << id ; - FormAddrSetting *form = new FormAddrSetting(nullptr,type,id); + FormAddrSetting *form = new FormAddrSetting(nullptr,type,id,checkId); form->setWindowModality(Qt::ApplicationModal); form->show(); } @@ -182,7 +182,7 @@ "text-decoration:underline;" "}"); btn_1->setCursor(Qt::PointingHandCursor); - int type=1; + int type=0; //connect(btn_1,SIGNAL(clicked()),this,SLOT(on_cmdButton_clicked(1,id))); connect(btn_1, &QPushButton::clicked, this, [this,type, id]() { on_cmdButton_clicked(type,id); @@ -239,7 +239,7 @@ "text-decoration:underline;" "}"); btn_1->setCursor(Qt::PointingHandCursor); - int type=2; + int type=1; connect(btn_1, &QPushButton::clicked, this, [this,type, id]() { on_cmdButton_clicked(type,id); });