diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro index 1280b70..dfb0418 100644 --- a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro @@ -22,6 +22,7 @@ checkmethodmanage.cpp \ checkwindow.cpp \ create_task.cpp \ + datasyncview.cpp \ depar_task.cpp \ indexwindow.cpp \ infomanageview.cpp \ @@ -43,6 +44,7 @@ checkmethodmanage.h \ checkwindow.h \ create_task.h \ + datasyncview.h \ depar_task.h \ indexwindow.h \ infomanageview.h \ @@ -62,6 +64,7 @@ checkmethodmanage.ui \ checkwindow.ui \ create_task.ui \ + datasyncview.ui \ depar_task.ui \ indexwindow.ui \ infomanageview.ui \ diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro index 1280b70..dfb0418 100644 --- a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro @@ -22,6 +22,7 @@ checkmethodmanage.cpp \ checkwindow.cpp \ create_task.cpp \ + datasyncview.cpp \ depar_task.cpp \ indexwindow.cpp \ infomanageview.cpp \ @@ -43,6 +44,7 @@ checkmethodmanage.h \ checkwindow.h \ create_task.h \ + datasyncview.h \ depar_task.h \ indexwindow.h \ infomanageview.h \ @@ -62,6 +64,7 @@ checkmethodmanage.ui \ checkwindow.ui \ create_task.ui \ + datasyncview.ui \ depar_task.ui \ indexwindow.ui \ infomanageview.ui \ diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user index 6ea03c5..93c39cb 100644 --- a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user @@ -1,10 +1,10 @@ - + EnvironmentId - {2746248a-b112-4e0f-9ae0-9e61f2a42309} + {c08df58c-84a7-4965-bca6-e98789474efa} ProjectExplorer.Project.ActiveTarget @@ -71,7 +71,7 @@ 0 0 - D:/dev/QT/AutoCalHainan/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug true @@ -119,7 +119,7 @@ 2 - D:/dev/QT/AutoCalHainan/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Release + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Release true @@ -167,7 +167,7 @@ 0 - D:/dev/QT/AutoCalHainan/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Profile + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Profile true @@ -287,8 +287,8 @@ 2 - Qt4ProjectManager.Qt4RunConfiguration:D:/dev/QT/AutoCalHainan/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro - D:/dev/QT/AutoCalHainan/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro + Qt4ProjectManager.Qt4RunConfiguration:C:/Users/admin/Desktop/SVN/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro + C:/Users/admin/Desktop/SVN/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro false @@ -299,7 +299,7 @@ false true - D:/dev/QT/AutoCalHainan/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug 1 @@ -314,7 +314,7 @@ 0 0 - D:/dev/QT/AutoCalHainan/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Debug + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Debug true @@ -362,7 +362,7 @@ 2 - D:/dev/QT/AutoCalHainan/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Release + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Release true @@ -410,7 +410,7 @@ 0 - D:/dev/QT/AutoCalHainan/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Profile + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Profile true @@ -530,14 +530,15 @@ 2 - - ProjectExplorer.CustomExecutableRunConfiguration - + AutoVerScheme2 + 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 diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro index 1280b70..dfb0418 100644 --- a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro @@ -22,6 +22,7 @@ checkmethodmanage.cpp \ checkwindow.cpp \ create_task.cpp \ + datasyncview.cpp \ depar_task.cpp \ indexwindow.cpp \ infomanageview.cpp \ @@ -43,6 +44,7 @@ checkmethodmanage.h \ checkwindow.h \ create_task.h \ + datasyncview.h \ depar_task.h \ indexwindow.h \ infomanageview.h \ @@ -62,6 +64,7 @@ checkmethodmanage.ui \ checkwindow.ui \ create_task.ui \ + datasyncview.ui \ depar_task.ui \ indexwindow.ui \ infomanageview.ui \ diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user index 6ea03c5..93c39cb 100644 --- a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user @@ -1,10 +1,10 @@ - + EnvironmentId - {2746248a-b112-4e0f-9ae0-9e61f2a42309} + {c08df58c-84a7-4965-bca6-e98789474efa} ProjectExplorer.Project.ActiveTarget @@ -71,7 +71,7 @@ 0 0 - D:/dev/QT/AutoCalHainan/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug true @@ -119,7 +119,7 @@ 2 - D:/dev/QT/AutoCalHainan/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Release + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Release true @@ -167,7 +167,7 @@ 0 - D:/dev/QT/AutoCalHainan/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Profile + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Profile true @@ -287,8 +287,8 @@ 2 - Qt4ProjectManager.Qt4RunConfiguration:D:/dev/QT/AutoCalHainan/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro - D:/dev/QT/AutoCalHainan/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro + Qt4ProjectManager.Qt4RunConfiguration:C:/Users/admin/Desktop/SVN/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro + C:/Users/admin/Desktop/SVN/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro false @@ -299,7 +299,7 @@ false true - D:/dev/QT/AutoCalHainan/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug 1 @@ -314,7 +314,7 @@ 0 0 - D:/dev/QT/AutoCalHainan/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Debug + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Debug true @@ -362,7 +362,7 @@ 2 - D:/dev/QT/AutoCalHainan/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Release + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Release true @@ -410,7 +410,7 @@ 0 - D:/dev/QT/AutoCalHainan/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Profile + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Profile true @@ -530,14 +530,15 @@ 2 - - ProjectExplorer.CustomExecutableRunConfiguration - + AutoVerScheme2 + 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 diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user.c08df58 b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user.c08df58 deleted file mode 100644 index 495f95c..0000000 --- a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user.c08df58 +++ /dev/null @@ -1,563 +0,0 @@ - - - - - - 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 32-bit - Desktop Qt 5.14.2 MinGW 32-bit - qt.qt5.5142.win32_mingw73_kit - 0 - 0 - 0 - - D:/Auto_verification_scheme/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 - - - D:/Auto_verification_scheme/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 - - - D:/Auto_verification_scheme/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 - - D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug - - 1 - - - - ProjectExplorer.Project.Target.1 - - 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 - - D:/Auto_verification_scheme/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 - - - D:/Auto_verification_scheme/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 - - - D:/Auto_verification_scheme/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 - - AutoVerScheme2 - 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 b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro index 1280b70..dfb0418 100644 --- a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro @@ -22,6 +22,7 @@ checkmethodmanage.cpp \ checkwindow.cpp \ create_task.cpp \ + datasyncview.cpp \ depar_task.cpp \ indexwindow.cpp \ infomanageview.cpp \ @@ -43,6 +44,7 @@ checkmethodmanage.h \ checkwindow.h \ create_task.h \ + datasyncview.h \ depar_task.h \ indexwindow.h \ infomanageview.h \ @@ -62,6 +64,7 @@ checkmethodmanage.ui \ checkwindow.ui \ create_task.ui \ + datasyncview.ui \ depar_task.ui \ indexwindow.ui \ infomanageview.ui \ diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user index 6ea03c5..93c39cb 100644 --- a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user @@ -1,10 +1,10 @@ - + EnvironmentId - {2746248a-b112-4e0f-9ae0-9e61f2a42309} + {c08df58c-84a7-4965-bca6-e98789474efa} ProjectExplorer.Project.ActiveTarget @@ -71,7 +71,7 @@ 0 0 - D:/dev/QT/AutoCalHainan/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug true @@ -119,7 +119,7 @@ 2 - D:/dev/QT/AutoCalHainan/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Release + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Release true @@ -167,7 +167,7 @@ 0 - D:/dev/QT/AutoCalHainan/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Profile + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Profile true @@ -287,8 +287,8 @@ 2 - Qt4ProjectManager.Qt4RunConfiguration:D:/dev/QT/AutoCalHainan/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro - D:/dev/QT/AutoCalHainan/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro + Qt4ProjectManager.Qt4RunConfiguration:C:/Users/admin/Desktop/SVN/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro + C:/Users/admin/Desktop/SVN/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro false @@ -299,7 +299,7 @@ false true - D:/dev/QT/AutoCalHainan/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug 1 @@ -314,7 +314,7 @@ 0 0 - D:/dev/QT/AutoCalHainan/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Debug + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Debug true @@ -362,7 +362,7 @@ 2 - D:/dev/QT/AutoCalHainan/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Release + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Release true @@ -410,7 +410,7 @@ 0 - D:/dev/QT/AutoCalHainan/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Profile + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Profile true @@ -530,14 +530,15 @@ 2 - - ProjectExplorer.CustomExecutableRunConfiguration - + AutoVerScheme2 + 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 diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user.c08df58 b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user.c08df58 deleted file mode 100644 index 495f95c..0000000 --- a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user.c08df58 +++ /dev/null @@ -1,563 +0,0 @@ - - - - - - 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 32-bit - Desktop Qt 5.14.2 MinGW 32-bit - qt.qt5.5142.win32_mingw73_kit - 0 - 0 - 0 - - D:/Auto_verification_scheme/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 - - - D:/Auto_verification_scheme/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 - - - D:/Auto_verification_scheme/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 - - D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug - - 1 - - - - ProjectExplorer.Project.Target.1 - - 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 - - D:/Auto_verification_scheme/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 - - - D:/Auto_verification_scheme/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 - - - D:/Auto_verification_scheme/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 - - AutoVerScheme2 - 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/InfoBase.h b/softwareDirectory/AutoVerScheme/InfoBase.h index 7fec63e..084cf3f 100644 --- a/softwareDirectory/AutoVerScheme/InfoBase.h +++ b/softwareDirectory/AutoVerScheme/InfoBase.h @@ -2,6 +2,7 @@ #define INFOBASE_H #include +#include "QStandardItemModel" ///信号管理页面的基类 所有信息管理页面都继承于InfoBase /// 便于统一管理 所有子类必须实现Load方法 /// 每次按钮点击切换都会调用Load方法 用于每次页面的数据刷新 @@ -11,6 +12,8 @@ InfoBase(QWidget *parent = nullptr): QWidget(parent){}; // 纯虚函数 virtual void Load()=0; + //QStandardItemModel 的实例。这个模型将用于存储和管理数据。 + QStandardItemModel *model; }; #endif // INFOBASE_H diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro index 1280b70..dfb0418 100644 --- a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro @@ -22,6 +22,7 @@ checkmethodmanage.cpp \ checkwindow.cpp \ create_task.cpp \ + datasyncview.cpp \ depar_task.cpp \ indexwindow.cpp \ infomanageview.cpp \ @@ -43,6 +44,7 @@ checkmethodmanage.h \ checkwindow.h \ create_task.h \ + datasyncview.h \ depar_task.h \ indexwindow.h \ infomanageview.h \ @@ -62,6 +64,7 @@ checkmethodmanage.ui \ checkwindow.ui \ create_task.ui \ + datasyncview.ui \ depar_task.ui \ indexwindow.ui \ infomanageview.ui \ diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user index 6ea03c5..93c39cb 100644 --- a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user @@ -1,10 +1,10 @@ - + EnvironmentId - {2746248a-b112-4e0f-9ae0-9e61f2a42309} + {c08df58c-84a7-4965-bca6-e98789474efa} ProjectExplorer.Project.ActiveTarget @@ -71,7 +71,7 @@ 0 0 - D:/dev/QT/AutoCalHainan/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug true @@ -119,7 +119,7 @@ 2 - D:/dev/QT/AutoCalHainan/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Release + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Release true @@ -167,7 +167,7 @@ 0 - D:/dev/QT/AutoCalHainan/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Profile + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Profile true @@ -287,8 +287,8 @@ 2 - Qt4ProjectManager.Qt4RunConfiguration:D:/dev/QT/AutoCalHainan/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro - D:/dev/QT/AutoCalHainan/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro + Qt4ProjectManager.Qt4RunConfiguration:C:/Users/admin/Desktop/SVN/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro + C:/Users/admin/Desktop/SVN/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro false @@ -299,7 +299,7 @@ false true - D:/dev/QT/AutoCalHainan/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug 1 @@ -314,7 +314,7 @@ 0 0 - D:/dev/QT/AutoCalHainan/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Debug + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Debug true @@ -362,7 +362,7 @@ 2 - D:/dev/QT/AutoCalHainan/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Release + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Release true @@ -410,7 +410,7 @@ 0 - D:/dev/QT/AutoCalHainan/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Profile + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Profile true @@ -530,14 +530,15 @@ 2 - - ProjectExplorer.CustomExecutableRunConfiguration - + AutoVerScheme2 + 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 diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user.c08df58 b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user.c08df58 deleted file mode 100644 index 495f95c..0000000 --- a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user.c08df58 +++ /dev/null @@ -1,563 +0,0 @@ - - - - - - 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 32-bit - Desktop Qt 5.14.2 MinGW 32-bit - qt.qt5.5142.win32_mingw73_kit - 0 - 0 - 0 - - D:/Auto_verification_scheme/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 - - - D:/Auto_verification_scheme/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 - - - D:/Auto_verification_scheme/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 - - D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug - - 1 - - - - ProjectExplorer.Project.Target.1 - - 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 - - D:/Auto_verification_scheme/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 - - - D:/Auto_verification_scheme/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 - - - D:/Auto_verification_scheme/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 - - AutoVerScheme2 - 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/InfoBase.h b/softwareDirectory/AutoVerScheme/InfoBase.h index 7fec63e..084cf3f 100644 --- a/softwareDirectory/AutoVerScheme/InfoBase.h +++ b/softwareDirectory/AutoVerScheme/InfoBase.h @@ -2,6 +2,7 @@ #define INFOBASE_H #include +#include "QStandardItemModel" ///信号管理页面的基类 所有信息管理页面都继承于InfoBase /// 便于统一管理 所有子类必须实现Load方法 /// 每次按钮点击切换都会调用Load方法 用于每次页面的数据刷新 @@ -11,6 +12,8 @@ InfoBase(QWidget *parent = nullptr): QWidget(parent){}; // 纯虚函数 virtual void Load()=0; + //QStandardItemModel 的实例。这个模型将用于存储和管理数据。 + QStandardItemModel *model; }; #endif // INFOBASE_H diff --git a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.cpp b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.cpp index 7ac1e87..ffb2bbc 100644 --- a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.cpp +++ b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.cpp @@ -1,14 +1,64 @@ #include "beexamined_deviceitem.h" #include "ui_beexamined_deviceitem.h" +#include "QMessageBox.h" BeExamined_DeviceItem::BeExamined_DeviceItem(QWidget *parent) : - QWidget(parent), + InfoBase(parent), ui(new Ui::BeExamined_DeviceItem) { ui->setupUi(this); + this->initForm(); } BeExamined_DeviceItem::~BeExamined_DeviceItem() { delete ui; } + +void BeExamined_DeviceItem::initForm() +{ + + //tableWidget设置 + //设置控件的边框显示 + ui->tableWidget->setStyleSheet("QHeaderView::section {" + "border: 1px solid rgba(197, 196, 196, 1);" + "border-left:none;" + "border-top:none;" + "background-color:white;" + "}"); + + ui->tableWidget->setRowCount(10); // 设置10行 + ui->tableWidget->setColumnCount(12); // 设置11列 + ui->tableWidget->setColumnWidth(0, 80); // 设置第一列的宽度为100像素 + ui->tableWidget->verticalHeader()->setParent(nullptr); //隐藏行头 + QTableWidgetItem *item = new QTableWidgetItem("测试数据"); + item->setTextAlignment(Qt::AlignCenter); + ui->tableWidget->setItem(0, 0, item); //设置数据 + + //初始化TableWidget 设置列 + QStringList headers; + headers << "序号" << "设备名称" << "型号规则" << "辅助字段" << "出厂编号" + << "生产厂家"<<"所在单位" <<"使用部门"<<"计量标识"<<"检定周期"<<"证书有效期"<<"操作"; + ui->tableWidget->setHorizontalHeaderLabels(headers); + +} +void BeExamined_DeviceItem::ShowMessageBox(QString title,QString value) { + // 创建一个QMessageBox对象 + QMessageBox msgBox; + + // 设置消息框的标题 + msgBox.setWindowTitle(title); + + // 设置消息框的文本内容 + msgBox.setText(value); + + // 设置消息框的标准按钮,这里是“确定”按钮 + msgBox.setStandardButtons(QMessageBox::Ok); + + // 显示消息框 + msgBox.exec(); +} +void BeExamined_DeviceItem::Load() +{ + //ShowMessageBox("被检设备","被检设备初始化完成"); +} diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro index 1280b70..dfb0418 100644 --- a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro @@ -22,6 +22,7 @@ checkmethodmanage.cpp \ checkwindow.cpp \ create_task.cpp \ + datasyncview.cpp \ depar_task.cpp \ indexwindow.cpp \ infomanageview.cpp \ @@ -43,6 +44,7 @@ checkmethodmanage.h \ checkwindow.h \ create_task.h \ + datasyncview.h \ depar_task.h \ indexwindow.h \ infomanageview.h \ @@ -62,6 +64,7 @@ checkmethodmanage.ui \ checkwindow.ui \ create_task.ui \ + datasyncview.ui \ depar_task.ui \ indexwindow.ui \ infomanageview.ui \ diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user index 6ea03c5..93c39cb 100644 --- a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user @@ -1,10 +1,10 @@ - + EnvironmentId - {2746248a-b112-4e0f-9ae0-9e61f2a42309} + {c08df58c-84a7-4965-bca6-e98789474efa} ProjectExplorer.Project.ActiveTarget @@ -71,7 +71,7 @@ 0 0 - D:/dev/QT/AutoCalHainan/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug true @@ -119,7 +119,7 @@ 2 - D:/dev/QT/AutoCalHainan/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Release + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Release true @@ -167,7 +167,7 @@ 0 - D:/dev/QT/AutoCalHainan/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Profile + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Profile true @@ -287,8 +287,8 @@ 2 - Qt4ProjectManager.Qt4RunConfiguration:D:/dev/QT/AutoCalHainan/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro - D:/dev/QT/AutoCalHainan/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro + Qt4ProjectManager.Qt4RunConfiguration:C:/Users/admin/Desktop/SVN/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro + C:/Users/admin/Desktop/SVN/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro false @@ -299,7 +299,7 @@ false true - D:/dev/QT/AutoCalHainan/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug 1 @@ -314,7 +314,7 @@ 0 0 - D:/dev/QT/AutoCalHainan/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Debug + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Debug true @@ -362,7 +362,7 @@ 2 - D:/dev/QT/AutoCalHainan/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Release + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Release true @@ -410,7 +410,7 @@ 0 - D:/dev/QT/AutoCalHainan/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Profile + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Profile true @@ -530,14 +530,15 @@ 2 - - ProjectExplorer.CustomExecutableRunConfiguration - + AutoVerScheme2 + 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 diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user.c08df58 b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user.c08df58 deleted file mode 100644 index 495f95c..0000000 --- a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user.c08df58 +++ /dev/null @@ -1,563 +0,0 @@ - - - - - - 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 32-bit - Desktop Qt 5.14.2 MinGW 32-bit - qt.qt5.5142.win32_mingw73_kit - 0 - 0 - 0 - - D:/Auto_verification_scheme/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 - - - D:/Auto_verification_scheme/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 - - - D:/Auto_verification_scheme/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 - - D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug - - 1 - - - - ProjectExplorer.Project.Target.1 - - 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 - - D:/Auto_verification_scheme/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 - - - D:/Auto_verification_scheme/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 - - - D:/Auto_verification_scheme/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 - - AutoVerScheme2 - 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/InfoBase.h b/softwareDirectory/AutoVerScheme/InfoBase.h index 7fec63e..084cf3f 100644 --- a/softwareDirectory/AutoVerScheme/InfoBase.h +++ b/softwareDirectory/AutoVerScheme/InfoBase.h @@ -2,6 +2,7 @@ #define INFOBASE_H #include +#include "QStandardItemModel" ///信号管理页面的基类 所有信息管理页面都继承于InfoBase /// 便于统一管理 所有子类必须实现Load方法 /// 每次按钮点击切换都会调用Load方法 用于每次页面的数据刷新 @@ -11,6 +12,8 @@ InfoBase(QWidget *parent = nullptr): QWidget(parent){}; // 纯虚函数 virtual void Load()=0; + //QStandardItemModel 的实例。这个模型将用于存储和管理数据。 + QStandardItemModel *model; }; #endif // INFOBASE_H diff --git a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.cpp b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.cpp index 7ac1e87..ffb2bbc 100644 --- a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.cpp +++ b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.cpp @@ -1,14 +1,64 @@ #include "beexamined_deviceitem.h" #include "ui_beexamined_deviceitem.h" +#include "QMessageBox.h" BeExamined_DeviceItem::BeExamined_DeviceItem(QWidget *parent) : - QWidget(parent), + InfoBase(parent), ui(new Ui::BeExamined_DeviceItem) { ui->setupUi(this); + this->initForm(); } BeExamined_DeviceItem::~BeExamined_DeviceItem() { delete ui; } + +void BeExamined_DeviceItem::initForm() +{ + + //tableWidget设置 + //设置控件的边框显示 + ui->tableWidget->setStyleSheet("QHeaderView::section {" + "border: 1px solid rgba(197, 196, 196, 1);" + "border-left:none;" + "border-top:none;" + "background-color:white;" + "}"); + + ui->tableWidget->setRowCount(10); // 设置10行 + ui->tableWidget->setColumnCount(12); // 设置11列 + ui->tableWidget->setColumnWidth(0, 80); // 设置第一列的宽度为100像素 + ui->tableWidget->verticalHeader()->setParent(nullptr); //隐藏行头 + QTableWidgetItem *item = new QTableWidgetItem("测试数据"); + item->setTextAlignment(Qt::AlignCenter); + ui->tableWidget->setItem(0, 0, item); //设置数据 + + //初始化TableWidget 设置列 + QStringList headers; + headers << "序号" << "设备名称" << "型号规则" << "辅助字段" << "出厂编号" + << "生产厂家"<<"所在单位" <<"使用部门"<<"计量标识"<<"检定周期"<<"证书有效期"<<"操作"; + ui->tableWidget->setHorizontalHeaderLabels(headers); + +} +void BeExamined_DeviceItem::ShowMessageBox(QString title,QString value) { + // 创建一个QMessageBox对象 + QMessageBox msgBox; + + // 设置消息框的标题 + msgBox.setWindowTitle(title); + + // 设置消息框的文本内容 + msgBox.setText(value); + + // 设置消息框的标准按钮,这里是“确定”按钮 + msgBox.setStandardButtons(QMessageBox::Ok); + + // 显示消息框 + msgBox.exec(); +} +void BeExamined_DeviceItem::Load() +{ + //ShowMessageBox("被检设备","被检设备初始化完成"); +} diff --git a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.h b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.h index 76b061d..ae46979 100644 --- a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.h +++ b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.h @@ -2,12 +2,13 @@ #define BEEXAMINED_DEVICEITEM_H #include +#include "InfoBase.h" namespace Ui { class BeExamined_DeviceItem; } -class BeExamined_DeviceItem : public QWidget +class BeExamined_DeviceItem : public InfoBase { Q_OBJECT @@ -15,6 +16,11 @@ explicit BeExamined_DeviceItem(QWidget *parent = nullptr); ~BeExamined_DeviceItem(); +private slots: + void initForm(); //初始化界面数据 + void ShowMessageBox(QString title,QString value); + //继承父类的Load方法 + void Load() override; private: Ui::BeExamined_DeviceItem *ui; }; diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro index 1280b70..dfb0418 100644 --- a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro @@ -22,6 +22,7 @@ checkmethodmanage.cpp \ checkwindow.cpp \ create_task.cpp \ + datasyncview.cpp \ depar_task.cpp \ indexwindow.cpp \ infomanageview.cpp \ @@ -43,6 +44,7 @@ checkmethodmanage.h \ checkwindow.h \ create_task.h \ + datasyncview.h \ depar_task.h \ indexwindow.h \ infomanageview.h \ @@ -62,6 +64,7 @@ checkmethodmanage.ui \ checkwindow.ui \ create_task.ui \ + datasyncview.ui \ depar_task.ui \ indexwindow.ui \ infomanageview.ui \ diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user index 6ea03c5..93c39cb 100644 --- a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user @@ -1,10 +1,10 @@ - + EnvironmentId - {2746248a-b112-4e0f-9ae0-9e61f2a42309} + {c08df58c-84a7-4965-bca6-e98789474efa} ProjectExplorer.Project.ActiveTarget @@ -71,7 +71,7 @@ 0 0 - D:/dev/QT/AutoCalHainan/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug true @@ -119,7 +119,7 @@ 2 - D:/dev/QT/AutoCalHainan/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Release + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Release true @@ -167,7 +167,7 @@ 0 - D:/dev/QT/AutoCalHainan/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Profile + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Profile true @@ -287,8 +287,8 @@ 2 - Qt4ProjectManager.Qt4RunConfiguration:D:/dev/QT/AutoCalHainan/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro - D:/dev/QT/AutoCalHainan/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro + Qt4ProjectManager.Qt4RunConfiguration:C:/Users/admin/Desktop/SVN/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro + C:/Users/admin/Desktop/SVN/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro false @@ -299,7 +299,7 @@ false true - D:/dev/QT/AutoCalHainan/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug 1 @@ -314,7 +314,7 @@ 0 0 - D:/dev/QT/AutoCalHainan/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Debug + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Debug true @@ -362,7 +362,7 @@ 2 - D:/dev/QT/AutoCalHainan/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Release + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Release true @@ -410,7 +410,7 @@ 0 - D:/dev/QT/AutoCalHainan/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Profile + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Profile true @@ -530,14 +530,15 @@ 2 - - ProjectExplorer.CustomExecutableRunConfiguration - + AutoVerScheme2 + 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 diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user.c08df58 b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user.c08df58 deleted file mode 100644 index 495f95c..0000000 --- a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user.c08df58 +++ /dev/null @@ -1,563 +0,0 @@ - - - - - - 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 32-bit - Desktop Qt 5.14.2 MinGW 32-bit - qt.qt5.5142.win32_mingw73_kit - 0 - 0 - 0 - - D:/Auto_verification_scheme/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 - - - D:/Auto_verification_scheme/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 - - - D:/Auto_verification_scheme/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 - - D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug - - 1 - - - - ProjectExplorer.Project.Target.1 - - 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 - - D:/Auto_verification_scheme/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 - - - D:/Auto_verification_scheme/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 - - - D:/Auto_verification_scheme/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 - - AutoVerScheme2 - 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/InfoBase.h b/softwareDirectory/AutoVerScheme/InfoBase.h index 7fec63e..084cf3f 100644 --- a/softwareDirectory/AutoVerScheme/InfoBase.h +++ b/softwareDirectory/AutoVerScheme/InfoBase.h @@ -2,6 +2,7 @@ #define INFOBASE_H #include +#include "QStandardItemModel" ///信号管理页面的基类 所有信息管理页面都继承于InfoBase /// 便于统一管理 所有子类必须实现Load方法 /// 每次按钮点击切换都会调用Load方法 用于每次页面的数据刷新 @@ -11,6 +12,8 @@ InfoBase(QWidget *parent = nullptr): QWidget(parent){}; // 纯虚函数 virtual void Load()=0; + //QStandardItemModel 的实例。这个模型将用于存储和管理数据。 + QStandardItemModel *model; }; #endif // INFOBASE_H diff --git a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.cpp b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.cpp index 7ac1e87..ffb2bbc 100644 --- a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.cpp +++ b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.cpp @@ -1,14 +1,64 @@ #include "beexamined_deviceitem.h" #include "ui_beexamined_deviceitem.h" +#include "QMessageBox.h" BeExamined_DeviceItem::BeExamined_DeviceItem(QWidget *parent) : - QWidget(parent), + InfoBase(parent), ui(new Ui::BeExamined_DeviceItem) { ui->setupUi(this); + this->initForm(); } BeExamined_DeviceItem::~BeExamined_DeviceItem() { delete ui; } + +void BeExamined_DeviceItem::initForm() +{ + + //tableWidget设置 + //设置控件的边框显示 + ui->tableWidget->setStyleSheet("QHeaderView::section {" + "border: 1px solid rgba(197, 196, 196, 1);" + "border-left:none;" + "border-top:none;" + "background-color:white;" + "}"); + + ui->tableWidget->setRowCount(10); // 设置10行 + ui->tableWidget->setColumnCount(12); // 设置11列 + ui->tableWidget->setColumnWidth(0, 80); // 设置第一列的宽度为100像素 + ui->tableWidget->verticalHeader()->setParent(nullptr); //隐藏行头 + QTableWidgetItem *item = new QTableWidgetItem("测试数据"); + item->setTextAlignment(Qt::AlignCenter); + ui->tableWidget->setItem(0, 0, item); //设置数据 + + //初始化TableWidget 设置列 + QStringList headers; + headers << "序号" << "设备名称" << "型号规则" << "辅助字段" << "出厂编号" + << "生产厂家"<<"所在单位" <<"使用部门"<<"计量标识"<<"检定周期"<<"证书有效期"<<"操作"; + ui->tableWidget->setHorizontalHeaderLabels(headers); + +} +void BeExamined_DeviceItem::ShowMessageBox(QString title,QString value) { + // 创建一个QMessageBox对象 + QMessageBox msgBox; + + // 设置消息框的标题 + msgBox.setWindowTitle(title); + + // 设置消息框的文本内容 + msgBox.setText(value); + + // 设置消息框的标准按钮,这里是“确定”按钮 + msgBox.setStandardButtons(QMessageBox::Ok); + + // 显示消息框 + msgBox.exec(); +} +void BeExamined_DeviceItem::Load() +{ + //ShowMessageBox("被检设备","被检设备初始化完成"); +} diff --git a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.h b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.h index 76b061d..ae46979 100644 --- a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.h +++ b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.h @@ -2,12 +2,13 @@ #define BEEXAMINED_DEVICEITEM_H #include +#include "InfoBase.h" namespace Ui { class BeExamined_DeviceItem; } -class BeExamined_DeviceItem : public QWidget +class BeExamined_DeviceItem : public InfoBase { Q_OBJECT @@ -15,6 +16,11 @@ explicit BeExamined_DeviceItem(QWidget *parent = nullptr); ~BeExamined_DeviceItem(); +private slots: + void initForm(); //初始化界面数据 + void ShowMessageBox(QString title,QString value); + //继承父类的Load方法 + void Load() override; private: Ui::BeExamined_DeviceItem *ui; }; diff --git a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.ui b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.ui index af9f7bf..5a0a3c9 100644 --- a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.ui +++ b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.ui @@ -6,26 +6,236 @@ 0 0 - 400 - 300 + 1291 + 575 Form - - - - 130 - 140 - 89 - 24 - - - - 被检设备管理 - - + + + + + + 0 + 0 + + + + background-color:white; + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 设备名称: + + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 型号规则: + + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 出厂编号: + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 生产厂家: + + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 使用部门: + + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 使用单位: + + + + + + + + + + Qt::Horizontal + + + QSizePolicy::Expanding + + + + 40 + 20 + + + + + + + + Qt::RightToLeft + + + 查询 + + + + + + + Qt::RightToLeft + + + 重置 + + + + + + + + + + background-color:white; + + + + + + + + + + + + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro index 1280b70..dfb0418 100644 --- a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro @@ -22,6 +22,7 @@ checkmethodmanage.cpp \ checkwindow.cpp \ create_task.cpp \ + datasyncview.cpp \ depar_task.cpp \ indexwindow.cpp \ infomanageview.cpp \ @@ -43,6 +44,7 @@ checkmethodmanage.h \ checkwindow.h \ create_task.h \ + datasyncview.h \ depar_task.h \ indexwindow.h \ infomanageview.h \ @@ -62,6 +64,7 @@ checkmethodmanage.ui \ checkwindow.ui \ create_task.ui \ + datasyncview.ui \ depar_task.ui \ indexwindow.ui \ infomanageview.ui \ diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user index 6ea03c5..93c39cb 100644 --- a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user @@ -1,10 +1,10 @@ - + EnvironmentId - {2746248a-b112-4e0f-9ae0-9e61f2a42309} + {c08df58c-84a7-4965-bca6-e98789474efa} ProjectExplorer.Project.ActiveTarget @@ -71,7 +71,7 @@ 0 0 - D:/dev/QT/AutoCalHainan/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug true @@ -119,7 +119,7 @@ 2 - D:/dev/QT/AutoCalHainan/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Release + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Release true @@ -167,7 +167,7 @@ 0 - D:/dev/QT/AutoCalHainan/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Profile + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Profile true @@ -287,8 +287,8 @@ 2 - Qt4ProjectManager.Qt4RunConfiguration:D:/dev/QT/AutoCalHainan/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro - D:/dev/QT/AutoCalHainan/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro + Qt4ProjectManager.Qt4RunConfiguration:C:/Users/admin/Desktop/SVN/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro + C:/Users/admin/Desktop/SVN/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro false @@ -299,7 +299,7 @@ false true - D:/dev/QT/AutoCalHainan/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug 1 @@ -314,7 +314,7 @@ 0 0 - D:/dev/QT/AutoCalHainan/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Debug + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Debug true @@ -362,7 +362,7 @@ 2 - D:/dev/QT/AutoCalHainan/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Release + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Release true @@ -410,7 +410,7 @@ 0 - D:/dev/QT/AutoCalHainan/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Profile + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Profile true @@ -530,14 +530,15 @@ 2 - - ProjectExplorer.CustomExecutableRunConfiguration - + AutoVerScheme2 + 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 diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user.c08df58 b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user.c08df58 deleted file mode 100644 index 495f95c..0000000 --- a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user.c08df58 +++ /dev/null @@ -1,563 +0,0 @@ - - - - - - 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 32-bit - Desktop Qt 5.14.2 MinGW 32-bit - qt.qt5.5142.win32_mingw73_kit - 0 - 0 - 0 - - D:/Auto_verification_scheme/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 - - - D:/Auto_verification_scheme/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 - - - D:/Auto_verification_scheme/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 - - D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug - - 1 - - - - ProjectExplorer.Project.Target.1 - - 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 - - D:/Auto_verification_scheme/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 - - - D:/Auto_verification_scheme/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 - - - D:/Auto_verification_scheme/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 - - AutoVerScheme2 - 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/InfoBase.h b/softwareDirectory/AutoVerScheme/InfoBase.h index 7fec63e..084cf3f 100644 --- a/softwareDirectory/AutoVerScheme/InfoBase.h +++ b/softwareDirectory/AutoVerScheme/InfoBase.h @@ -2,6 +2,7 @@ #define INFOBASE_H #include +#include "QStandardItemModel" ///信号管理页面的基类 所有信息管理页面都继承于InfoBase /// 便于统一管理 所有子类必须实现Load方法 /// 每次按钮点击切换都会调用Load方法 用于每次页面的数据刷新 @@ -11,6 +12,8 @@ InfoBase(QWidget *parent = nullptr): QWidget(parent){}; // 纯虚函数 virtual void Load()=0; + //QStandardItemModel 的实例。这个模型将用于存储和管理数据。 + QStandardItemModel *model; }; #endif // INFOBASE_H diff --git a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.cpp b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.cpp index 7ac1e87..ffb2bbc 100644 --- a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.cpp +++ b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.cpp @@ -1,14 +1,64 @@ #include "beexamined_deviceitem.h" #include "ui_beexamined_deviceitem.h" +#include "QMessageBox.h" BeExamined_DeviceItem::BeExamined_DeviceItem(QWidget *parent) : - QWidget(parent), + InfoBase(parent), ui(new Ui::BeExamined_DeviceItem) { ui->setupUi(this); + this->initForm(); } BeExamined_DeviceItem::~BeExamined_DeviceItem() { delete ui; } + +void BeExamined_DeviceItem::initForm() +{ + + //tableWidget设置 + //设置控件的边框显示 + ui->tableWidget->setStyleSheet("QHeaderView::section {" + "border: 1px solid rgba(197, 196, 196, 1);" + "border-left:none;" + "border-top:none;" + "background-color:white;" + "}"); + + ui->tableWidget->setRowCount(10); // 设置10行 + ui->tableWidget->setColumnCount(12); // 设置11列 + ui->tableWidget->setColumnWidth(0, 80); // 设置第一列的宽度为100像素 + ui->tableWidget->verticalHeader()->setParent(nullptr); //隐藏行头 + QTableWidgetItem *item = new QTableWidgetItem("测试数据"); + item->setTextAlignment(Qt::AlignCenter); + ui->tableWidget->setItem(0, 0, item); //设置数据 + + //初始化TableWidget 设置列 + QStringList headers; + headers << "序号" << "设备名称" << "型号规则" << "辅助字段" << "出厂编号" + << "生产厂家"<<"所在单位" <<"使用部门"<<"计量标识"<<"检定周期"<<"证书有效期"<<"操作"; + ui->tableWidget->setHorizontalHeaderLabels(headers); + +} +void BeExamined_DeviceItem::ShowMessageBox(QString title,QString value) { + // 创建一个QMessageBox对象 + QMessageBox msgBox; + + // 设置消息框的标题 + msgBox.setWindowTitle(title); + + // 设置消息框的文本内容 + msgBox.setText(value); + + // 设置消息框的标准按钮,这里是“确定”按钮 + msgBox.setStandardButtons(QMessageBox::Ok); + + // 显示消息框 + msgBox.exec(); +} +void BeExamined_DeviceItem::Load() +{ + //ShowMessageBox("被检设备","被检设备初始化完成"); +} diff --git a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.h b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.h index 76b061d..ae46979 100644 --- a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.h +++ b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.h @@ -2,12 +2,13 @@ #define BEEXAMINED_DEVICEITEM_H #include +#include "InfoBase.h" namespace Ui { class BeExamined_DeviceItem; } -class BeExamined_DeviceItem : public QWidget +class BeExamined_DeviceItem : public InfoBase { Q_OBJECT @@ -15,6 +16,11 @@ explicit BeExamined_DeviceItem(QWidget *parent = nullptr); ~BeExamined_DeviceItem(); +private slots: + void initForm(); //初始化界面数据 + void ShowMessageBox(QString title,QString value); + //继承父类的Load方法 + void Load() override; private: Ui::BeExamined_DeviceItem *ui; }; diff --git a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.ui b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.ui index af9f7bf..5a0a3c9 100644 --- a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.ui +++ b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.ui @@ -6,26 +6,236 @@ 0 0 - 400 - 300 + 1291 + 575 Form - - - - 130 - 140 - 89 - 24 - - - - 被检设备管理 - - + + + + + + 0 + 0 + + + + background-color:white; + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 设备名称: + + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 型号规则: + + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 出厂编号: + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 生产厂家: + + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 使用部门: + + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 使用单位: + + + + + + + + + + Qt::Horizontal + + + QSizePolicy::Expanding + + + + 40 + 20 + + + + + + + + Qt::RightToLeft + + + 查询 + + + + + + + Qt::RightToLeft + + + 重置 + + + + + + + + + + background-color:white; + + + + + + + + + + + + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/create_task.cpp b/softwareDirectory/AutoVerScheme/create_task.cpp index 4193efc..9b49a1a 100644 --- a/softwareDirectory/AutoVerScheme/create_task.cpp +++ b/softwareDirectory/AutoVerScheme/create_task.cpp @@ -1,14 +1,61 @@ #include "create_task.h" #include "ui_create_task.h" +#include "QMessageBox" Create_Task::Create_Task(QWidget *parent) : - QWidget(parent), + InfoBase(parent), ui(new Ui::Create_Task) { ui->setupUi(this); + this->initForm(); } Create_Task::~Create_Task() { delete ui; } +void Create_Task::initForm() +{ + //tableWidget设置 + //设置控件的边框显示 + ui->tableWidget->setStyleSheet("QHeaderView::section {" + "border: 1px solid rgba(197, 196, 196, 1);" + "border-left:none;" + "border-top:none;" + "background-color:white;" + "}"); + + ui->tableWidget->setRowCount(10); // 设置10行 + ui->tableWidget->setColumnCount(8); // 设置11列 + ui->tableWidget->setColumnWidth(0, 80); // 设置第一列的宽度为100像素 + ui->tableWidget->verticalHeader()->setParent(nullptr); //隐藏行头 + QTableWidgetItem *item = new QTableWidgetItem("测试数据"); + item->setTextAlignment(Qt::AlignCenter); + ui->tableWidget->setItem(0, 0, item); //设置数据 + + //初始化TableWidget 设置列 + QStringList headers; + headers << "序号" << "任务单编号" << "委托方"<< "使用部门" << "要求检完时间" << "送检人"<<"是否加急"<<"操作"; + ui->tableWidget->setHorizontalHeaderLabels(headers); + //ShowMessageBox("标题","初始化完成"); +} +void Create_Task::ShowMessageBox(QString title,QString value) { + // 创建一个QMessageBox对象 + QMessageBox msgBox; + + // 设置消息框的标题 + msgBox.setWindowTitle(title); + + // 设置消息框的文本内容 + msgBox.setText(value); + + // 设置消息框的标准按钮,这里是“确定”按钮 + msgBox.setStandardButtons(QMessageBox::Ok); + + // 显示消息框 + msgBox.exec(); +} +void Create_Task::Load() +{ + //ShowMessageBox("创建任务界面","创建任务界面初始化完成"); +} diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro index 1280b70..dfb0418 100644 --- a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro @@ -22,6 +22,7 @@ checkmethodmanage.cpp \ checkwindow.cpp \ create_task.cpp \ + datasyncview.cpp \ depar_task.cpp \ indexwindow.cpp \ infomanageview.cpp \ @@ -43,6 +44,7 @@ checkmethodmanage.h \ checkwindow.h \ create_task.h \ + datasyncview.h \ depar_task.h \ indexwindow.h \ infomanageview.h \ @@ -62,6 +64,7 @@ checkmethodmanage.ui \ checkwindow.ui \ create_task.ui \ + datasyncview.ui \ depar_task.ui \ indexwindow.ui \ infomanageview.ui \ diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user index 6ea03c5..93c39cb 100644 --- a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user @@ -1,10 +1,10 @@ - + EnvironmentId - {2746248a-b112-4e0f-9ae0-9e61f2a42309} + {c08df58c-84a7-4965-bca6-e98789474efa} ProjectExplorer.Project.ActiveTarget @@ -71,7 +71,7 @@ 0 0 - D:/dev/QT/AutoCalHainan/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug true @@ -119,7 +119,7 @@ 2 - D:/dev/QT/AutoCalHainan/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Release + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Release true @@ -167,7 +167,7 @@ 0 - D:/dev/QT/AutoCalHainan/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Profile + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Profile true @@ -287,8 +287,8 @@ 2 - Qt4ProjectManager.Qt4RunConfiguration:D:/dev/QT/AutoCalHainan/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro - D:/dev/QT/AutoCalHainan/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro + Qt4ProjectManager.Qt4RunConfiguration:C:/Users/admin/Desktop/SVN/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro + C:/Users/admin/Desktop/SVN/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro false @@ -299,7 +299,7 @@ false true - D:/dev/QT/AutoCalHainan/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug 1 @@ -314,7 +314,7 @@ 0 0 - D:/dev/QT/AutoCalHainan/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Debug + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Debug true @@ -362,7 +362,7 @@ 2 - D:/dev/QT/AutoCalHainan/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Release + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Release true @@ -410,7 +410,7 @@ 0 - D:/dev/QT/AutoCalHainan/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Profile + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Profile true @@ -530,14 +530,15 @@ 2 - - ProjectExplorer.CustomExecutableRunConfiguration - + AutoVerScheme2 + 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 diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user.c08df58 b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user.c08df58 deleted file mode 100644 index 495f95c..0000000 --- a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user.c08df58 +++ /dev/null @@ -1,563 +0,0 @@ - - - - - - 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 32-bit - Desktop Qt 5.14.2 MinGW 32-bit - qt.qt5.5142.win32_mingw73_kit - 0 - 0 - 0 - - D:/Auto_verification_scheme/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 - - - D:/Auto_verification_scheme/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 - - - D:/Auto_verification_scheme/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 - - D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug - - 1 - - - - ProjectExplorer.Project.Target.1 - - 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 - - D:/Auto_verification_scheme/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 - - - D:/Auto_verification_scheme/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 - - - D:/Auto_verification_scheme/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 - - AutoVerScheme2 - 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/InfoBase.h b/softwareDirectory/AutoVerScheme/InfoBase.h index 7fec63e..084cf3f 100644 --- a/softwareDirectory/AutoVerScheme/InfoBase.h +++ b/softwareDirectory/AutoVerScheme/InfoBase.h @@ -2,6 +2,7 @@ #define INFOBASE_H #include +#include "QStandardItemModel" ///信号管理页面的基类 所有信息管理页面都继承于InfoBase /// 便于统一管理 所有子类必须实现Load方法 /// 每次按钮点击切换都会调用Load方法 用于每次页面的数据刷新 @@ -11,6 +12,8 @@ InfoBase(QWidget *parent = nullptr): QWidget(parent){}; // 纯虚函数 virtual void Load()=0; + //QStandardItemModel 的实例。这个模型将用于存储和管理数据。 + QStandardItemModel *model; }; #endif // INFOBASE_H diff --git a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.cpp b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.cpp index 7ac1e87..ffb2bbc 100644 --- a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.cpp +++ b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.cpp @@ -1,14 +1,64 @@ #include "beexamined_deviceitem.h" #include "ui_beexamined_deviceitem.h" +#include "QMessageBox.h" BeExamined_DeviceItem::BeExamined_DeviceItem(QWidget *parent) : - QWidget(parent), + InfoBase(parent), ui(new Ui::BeExamined_DeviceItem) { ui->setupUi(this); + this->initForm(); } BeExamined_DeviceItem::~BeExamined_DeviceItem() { delete ui; } + +void BeExamined_DeviceItem::initForm() +{ + + //tableWidget设置 + //设置控件的边框显示 + ui->tableWidget->setStyleSheet("QHeaderView::section {" + "border: 1px solid rgba(197, 196, 196, 1);" + "border-left:none;" + "border-top:none;" + "background-color:white;" + "}"); + + ui->tableWidget->setRowCount(10); // 设置10行 + ui->tableWidget->setColumnCount(12); // 设置11列 + ui->tableWidget->setColumnWidth(0, 80); // 设置第一列的宽度为100像素 + ui->tableWidget->verticalHeader()->setParent(nullptr); //隐藏行头 + QTableWidgetItem *item = new QTableWidgetItem("测试数据"); + item->setTextAlignment(Qt::AlignCenter); + ui->tableWidget->setItem(0, 0, item); //设置数据 + + //初始化TableWidget 设置列 + QStringList headers; + headers << "序号" << "设备名称" << "型号规则" << "辅助字段" << "出厂编号" + << "生产厂家"<<"所在单位" <<"使用部门"<<"计量标识"<<"检定周期"<<"证书有效期"<<"操作"; + ui->tableWidget->setHorizontalHeaderLabels(headers); + +} +void BeExamined_DeviceItem::ShowMessageBox(QString title,QString value) { + // 创建一个QMessageBox对象 + QMessageBox msgBox; + + // 设置消息框的标题 + msgBox.setWindowTitle(title); + + // 设置消息框的文本内容 + msgBox.setText(value); + + // 设置消息框的标准按钮,这里是“确定”按钮 + msgBox.setStandardButtons(QMessageBox::Ok); + + // 显示消息框 + msgBox.exec(); +} +void BeExamined_DeviceItem::Load() +{ + //ShowMessageBox("被检设备","被检设备初始化完成"); +} diff --git a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.h b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.h index 76b061d..ae46979 100644 --- a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.h +++ b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.h @@ -2,12 +2,13 @@ #define BEEXAMINED_DEVICEITEM_H #include +#include "InfoBase.h" namespace Ui { class BeExamined_DeviceItem; } -class BeExamined_DeviceItem : public QWidget +class BeExamined_DeviceItem : public InfoBase { Q_OBJECT @@ -15,6 +16,11 @@ explicit BeExamined_DeviceItem(QWidget *parent = nullptr); ~BeExamined_DeviceItem(); +private slots: + void initForm(); //初始化界面数据 + void ShowMessageBox(QString title,QString value); + //继承父类的Load方法 + void Load() override; private: Ui::BeExamined_DeviceItem *ui; }; diff --git a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.ui b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.ui index af9f7bf..5a0a3c9 100644 --- a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.ui +++ b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.ui @@ -6,26 +6,236 @@ 0 0 - 400 - 300 + 1291 + 575 Form - - - - 130 - 140 - 89 - 24 - - - - 被检设备管理 - - + + + + + + 0 + 0 + + + + background-color:white; + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 设备名称: + + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 型号规则: + + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 出厂编号: + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 生产厂家: + + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 使用部门: + + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 使用单位: + + + + + + + + + + Qt::Horizontal + + + QSizePolicy::Expanding + + + + 40 + 20 + + + + + + + + Qt::RightToLeft + + + 查询 + + + + + + + Qt::RightToLeft + + + 重置 + + + + + + + + + + background-color:white; + + + + + + + + + + + + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/create_task.cpp b/softwareDirectory/AutoVerScheme/create_task.cpp index 4193efc..9b49a1a 100644 --- a/softwareDirectory/AutoVerScheme/create_task.cpp +++ b/softwareDirectory/AutoVerScheme/create_task.cpp @@ -1,14 +1,61 @@ #include "create_task.h" #include "ui_create_task.h" +#include "QMessageBox" Create_Task::Create_Task(QWidget *parent) : - QWidget(parent), + InfoBase(parent), ui(new Ui::Create_Task) { ui->setupUi(this); + this->initForm(); } Create_Task::~Create_Task() { delete ui; } +void Create_Task::initForm() +{ + //tableWidget设置 + //设置控件的边框显示 + ui->tableWidget->setStyleSheet("QHeaderView::section {" + "border: 1px solid rgba(197, 196, 196, 1);" + "border-left:none;" + "border-top:none;" + "background-color:white;" + "}"); + + ui->tableWidget->setRowCount(10); // 设置10行 + ui->tableWidget->setColumnCount(8); // 设置11列 + ui->tableWidget->setColumnWidth(0, 80); // 设置第一列的宽度为100像素 + ui->tableWidget->verticalHeader()->setParent(nullptr); //隐藏行头 + QTableWidgetItem *item = new QTableWidgetItem("测试数据"); + item->setTextAlignment(Qt::AlignCenter); + ui->tableWidget->setItem(0, 0, item); //设置数据 + + //初始化TableWidget 设置列 + QStringList headers; + headers << "序号" << "任务单编号" << "委托方"<< "使用部门" << "要求检完时间" << "送检人"<<"是否加急"<<"操作"; + ui->tableWidget->setHorizontalHeaderLabels(headers); + //ShowMessageBox("标题","初始化完成"); +} +void Create_Task::ShowMessageBox(QString title,QString value) { + // 创建一个QMessageBox对象 + QMessageBox msgBox; + + // 设置消息框的标题 + msgBox.setWindowTitle(title); + + // 设置消息框的文本内容 + msgBox.setText(value); + + // 设置消息框的标准按钮,这里是“确定”按钮 + msgBox.setStandardButtons(QMessageBox::Ok); + + // 显示消息框 + msgBox.exec(); +} +void Create_Task::Load() +{ + //ShowMessageBox("创建任务界面","创建任务界面初始化完成"); +} diff --git a/softwareDirectory/AutoVerScheme/create_task.h b/softwareDirectory/AutoVerScheme/create_task.h index e2264de..7cf383f 100644 --- a/softwareDirectory/AutoVerScheme/create_task.h +++ b/softwareDirectory/AutoVerScheme/create_task.h @@ -1,13 +1,14 @@ #ifndef CREATE_TASK_H #define CREATE_TASK_H +#include "InfoBase.h" #include namespace Ui { class Create_Task; } -class Create_Task : public QWidget +class Create_Task : public InfoBase { Q_OBJECT @@ -15,6 +16,11 @@ explicit Create_Task(QWidget *parent = nullptr); ~Create_Task(); +private slots: + void initForm(); //初始化界面数据 + void ShowMessageBox(QString title,QString value); + //继承父类的Load方法 + void Load() override; private: Ui::Create_Task *ui; }; diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro index 1280b70..dfb0418 100644 --- a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro @@ -22,6 +22,7 @@ checkmethodmanage.cpp \ checkwindow.cpp \ create_task.cpp \ + datasyncview.cpp \ depar_task.cpp \ indexwindow.cpp \ infomanageview.cpp \ @@ -43,6 +44,7 @@ checkmethodmanage.h \ checkwindow.h \ create_task.h \ + datasyncview.h \ depar_task.h \ indexwindow.h \ infomanageview.h \ @@ -62,6 +64,7 @@ checkmethodmanage.ui \ checkwindow.ui \ create_task.ui \ + datasyncview.ui \ depar_task.ui \ indexwindow.ui \ infomanageview.ui \ diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user index 6ea03c5..93c39cb 100644 --- a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user @@ -1,10 +1,10 @@ - + EnvironmentId - {2746248a-b112-4e0f-9ae0-9e61f2a42309} + {c08df58c-84a7-4965-bca6-e98789474efa} ProjectExplorer.Project.ActiveTarget @@ -71,7 +71,7 @@ 0 0 - D:/dev/QT/AutoCalHainan/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug true @@ -119,7 +119,7 @@ 2 - D:/dev/QT/AutoCalHainan/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Release + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Release true @@ -167,7 +167,7 @@ 0 - D:/dev/QT/AutoCalHainan/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Profile + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Profile true @@ -287,8 +287,8 @@ 2 - Qt4ProjectManager.Qt4RunConfiguration:D:/dev/QT/AutoCalHainan/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro - D:/dev/QT/AutoCalHainan/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro + Qt4ProjectManager.Qt4RunConfiguration:C:/Users/admin/Desktop/SVN/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro + C:/Users/admin/Desktop/SVN/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro false @@ -299,7 +299,7 @@ false true - D:/dev/QT/AutoCalHainan/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug 1 @@ -314,7 +314,7 @@ 0 0 - D:/dev/QT/AutoCalHainan/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Debug + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Debug true @@ -362,7 +362,7 @@ 2 - D:/dev/QT/AutoCalHainan/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Release + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Release true @@ -410,7 +410,7 @@ 0 - D:/dev/QT/AutoCalHainan/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Profile + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Profile true @@ -530,14 +530,15 @@ 2 - - ProjectExplorer.CustomExecutableRunConfiguration - + AutoVerScheme2 + 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 diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user.c08df58 b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user.c08df58 deleted file mode 100644 index 495f95c..0000000 --- a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user.c08df58 +++ /dev/null @@ -1,563 +0,0 @@ - - - - - - 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 32-bit - Desktop Qt 5.14.2 MinGW 32-bit - qt.qt5.5142.win32_mingw73_kit - 0 - 0 - 0 - - D:/Auto_verification_scheme/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 - - - D:/Auto_verification_scheme/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 - - - D:/Auto_verification_scheme/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 - - D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug - - 1 - - - - ProjectExplorer.Project.Target.1 - - 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 - - D:/Auto_verification_scheme/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 - - - D:/Auto_verification_scheme/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 - - - D:/Auto_verification_scheme/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 - - AutoVerScheme2 - 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/InfoBase.h b/softwareDirectory/AutoVerScheme/InfoBase.h index 7fec63e..084cf3f 100644 --- a/softwareDirectory/AutoVerScheme/InfoBase.h +++ b/softwareDirectory/AutoVerScheme/InfoBase.h @@ -2,6 +2,7 @@ #define INFOBASE_H #include +#include "QStandardItemModel" ///信号管理页面的基类 所有信息管理页面都继承于InfoBase /// 便于统一管理 所有子类必须实现Load方法 /// 每次按钮点击切换都会调用Load方法 用于每次页面的数据刷新 @@ -11,6 +12,8 @@ InfoBase(QWidget *parent = nullptr): QWidget(parent){}; // 纯虚函数 virtual void Load()=0; + //QStandardItemModel 的实例。这个模型将用于存储和管理数据。 + QStandardItemModel *model; }; #endif // INFOBASE_H diff --git a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.cpp b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.cpp index 7ac1e87..ffb2bbc 100644 --- a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.cpp +++ b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.cpp @@ -1,14 +1,64 @@ #include "beexamined_deviceitem.h" #include "ui_beexamined_deviceitem.h" +#include "QMessageBox.h" BeExamined_DeviceItem::BeExamined_DeviceItem(QWidget *parent) : - QWidget(parent), + InfoBase(parent), ui(new Ui::BeExamined_DeviceItem) { ui->setupUi(this); + this->initForm(); } BeExamined_DeviceItem::~BeExamined_DeviceItem() { delete ui; } + +void BeExamined_DeviceItem::initForm() +{ + + //tableWidget设置 + //设置控件的边框显示 + ui->tableWidget->setStyleSheet("QHeaderView::section {" + "border: 1px solid rgba(197, 196, 196, 1);" + "border-left:none;" + "border-top:none;" + "background-color:white;" + "}"); + + ui->tableWidget->setRowCount(10); // 设置10行 + ui->tableWidget->setColumnCount(12); // 设置11列 + ui->tableWidget->setColumnWidth(0, 80); // 设置第一列的宽度为100像素 + ui->tableWidget->verticalHeader()->setParent(nullptr); //隐藏行头 + QTableWidgetItem *item = new QTableWidgetItem("测试数据"); + item->setTextAlignment(Qt::AlignCenter); + ui->tableWidget->setItem(0, 0, item); //设置数据 + + //初始化TableWidget 设置列 + QStringList headers; + headers << "序号" << "设备名称" << "型号规则" << "辅助字段" << "出厂编号" + << "生产厂家"<<"所在单位" <<"使用部门"<<"计量标识"<<"检定周期"<<"证书有效期"<<"操作"; + ui->tableWidget->setHorizontalHeaderLabels(headers); + +} +void BeExamined_DeviceItem::ShowMessageBox(QString title,QString value) { + // 创建一个QMessageBox对象 + QMessageBox msgBox; + + // 设置消息框的标题 + msgBox.setWindowTitle(title); + + // 设置消息框的文本内容 + msgBox.setText(value); + + // 设置消息框的标准按钮,这里是“确定”按钮 + msgBox.setStandardButtons(QMessageBox::Ok); + + // 显示消息框 + msgBox.exec(); +} +void BeExamined_DeviceItem::Load() +{ + //ShowMessageBox("被检设备","被检设备初始化完成"); +} diff --git a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.h b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.h index 76b061d..ae46979 100644 --- a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.h +++ b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.h @@ -2,12 +2,13 @@ #define BEEXAMINED_DEVICEITEM_H #include +#include "InfoBase.h" namespace Ui { class BeExamined_DeviceItem; } -class BeExamined_DeviceItem : public QWidget +class BeExamined_DeviceItem : public InfoBase { Q_OBJECT @@ -15,6 +16,11 @@ explicit BeExamined_DeviceItem(QWidget *parent = nullptr); ~BeExamined_DeviceItem(); +private slots: + void initForm(); //初始化界面数据 + void ShowMessageBox(QString title,QString value); + //继承父类的Load方法 + void Load() override; private: Ui::BeExamined_DeviceItem *ui; }; diff --git a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.ui b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.ui index af9f7bf..5a0a3c9 100644 --- a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.ui +++ b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.ui @@ -6,26 +6,236 @@ 0 0 - 400 - 300 + 1291 + 575 Form - - - - 130 - 140 - 89 - 24 - - - - 被检设备管理 - - + + + + + + 0 + 0 + + + + background-color:white; + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 设备名称: + + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 型号规则: + + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 出厂编号: + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 生产厂家: + + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 使用部门: + + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 使用单位: + + + + + + + + + + Qt::Horizontal + + + QSizePolicy::Expanding + + + + 40 + 20 + + + + + + + + Qt::RightToLeft + + + 查询 + + + + + + + Qt::RightToLeft + + + 重置 + + + + + + + + + + background-color:white; + + + + + + + + + + + + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/create_task.cpp b/softwareDirectory/AutoVerScheme/create_task.cpp index 4193efc..9b49a1a 100644 --- a/softwareDirectory/AutoVerScheme/create_task.cpp +++ b/softwareDirectory/AutoVerScheme/create_task.cpp @@ -1,14 +1,61 @@ #include "create_task.h" #include "ui_create_task.h" +#include "QMessageBox" Create_Task::Create_Task(QWidget *parent) : - QWidget(parent), + InfoBase(parent), ui(new Ui::Create_Task) { ui->setupUi(this); + this->initForm(); } Create_Task::~Create_Task() { delete ui; } +void Create_Task::initForm() +{ + //tableWidget设置 + //设置控件的边框显示 + ui->tableWidget->setStyleSheet("QHeaderView::section {" + "border: 1px solid rgba(197, 196, 196, 1);" + "border-left:none;" + "border-top:none;" + "background-color:white;" + "}"); + + ui->tableWidget->setRowCount(10); // 设置10行 + ui->tableWidget->setColumnCount(8); // 设置11列 + ui->tableWidget->setColumnWidth(0, 80); // 设置第一列的宽度为100像素 + ui->tableWidget->verticalHeader()->setParent(nullptr); //隐藏行头 + QTableWidgetItem *item = new QTableWidgetItem("测试数据"); + item->setTextAlignment(Qt::AlignCenter); + ui->tableWidget->setItem(0, 0, item); //设置数据 + + //初始化TableWidget 设置列 + QStringList headers; + headers << "序号" << "任务单编号" << "委托方"<< "使用部门" << "要求检完时间" << "送检人"<<"是否加急"<<"操作"; + ui->tableWidget->setHorizontalHeaderLabels(headers); + //ShowMessageBox("标题","初始化完成"); +} +void Create_Task::ShowMessageBox(QString title,QString value) { + // 创建一个QMessageBox对象 + QMessageBox msgBox; + + // 设置消息框的标题 + msgBox.setWindowTitle(title); + + // 设置消息框的文本内容 + msgBox.setText(value); + + // 设置消息框的标准按钮,这里是“确定”按钮 + msgBox.setStandardButtons(QMessageBox::Ok); + + // 显示消息框 + msgBox.exec(); +} +void Create_Task::Load() +{ + //ShowMessageBox("创建任务界面","创建任务界面初始化完成"); +} diff --git a/softwareDirectory/AutoVerScheme/create_task.h b/softwareDirectory/AutoVerScheme/create_task.h index e2264de..7cf383f 100644 --- a/softwareDirectory/AutoVerScheme/create_task.h +++ b/softwareDirectory/AutoVerScheme/create_task.h @@ -1,13 +1,14 @@ #ifndef CREATE_TASK_H #define CREATE_TASK_H +#include "InfoBase.h" #include namespace Ui { class Create_Task; } -class Create_Task : public QWidget +class Create_Task : public InfoBase { Q_OBJECT @@ -15,6 +16,11 @@ explicit Create_Task(QWidget *parent = nullptr); ~Create_Task(); +private slots: + void initForm(); //初始化界面数据 + void ShowMessageBox(QString title,QString value); + //继承父类的Load方法 + void Load() override; private: Ui::Create_Task *ui; }; diff --git a/softwareDirectory/AutoVerScheme/create_task.ui b/softwareDirectory/AutoVerScheme/create_task.ui index b79c6a1..d9d88ed 100644 --- a/softwareDirectory/AutoVerScheme/create_task.ui +++ b/softwareDirectory/AutoVerScheme/create_task.ui @@ -6,29 +6,294 @@ 0 0 - 400 - 300 + 1184 + 580 Form - - background-color:red; + + Qt::LeftToRight - - - - 140 - 120 - 89 - 24 - - - - 创建任务单 - - + + + + + + + + + 0 + 0 + + + + background-color:white; + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 任务单编号: + + + + + + + + 0 + 0 + + + + + + + + + 0 + 0 + + + + + 50 + 0 + + + + 委托方: + + + + + + + + 0 + 0 + + + + + 0 + 0 + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 使用部门: + + + + + + + + 0 + 0 + + + + + 0 + 0 + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 要求完成时间: + + + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + 0 + 30 + + + + Qt::RightToLeft + + + background-color:rgb(3, 58, 132); +color:white; + + + + 查询 + + + + + + + + 0 + 30 + + + + Qt::RightToLeft + + + background-color:rgb(207, 132, 33); +color:white; + + + + 重置 + + + + + + + + + + background-color:white; + + + + + + + 6 + + + 9 + + + 9 + + + 9 + + + + + + 0 + 0 + + + + + 120 + 40 + + + + OpenHandCursor + + + Qt::DefaultContextMenu + + + Qt::RightToLeft + + + false + + + background-color:rgb(9, 89, 179); +color:white; + + + 创建任务单 + + + true + + + + + + + + + + + + + + SizeVerCursor + + + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro index 1280b70..dfb0418 100644 --- a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro @@ -22,6 +22,7 @@ checkmethodmanage.cpp \ checkwindow.cpp \ create_task.cpp \ + datasyncview.cpp \ depar_task.cpp \ indexwindow.cpp \ infomanageview.cpp \ @@ -43,6 +44,7 @@ checkmethodmanage.h \ checkwindow.h \ create_task.h \ + datasyncview.h \ depar_task.h \ indexwindow.h \ infomanageview.h \ @@ -62,6 +64,7 @@ checkmethodmanage.ui \ checkwindow.ui \ create_task.ui \ + datasyncview.ui \ depar_task.ui \ indexwindow.ui \ infomanageview.ui \ diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user index 6ea03c5..93c39cb 100644 --- a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user @@ -1,10 +1,10 @@ - + EnvironmentId - {2746248a-b112-4e0f-9ae0-9e61f2a42309} + {c08df58c-84a7-4965-bca6-e98789474efa} ProjectExplorer.Project.ActiveTarget @@ -71,7 +71,7 @@ 0 0 - D:/dev/QT/AutoCalHainan/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug true @@ -119,7 +119,7 @@ 2 - D:/dev/QT/AutoCalHainan/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Release + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Release true @@ -167,7 +167,7 @@ 0 - D:/dev/QT/AutoCalHainan/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Profile + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Profile true @@ -287,8 +287,8 @@ 2 - Qt4ProjectManager.Qt4RunConfiguration:D:/dev/QT/AutoCalHainan/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro - D:/dev/QT/AutoCalHainan/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro + Qt4ProjectManager.Qt4RunConfiguration:C:/Users/admin/Desktop/SVN/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro + C:/Users/admin/Desktop/SVN/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro false @@ -299,7 +299,7 @@ false true - D:/dev/QT/AutoCalHainan/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug 1 @@ -314,7 +314,7 @@ 0 0 - D:/dev/QT/AutoCalHainan/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Debug + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Debug true @@ -362,7 +362,7 @@ 2 - D:/dev/QT/AutoCalHainan/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Release + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Release true @@ -410,7 +410,7 @@ 0 - D:/dev/QT/AutoCalHainan/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Profile + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Profile true @@ -530,14 +530,15 @@ 2 - - ProjectExplorer.CustomExecutableRunConfiguration - + AutoVerScheme2 + 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 diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user.c08df58 b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user.c08df58 deleted file mode 100644 index 495f95c..0000000 --- a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user.c08df58 +++ /dev/null @@ -1,563 +0,0 @@ - - - - - - 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 32-bit - Desktop Qt 5.14.2 MinGW 32-bit - qt.qt5.5142.win32_mingw73_kit - 0 - 0 - 0 - - D:/Auto_verification_scheme/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 - - - D:/Auto_verification_scheme/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 - - - D:/Auto_verification_scheme/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 - - D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug - - 1 - - - - ProjectExplorer.Project.Target.1 - - 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 - - D:/Auto_verification_scheme/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 - - - D:/Auto_verification_scheme/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 - - - D:/Auto_verification_scheme/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 - - AutoVerScheme2 - 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/InfoBase.h b/softwareDirectory/AutoVerScheme/InfoBase.h index 7fec63e..084cf3f 100644 --- a/softwareDirectory/AutoVerScheme/InfoBase.h +++ b/softwareDirectory/AutoVerScheme/InfoBase.h @@ -2,6 +2,7 @@ #define INFOBASE_H #include +#include "QStandardItemModel" ///信号管理页面的基类 所有信息管理页面都继承于InfoBase /// 便于统一管理 所有子类必须实现Load方法 /// 每次按钮点击切换都会调用Load方法 用于每次页面的数据刷新 @@ -11,6 +12,8 @@ InfoBase(QWidget *parent = nullptr): QWidget(parent){}; // 纯虚函数 virtual void Load()=0; + //QStandardItemModel 的实例。这个模型将用于存储和管理数据。 + QStandardItemModel *model; }; #endif // INFOBASE_H diff --git a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.cpp b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.cpp index 7ac1e87..ffb2bbc 100644 --- a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.cpp +++ b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.cpp @@ -1,14 +1,64 @@ #include "beexamined_deviceitem.h" #include "ui_beexamined_deviceitem.h" +#include "QMessageBox.h" BeExamined_DeviceItem::BeExamined_DeviceItem(QWidget *parent) : - QWidget(parent), + InfoBase(parent), ui(new Ui::BeExamined_DeviceItem) { ui->setupUi(this); + this->initForm(); } BeExamined_DeviceItem::~BeExamined_DeviceItem() { delete ui; } + +void BeExamined_DeviceItem::initForm() +{ + + //tableWidget设置 + //设置控件的边框显示 + ui->tableWidget->setStyleSheet("QHeaderView::section {" + "border: 1px solid rgba(197, 196, 196, 1);" + "border-left:none;" + "border-top:none;" + "background-color:white;" + "}"); + + ui->tableWidget->setRowCount(10); // 设置10行 + ui->tableWidget->setColumnCount(12); // 设置11列 + ui->tableWidget->setColumnWidth(0, 80); // 设置第一列的宽度为100像素 + ui->tableWidget->verticalHeader()->setParent(nullptr); //隐藏行头 + QTableWidgetItem *item = new QTableWidgetItem("测试数据"); + item->setTextAlignment(Qt::AlignCenter); + ui->tableWidget->setItem(0, 0, item); //设置数据 + + //初始化TableWidget 设置列 + QStringList headers; + headers << "序号" << "设备名称" << "型号规则" << "辅助字段" << "出厂编号" + << "生产厂家"<<"所在单位" <<"使用部门"<<"计量标识"<<"检定周期"<<"证书有效期"<<"操作"; + ui->tableWidget->setHorizontalHeaderLabels(headers); + +} +void BeExamined_DeviceItem::ShowMessageBox(QString title,QString value) { + // 创建一个QMessageBox对象 + QMessageBox msgBox; + + // 设置消息框的标题 + msgBox.setWindowTitle(title); + + // 设置消息框的文本内容 + msgBox.setText(value); + + // 设置消息框的标准按钮,这里是“确定”按钮 + msgBox.setStandardButtons(QMessageBox::Ok); + + // 显示消息框 + msgBox.exec(); +} +void BeExamined_DeviceItem::Load() +{ + //ShowMessageBox("被检设备","被检设备初始化完成"); +} diff --git a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.h b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.h index 76b061d..ae46979 100644 --- a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.h +++ b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.h @@ -2,12 +2,13 @@ #define BEEXAMINED_DEVICEITEM_H #include +#include "InfoBase.h" namespace Ui { class BeExamined_DeviceItem; } -class BeExamined_DeviceItem : public QWidget +class BeExamined_DeviceItem : public InfoBase { Q_OBJECT @@ -15,6 +16,11 @@ explicit BeExamined_DeviceItem(QWidget *parent = nullptr); ~BeExamined_DeviceItem(); +private slots: + void initForm(); //初始化界面数据 + void ShowMessageBox(QString title,QString value); + //继承父类的Load方法 + void Load() override; private: Ui::BeExamined_DeviceItem *ui; }; diff --git a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.ui b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.ui index af9f7bf..5a0a3c9 100644 --- a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.ui +++ b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.ui @@ -6,26 +6,236 @@ 0 0 - 400 - 300 + 1291 + 575 Form - - - - 130 - 140 - 89 - 24 - - - - 被检设备管理 - - + + + + + + 0 + 0 + + + + background-color:white; + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 设备名称: + + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 型号规则: + + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 出厂编号: + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 生产厂家: + + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 使用部门: + + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 使用单位: + + + + + + + + + + Qt::Horizontal + + + QSizePolicy::Expanding + + + + 40 + 20 + + + + + + + + Qt::RightToLeft + + + 查询 + + + + + + + Qt::RightToLeft + + + 重置 + + + + + + + + + + background-color:white; + + + + + + + + + + + + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/create_task.cpp b/softwareDirectory/AutoVerScheme/create_task.cpp index 4193efc..9b49a1a 100644 --- a/softwareDirectory/AutoVerScheme/create_task.cpp +++ b/softwareDirectory/AutoVerScheme/create_task.cpp @@ -1,14 +1,61 @@ #include "create_task.h" #include "ui_create_task.h" +#include "QMessageBox" Create_Task::Create_Task(QWidget *parent) : - QWidget(parent), + InfoBase(parent), ui(new Ui::Create_Task) { ui->setupUi(this); + this->initForm(); } Create_Task::~Create_Task() { delete ui; } +void Create_Task::initForm() +{ + //tableWidget设置 + //设置控件的边框显示 + ui->tableWidget->setStyleSheet("QHeaderView::section {" + "border: 1px solid rgba(197, 196, 196, 1);" + "border-left:none;" + "border-top:none;" + "background-color:white;" + "}"); + + ui->tableWidget->setRowCount(10); // 设置10行 + ui->tableWidget->setColumnCount(8); // 设置11列 + ui->tableWidget->setColumnWidth(0, 80); // 设置第一列的宽度为100像素 + ui->tableWidget->verticalHeader()->setParent(nullptr); //隐藏行头 + QTableWidgetItem *item = new QTableWidgetItem("测试数据"); + item->setTextAlignment(Qt::AlignCenter); + ui->tableWidget->setItem(0, 0, item); //设置数据 + + //初始化TableWidget 设置列 + QStringList headers; + headers << "序号" << "任务单编号" << "委托方"<< "使用部门" << "要求检完时间" << "送检人"<<"是否加急"<<"操作"; + ui->tableWidget->setHorizontalHeaderLabels(headers); + //ShowMessageBox("标题","初始化完成"); +} +void Create_Task::ShowMessageBox(QString title,QString value) { + // 创建一个QMessageBox对象 + QMessageBox msgBox; + + // 设置消息框的标题 + msgBox.setWindowTitle(title); + + // 设置消息框的文本内容 + msgBox.setText(value); + + // 设置消息框的标准按钮,这里是“确定”按钮 + msgBox.setStandardButtons(QMessageBox::Ok); + + // 显示消息框 + msgBox.exec(); +} +void Create_Task::Load() +{ + //ShowMessageBox("创建任务界面","创建任务界面初始化完成"); +} diff --git a/softwareDirectory/AutoVerScheme/create_task.h b/softwareDirectory/AutoVerScheme/create_task.h index e2264de..7cf383f 100644 --- a/softwareDirectory/AutoVerScheme/create_task.h +++ b/softwareDirectory/AutoVerScheme/create_task.h @@ -1,13 +1,14 @@ #ifndef CREATE_TASK_H #define CREATE_TASK_H +#include "InfoBase.h" #include namespace Ui { class Create_Task; } -class Create_Task : public QWidget +class Create_Task : public InfoBase { Q_OBJECT @@ -15,6 +16,11 @@ explicit Create_Task(QWidget *parent = nullptr); ~Create_Task(); +private slots: + void initForm(); //初始化界面数据 + void ShowMessageBox(QString title,QString value); + //继承父类的Load方法 + void Load() override; private: Ui::Create_Task *ui; }; diff --git a/softwareDirectory/AutoVerScheme/create_task.ui b/softwareDirectory/AutoVerScheme/create_task.ui index b79c6a1..d9d88ed 100644 --- a/softwareDirectory/AutoVerScheme/create_task.ui +++ b/softwareDirectory/AutoVerScheme/create_task.ui @@ -6,29 +6,294 @@ 0 0 - 400 - 300 + 1184 + 580 Form - - background-color:red; + + Qt::LeftToRight - - - - 140 - 120 - 89 - 24 - - - - 创建任务单 - - + + + + + + + + + 0 + 0 + + + + background-color:white; + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 任务单编号: + + + + + + + + 0 + 0 + + + + + + + + + 0 + 0 + + + + + 50 + 0 + + + + 委托方: + + + + + + + + 0 + 0 + + + + + 0 + 0 + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 使用部门: + + + + + + + + 0 + 0 + + + + + 0 + 0 + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 要求完成时间: + + + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + 0 + 30 + + + + Qt::RightToLeft + + + background-color:rgb(3, 58, 132); +color:white; + + + + 查询 + + + + + + + + 0 + 30 + + + + Qt::RightToLeft + + + background-color:rgb(207, 132, 33); +color:white; + + + + 重置 + + + + + + + + + + background-color:white; + + + + + + + 6 + + + 9 + + + 9 + + + 9 + + + + + + 0 + 0 + + + + + 120 + 40 + + + + OpenHandCursor + + + Qt::DefaultContextMenu + + + Qt::RightToLeft + + + false + + + background-color:rgb(9, 89, 179); +color:white; + + + 创建任务单 + + + true + + + + + + + + + + + + + + SizeVerCursor + + + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/datasyncview.cpp b/softwareDirectory/AutoVerScheme/datasyncview.cpp new file mode 100644 index 0000000..74cd41d --- /dev/null +++ b/softwareDirectory/AutoVerScheme/datasyncview.cpp @@ -0,0 +1,44 @@ +#include "datasyncview.h" +#include "ui_datasyncview.h" + +DataSyncView::DataSyncView(QWidget *parent) : + QWidget(parent), + ui(new Ui::DataSyncView) +{ + ui->setupUi(this); + this->initForm(); +} + +DataSyncView::~DataSyncView() +{ + delete ui; +} +void DataSyncView::initForm() +{ + //tableWidget设置 + //设置控件的边框显示 + ui->tableWidget->setStyleSheet("QHeaderView::section {" + "border: 1px solid grey;" + "border-left:none;" + "border-top:none;" + "background-color:white;" + " color:black;" + "font: bold 18px Arial, sans-serif;" + "}"); + + ui->tableWidget->setRowCount(10); // 设置10行 + ui->tableWidget->setColumnCount(4); // 设置11列 + ui->tableWidget->setColumnWidth(0, 80); // 设置第一列的宽度为100像素 + ui->tableWidget->verticalHeader()->setParent(nullptr); //隐藏行头 + QTableWidgetItem *item = new QTableWidgetItem("测试数据"); + item->setTextAlignment(Qt::AlignCenter); + ui->tableWidget->setItem(0, 0, item); //设置数据 + + //初始化TableWidget 设置列 + QStringList headers; + headers << "序号" << "同步时间" << "是否同步成功" << "备注" ; + ui->tableWidget->setHorizontalHeaderLabels(headers); + + + +} diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro index 1280b70..dfb0418 100644 --- a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro @@ -22,6 +22,7 @@ checkmethodmanage.cpp \ checkwindow.cpp \ create_task.cpp \ + datasyncview.cpp \ depar_task.cpp \ indexwindow.cpp \ infomanageview.cpp \ @@ -43,6 +44,7 @@ checkmethodmanage.h \ checkwindow.h \ create_task.h \ + datasyncview.h \ depar_task.h \ indexwindow.h \ infomanageview.h \ @@ -62,6 +64,7 @@ checkmethodmanage.ui \ checkwindow.ui \ create_task.ui \ + datasyncview.ui \ depar_task.ui \ indexwindow.ui \ infomanageview.ui \ diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user index 6ea03c5..93c39cb 100644 --- a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user @@ -1,10 +1,10 @@ - + EnvironmentId - {2746248a-b112-4e0f-9ae0-9e61f2a42309} + {c08df58c-84a7-4965-bca6-e98789474efa} ProjectExplorer.Project.ActiveTarget @@ -71,7 +71,7 @@ 0 0 - D:/dev/QT/AutoCalHainan/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug true @@ -119,7 +119,7 @@ 2 - D:/dev/QT/AutoCalHainan/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Release + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Release true @@ -167,7 +167,7 @@ 0 - D:/dev/QT/AutoCalHainan/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Profile + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Profile true @@ -287,8 +287,8 @@ 2 - Qt4ProjectManager.Qt4RunConfiguration:D:/dev/QT/AutoCalHainan/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro - D:/dev/QT/AutoCalHainan/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro + Qt4ProjectManager.Qt4RunConfiguration:C:/Users/admin/Desktop/SVN/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro + C:/Users/admin/Desktop/SVN/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro false @@ -299,7 +299,7 @@ false true - D:/dev/QT/AutoCalHainan/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug 1 @@ -314,7 +314,7 @@ 0 0 - D:/dev/QT/AutoCalHainan/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Debug + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Debug true @@ -362,7 +362,7 @@ 2 - D:/dev/QT/AutoCalHainan/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Release + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Release true @@ -410,7 +410,7 @@ 0 - D:/dev/QT/AutoCalHainan/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Profile + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Profile true @@ -530,14 +530,15 @@ 2 - - ProjectExplorer.CustomExecutableRunConfiguration - + AutoVerScheme2 + 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 diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user.c08df58 b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user.c08df58 deleted file mode 100644 index 495f95c..0000000 --- a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user.c08df58 +++ /dev/null @@ -1,563 +0,0 @@ - - - - - - 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 32-bit - Desktop Qt 5.14.2 MinGW 32-bit - qt.qt5.5142.win32_mingw73_kit - 0 - 0 - 0 - - D:/Auto_verification_scheme/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 - - - D:/Auto_verification_scheme/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 - - - D:/Auto_verification_scheme/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 - - D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug - - 1 - - - - ProjectExplorer.Project.Target.1 - - 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 - - D:/Auto_verification_scheme/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 - - - D:/Auto_verification_scheme/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 - - - D:/Auto_verification_scheme/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 - - AutoVerScheme2 - 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/InfoBase.h b/softwareDirectory/AutoVerScheme/InfoBase.h index 7fec63e..084cf3f 100644 --- a/softwareDirectory/AutoVerScheme/InfoBase.h +++ b/softwareDirectory/AutoVerScheme/InfoBase.h @@ -2,6 +2,7 @@ #define INFOBASE_H #include +#include "QStandardItemModel" ///信号管理页面的基类 所有信息管理页面都继承于InfoBase /// 便于统一管理 所有子类必须实现Load方法 /// 每次按钮点击切换都会调用Load方法 用于每次页面的数据刷新 @@ -11,6 +12,8 @@ InfoBase(QWidget *parent = nullptr): QWidget(parent){}; // 纯虚函数 virtual void Load()=0; + //QStandardItemModel 的实例。这个模型将用于存储和管理数据。 + QStandardItemModel *model; }; #endif // INFOBASE_H diff --git a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.cpp b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.cpp index 7ac1e87..ffb2bbc 100644 --- a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.cpp +++ b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.cpp @@ -1,14 +1,64 @@ #include "beexamined_deviceitem.h" #include "ui_beexamined_deviceitem.h" +#include "QMessageBox.h" BeExamined_DeviceItem::BeExamined_DeviceItem(QWidget *parent) : - QWidget(parent), + InfoBase(parent), ui(new Ui::BeExamined_DeviceItem) { ui->setupUi(this); + this->initForm(); } BeExamined_DeviceItem::~BeExamined_DeviceItem() { delete ui; } + +void BeExamined_DeviceItem::initForm() +{ + + //tableWidget设置 + //设置控件的边框显示 + ui->tableWidget->setStyleSheet("QHeaderView::section {" + "border: 1px solid rgba(197, 196, 196, 1);" + "border-left:none;" + "border-top:none;" + "background-color:white;" + "}"); + + ui->tableWidget->setRowCount(10); // 设置10行 + ui->tableWidget->setColumnCount(12); // 设置11列 + ui->tableWidget->setColumnWidth(0, 80); // 设置第一列的宽度为100像素 + ui->tableWidget->verticalHeader()->setParent(nullptr); //隐藏行头 + QTableWidgetItem *item = new QTableWidgetItem("测试数据"); + item->setTextAlignment(Qt::AlignCenter); + ui->tableWidget->setItem(0, 0, item); //设置数据 + + //初始化TableWidget 设置列 + QStringList headers; + headers << "序号" << "设备名称" << "型号规则" << "辅助字段" << "出厂编号" + << "生产厂家"<<"所在单位" <<"使用部门"<<"计量标识"<<"检定周期"<<"证书有效期"<<"操作"; + ui->tableWidget->setHorizontalHeaderLabels(headers); + +} +void BeExamined_DeviceItem::ShowMessageBox(QString title,QString value) { + // 创建一个QMessageBox对象 + QMessageBox msgBox; + + // 设置消息框的标题 + msgBox.setWindowTitle(title); + + // 设置消息框的文本内容 + msgBox.setText(value); + + // 设置消息框的标准按钮,这里是“确定”按钮 + msgBox.setStandardButtons(QMessageBox::Ok); + + // 显示消息框 + msgBox.exec(); +} +void BeExamined_DeviceItem::Load() +{ + //ShowMessageBox("被检设备","被检设备初始化完成"); +} diff --git a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.h b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.h index 76b061d..ae46979 100644 --- a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.h +++ b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.h @@ -2,12 +2,13 @@ #define BEEXAMINED_DEVICEITEM_H #include +#include "InfoBase.h" namespace Ui { class BeExamined_DeviceItem; } -class BeExamined_DeviceItem : public QWidget +class BeExamined_DeviceItem : public InfoBase { Q_OBJECT @@ -15,6 +16,11 @@ explicit BeExamined_DeviceItem(QWidget *parent = nullptr); ~BeExamined_DeviceItem(); +private slots: + void initForm(); //初始化界面数据 + void ShowMessageBox(QString title,QString value); + //继承父类的Load方法 + void Load() override; private: Ui::BeExamined_DeviceItem *ui; }; diff --git a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.ui b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.ui index af9f7bf..5a0a3c9 100644 --- a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.ui +++ b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.ui @@ -6,26 +6,236 @@ 0 0 - 400 - 300 + 1291 + 575 Form - - - - 130 - 140 - 89 - 24 - - - - 被检设备管理 - - + + + + + + 0 + 0 + + + + background-color:white; + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 设备名称: + + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 型号规则: + + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 出厂编号: + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 生产厂家: + + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 使用部门: + + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 使用单位: + + + + + + + + + + Qt::Horizontal + + + QSizePolicy::Expanding + + + + 40 + 20 + + + + + + + + Qt::RightToLeft + + + 查询 + + + + + + + Qt::RightToLeft + + + 重置 + + + + + + + + + + background-color:white; + + + + + + + + + + + + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/create_task.cpp b/softwareDirectory/AutoVerScheme/create_task.cpp index 4193efc..9b49a1a 100644 --- a/softwareDirectory/AutoVerScheme/create_task.cpp +++ b/softwareDirectory/AutoVerScheme/create_task.cpp @@ -1,14 +1,61 @@ #include "create_task.h" #include "ui_create_task.h" +#include "QMessageBox" Create_Task::Create_Task(QWidget *parent) : - QWidget(parent), + InfoBase(parent), ui(new Ui::Create_Task) { ui->setupUi(this); + this->initForm(); } Create_Task::~Create_Task() { delete ui; } +void Create_Task::initForm() +{ + //tableWidget设置 + //设置控件的边框显示 + ui->tableWidget->setStyleSheet("QHeaderView::section {" + "border: 1px solid rgba(197, 196, 196, 1);" + "border-left:none;" + "border-top:none;" + "background-color:white;" + "}"); + + ui->tableWidget->setRowCount(10); // 设置10行 + ui->tableWidget->setColumnCount(8); // 设置11列 + ui->tableWidget->setColumnWidth(0, 80); // 设置第一列的宽度为100像素 + ui->tableWidget->verticalHeader()->setParent(nullptr); //隐藏行头 + QTableWidgetItem *item = new QTableWidgetItem("测试数据"); + item->setTextAlignment(Qt::AlignCenter); + ui->tableWidget->setItem(0, 0, item); //设置数据 + + //初始化TableWidget 设置列 + QStringList headers; + headers << "序号" << "任务单编号" << "委托方"<< "使用部门" << "要求检完时间" << "送检人"<<"是否加急"<<"操作"; + ui->tableWidget->setHorizontalHeaderLabels(headers); + //ShowMessageBox("标题","初始化完成"); +} +void Create_Task::ShowMessageBox(QString title,QString value) { + // 创建一个QMessageBox对象 + QMessageBox msgBox; + + // 设置消息框的标题 + msgBox.setWindowTitle(title); + + // 设置消息框的文本内容 + msgBox.setText(value); + + // 设置消息框的标准按钮,这里是“确定”按钮 + msgBox.setStandardButtons(QMessageBox::Ok); + + // 显示消息框 + msgBox.exec(); +} +void Create_Task::Load() +{ + //ShowMessageBox("创建任务界面","创建任务界面初始化完成"); +} diff --git a/softwareDirectory/AutoVerScheme/create_task.h b/softwareDirectory/AutoVerScheme/create_task.h index e2264de..7cf383f 100644 --- a/softwareDirectory/AutoVerScheme/create_task.h +++ b/softwareDirectory/AutoVerScheme/create_task.h @@ -1,13 +1,14 @@ #ifndef CREATE_TASK_H #define CREATE_TASK_H +#include "InfoBase.h" #include namespace Ui { class Create_Task; } -class Create_Task : public QWidget +class Create_Task : public InfoBase { Q_OBJECT @@ -15,6 +16,11 @@ explicit Create_Task(QWidget *parent = nullptr); ~Create_Task(); +private slots: + void initForm(); //初始化界面数据 + void ShowMessageBox(QString title,QString value); + //继承父类的Load方法 + void Load() override; private: Ui::Create_Task *ui; }; diff --git a/softwareDirectory/AutoVerScheme/create_task.ui b/softwareDirectory/AutoVerScheme/create_task.ui index b79c6a1..d9d88ed 100644 --- a/softwareDirectory/AutoVerScheme/create_task.ui +++ b/softwareDirectory/AutoVerScheme/create_task.ui @@ -6,29 +6,294 @@ 0 0 - 400 - 300 + 1184 + 580 Form - - background-color:red; + + Qt::LeftToRight - - - - 140 - 120 - 89 - 24 - - - - 创建任务单 - - + + + + + + + + + 0 + 0 + + + + background-color:white; + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 任务单编号: + + + + + + + + 0 + 0 + + + + + + + + + 0 + 0 + + + + + 50 + 0 + + + + 委托方: + + + + + + + + 0 + 0 + + + + + 0 + 0 + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 使用部门: + + + + + + + + 0 + 0 + + + + + 0 + 0 + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 要求完成时间: + + + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + 0 + 30 + + + + Qt::RightToLeft + + + background-color:rgb(3, 58, 132); +color:white; + + + + 查询 + + + + + + + + 0 + 30 + + + + Qt::RightToLeft + + + background-color:rgb(207, 132, 33); +color:white; + + + + 重置 + + + + + + + + + + background-color:white; + + + + + + + 6 + + + 9 + + + 9 + + + 9 + + + + + + 0 + 0 + + + + + 120 + 40 + + + + OpenHandCursor + + + Qt::DefaultContextMenu + + + Qt::RightToLeft + + + false + + + background-color:rgb(9, 89, 179); +color:white; + + + 创建任务单 + + + true + + + + + + + + + + + + + + SizeVerCursor + + + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/datasyncview.cpp b/softwareDirectory/AutoVerScheme/datasyncview.cpp new file mode 100644 index 0000000..74cd41d --- /dev/null +++ b/softwareDirectory/AutoVerScheme/datasyncview.cpp @@ -0,0 +1,44 @@ +#include "datasyncview.h" +#include "ui_datasyncview.h" + +DataSyncView::DataSyncView(QWidget *parent) : + QWidget(parent), + ui(new Ui::DataSyncView) +{ + ui->setupUi(this); + this->initForm(); +} + +DataSyncView::~DataSyncView() +{ + delete ui; +} +void DataSyncView::initForm() +{ + //tableWidget设置 + //设置控件的边框显示 + ui->tableWidget->setStyleSheet("QHeaderView::section {" + "border: 1px solid grey;" + "border-left:none;" + "border-top:none;" + "background-color:white;" + " color:black;" + "font: bold 18px Arial, sans-serif;" + "}"); + + ui->tableWidget->setRowCount(10); // 设置10行 + ui->tableWidget->setColumnCount(4); // 设置11列 + ui->tableWidget->setColumnWidth(0, 80); // 设置第一列的宽度为100像素 + ui->tableWidget->verticalHeader()->setParent(nullptr); //隐藏行头 + QTableWidgetItem *item = new QTableWidgetItem("测试数据"); + item->setTextAlignment(Qt::AlignCenter); + ui->tableWidget->setItem(0, 0, item); //设置数据 + + //初始化TableWidget 设置列 + QStringList headers; + headers << "序号" << "同步时间" << "是否同步成功" << "备注" ; + ui->tableWidget->setHorizontalHeaderLabels(headers); + + + +} diff --git a/softwareDirectory/AutoVerScheme/datasyncview.h b/softwareDirectory/AutoVerScheme/datasyncview.h new file mode 100644 index 0000000..9a73de9 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/datasyncview.h @@ -0,0 +1,24 @@ +#ifndef DATASYNCVIEW_H +#define DATASYNCVIEW_H + +#include + +namespace Ui { +class DataSyncView; +} + +class DataSyncView : public QWidget +{ + Q_OBJECT + +public: + explicit DataSyncView(QWidget *parent = nullptr); + ~DataSyncView(); +private slots: + void initForm(); //初始化界面数据 + +private: + Ui::DataSyncView *ui; +}; + +#endif // DATASYNCVIEW_H diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro index 1280b70..dfb0418 100644 --- a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro @@ -22,6 +22,7 @@ checkmethodmanage.cpp \ checkwindow.cpp \ create_task.cpp \ + datasyncview.cpp \ depar_task.cpp \ indexwindow.cpp \ infomanageview.cpp \ @@ -43,6 +44,7 @@ checkmethodmanage.h \ checkwindow.h \ create_task.h \ + datasyncview.h \ depar_task.h \ indexwindow.h \ infomanageview.h \ @@ -62,6 +64,7 @@ checkmethodmanage.ui \ checkwindow.ui \ create_task.ui \ + datasyncview.ui \ depar_task.ui \ indexwindow.ui \ infomanageview.ui \ diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user index 6ea03c5..93c39cb 100644 --- a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user @@ -1,10 +1,10 @@ - + EnvironmentId - {2746248a-b112-4e0f-9ae0-9e61f2a42309} + {c08df58c-84a7-4965-bca6-e98789474efa} ProjectExplorer.Project.ActiveTarget @@ -71,7 +71,7 @@ 0 0 - D:/dev/QT/AutoCalHainan/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug true @@ -119,7 +119,7 @@ 2 - D:/dev/QT/AutoCalHainan/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Release + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Release true @@ -167,7 +167,7 @@ 0 - D:/dev/QT/AutoCalHainan/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Profile + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Profile true @@ -287,8 +287,8 @@ 2 - Qt4ProjectManager.Qt4RunConfiguration:D:/dev/QT/AutoCalHainan/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro - D:/dev/QT/AutoCalHainan/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro + Qt4ProjectManager.Qt4RunConfiguration:C:/Users/admin/Desktop/SVN/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro + C:/Users/admin/Desktop/SVN/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro false @@ -299,7 +299,7 @@ false true - D:/dev/QT/AutoCalHainan/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug 1 @@ -314,7 +314,7 @@ 0 0 - D:/dev/QT/AutoCalHainan/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Debug + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Debug true @@ -362,7 +362,7 @@ 2 - D:/dev/QT/AutoCalHainan/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Release + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Release true @@ -410,7 +410,7 @@ 0 - D:/dev/QT/AutoCalHainan/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Profile + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Profile true @@ -530,14 +530,15 @@ 2 - - ProjectExplorer.CustomExecutableRunConfiguration - + AutoVerScheme2 + 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 diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user.c08df58 b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user.c08df58 deleted file mode 100644 index 495f95c..0000000 --- a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user.c08df58 +++ /dev/null @@ -1,563 +0,0 @@ - - - - - - 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 32-bit - Desktop Qt 5.14.2 MinGW 32-bit - qt.qt5.5142.win32_mingw73_kit - 0 - 0 - 0 - - D:/Auto_verification_scheme/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 - - - D:/Auto_verification_scheme/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 - - - D:/Auto_verification_scheme/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 - - D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug - - 1 - - - - ProjectExplorer.Project.Target.1 - - 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 - - D:/Auto_verification_scheme/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 - - - D:/Auto_verification_scheme/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 - - - D:/Auto_verification_scheme/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 - - AutoVerScheme2 - 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/InfoBase.h b/softwareDirectory/AutoVerScheme/InfoBase.h index 7fec63e..084cf3f 100644 --- a/softwareDirectory/AutoVerScheme/InfoBase.h +++ b/softwareDirectory/AutoVerScheme/InfoBase.h @@ -2,6 +2,7 @@ #define INFOBASE_H #include +#include "QStandardItemModel" ///信号管理页面的基类 所有信息管理页面都继承于InfoBase /// 便于统一管理 所有子类必须实现Load方法 /// 每次按钮点击切换都会调用Load方法 用于每次页面的数据刷新 @@ -11,6 +12,8 @@ InfoBase(QWidget *parent = nullptr): QWidget(parent){}; // 纯虚函数 virtual void Load()=0; + //QStandardItemModel 的实例。这个模型将用于存储和管理数据。 + QStandardItemModel *model; }; #endif // INFOBASE_H diff --git a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.cpp b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.cpp index 7ac1e87..ffb2bbc 100644 --- a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.cpp +++ b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.cpp @@ -1,14 +1,64 @@ #include "beexamined_deviceitem.h" #include "ui_beexamined_deviceitem.h" +#include "QMessageBox.h" BeExamined_DeviceItem::BeExamined_DeviceItem(QWidget *parent) : - QWidget(parent), + InfoBase(parent), ui(new Ui::BeExamined_DeviceItem) { ui->setupUi(this); + this->initForm(); } BeExamined_DeviceItem::~BeExamined_DeviceItem() { delete ui; } + +void BeExamined_DeviceItem::initForm() +{ + + //tableWidget设置 + //设置控件的边框显示 + ui->tableWidget->setStyleSheet("QHeaderView::section {" + "border: 1px solid rgba(197, 196, 196, 1);" + "border-left:none;" + "border-top:none;" + "background-color:white;" + "}"); + + ui->tableWidget->setRowCount(10); // 设置10行 + ui->tableWidget->setColumnCount(12); // 设置11列 + ui->tableWidget->setColumnWidth(0, 80); // 设置第一列的宽度为100像素 + ui->tableWidget->verticalHeader()->setParent(nullptr); //隐藏行头 + QTableWidgetItem *item = new QTableWidgetItem("测试数据"); + item->setTextAlignment(Qt::AlignCenter); + ui->tableWidget->setItem(0, 0, item); //设置数据 + + //初始化TableWidget 设置列 + QStringList headers; + headers << "序号" << "设备名称" << "型号规则" << "辅助字段" << "出厂编号" + << "生产厂家"<<"所在单位" <<"使用部门"<<"计量标识"<<"检定周期"<<"证书有效期"<<"操作"; + ui->tableWidget->setHorizontalHeaderLabels(headers); + +} +void BeExamined_DeviceItem::ShowMessageBox(QString title,QString value) { + // 创建一个QMessageBox对象 + QMessageBox msgBox; + + // 设置消息框的标题 + msgBox.setWindowTitle(title); + + // 设置消息框的文本内容 + msgBox.setText(value); + + // 设置消息框的标准按钮,这里是“确定”按钮 + msgBox.setStandardButtons(QMessageBox::Ok); + + // 显示消息框 + msgBox.exec(); +} +void BeExamined_DeviceItem::Load() +{ + //ShowMessageBox("被检设备","被检设备初始化完成"); +} diff --git a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.h b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.h index 76b061d..ae46979 100644 --- a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.h +++ b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.h @@ -2,12 +2,13 @@ #define BEEXAMINED_DEVICEITEM_H #include +#include "InfoBase.h" namespace Ui { class BeExamined_DeviceItem; } -class BeExamined_DeviceItem : public QWidget +class BeExamined_DeviceItem : public InfoBase { Q_OBJECT @@ -15,6 +16,11 @@ explicit BeExamined_DeviceItem(QWidget *parent = nullptr); ~BeExamined_DeviceItem(); +private slots: + void initForm(); //初始化界面数据 + void ShowMessageBox(QString title,QString value); + //继承父类的Load方法 + void Load() override; private: Ui::BeExamined_DeviceItem *ui; }; diff --git a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.ui b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.ui index af9f7bf..5a0a3c9 100644 --- a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.ui +++ b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.ui @@ -6,26 +6,236 @@ 0 0 - 400 - 300 + 1291 + 575 Form - - - - 130 - 140 - 89 - 24 - - - - 被检设备管理 - - + + + + + + 0 + 0 + + + + background-color:white; + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 设备名称: + + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 型号规则: + + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 出厂编号: + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 生产厂家: + + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 使用部门: + + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 使用单位: + + + + + + + + + + Qt::Horizontal + + + QSizePolicy::Expanding + + + + 40 + 20 + + + + + + + + Qt::RightToLeft + + + 查询 + + + + + + + Qt::RightToLeft + + + 重置 + + + + + + + + + + background-color:white; + + + + + + + + + + + + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/create_task.cpp b/softwareDirectory/AutoVerScheme/create_task.cpp index 4193efc..9b49a1a 100644 --- a/softwareDirectory/AutoVerScheme/create_task.cpp +++ b/softwareDirectory/AutoVerScheme/create_task.cpp @@ -1,14 +1,61 @@ #include "create_task.h" #include "ui_create_task.h" +#include "QMessageBox" Create_Task::Create_Task(QWidget *parent) : - QWidget(parent), + InfoBase(parent), ui(new Ui::Create_Task) { ui->setupUi(this); + this->initForm(); } Create_Task::~Create_Task() { delete ui; } +void Create_Task::initForm() +{ + //tableWidget设置 + //设置控件的边框显示 + ui->tableWidget->setStyleSheet("QHeaderView::section {" + "border: 1px solid rgba(197, 196, 196, 1);" + "border-left:none;" + "border-top:none;" + "background-color:white;" + "}"); + + ui->tableWidget->setRowCount(10); // 设置10行 + ui->tableWidget->setColumnCount(8); // 设置11列 + ui->tableWidget->setColumnWidth(0, 80); // 设置第一列的宽度为100像素 + ui->tableWidget->verticalHeader()->setParent(nullptr); //隐藏行头 + QTableWidgetItem *item = new QTableWidgetItem("测试数据"); + item->setTextAlignment(Qt::AlignCenter); + ui->tableWidget->setItem(0, 0, item); //设置数据 + + //初始化TableWidget 设置列 + QStringList headers; + headers << "序号" << "任务单编号" << "委托方"<< "使用部门" << "要求检完时间" << "送检人"<<"是否加急"<<"操作"; + ui->tableWidget->setHorizontalHeaderLabels(headers); + //ShowMessageBox("标题","初始化完成"); +} +void Create_Task::ShowMessageBox(QString title,QString value) { + // 创建一个QMessageBox对象 + QMessageBox msgBox; + + // 设置消息框的标题 + msgBox.setWindowTitle(title); + + // 设置消息框的文本内容 + msgBox.setText(value); + + // 设置消息框的标准按钮,这里是“确定”按钮 + msgBox.setStandardButtons(QMessageBox::Ok); + + // 显示消息框 + msgBox.exec(); +} +void Create_Task::Load() +{ + //ShowMessageBox("创建任务界面","创建任务界面初始化完成"); +} diff --git a/softwareDirectory/AutoVerScheme/create_task.h b/softwareDirectory/AutoVerScheme/create_task.h index e2264de..7cf383f 100644 --- a/softwareDirectory/AutoVerScheme/create_task.h +++ b/softwareDirectory/AutoVerScheme/create_task.h @@ -1,13 +1,14 @@ #ifndef CREATE_TASK_H #define CREATE_TASK_H +#include "InfoBase.h" #include namespace Ui { class Create_Task; } -class Create_Task : public QWidget +class Create_Task : public InfoBase { Q_OBJECT @@ -15,6 +16,11 @@ explicit Create_Task(QWidget *parent = nullptr); ~Create_Task(); +private slots: + void initForm(); //初始化界面数据 + void ShowMessageBox(QString title,QString value); + //继承父类的Load方法 + void Load() override; private: Ui::Create_Task *ui; }; diff --git a/softwareDirectory/AutoVerScheme/create_task.ui b/softwareDirectory/AutoVerScheme/create_task.ui index b79c6a1..d9d88ed 100644 --- a/softwareDirectory/AutoVerScheme/create_task.ui +++ b/softwareDirectory/AutoVerScheme/create_task.ui @@ -6,29 +6,294 @@ 0 0 - 400 - 300 + 1184 + 580 Form - - background-color:red; + + Qt::LeftToRight - - - - 140 - 120 - 89 - 24 - - - - 创建任务单 - - + + + + + + + + + 0 + 0 + + + + background-color:white; + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 任务单编号: + + + + + + + + 0 + 0 + + + + + + + + + 0 + 0 + + + + + 50 + 0 + + + + 委托方: + + + + + + + + 0 + 0 + + + + + 0 + 0 + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 使用部门: + + + + + + + + 0 + 0 + + + + + 0 + 0 + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 要求完成时间: + + + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + 0 + 30 + + + + Qt::RightToLeft + + + background-color:rgb(3, 58, 132); +color:white; + + + + 查询 + + + + + + + + 0 + 30 + + + + Qt::RightToLeft + + + background-color:rgb(207, 132, 33); +color:white; + + + + 重置 + + + + + + + + + + background-color:white; + + + + + + + 6 + + + 9 + + + 9 + + + 9 + + + + + + 0 + 0 + + + + + 120 + 40 + + + + OpenHandCursor + + + Qt::DefaultContextMenu + + + Qt::RightToLeft + + + false + + + background-color:rgb(9, 89, 179); +color:white; + + + 创建任务单 + + + true + + + + + + + + + + + + + + SizeVerCursor + + + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/datasyncview.cpp b/softwareDirectory/AutoVerScheme/datasyncview.cpp new file mode 100644 index 0000000..74cd41d --- /dev/null +++ b/softwareDirectory/AutoVerScheme/datasyncview.cpp @@ -0,0 +1,44 @@ +#include "datasyncview.h" +#include "ui_datasyncview.h" + +DataSyncView::DataSyncView(QWidget *parent) : + QWidget(parent), + ui(new Ui::DataSyncView) +{ + ui->setupUi(this); + this->initForm(); +} + +DataSyncView::~DataSyncView() +{ + delete ui; +} +void DataSyncView::initForm() +{ + //tableWidget设置 + //设置控件的边框显示 + ui->tableWidget->setStyleSheet("QHeaderView::section {" + "border: 1px solid grey;" + "border-left:none;" + "border-top:none;" + "background-color:white;" + " color:black;" + "font: bold 18px Arial, sans-serif;" + "}"); + + ui->tableWidget->setRowCount(10); // 设置10行 + ui->tableWidget->setColumnCount(4); // 设置11列 + ui->tableWidget->setColumnWidth(0, 80); // 设置第一列的宽度为100像素 + ui->tableWidget->verticalHeader()->setParent(nullptr); //隐藏行头 + QTableWidgetItem *item = new QTableWidgetItem("测试数据"); + item->setTextAlignment(Qt::AlignCenter); + ui->tableWidget->setItem(0, 0, item); //设置数据 + + //初始化TableWidget 设置列 + QStringList headers; + headers << "序号" << "同步时间" << "是否同步成功" << "备注" ; + ui->tableWidget->setHorizontalHeaderLabels(headers); + + + +} diff --git a/softwareDirectory/AutoVerScheme/datasyncview.h b/softwareDirectory/AutoVerScheme/datasyncview.h new file mode 100644 index 0000000..9a73de9 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/datasyncview.h @@ -0,0 +1,24 @@ +#ifndef DATASYNCVIEW_H +#define DATASYNCVIEW_H + +#include + +namespace Ui { +class DataSyncView; +} + +class DataSyncView : public QWidget +{ + Q_OBJECT + +public: + explicit DataSyncView(QWidget *parent = nullptr); + ~DataSyncView(); +private slots: + void initForm(); //初始化界面数据 + +private: + Ui::DataSyncView *ui; +}; + +#endif // DATASYNCVIEW_H diff --git a/softwareDirectory/AutoVerScheme/datasyncview.ui b/softwareDirectory/AutoVerScheme/datasyncview.ui new file mode 100644 index 0000000..c45bf56 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/datasyncview.ui @@ -0,0 +1,133 @@ + + + DataSyncView + + + + 0 + 0 + 874 + 531 + + + + 数据同步 + + + background-color:rgba(240, 240, 240, 1); + + + + + + background-color:white; + + + + + + + + + + 0 + 0 + + + + background-color:white; +border:0; + + + + + + + + + + 0 + 0 + + + + font:bold 20px Arial, sans-serif; +color:#334582; + + + 同步记录 + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + background-color:#334582; + font: bold 18px Arial, sans-serif; +color:white; +padding:10px; + + + 下载数据 + + + + + + + + 200 + 0 + + + + + 100 + 40 + + + + Qt::RightToLeft + + + background-color:#334582; + font: bold 18px Arial, sans-serif; +color:white; +padding:10px; + + + 发送同步请求 + + + + + + + + + + + + + + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro index 1280b70..dfb0418 100644 --- a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro @@ -22,6 +22,7 @@ checkmethodmanage.cpp \ checkwindow.cpp \ create_task.cpp \ + datasyncview.cpp \ depar_task.cpp \ indexwindow.cpp \ infomanageview.cpp \ @@ -43,6 +44,7 @@ checkmethodmanage.h \ checkwindow.h \ create_task.h \ + datasyncview.h \ depar_task.h \ indexwindow.h \ infomanageview.h \ @@ -62,6 +64,7 @@ checkmethodmanage.ui \ checkwindow.ui \ create_task.ui \ + datasyncview.ui \ depar_task.ui \ indexwindow.ui \ infomanageview.ui \ diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user index 6ea03c5..93c39cb 100644 --- a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user @@ -1,10 +1,10 @@ - + EnvironmentId - {2746248a-b112-4e0f-9ae0-9e61f2a42309} + {c08df58c-84a7-4965-bca6-e98789474efa} ProjectExplorer.Project.ActiveTarget @@ -71,7 +71,7 @@ 0 0 - D:/dev/QT/AutoCalHainan/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug true @@ -119,7 +119,7 @@ 2 - D:/dev/QT/AutoCalHainan/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Release + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Release true @@ -167,7 +167,7 @@ 0 - D:/dev/QT/AutoCalHainan/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Profile + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Profile true @@ -287,8 +287,8 @@ 2 - Qt4ProjectManager.Qt4RunConfiguration:D:/dev/QT/AutoCalHainan/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro - D:/dev/QT/AutoCalHainan/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro + Qt4ProjectManager.Qt4RunConfiguration:C:/Users/admin/Desktop/SVN/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro + C:/Users/admin/Desktop/SVN/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro false @@ -299,7 +299,7 @@ false true - D:/dev/QT/AutoCalHainan/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug 1 @@ -314,7 +314,7 @@ 0 0 - D:/dev/QT/AutoCalHainan/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Debug + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Debug true @@ -362,7 +362,7 @@ 2 - D:/dev/QT/AutoCalHainan/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Release + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Release true @@ -410,7 +410,7 @@ 0 - D:/dev/QT/AutoCalHainan/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Profile + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Profile true @@ -530,14 +530,15 @@ 2 - - ProjectExplorer.CustomExecutableRunConfiguration - + AutoVerScheme2 + 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 diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user.c08df58 b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user.c08df58 deleted file mode 100644 index 495f95c..0000000 --- a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user.c08df58 +++ /dev/null @@ -1,563 +0,0 @@ - - - - - - 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 32-bit - Desktop Qt 5.14.2 MinGW 32-bit - qt.qt5.5142.win32_mingw73_kit - 0 - 0 - 0 - - D:/Auto_verification_scheme/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 - - - D:/Auto_verification_scheme/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 - - - D:/Auto_verification_scheme/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 - - D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug - - 1 - - - - ProjectExplorer.Project.Target.1 - - 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 - - D:/Auto_verification_scheme/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 - - - D:/Auto_verification_scheme/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 - - - D:/Auto_verification_scheme/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 - - AutoVerScheme2 - 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/InfoBase.h b/softwareDirectory/AutoVerScheme/InfoBase.h index 7fec63e..084cf3f 100644 --- a/softwareDirectory/AutoVerScheme/InfoBase.h +++ b/softwareDirectory/AutoVerScheme/InfoBase.h @@ -2,6 +2,7 @@ #define INFOBASE_H #include +#include "QStandardItemModel" ///信号管理页面的基类 所有信息管理页面都继承于InfoBase /// 便于统一管理 所有子类必须实现Load方法 /// 每次按钮点击切换都会调用Load方法 用于每次页面的数据刷新 @@ -11,6 +12,8 @@ InfoBase(QWidget *parent = nullptr): QWidget(parent){}; // 纯虚函数 virtual void Load()=0; + //QStandardItemModel 的实例。这个模型将用于存储和管理数据。 + QStandardItemModel *model; }; #endif // INFOBASE_H diff --git a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.cpp b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.cpp index 7ac1e87..ffb2bbc 100644 --- a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.cpp +++ b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.cpp @@ -1,14 +1,64 @@ #include "beexamined_deviceitem.h" #include "ui_beexamined_deviceitem.h" +#include "QMessageBox.h" BeExamined_DeviceItem::BeExamined_DeviceItem(QWidget *parent) : - QWidget(parent), + InfoBase(parent), ui(new Ui::BeExamined_DeviceItem) { ui->setupUi(this); + this->initForm(); } BeExamined_DeviceItem::~BeExamined_DeviceItem() { delete ui; } + +void BeExamined_DeviceItem::initForm() +{ + + //tableWidget设置 + //设置控件的边框显示 + ui->tableWidget->setStyleSheet("QHeaderView::section {" + "border: 1px solid rgba(197, 196, 196, 1);" + "border-left:none;" + "border-top:none;" + "background-color:white;" + "}"); + + ui->tableWidget->setRowCount(10); // 设置10行 + ui->tableWidget->setColumnCount(12); // 设置11列 + ui->tableWidget->setColumnWidth(0, 80); // 设置第一列的宽度为100像素 + ui->tableWidget->verticalHeader()->setParent(nullptr); //隐藏行头 + QTableWidgetItem *item = new QTableWidgetItem("测试数据"); + item->setTextAlignment(Qt::AlignCenter); + ui->tableWidget->setItem(0, 0, item); //设置数据 + + //初始化TableWidget 设置列 + QStringList headers; + headers << "序号" << "设备名称" << "型号规则" << "辅助字段" << "出厂编号" + << "生产厂家"<<"所在单位" <<"使用部门"<<"计量标识"<<"检定周期"<<"证书有效期"<<"操作"; + ui->tableWidget->setHorizontalHeaderLabels(headers); + +} +void BeExamined_DeviceItem::ShowMessageBox(QString title,QString value) { + // 创建一个QMessageBox对象 + QMessageBox msgBox; + + // 设置消息框的标题 + msgBox.setWindowTitle(title); + + // 设置消息框的文本内容 + msgBox.setText(value); + + // 设置消息框的标准按钮,这里是“确定”按钮 + msgBox.setStandardButtons(QMessageBox::Ok); + + // 显示消息框 + msgBox.exec(); +} +void BeExamined_DeviceItem::Load() +{ + //ShowMessageBox("被检设备","被检设备初始化完成"); +} diff --git a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.h b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.h index 76b061d..ae46979 100644 --- a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.h +++ b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.h @@ -2,12 +2,13 @@ #define BEEXAMINED_DEVICEITEM_H #include +#include "InfoBase.h" namespace Ui { class BeExamined_DeviceItem; } -class BeExamined_DeviceItem : public QWidget +class BeExamined_DeviceItem : public InfoBase { Q_OBJECT @@ -15,6 +16,11 @@ explicit BeExamined_DeviceItem(QWidget *parent = nullptr); ~BeExamined_DeviceItem(); +private slots: + void initForm(); //初始化界面数据 + void ShowMessageBox(QString title,QString value); + //继承父类的Load方法 + void Load() override; private: Ui::BeExamined_DeviceItem *ui; }; diff --git a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.ui b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.ui index af9f7bf..5a0a3c9 100644 --- a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.ui +++ b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.ui @@ -6,26 +6,236 @@ 0 0 - 400 - 300 + 1291 + 575 Form - - - - 130 - 140 - 89 - 24 - - - - 被检设备管理 - - + + + + + + 0 + 0 + + + + background-color:white; + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 设备名称: + + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 型号规则: + + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 出厂编号: + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 生产厂家: + + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 使用部门: + + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 使用单位: + + + + + + + + + + Qt::Horizontal + + + QSizePolicy::Expanding + + + + 40 + 20 + + + + + + + + Qt::RightToLeft + + + 查询 + + + + + + + Qt::RightToLeft + + + 重置 + + + + + + + + + + background-color:white; + + + + + + + + + + + + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/create_task.cpp b/softwareDirectory/AutoVerScheme/create_task.cpp index 4193efc..9b49a1a 100644 --- a/softwareDirectory/AutoVerScheme/create_task.cpp +++ b/softwareDirectory/AutoVerScheme/create_task.cpp @@ -1,14 +1,61 @@ #include "create_task.h" #include "ui_create_task.h" +#include "QMessageBox" Create_Task::Create_Task(QWidget *parent) : - QWidget(parent), + InfoBase(parent), ui(new Ui::Create_Task) { ui->setupUi(this); + this->initForm(); } Create_Task::~Create_Task() { delete ui; } +void Create_Task::initForm() +{ + //tableWidget设置 + //设置控件的边框显示 + ui->tableWidget->setStyleSheet("QHeaderView::section {" + "border: 1px solid rgba(197, 196, 196, 1);" + "border-left:none;" + "border-top:none;" + "background-color:white;" + "}"); + + ui->tableWidget->setRowCount(10); // 设置10行 + ui->tableWidget->setColumnCount(8); // 设置11列 + ui->tableWidget->setColumnWidth(0, 80); // 设置第一列的宽度为100像素 + ui->tableWidget->verticalHeader()->setParent(nullptr); //隐藏行头 + QTableWidgetItem *item = new QTableWidgetItem("测试数据"); + item->setTextAlignment(Qt::AlignCenter); + ui->tableWidget->setItem(0, 0, item); //设置数据 + + //初始化TableWidget 设置列 + QStringList headers; + headers << "序号" << "任务单编号" << "委托方"<< "使用部门" << "要求检完时间" << "送检人"<<"是否加急"<<"操作"; + ui->tableWidget->setHorizontalHeaderLabels(headers); + //ShowMessageBox("标题","初始化完成"); +} +void Create_Task::ShowMessageBox(QString title,QString value) { + // 创建一个QMessageBox对象 + QMessageBox msgBox; + + // 设置消息框的标题 + msgBox.setWindowTitle(title); + + // 设置消息框的文本内容 + msgBox.setText(value); + + // 设置消息框的标准按钮,这里是“确定”按钮 + msgBox.setStandardButtons(QMessageBox::Ok); + + // 显示消息框 + msgBox.exec(); +} +void Create_Task::Load() +{ + //ShowMessageBox("创建任务界面","创建任务界面初始化完成"); +} diff --git a/softwareDirectory/AutoVerScheme/create_task.h b/softwareDirectory/AutoVerScheme/create_task.h index e2264de..7cf383f 100644 --- a/softwareDirectory/AutoVerScheme/create_task.h +++ b/softwareDirectory/AutoVerScheme/create_task.h @@ -1,13 +1,14 @@ #ifndef CREATE_TASK_H #define CREATE_TASK_H +#include "InfoBase.h" #include namespace Ui { class Create_Task; } -class Create_Task : public QWidget +class Create_Task : public InfoBase { Q_OBJECT @@ -15,6 +16,11 @@ explicit Create_Task(QWidget *parent = nullptr); ~Create_Task(); +private slots: + void initForm(); //初始化界面数据 + void ShowMessageBox(QString title,QString value); + //继承父类的Load方法 + void Load() override; private: Ui::Create_Task *ui; }; diff --git a/softwareDirectory/AutoVerScheme/create_task.ui b/softwareDirectory/AutoVerScheme/create_task.ui index b79c6a1..d9d88ed 100644 --- a/softwareDirectory/AutoVerScheme/create_task.ui +++ b/softwareDirectory/AutoVerScheme/create_task.ui @@ -6,29 +6,294 @@ 0 0 - 400 - 300 + 1184 + 580 Form - - background-color:red; + + Qt::LeftToRight - - - - 140 - 120 - 89 - 24 - - - - 创建任务单 - - + + + + + + + + + 0 + 0 + + + + background-color:white; + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 任务单编号: + + + + + + + + 0 + 0 + + + + + + + + + 0 + 0 + + + + + 50 + 0 + + + + 委托方: + + + + + + + + 0 + 0 + + + + + 0 + 0 + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 使用部门: + + + + + + + + 0 + 0 + + + + + 0 + 0 + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 要求完成时间: + + + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + 0 + 30 + + + + Qt::RightToLeft + + + background-color:rgb(3, 58, 132); +color:white; + + + + 查询 + + + + + + + + 0 + 30 + + + + Qt::RightToLeft + + + background-color:rgb(207, 132, 33); +color:white; + + + + 重置 + + + + + + + + + + background-color:white; + + + + + + + 6 + + + 9 + + + 9 + + + 9 + + + + + + 0 + 0 + + + + + 120 + 40 + + + + OpenHandCursor + + + Qt::DefaultContextMenu + + + Qt::RightToLeft + + + false + + + background-color:rgb(9, 89, 179); +color:white; + + + 创建任务单 + + + true + + + + + + + + + + + + + + SizeVerCursor + + + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/datasyncview.cpp b/softwareDirectory/AutoVerScheme/datasyncview.cpp new file mode 100644 index 0000000..74cd41d --- /dev/null +++ b/softwareDirectory/AutoVerScheme/datasyncview.cpp @@ -0,0 +1,44 @@ +#include "datasyncview.h" +#include "ui_datasyncview.h" + +DataSyncView::DataSyncView(QWidget *parent) : + QWidget(parent), + ui(new Ui::DataSyncView) +{ + ui->setupUi(this); + this->initForm(); +} + +DataSyncView::~DataSyncView() +{ + delete ui; +} +void DataSyncView::initForm() +{ + //tableWidget设置 + //设置控件的边框显示 + ui->tableWidget->setStyleSheet("QHeaderView::section {" + "border: 1px solid grey;" + "border-left:none;" + "border-top:none;" + "background-color:white;" + " color:black;" + "font: bold 18px Arial, sans-serif;" + "}"); + + ui->tableWidget->setRowCount(10); // 设置10行 + ui->tableWidget->setColumnCount(4); // 设置11列 + ui->tableWidget->setColumnWidth(0, 80); // 设置第一列的宽度为100像素 + ui->tableWidget->verticalHeader()->setParent(nullptr); //隐藏行头 + QTableWidgetItem *item = new QTableWidgetItem("测试数据"); + item->setTextAlignment(Qt::AlignCenter); + ui->tableWidget->setItem(0, 0, item); //设置数据 + + //初始化TableWidget 设置列 + QStringList headers; + headers << "序号" << "同步时间" << "是否同步成功" << "备注" ; + ui->tableWidget->setHorizontalHeaderLabels(headers); + + + +} diff --git a/softwareDirectory/AutoVerScheme/datasyncview.h b/softwareDirectory/AutoVerScheme/datasyncview.h new file mode 100644 index 0000000..9a73de9 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/datasyncview.h @@ -0,0 +1,24 @@ +#ifndef DATASYNCVIEW_H +#define DATASYNCVIEW_H + +#include + +namespace Ui { +class DataSyncView; +} + +class DataSyncView : public QWidget +{ + Q_OBJECT + +public: + explicit DataSyncView(QWidget *parent = nullptr); + ~DataSyncView(); +private slots: + void initForm(); //初始化界面数据 + +private: + Ui::DataSyncView *ui; +}; + +#endif // DATASYNCVIEW_H diff --git a/softwareDirectory/AutoVerScheme/datasyncview.ui b/softwareDirectory/AutoVerScheme/datasyncview.ui new file mode 100644 index 0000000..c45bf56 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/datasyncview.ui @@ -0,0 +1,133 @@ + + + DataSyncView + + + + 0 + 0 + 874 + 531 + + + + 数据同步 + + + background-color:rgba(240, 240, 240, 1); + + + + + + background-color:white; + + + + + + + + + + 0 + 0 + + + + background-color:white; +border:0; + + + + + + + + + + 0 + 0 + + + + font:bold 20px Arial, sans-serif; +color:#334582; + + + 同步记录 + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + background-color:#334582; + font: bold 18px Arial, sans-serif; +color:white; +padding:10px; + + + 下载数据 + + + + + + + + 200 + 0 + + + + + 100 + 40 + + + + Qt::RightToLeft + + + background-color:#334582; + font: bold 18px Arial, sans-serif; +color:white; +padding:10px; + + + 发送同步请求 + + + + + + + + + + + + + + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/depar_task.cpp b/softwareDirectory/AutoVerScheme/depar_task.cpp index de39775..5f0f93a 100644 --- a/softwareDirectory/AutoVerScheme/depar_task.cpp +++ b/softwareDirectory/AutoVerScheme/depar_task.cpp @@ -2,13 +2,19 @@ #include "ui_depar_task.h" #include "QMessageBox" #include "InfoBase.h" +#include "QStandardItemModel" Depar_Task::Depar_Task(QWidget *parent) : InfoBase(parent), ui(new Ui::Depar_Task) { ui->setupUi(this); + //初始化列表 this->initForm(); + + + + } Depar_Task::~Depar_Task() @@ -17,8 +23,31 @@ } void Depar_Task::initForm() { + //tableWidget设置 + //设置控件的边框显示 + ui->tableWidget->setStyleSheet("QHeaderView::section {" + "border: 1px solid rgba(197, 196, 196, 1);" + "border-left:none;" + "border-top:none;" + "background-color:white;" + "}"); - //ShowMessageBox("标题","初始化完成"); + ui->tableWidget->setRowCount(10); // 设置10行 + ui->tableWidget->setColumnCount(10); // 设置11列 + ui->tableWidget->setColumnWidth(0, 80); // 设置第一列的宽度为100像素 + ui->tableWidget->verticalHeader()->setParent(nullptr); //隐藏行头 + QTableWidgetItem *item = new QTableWidgetItem("测试数据"); + item->setTextAlignment(Qt::AlignCenter); //文件居中 + ui->tableWidget->setItem(0, 0, item); //设置数据 + + //初始化TableWidget 设置列 + QStringList headers; + headers << "序号" << "设备名称" << "型号规则" << "辅助字段" << "辅助字段"<< "出厂编号" + << "生产厂家" <<"委托方"<<"使用部门"<<"要求检完时间"<<"是否加急"; + ui->tableWidget->setHorizontalHeaderLabels(headers); + + + } void Depar_Task::ShowMessageBox(QString title,QString value) { // 创建一个QMessageBox对象 @@ -38,5 +67,5 @@ } void Depar_Task::Load() { - ShowMessageBox("部门任务页面","部门任务初始化完成"); + //ShowMessageBox("部门任务页面","部门任务初始化完成"); } diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro index 1280b70..dfb0418 100644 --- a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro @@ -22,6 +22,7 @@ checkmethodmanage.cpp \ checkwindow.cpp \ create_task.cpp \ + datasyncview.cpp \ depar_task.cpp \ indexwindow.cpp \ infomanageview.cpp \ @@ -43,6 +44,7 @@ checkmethodmanage.h \ checkwindow.h \ create_task.h \ + datasyncview.h \ depar_task.h \ indexwindow.h \ infomanageview.h \ @@ -62,6 +64,7 @@ checkmethodmanage.ui \ checkwindow.ui \ create_task.ui \ + datasyncview.ui \ depar_task.ui \ indexwindow.ui \ infomanageview.ui \ diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user index 6ea03c5..93c39cb 100644 --- a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user @@ -1,10 +1,10 @@ - + EnvironmentId - {2746248a-b112-4e0f-9ae0-9e61f2a42309} + {c08df58c-84a7-4965-bca6-e98789474efa} ProjectExplorer.Project.ActiveTarget @@ -71,7 +71,7 @@ 0 0 - D:/dev/QT/AutoCalHainan/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug true @@ -119,7 +119,7 @@ 2 - D:/dev/QT/AutoCalHainan/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Release + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Release true @@ -167,7 +167,7 @@ 0 - D:/dev/QT/AutoCalHainan/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Profile + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Profile true @@ -287,8 +287,8 @@ 2 - Qt4ProjectManager.Qt4RunConfiguration:D:/dev/QT/AutoCalHainan/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro - D:/dev/QT/AutoCalHainan/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro + Qt4ProjectManager.Qt4RunConfiguration:C:/Users/admin/Desktop/SVN/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro + C:/Users/admin/Desktop/SVN/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro false @@ -299,7 +299,7 @@ false true - D:/dev/QT/AutoCalHainan/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug 1 @@ -314,7 +314,7 @@ 0 0 - D:/dev/QT/AutoCalHainan/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Debug + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Debug true @@ -362,7 +362,7 @@ 2 - D:/dev/QT/AutoCalHainan/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Release + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Release true @@ -410,7 +410,7 @@ 0 - D:/dev/QT/AutoCalHainan/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Profile + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Profile true @@ -530,14 +530,15 @@ 2 - - ProjectExplorer.CustomExecutableRunConfiguration - + AutoVerScheme2 + 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 diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user.c08df58 b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user.c08df58 deleted file mode 100644 index 495f95c..0000000 --- a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user.c08df58 +++ /dev/null @@ -1,563 +0,0 @@ - - - - - - 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 32-bit - Desktop Qt 5.14.2 MinGW 32-bit - qt.qt5.5142.win32_mingw73_kit - 0 - 0 - 0 - - D:/Auto_verification_scheme/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 - - - D:/Auto_verification_scheme/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 - - - D:/Auto_verification_scheme/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 - - D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug - - 1 - - - - ProjectExplorer.Project.Target.1 - - 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 - - D:/Auto_verification_scheme/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 - - - D:/Auto_verification_scheme/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 - - - D:/Auto_verification_scheme/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 - - AutoVerScheme2 - 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/InfoBase.h b/softwareDirectory/AutoVerScheme/InfoBase.h index 7fec63e..084cf3f 100644 --- a/softwareDirectory/AutoVerScheme/InfoBase.h +++ b/softwareDirectory/AutoVerScheme/InfoBase.h @@ -2,6 +2,7 @@ #define INFOBASE_H #include +#include "QStandardItemModel" ///信号管理页面的基类 所有信息管理页面都继承于InfoBase /// 便于统一管理 所有子类必须实现Load方法 /// 每次按钮点击切换都会调用Load方法 用于每次页面的数据刷新 @@ -11,6 +12,8 @@ InfoBase(QWidget *parent = nullptr): QWidget(parent){}; // 纯虚函数 virtual void Load()=0; + //QStandardItemModel 的实例。这个模型将用于存储和管理数据。 + QStandardItemModel *model; }; #endif // INFOBASE_H diff --git a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.cpp b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.cpp index 7ac1e87..ffb2bbc 100644 --- a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.cpp +++ b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.cpp @@ -1,14 +1,64 @@ #include "beexamined_deviceitem.h" #include "ui_beexamined_deviceitem.h" +#include "QMessageBox.h" BeExamined_DeviceItem::BeExamined_DeviceItem(QWidget *parent) : - QWidget(parent), + InfoBase(parent), ui(new Ui::BeExamined_DeviceItem) { ui->setupUi(this); + this->initForm(); } BeExamined_DeviceItem::~BeExamined_DeviceItem() { delete ui; } + +void BeExamined_DeviceItem::initForm() +{ + + //tableWidget设置 + //设置控件的边框显示 + ui->tableWidget->setStyleSheet("QHeaderView::section {" + "border: 1px solid rgba(197, 196, 196, 1);" + "border-left:none;" + "border-top:none;" + "background-color:white;" + "}"); + + ui->tableWidget->setRowCount(10); // 设置10行 + ui->tableWidget->setColumnCount(12); // 设置11列 + ui->tableWidget->setColumnWidth(0, 80); // 设置第一列的宽度为100像素 + ui->tableWidget->verticalHeader()->setParent(nullptr); //隐藏行头 + QTableWidgetItem *item = new QTableWidgetItem("测试数据"); + item->setTextAlignment(Qt::AlignCenter); + ui->tableWidget->setItem(0, 0, item); //设置数据 + + //初始化TableWidget 设置列 + QStringList headers; + headers << "序号" << "设备名称" << "型号规则" << "辅助字段" << "出厂编号" + << "生产厂家"<<"所在单位" <<"使用部门"<<"计量标识"<<"检定周期"<<"证书有效期"<<"操作"; + ui->tableWidget->setHorizontalHeaderLabels(headers); + +} +void BeExamined_DeviceItem::ShowMessageBox(QString title,QString value) { + // 创建一个QMessageBox对象 + QMessageBox msgBox; + + // 设置消息框的标题 + msgBox.setWindowTitle(title); + + // 设置消息框的文本内容 + msgBox.setText(value); + + // 设置消息框的标准按钮,这里是“确定”按钮 + msgBox.setStandardButtons(QMessageBox::Ok); + + // 显示消息框 + msgBox.exec(); +} +void BeExamined_DeviceItem::Load() +{ + //ShowMessageBox("被检设备","被检设备初始化完成"); +} diff --git a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.h b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.h index 76b061d..ae46979 100644 --- a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.h +++ b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.h @@ -2,12 +2,13 @@ #define BEEXAMINED_DEVICEITEM_H #include +#include "InfoBase.h" namespace Ui { class BeExamined_DeviceItem; } -class BeExamined_DeviceItem : public QWidget +class BeExamined_DeviceItem : public InfoBase { Q_OBJECT @@ -15,6 +16,11 @@ explicit BeExamined_DeviceItem(QWidget *parent = nullptr); ~BeExamined_DeviceItem(); +private slots: + void initForm(); //初始化界面数据 + void ShowMessageBox(QString title,QString value); + //继承父类的Load方法 + void Load() override; private: Ui::BeExamined_DeviceItem *ui; }; diff --git a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.ui b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.ui index af9f7bf..5a0a3c9 100644 --- a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.ui +++ b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.ui @@ -6,26 +6,236 @@ 0 0 - 400 - 300 + 1291 + 575 Form - - - - 130 - 140 - 89 - 24 - - - - 被检设备管理 - - + + + + + + 0 + 0 + + + + background-color:white; + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 设备名称: + + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 型号规则: + + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 出厂编号: + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 生产厂家: + + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 使用部门: + + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 使用单位: + + + + + + + + + + Qt::Horizontal + + + QSizePolicy::Expanding + + + + 40 + 20 + + + + + + + + Qt::RightToLeft + + + 查询 + + + + + + + Qt::RightToLeft + + + 重置 + + + + + + + + + + background-color:white; + + + + + + + + + + + + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/create_task.cpp b/softwareDirectory/AutoVerScheme/create_task.cpp index 4193efc..9b49a1a 100644 --- a/softwareDirectory/AutoVerScheme/create_task.cpp +++ b/softwareDirectory/AutoVerScheme/create_task.cpp @@ -1,14 +1,61 @@ #include "create_task.h" #include "ui_create_task.h" +#include "QMessageBox" Create_Task::Create_Task(QWidget *parent) : - QWidget(parent), + InfoBase(parent), ui(new Ui::Create_Task) { ui->setupUi(this); + this->initForm(); } Create_Task::~Create_Task() { delete ui; } +void Create_Task::initForm() +{ + //tableWidget设置 + //设置控件的边框显示 + ui->tableWidget->setStyleSheet("QHeaderView::section {" + "border: 1px solid rgba(197, 196, 196, 1);" + "border-left:none;" + "border-top:none;" + "background-color:white;" + "}"); + + ui->tableWidget->setRowCount(10); // 设置10行 + ui->tableWidget->setColumnCount(8); // 设置11列 + ui->tableWidget->setColumnWidth(0, 80); // 设置第一列的宽度为100像素 + ui->tableWidget->verticalHeader()->setParent(nullptr); //隐藏行头 + QTableWidgetItem *item = new QTableWidgetItem("测试数据"); + item->setTextAlignment(Qt::AlignCenter); + ui->tableWidget->setItem(0, 0, item); //设置数据 + + //初始化TableWidget 设置列 + QStringList headers; + headers << "序号" << "任务单编号" << "委托方"<< "使用部门" << "要求检完时间" << "送检人"<<"是否加急"<<"操作"; + ui->tableWidget->setHorizontalHeaderLabels(headers); + //ShowMessageBox("标题","初始化完成"); +} +void Create_Task::ShowMessageBox(QString title,QString value) { + // 创建一个QMessageBox对象 + QMessageBox msgBox; + + // 设置消息框的标题 + msgBox.setWindowTitle(title); + + // 设置消息框的文本内容 + msgBox.setText(value); + + // 设置消息框的标准按钮,这里是“确定”按钮 + msgBox.setStandardButtons(QMessageBox::Ok); + + // 显示消息框 + msgBox.exec(); +} +void Create_Task::Load() +{ + //ShowMessageBox("创建任务界面","创建任务界面初始化完成"); +} diff --git a/softwareDirectory/AutoVerScheme/create_task.h b/softwareDirectory/AutoVerScheme/create_task.h index e2264de..7cf383f 100644 --- a/softwareDirectory/AutoVerScheme/create_task.h +++ b/softwareDirectory/AutoVerScheme/create_task.h @@ -1,13 +1,14 @@ #ifndef CREATE_TASK_H #define CREATE_TASK_H +#include "InfoBase.h" #include namespace Ui { class Create_Task; } -class Create_Task : public QWidget +class Create_Task : public InfoBase { Q_OBJECT @@ -15,6 +16,11 @@ explicit Create_Task(QWidget *parent = nullptr); ~Create_Task(); +private slots: + void initForm(); //初始化界面数据 + void ShowMessageBox(QString title,QString value); + //继承父类的Load方法 + void Load() override; private: Ui::Create_Task *ui; }; diff --git a/softwareDirectory/AutoVerScheme/create_task.ui b/softwareDirectory/AutoVerScheme/create_task.ui index b79c6a1..d9d88ed 100644 --- a/softwareDirectory/AutoVerScheme/create_task.ui +++ b/softwareDirectory/AutoVerScheme/create_task.ui @@ -6,29 +6,294 @@ 0 0 - 400 - 300 + 1184 + 580 Form - - background-color:red; + + Qt::LeftToRight - - - - 140 - 120 - 89 - 24 - - - - 创建任务单 - - + + + + + + + + + 0 + 0 + + + + background-color:white; + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 任务单编号: + + + + + + + + 0 + 0 + + + + + + + + + 0 + 0 + + + + + 50 + 0 + + + + 委托方: + + + + + + + + 0 + 0 + + + + + 0 + 0 + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 使用部门: + + + + + + + + 0 + 0 + + + + + 0 + 0 + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 要求完成时间: + + + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + 0 + 30 + + + + Qt::RightToLeft + + + background-color:rgb(3, 58, 132); +color:white; + + + + 查询 + + + + + + + + 0 + 30 + + + + Qt::RightToLeft + + + background-color:rgb(207, 132, 33); +color:white; + + + + 重置 + + + + + + + + + + background-color:white; + + + + + + + 6 + + + 9 + + + 9 + + + 9 + + + + + + 0 + 0 + + + + + 120 + 40 + + + + OpenHandCursor + + + Qt::DefaultContextMenu + + + Qt::RightToLeft + + + false + + + background-color:rgb(9, 89, 179); +color:white; + + + 创建任务单 + + + true + + + + + + + + + + + + + + SizeVerCursor + + + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/datasyncview.cpp b/softwareDirectory/AutoVerScheme/datasyncview.cpp new file mode 100644 index 0000000..74cd41d --- /dev/null +++ b/softwareDirectory/AutoVerScheme/datasyncview.cpp @@ -0,0 +1,44 @@ +#include "datasyncview.h" +#include "ui_datasyncview.h" + +DataSyncView::DataSyncView(QWidget *parent) : + QWidget(parent), + ui(new Ui::DataSyncView) +{ + ui->setupUi(this); + this->initForm(); +} + +DataSyncView::~DataSyncView() +{ + delete ui; +} +void DataSyncView::initForm() +{ + //tableWidget设置 + //设置控件的边框显示 + ui->tableWidget->setStyleSheet("QHeaderView::section {" + "border: 1px solid grey;" + "border-left:none;" + "border-top:none;" + "background-color:white;" + " color:black;" + "font: bold 18px Arial, sans-serif;" + "}"); + + ui->tableWidget->setRowCount(10); // 设置10行 + ui->tableWidget->setColumnCount(4); // 设置11列 + ui->tableWidget->setColumnWidth(0, 80); // 设置第一列的宽度为100像素 + ui->tableWidget->verticalHeader()->setParent(nullptr); //隐藏行头 + QTableWidgetItem *item = new QTableWidgetItem("测试数据"); + item->setTextAlignment(Qt::AlignCenter); + ui->tableWidget->setItem(0, 0, item); //设置数据 + + //初始化TableWidget 设置列 + QStringList headers; + headers << "序号" << "同步时间" << "是否同步成功" << "备注" ; + ui->tableWidget->setHorizontalHeaderLabels(headers); + + + +} diff --git a/softwareDirectory/AutoVerScheme/datasyncview.h b/softwareDirectory/AutoVerScheme/datasyncview.h new file mode 100644 index 0000000..9a73de9 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/datasyncview.h @@ -0,0 +1,24 @@ +#ifndef DATASYNCVIEW_H +#define DATASYNCVIEW_H + +#include + +namespace Ui { +class DataSyncView; +} + +class DataSyncView : public QWidget +{ + Q_OBJECT + +public: + explicit DataSyncView(QWidget *parent = nullptr); + ~DataSyncView(); +private slots: + void initForm(); //初始化界面数据 + +private: + Ui::DataSyncView *ui; +}; + +#endif // DATASYNCVIEW_H diff --git a/softwareDirectory/AutoVerScheme/datasyncview.ui b/softwareDirectory/AutoVerScheme/datasyncview.ui new file mode 100644 index 0000000..c45bf56 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/datasyncview.ui @@ -0,0 +1,133 @@ + + + DataSyncView + + + + 0 + 0 + 874 + 531 + + + + 数据同步 + + + background-color:rgba(240, 240, 240, 1); + + + + + + background-color:white; + + + + + + + + + + 0 + 0 + + + + background-color:white; +border:0; + + + + + + + + + + 0 + 0 + + + + font:bold 20px Arial, sans-serif; +color:#334582; + + + 同步记录 + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + background-color:#334582; + font: bold 18px Arial, sans-serif; +color:white; +padding:10px; + + + 下载数据 + + + + + + + + 200 + 0 + + + + + 100 + 40 + + + + Qt::RightToLeft + + + background-color:#334582; + font: bold 18px Arial, sans-serif; +color:white; +padding:10px; + + + 发送同步请求 + + + + + + + + + + + + + + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/depar_task.cpp b/softwareDirectory/AutoVerScheme/depar_task.cpp index de39775..5f0f93a 100644 --- a/softwareDirectory/AutoVerScheme/depar_task.cpp +++ b/softwareDirectory/AutoVerScheme/depar_task.cpp @@ -2,13 +2,19 @@ #include "ui_depar_task.h" #include "QMessageBox" #include "InfoBase.h" +#include "QStandardItemModel" Depar_Task::Depar_Task(QWidget *parent) : InfoBase(parent), ui(new Ui::Depar_Task) { ui->setupUi(this); + //初始化列表 this->initForm(); + + + + } Depar_Task::~Depar_Task() @@ -17,8 +23,31 @@ } void Depar_Task::initForm() { + //tableWidget设置 + //设置控件的边框显示 + ui->tableWidget->setStyleSheet("QHeaderView::section {" + "border: 1px solid rgba(197, 196, 196, 1);" + "border-left:none;" + "border-top:none;" + "background-color:white;" + "}"); - //ShowMessageBox("标题","初始化完成"); + ui->tableWidget->setRowCount(10); // 设置10行 + ui->tableWidget->setColumnCount(10); // 设置11列 + ui->tableWidget->setColumnWidth(0, 80); // 设置第一列的宽度为100像素 + ui->tableWidget->verticalHeader()->setParent(nullptr); //隐藏行头 + QTableWidgetItem *item = new QTableWidgetItem("测试数据"); + item->setTextAlignment(Qt::AlignCenter); //文件居中 + ui->tableWidget->setItem(0, 0, item); //设置数据 + + //初始化TableWidget 设置列 + QStringList headers; + headers << "序号" << "设备名称" << "型号规则" << "辅助字段" << "辅助字段"<< "出厂编号" + << "生产厂家" <<"委托方"<<"使用部门"<<"要求检完时间"<<"是否加急"; + ui->tableWidget->setHorizontalHeaderLabels(headers); + + + } void Depar_Task::ShowMessageBox(QString title,QString value) { // 创建一个QMessageBox对象 @@ -38,5 +67,5 @@ } void Depar_Task::Load() { - ShowMessageBox("部门任务页面","部门任务初始化完成"); + //ShowMessageBox("部门任务页面","部门任务初始化完成"); } diff --git a/softwareDirectory/AutoVerScheme/depar_task.h b/softwareDirectory/AutoVerScheme/depar_task.h index 8716faf..110008d 100644 --- a/softwareDirectory/AutoVerScheme/depar_task.h +++ b/softwareDirectory/AutoVerScheme/depar_task.h @@ -3,6 +3,7 @@ #include "InfoBase.h" +#include "QStandardItemModel" namespace Ui { class Depar_Task; @@ -20,9 +21,12 @@ private slots: void initForm(); //初始化界面数据 void ShowMessageBox(QString title,QString value); + //继承父类的Load方法 void Load() override; + private: Ui::Depar_Task *ui; + // QStandardItemModel *model; }; #endif // DEPAR_TASK_H diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro index 1280b70..dfb0418 100644 --- a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro @@ -22,6 +22,7 @@ checkmethodmanage.cpp \ checkwindow.cpp \ create_task.cpp \ + datasyncview.cpp \ depar_task.cpp \ indexwindow.cpp \ infomanageview.cpp \ @@ -43,6 +44,7 @@ checkmethodmanage.h \ checkwindow.h \ create_task.h \ + datasyncview.h \ depar_task.h \ indexwindow.h \ infomanageview.h \ @@ -62,6 +64,7 @@ checkmethodmanage.ui \ checkwindow.ui \ create_task.ui \ + datasyncview.ui \ depar_task.ui \ indexwindow.ui \ infomanageview.ui \ diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user index 6ea03c5..93c39cb 100644 --- a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user @@ -1,10 +1,10 @@ - + EnvironmentId - {2746248a-b112-4e0f-9ae0-9e61f2a42309} + {c08df58c-84a7-4965-bca6-e98789474efa} ProjectExplorer.Project.ActiveTarget @@ -71,7 +71,7 @@ 0 0 - D:/dev/QT/AutoCalHainan/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug true @@ -119,7 +119,7 @@ 2 - D:/dev/QT/AutoCalHainan/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Release + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Release true @@ -167,7 +167,7 @@ 0 - D:/dev/QT/AutoCalHainan/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Profile + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Profile true @@ -287,8 +287,8 @@ 2 - Qt4ProjectManager.Qt4RunConfiguration:D:/dev/QT/AutoCalHainan/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro - D:/dev/QT/AutoCalHainan/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro + Qt4ProjectManager.Qt4RunConfiguration:C:/Users/admin/Desktop/SVN/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro + C:/Users/admin/Desktop/SVN/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro false @@ -299,7 +299,7 @@ false true - D:/dev/QT/AutoCalHainan/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug 1 @@ -314,7 +314,7 @@ 0 0 - D:/dev/QT/AutoCalHainan/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Debug + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Debug true @@ -362,7 +362,7 @@ 2 - D:/dev/QT/AutoCalHainan/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Release + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Release true @@ -410,7 +410,7 @@ 0 - D:/dev/QT/AutoCalHainan/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Profile + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Profile true @@ -530,14 +530,15 @@ 2 - - ProjectExplorer.CustomExecutableRunConfiguration - + AutoVerScheme2 + 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 diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user.c08df58 b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user.c08df58 deleted file mode 100644 index 495f95c..0000000 --- a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user.c08df58 +++ /dev/null @@ -1,563 +0,0 @@ - - - - - - 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 32-bit - Desktop Qt 5.14.2 MinGW 32-bit - qt.qt5.5142.win32_mingw73_kit - 0 - 0 - 0 - - D:/Auto_verification_scheme/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 - - - D:/Auto_verification_scheme/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 - - - D:/Auto_verification_scheme/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 - - D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug - - 1 - - - - ProjectExplorer.Project.Target.1 - - 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 - - D:/Auto_verification_scheme/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 - - - D:/Auto_verification_scheme/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 - - - D:/Auto_verification_scheme/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 - - AutoVerScheme2 - 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/InfoBase.h b/softwareDirectory/AutoVerScheme/InfoBase.h index 7fec63e..084cf3f 100644 --- a/softwareDirectory/AutoVerScheme/InfoBase.h +++ b/softwareDirectory/AutoVerScheme/InfoBase.h @@ -2,6 +2,7 @@ #define INFOBASE_H #include +#include "QStandardItemModel" ///信号管理页面的基类 所有信息管理页面都继承于InfoBase /// 便于统一管理 所有子类必须实现Load方法 /// 每次按钮点击切换都会调用Load方法 用于每次页面的数据刷新 @@ -11,6 +12,8 @@ InfoBase(QWidget *parent = nullptr): QWidget(parent){}; // 纯虚函数 virtual void Load()=0; + //QStandardItemModel 的实例。这个模型将用于存储和管理数据。 + QStandardItemModel *model; }; #endif // INFOBASE_H diff --git a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.cpp b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.cpp index 7ac1e87..ffb2bbc 100644 --- a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.cpp +++ b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.cpp @@ -1,14 +1,64 @@ #include "beexamined_deviceitem.h" #include "ui_beexamined_deviceitem.h" +#include "QMessageBox.h" BeExamined_DeviceItem::BeExamined_DeviceItem(QWidget *parent) : - QWidget(parent), + InfoBase(parent), ui(new Ui::BeExamined_DeviceItem) { ui->setupUi(this); + this->initForm(); } BeExamined_DeviceItem::~BeExamined_DeviceItem() { delete ui; } + +void BeExamined_DeviceItem::initForm() +{ + + //tableWidget设置 + //设置控件的边框显示 + ui->tableWidget->setStyleSheet("QHeaderView::section {" + "border: 1px solid rgba(197, 196, 196, 1);" + "border-left:none;" + "border-top:none;" + "background-color:white;" + "}"); + + ui->tableWidget->setRowCount(10); // 设置10行 + ui->tableWidget->setColumnCount(12); // 设置11列 + ui->tableWidget->setColumnWidth(0, 80); // 设置第一列的宽度为100像素 + ui->tableWidget->verticalHeader()->setParent(nullptr); //隐藏行头 + QTableWidgetItem *item = new QTableWidgetItem("测试数据"); + item->setTextAlignment(Qt::AlignCenter); + ui->tableWidget->setItem(0, 0, item); //设置数据 + + //初始化TableWidget 设置列 + QStringList headers; + headers << "序号" << "设备名称" << "型号规则" << "辅助字段" << "出厂编号" + << "生产厂家"<<"所在单位" <<"使用部门"<<"计量标识"<<"检定周期"<<"证书有效期"<<"操作"; + ui->tableWidget->setHorizontalHeaderLabels(headers); + +} +void BeExamined_DeviceItem::ShowMessageBox(QString title,QString value) { + // 创建一个QMessageBox对象 + QMessageBox msgBox; + + // 设置消息框的标题 + msgBox.setWindowTitle(title); + + // 设置消息框的文本内容 + msgBox.setText(value); + + // 设置消息框的标准按钮,这里是“确定”按钮 + msgBox.setStandardButtons(QMessageBox::Ok); + + // 显示消息框 + msgBox.exec(); +} +void BeExamined_DeviceItem::Load() +{ + //ShowMessageBox("被检设备","被检设备初始化完成"); +} diff --git a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.h b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.h index 76b061d..ae46979 100644 --- a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.h +++ b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.h @@ -2,12 +2,13 @@ #define BEEXAMINED_DEVICEITEM_H #include +#include "InfoBase.h" namespace Ui { class BeExamined_DeviceItem; } -class BeExamined_DeviceItem : public QWidget +class BeExamined_DeviceItem : public InfoBase { Q_OBJECT @@ -15,6 +16,11 @@ explicit BeExamined_DeviceItem(QWidget *parent = nullptr); ~BeExamined_DeviceItem(); +private slots: + void initForm(); //初始化界面数据 + void ShowMessageBox(QString title,QString value); + //继承父类的Load方法 + void Load() override; private: Ui::BeExamined_DeviceItem *ui; }; diff --git a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.ui b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.ui index af9f7bf..5a0a3c9 100644 --- a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.ui +++ b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.ui @@ -6,26 +6,236 @@ 0 0 - 400 - 300 + 1291 + 575 Form - - - - 130 - 140 - 89 - 24 - - - - 被检设备管理 - - + + + + + + 0 + 0 + + + + background-color:white; + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 设备名称: + + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 型号规则: + + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 出厂编号: + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 生产厂家: + + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 使用部门: + + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 使用单位: + + + + + + + + + + Qt::Horizontal + + + QSizePolicy::Expanding + + + + 40 + 20 + + + + + + + + Qt::RightToLeft + + + 查询 + + + + + + + Qt::RightToLeft + + + 重置 + + + + + + + + + + background-color:white; + + + + + + + + + + + + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/create_task.cpp b/softwareDirectory/AutoVerScheme/create_task.cpp index 4193efc..9b49a1a 100644 --- a/softwareDirectory/AutoVerScheme/create_task.cpp +++ b/softwareDirectory/AutoVerScheme/create_task.cpp @@ -1,14 +1,61 @@ #include "create_task.h" #include "ui_create_task.h" +#include "QMessageBox" Create_Task::Create_Task(QWidget *parent) : - QWidget(parent), + InfoBase(parent), ui(new Ui::Create_Task) { ui->setupUi(this); + this->initForm(); } Create_Task::~Create_Task() { delete ui; } +void Create_Task::initForm() +{ + //tableWidget设置 + //设置控件的边框显示 + ui->tableWidget->setStyleSheet("QHeaderView::section {" + "border: 1px solid rgba(197, 196, 196, 1);" + "border-left:none;" + "border-top:none;" + "background-color:white;" + "}"); + + ui->tableWidget->setRowCount(10); // 设置10行 + ui->tableWidget->setColumnCount(8); // 设置11列 + ui->tableWidget->setColumnWidth(0, 80); // 设置第一列的宽度为100像素 + ui->tableWidget->verticalHeader()->setParent(nullptr); //隐藏行头 + QTableWidgetItem *item = new QTableWidgetItem("测试数据"); + item->setTextAlignment(Qt::AlignCenter); + ui->tableWidget->setItem(0, 0, item); //设置数据 + + //初始化TableWidget 设置列 + QStringList headers; + headers << "序号" << "任务单编号" << "委托方"<< "使用部门" << "要求检完时间" << "送检人"<<"是否加急"<<"操作"; + ui->tableWidget->setHorizontalHeaderLabels(headers); + //ShowMessageBox("标题","初始化完成"); +} +void Create_Task::ShowMessageBox(QString title,QString value) { + // 创建一个QMessageBox对象 + QMessageBox msgBox; + + // 设置消息框的标题 + msgBox.setWindowTitle(title); + + // 设置消息框的文本内容 + msgBox.setText(value); + + // 设置消息框的标准按钮,这里是“确定”按钮 + msgBox.setStandardButtons(QMessageBox::Ok); + + // 显示消息框 + msgBox.exec(); +} +void Create_Task::Load() +{ + //ShowMessageBox("创建任务界面","创建任务界面初始化完成"); +} diff --git a/softwareDirectory/AutoVerScheme/create_task.h b/softwareDirectory/AutoVerScheme/create_task.h index e2264de..7cf383f 100644 --- a/softwareDirectory/AutoVerScheme/create_task.h +++ b/softwareDirectory/AutoVerScheme/create_task.h @@ -1,13 +1,14 @@ #ifndef CREATE_TASK_H #define CREATE_TASK_H +#include "InfoBase.h" #include namespace Ui { class Create_Task; } -class Create_Task : public QWidget +class Create_Task : public InfoBase { Q_OBJECT @@ -15,6 +16,11 @@ explicit Create_Task(QWidget *parent = nullptr); ~Create_Task(); +private slots: + void initForm(); //初始化界面数据 + void ShowMessageBox(QString title,QString value); + //继承父类的Load方法 + void Load() override; private: Ui::Create_Task *ui; }; diff --git a/softwareDirectory/AutoVerScheme/create_task.ui b/softwareDirectory/AutoVerScheme/create_task.ui index b79c6a1..d9d88ed 100644 --- a/softwareDirectory/AutoVerScheme/create_task.ui +++ b/softwareDirectory/AutoVerScheme/create_task.ui @@ -6,29 +6,294 @@ 0 0 - 400 - 300 + 1184 + 580 Form - - background-color:red; + + Qt::LeftToRight - - - - 140 - 120 - 89 - 24 - - - - 创建任务单 - - + + + + + + + + + 0 + 0 + + + + background-color:white; + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 任务单编号: + + + + + + + + 0 + 0 + + + + + + + + + 0 + 0 + + + + + 50 + 0 + + + + 委托方: + + + + + + + + 0 + 0 + + + + + 0 + 0 + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 使用部门: + + + + + + + + 0 + 0 + + + + + 0 + 0 + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 要求完成时间: + + + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + 0 + 30 + + + + Qt::RightToLeft + + + background-color:rgb(3, 58, 132); +color:white; + + + + 查询 + + + + + + + + 0 + 30 + + + + Qt::RightToLeft + + + background-color:rgb(207, 132, 33); +color:white; + + + + 重置 + + + + + + + + + + background-color:white; + + + + + + + 6 + + + 9 + + + 9 + + + 9 + + + + + + 0 + 0 + + + + + 120 + 40 + + + + OpenHandCursor + + + Qt::DefaultContextMenu + + + Qt::RightToLeft + + + false + + + background-color:rgb(9, 89, 179); +color:white; + + + 创建任务单 + + + true + + + + + + + + + + + + + + SizeVerCursor + + + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/datasyncview.cpp b/softwareDirectory/AutoVerScheme/datasyncview.cpp new file mode 100644 index 0000000..74cd41d --- /dev/null +++ b/softwareDirectory/AutoVerScheme/datasyncview.cpp @@ -0,0 +1,44 @@ +#include "datasyncview.h" +#include "ui_datasyncview.h" + +DataSyncView::DataSyncView(QWidget *parent) : + QWidget(parent), + ui(new Ui::DataSyncView) +{ + ui->setupUi(this); + this->initForm(); +} + +DataSyncView::~DataSyncView() +{ + delete ui; +} +void DataSyncView::initForm() +{ + //tableWidget设置 + //设置控件的边框显示 + ui->tableWidget->setStyleSheet("QHeaderView::section {" + "border: 1px solid grey;" + "border-left:none;" + "border-top:none;" + "background-color:white;" + " color:black;" + "font: bold 18px Arial, sans-serif;" + "}"); + + ui->tableWidget->setRowCount(10); // 设置10行 + ui->tableWidget->setColumnCount(4); // 设置11列 + ui->tableWidget->setColumnWidth(0, 80); // 设置第一列的宽度为100像素 + ui->tableWidget->verticalHeader()->setParent(nullptr); //隐藏行头 + QTableWidgetItem *item = new QTableWidgetItem("测试数据"); + item->setTextAlignment(Qt::AlignCenter); + ui->tableWidget->setItem(0, 0, item); //设置数据 + + //初始化TableWidget 设置列 + QStringList headers; + headers << "序号" << "同步时间" << "是否同步成功" << "备注" ; + ui->tableWidget->setHorizontalHeaderLabels(headers); + + + +} diff --git a/softwareDirectory/AutoVerScheme/datasyncview.h b/softwareDirectory/AutoVerScheme/datasyncview.h new file mode 100644 index 0000000..9a73de9 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/datasyncview.h @@ -0,0 +1,24 @@ +#ifndef DATASYNCVIEW_H +#define DATASYNCVIEW_H + +#include + +namespace Ui { +class DataSyncView; +} + +class DataSyncView : public QWidget +{ + Q_OBJECT + +public: + explicit DataSyncView(QWidget *parent = nullptr); + ~DataSyncView(); +private slots: + void initForm(); //初始化界面数据 + +private: + Ui::DataSyncView *ui; +}; + +#endif // DATASYNCVIEW_H diff --git a/softwareDirectory/AutoVerScheme/datasyncview.ui b/softwareDirectory/AutoVerScheme/datasyncview.ui new file mode 100644 index 0000000..c45bf56 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/datasyncview.ui @@ -0,0 +1,133 @@ + + + DataSyncView + + + + 0 + 0 + 874 + 531 + + + + 数据同步 + + + background-color:rgba(240, 240, 240, 1); + + + + + + background-color:white; + + + + + + + + + + 0 + 0 + + + + background-color:white; +border:0; + + + + + + + + + + 0 + 0 + + + + font:bold 20px Arial, sans-serif; +color:#334582; + + + 同步记录 + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + background-color:#334582; + font: bold 18px Arial, sans-serif; +color:white; +padding:10px; + + + 下载数据 + + + + + + + + 200 + 0 + + + + + 100 + 40 + + + + Qt::RightToLeft + + + background-color:#334582; + font: bold 18px Arial, sans-serif; +color:white; +padding:10px; + + + 发送同步请求 + + + + + + + + + + + + + + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/depar_task.cpp b/softwareDirectory/AutoVerScheme/depar_task.cpp index de39775..5f0f93a 100644 --- a/softwareDirectory/AutoVerScheme/depar_task.cpp +++ b/softwareDirectory/AutoVerScheme/depar_task.cpp @@ -2,13 +2,19 @@ #include "ui_depar_task.h" #include "QMessageBox" #include "InfoBase.h" +#include "QStandardItemModel" Depar_Task::Depar_Task(QWidget *parent) : InfoBase(parent), ui(new Ui::Depar_Task) { ui->setupUi(this); + //初始化列表 this->initForm(); + + + + } Depar_Task::~Depar_Task() @@ -17,8 +23,31 @@ } void Depar_Task::initForm() { + //tableWidget设置 + //设置控件的边框显示 + ui->tableWidget->setStyleSheet("QHeaderView::section {" + "border: 1px solid rgba(197, 196, 196, 1);" + "border-left:none;" + "border-top:none;" + "background-color:white;" + "}"); - //ShowMessageBox("标题","初始化完成"); + ui->tableWidget->setRowCount(10); // 设置10行 + ui->tableWidget->setColumnCount(10); // 设置11列 + ui->tableWidget->setColumnWidth(0, 80); // 设置第一列的宽度为100像素 + ui->tableWidget->verticalHeader()->setParent(nullptr); //隐藏行头 + QTableWidgetItem *item = new QTableWidgetItem("测试数据"); + item->setTextAlignment(Qt::AlignCenter); //文件居中 + ui->tableWidget->setItem(0, 0, item); //设置数据 + + //初始化TableWidget 设置列 + QStringList headers; + headers << "序号" << "设备名称" << "型号规则" << "辅助字段" << "辅助字段"<< "出厂编号" + << "生产厂家" <<"委托方"<<"使用部门"<<"要求检完时间"<<"是否加急"; + ui->tableWidget->setHorizontalHeaderLabels(headers); + + + } void Depar_Task::ShowMessageBox(QString title,QString value) { // 创建一个QMessageBox对象 @@ -38,5 +67,5 @@ } void Depar_Task::Load() { - ShowMessageBox("部门任务页面","部门任务初始化完成"); + //ShowMessageBox("部门任务页面","部门任务初始化完成"); } diff --git a/softwareDirectory/AutoVerScheme/depar_task.h b/softwareDirectory/AutoVerScheme/depar_task.h index 8716faf..110008d 100644 --- a/softwareDirectory/AutoVerScheme/depar_task.h +++ b/softwareDirectory/AutoVerScheme/depar_task.h @@ -3,6 +3,7 @@ #include "InfoBase.h" +#include "QStandardItemModel" namespace Ui { class Depar_Task; @@ -20,9 +21,12 @@ private slots: void initForm(); //初始化界面数据 void ShowMessageBox(QString title,QString value); + //继承父类的Load方法 void Load() override; + private: Ui::Depar_Task *ui; + // QStandardItemModel *model; }; #endif // DEPAR_TASK_H diff --git a/softwareDirectory/AutoVerScheme/depar_task.ui b/softwareDirectory/AutoVerScheme/depar_task.ui index ff3d44f..1a95cc4 100644 --- a/softwareDirectory/AutoVerScheme/depar_task.ui +++ b/softwareDirectory/AutoVerScheme/depar_task.ui @@ -6,7 +6,7 @@ 0 0 - 1184 + 1190 456 @@ -143,7 +143,34 @@ + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + 0 + 30 + + + + Qt::RightToLeft + + + background-color:rgb(3, 58, 152); +color:white; + + 查询 @@ -151,6 +178,20 @@ + + + 0 + 30 + + + + Qt::RightToLeft + + + background-color:rgb(207, 132, 33); +color:white; + + 重置 @@ -168,8 +209,15 @@ + + + - + + + + + diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro index 1280b70..dfb0418 100644 --- a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro @@ -22,6 +22,7 @@ checkmethodmanage.cpp \ checkwindow.cpp \ create_task.cpp \ + datasyncview.cpp \ depar_task.cpp \ indexwindow.cpp \ infomanageview.cpp \ @@ -43,6 +44,7 @@ checkmethodmanage.h \ checkwindow.h \ create_task.h \ + datasyncview.h \ depar_task.h \ indexwindow.h \ infomanageview.h \ @@ -62,6 +64,7 @@ checkmethodmanage.ui \ checkwindow.ui \ create_task.ui \ + datasyncview.ui \ depar_task.ui \ indexwindow.ui \ infomanageview.ui \ diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user index 6ea03c5..93c39cb 100644 --- a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user @@ -1,10 +1,10 @@ - + EnvironmentId - {2746248a-b112-4e0f-9ae0-9e61f2a42309} + {c08df58c-84a7-4965-bca6-e98789474efa} ProjectExplorer.Project.ActiveTarget @@ -71,7 +71,7 @@ 0 0 - D:/dev/QT/AutoCalHainan/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug true @@ -119,7 +119,7 @@ 2 - D:/dev/QT/AutoCalHainan/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Release + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Release true @@ -167,7 +167,7 @@ 0 - D:/dev/QT/AutoCalHainan/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Profile + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Profile true @@ -287,8 +287,8 @@ 2 - Qt4ProjectManager.Qt4RunConfiguration:D:/dev/QT/AutoCalHainan/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro - D:/dev/QT/AutoCalHainan/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro + Qt4ProjectManager.Qt4RunConfiguration:C:/Users/admin/Desktop/SVN/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro + C:/Users/admin/Desktop/SVN/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro false @@ -299,7 +299,7 @@ false true - D:/dev/QT/AutoCalHainan/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug 1 @@ -314,7 +314,7 @@ 0 0 - D:/dev/QT/AutoCalHainan/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Debug + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Debug true @@ -362,7 +362,7 @@ 2 - D:/dev/QT/AutoCalHainan/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Release + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Release true @@ -410,7 +410,7 @@ 0 - D:/dev/QT/AutoCalHainan/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Profile + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Profile true @@ -530,14 +530,15 @@ 2 - - ProjectExplorer.CustomExecutableRunConfiguration - + AutoVerScheme2 + 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 diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user.c08df58 b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user.c08df58 deleted file mode 100644 index 495f95c..0000000 --- a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user.c08df58 +++ /dev/null @@ -1,563 +0,0 @@ - - - - - - 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 32-bit - Desktop Qt 5.14.2 MinGW 32-bit - qt.qt5.5142.win32_mingw73_kit - 0 - 0 - 0 - - D:/Auto_verification_scheme/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 - - - D:/Auto_verification_scheme/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 - - - D:/Auto_verification_scheme/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 - - D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug - - 1 - - - - ProjectExplorer.Project.Target.1 - - 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 - - D:/Auto_verification_scheme/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 - - - D:/Auto_verification_scheme/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 - - - D:/Auto_verification_scheme/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 - - AutoVerScheme2 - 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/InfoBase.h b/softwareDirectory/AutoVerScheme/InfoBase.h index 7fec63e..084cf3f 100644 --- a/softwareDirectory/AutoVerScheme/InfoBase.h +++ b/softwareDirectory/AutoVerScheme/InfoBase.h @@ -2,6 +2,7 @@ #define INFOBASE_H #include +#include "QStandardItemModel" ///信号管理页面的基类 所有信息管理页面都继承于InfoBase /// 便于统一管理 所有子类必须实现Load方法 /// 每次按钮点击切换都会调用Load方法 用于每次页面的数据刷新 @@ -11,6 +12,8 @@ InfoBase(QWidget *parent = nullptr): QWidget(parent){}; // 纯虚函数 virtual void Load()=0; + //QStandardItemModel 的实例。这个模型将用于存储和管理数据。 + QStandardItemModel *model; }; #endif // INFOBASE_H diff --git a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.cpp b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.cpp index 7ac1e87..ffb2bbc 100644 --- a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.cpp +++ b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.cpp @@ -1,14 +1,64 @@ #include "beexamined_deviceitem.h" #include "ui_beexamined_deviceitem.h" +#include "QMessageBox.h" BeExamined_DeviceItem::BeExamined_DeviceItem(QWidget *parent) : - QWidget(parent), + InfoBase(parent), ui(new Ui::BeExamined_DeviceItem) { ui->setupUi(this); + this->initForm(); } BeExamined_DeviceItem::~BeExamined_DeviceItem() { delete ui; } + +void BeExamined_DeviceItem::initForm() +{ + + //tableWidget设置 + //设置控件的边框显示 + ui->tableWidget->setStyleSheet("QHeaderView::section {" + "border: 1px solid rgba(197, 196, 196, 1);" + "border-left:none;" + "border-top:none;" + "background-color:white;" + "}"); + + ui->tableWidget->setRowCount(10); // 设置10行 + ui->tableWidget->setColumnCount(12); // 设置11列 + ui->tableWidget->setColumnWidth(0, 80); // 设置第一列的宽度为100像素 + ui->tableWidget->verticalHeader()->setParent(nullptr); //隐藏行头 + QTableWidgetItem *item = new QTableWidgetItem("测试数据"); + item->setTextAlignment(Qt::AlignCenter); + ui->tableWidget->setItem(0, 0, item); //设置数据 + + //初始化TableWidget 设置列 + QStringList headers; + headers << "序号" << "设备名称" << "型号规则" << "辅助字段" << "出厂编号" + << "生产厂家"<<"所在单位" <<"使用部门"<<"计量标识"<<"检定周期"<<"证书有效期"<<"操作"; + ui->tableWidget->setHorizontalHeaderLabels(headers); + +} +void BeExamined_DeviceItem::ShowMessageBox(QString title,QString value) { + // 创建一个QMessageBox对象 + QMessageBox msgBox; + + // 设置消息框的标题 + msgBox.setWindowTitle(title); + + // 设置消息框的文本内容 + msgBox.setText(value); + + // 设置消息框的标准按钮,这里是“确定”按钮 + msgBox.setStandardButtons(QMessageBox::Ok); + + // 显示消息框 + msgBox.exec(); +} +void BeExamined_DeviceItem::Load() +{ + //ShowMessageBox("被检设备","被检设备初始化完成"); +} diff --git a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.h b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.h index 76b061d..ae46979 100644 --- a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.h +++ b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.h @@ -2,12 +2,13 @@ #define BEEXAMINED_DEVICEITEM_H #include +#include "InfoBase.h" namespace Ui { class BeExamined_DeviceItem; } -class BeExamined_DeviceItem : public QWidget +class BeExamined_DeviceItem : public InfoBase { Q_OBJECT @@ -15,6 +16,11 @@ explicit BeExamined_DeviceItem(QWidget *parent = nullptr); ~BeExamined_DeviceItem(); +private slots: + void initForm(); //初始化界面数据 + void ShowMessageBox(QString title,QString value); + //继承父类的Load方法 + void Load() override; private: Ui::BeExamined_DeviceItem *ui; }; diff --git a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.ui b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.ui index af9f7bf..5a0a3c9 100644 --- a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.ui +++ b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.ui @@ -6,26 +6,236 @@ 0 0 - 400 - 300 + 1291 + 575 Form - - - - 130 - 140 - 89 - 24 - - - - 被检设备管理 - - + + + + + + 0 + 0 + + + + background-color:white; + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 设备名称: + + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 型号规则: + + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 出厂编号: + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 生产厂家: + + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 使用部门: + + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 使用单位: + + + + + + + + + + Qt::Horizontal + + + QSizePolicy::Expanding + + + + 40 + 20 + + + + + + + + Qt::RightToLeft + + + 查询 + + + + + + + Qt::RightToLeft + + + 重置 + + + + + + + + + + background-color:white; + + + + + + + + + + + + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/create_task.cpp b/softwareDirectory/AutoVerScheme/create_task.cpp index 4193efc..9b49a1a 100644 --- a/softwareDirectory/AutoVerScheme/create_task.cpp +++ b/softwareDirectory/AutoVerScheme/create_task.cpp @@ -1,14 +1,61 @@ #include "create_task.h" #include "ui_create_task.h" +#include "QMessageBox" Create_Task::Create_Task(QWidget *parent) : - QWidget(parent), + InfoBase(parent), ui(new Ui::Create_Task) { ui->setupUi(this); + this->initForm(); } Create_Task::~Create_Task() { delete ui; } +void Create_Task::initForm() +{ + //tableWidget设置 + //设置控件的边框显示 + ui->tableWidget->setStyleSheet("QHeaderView::section {" + "border: 1px solid rgba(197, 196, 196, 1);" + "border-left:none;" + "border-top:none;" + "background-color:white;" + "}"); + + ui->tableWidget->setRowCount(10); // 设置10行 + ui->tableWidget->setColumnCount(8); // 设置11列 + ui->tableWidget->setColumnWidth(0, 80); // 设置第一列的宽度为100像素 + ui->tableWidget->verticalHeader()->setParent(nullptr); //隐藏行头 + QTableWidgetItem *item = new QTableWidgetItem("测试数据"); + item->setTextAlignment(Qt::AlignCenter); + ui->tableWidget->setItem(0, 0, item); //设置数据 + + //初始化TableWidget 设置列 + QStringList headers; + headers << "序号" << "任务单编号" << "委托方"<< "使用部门" << "要求检完时间" << "送检人"<<"是否加急"<<"操作"; + ui->tableWidget->setHorizontalHeaderLabels(headers); + //ShowMessageBox("标题","初始化完成"); +} +void Create_Task::ShowMessageBox(QString title,QString value) { + // 创建一个QMessageBox对象 + QMessageBox msgBox; + + // 设置消息框的标题 + msgBox.setWindowTitle(title); + + // 设置消息框的文本内容 + msgBox.setText(value); + + // 设置消息框的标准按钮,这里是“确定”按钮 + msgBox.setStandardButtons(QMessageBox::Ok); + + // 显示消息框 + msgBox.exec(); +} +void Create_Task::Load() +{ + //ShowMessageBox("创建任务界面","创建任务界面初始化完成"); +} diff --git a/softwareDirectory/AutoVerScheme/create_task.h b/softwareDirectory/AutoVerScheme/create_task.h index e2264de..7cf383f 100644 --- a/softwareDirectory/AutoVerScheme/create_task.h +++ b/softwareDirectory/AutoVerScheme/create_task.h @@ -1,13 +1,14 @@ #ifndef CREATE_TASK_H #define CREATE_TASK_H +#include "InfoBase.h" #include namespace Ui { class Create_Task; } -class Create_Task : public QWidget +class Create_Task : public InfoBase { Q_OBJECT @@ -15,6 +16,11 @@ explicit Create_Task(QWidget *parent = nullptr); ~Create_Task(); +private slots: + void initForm(); //初始化界面数据 + void ShowMessageBox(QString title,QString value); + //继承父类的Load方法 + void Load() override; private: Ui::Create_Task *ui; }; diff --git a/softwareDirectory/AutoVerScheme/create_task.ui b/softwareDirectory/AutoVerScheme/create_task.ui index b79c6a1..d9d88ed 100644 --- a/softwareDirectory/AutoVerScheme/create_task.ui +++ b/softwareDirectory/AutoVerScheme/create_task.ui @@ -6,29 +6,294 @@ 0 0 - 400 - 300 + 1184 + 580 Form - - background-color:red; + + Qt::LeftToRight - - - - 140 - 120 - 89 - 24 - - - - 创建任务单 - - + + + + + + + + + 0 + 0 + + + + background-color:white; + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 任务单编号: + + + + + + + + 0 + 0 + + + + + + + + + 0 + 0 + + + + + 50 + 0 + + + + 委托方: + + + + + + + + 0 + 0 + + + + + 0 + 0 + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 使用部门: + + + + + + + + 0 + 0 + + + + + 0 + 0 + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 要求完成时间: + + + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + 0 + 30 + + + + Qt::RightToLeft + + + background-color:rgb(3, 58, 132); +color:white; + + + + 查询 + + + + + + + + 0 + 30 + + + + Qt::RightToLeft + + + background-color:rgb(207, 132, 33); +color:white; + + + + 重置 + + + + + + + + + + background-color:white; + + + + + + + 6 + + + 9 + + + 9 + + + 9 + + + + + + 0 + 0 + + + + + 120 + 40 + + + + OpenHandCursor + + + Qt::DefaultContextMenu + + + Qt::RightToLeft + + + false + + + background-color:rgb(9, 89, 179); +color:white; + + + 创建任务单 + + + true + + + + + + + + + + + + + + SizeVerCursor + + + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/datasyncview.cpp b/softwareDirectory/AutoVerScheme/datasyncview.cpp new file mode 100644 index 0000000..74cd41d --- /dev/null +++ b/softwareDirectory/AutoVerScheme/datasyncview.cpp @@ -0,0 +1,44 @@ +#include "datasyncview.h" +#include "ui_datasyncview.h" + +DataSyncView::DataSyncView(QWidget *parent) : + QWidget(parent), + ui(new Ui::DataSyncView) +{ + ui->setupUi(this); + this->initForm(); +} + +DataSyncView::~DataSyncView() +{ + delete ui; +} +void DataSyncView::initForm() +{ + //tableWidget设置 + //设置控件的边框显示 + ui->tableWidget->setStyleSheet("QHeaderView::section {" + "border: 1px solid grey;" + "border-left:none;" + "border-top:none;" + "background-color:white;" + " color:black;" + "font: bold 18px Arial, sans-serif;" + "}"); + + ui->tableWidget->setRowCount(10); // 设置10行 + ui->tableWidget->setColumnCount(4); // 设置11列 + ui->tableWidget->setColumnWidth(0, 80); // 设置第一列的宽度为100像素 + ui->tableWidget->verticalHeader()->setParent(nullptr); //隐藏行头 + QTableWidgetItem *item = new QTableWidgetItem("测试数据"); + item->setTextAlignment(Qt::AlignCenter); + ui->tableWidget->setItem(0, 0, item); //设置数据 + + //初始化TableWidget 设置列 + QStringList headers; + headers << "序号" << "同步时间" << "是否同步成功" << "备注" ; + ui->tableWidget->setHorizontalHeaderLabels(headers); + + + +} diff --git a/softwareDirectory/AutoVerScheme/datasyncview.h b/softwareDirectory/AutoVerScheme/datasyncview.h new file mode 100644 index 0000000..9a73de9 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/datasyncview.h @@ -0,0 +1,24 @@ +#ifndef DATASYNCVIEW_H +#define DATASYNCVIEW_H + +#include + +namespace Ui { +class DataSyncView; +} + +class DataSyncView : public QWidget +{ + Q_OBJECT + +public: + explicit DataSyncView(QWidget *parent = nullptr); + ~DataSyncView(); +private slots: + void initForm(); //初始化界面数据 + +private: + Ui::DataSyncView *ui; +}; + +#endif // DATASYNCVIEW_H diff --git a/softwareDirectory/AutoVerScheme/datasyncview.ui b/softwareDirectory/AutoVerScheme/datasyncview.ui new file mode 100644 index 0000000..c45bf56 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/datasyncview.ui @@ -0,0 +1,133 @@ + + + DataSyncView + + + + 0 + 0 + 874 + 531 + + + + 数据同步 + + + background-color:rgba(240, 240, 240, 1); + + + + + + background-color:white; + + + + + + + + + + 0 + 0 + + + + background-color:white; +border:0; + + + + + + + + + + 0 + 0 + + + + font:bold 20px Arial, sans-serif; +color:#334582; + + + 同步记录 + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + background-color:#334582; + font: bold 18px Arial, sans-serif; +color:white; +padding:10px; + + + 下载数据 + + + + + + + + 200 + 0 + + + + + 100 + 40 + + + + Qt::RightToLeft + + + background-color:#334582; + font: bold 18px Arial, sans-serif; +color:white; +padding:10px; + + + 发送同步请求 + + + + + + + + + + + + + + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/depar_task.cpp b/softwareDirectory/AutoVerScheme/depar_task.cpp index de39775..5f0f93a 100644 --- a/softwareDirectory/AutoVerScheme/depar_task.cpp +++ b/softwareDirectory/AutoVerScheme/depar_task.cpp @@ -2,13 +2,19 @@ #include "ui_depar_task.h" #include "QMessageBox" #include "InfoBase.h" +#include "QStandardItemModel" Depar_Task::Depar_Task(QWidget *parent) : InfoBase(parent), ui(new Ui::Depar_Task) { ui->setupUi(this); + //初始化列表 this->initForm(); + + + + } Depar_Task::~Depar_Task() @@ -17,8 +23,31 @@ } void Depar_Task::initForm() { + //tableWidget设置 + //设置控件的边框显示 + ui->tableWidget->setStyleSheet("QHeaderView::section {" + "border: 1px solid rgba(197, 196, 196, 1);" + "border-left:none;" + "border-top:none;" + "background-color:white;" + "}"); - //ShowMessageBox("标题","初始化完成"); + ui->tableWidget->setRowCount(10); // 设置10行 + ui->tableWidget->setColumnCount(10); // 设置11列 + ui->tableWidget->setColumnWidth(0, 80); // 设置第一列的宽度为100像素 + ui->tableWidget->verticalHeader()->setParent(nullptr); //隐藏行头 + QTableWidgetItem *item = new QTableWidgetItem("测试数据"); + item->setTextAlignment(Qt::AlignCenter); //文件居中 + ui->tableWidget->setItem(0, 0, item); //设置数据 + + //初始化TableWidget 设置列 + QStringList headers; + headers << "序号" << "设备名称" << "型号规则" << "辅助字段" << "辅助字段"<< "出厂编号" + << "生产厂家" <<"委托方"<<"使用部门"<<"要求检完时间"<<"是否加急"; + ui->tableWidget->setHorizontalHeaderLabels(headers); + + + } void Depar_Task::ShowMessageBox(QString title,QString value) { // 创建一个QMessageBox对象 @@ -38,5 +67,5 @@ } void Depar_Task::Load() { - ShowMessageBox("部门任务页面","部门任务初始化完成"); + //ShowMessageBox("部门任务页面","部门任务初始化完成"); } diff --git a/softwareDirectory/AutoVerScheme/depar_task.h b/softwareDirectory/AutoVerScheme/depar_task.h index 8716faf..110008d 100644 --- a/softwareDirectory/AutoVerScheme/depar_task.h +++ b/softwareDirectory/AutoVerScheme/depar_task.h @@ -3,6 +3,7 @@ #include "InfoBase.h" +#include "QStandardItemModel" namespace Ui { class Depar_Task; @@ -20,9 +21,12 @@ private slots: void initForm(); //初始化界面数据 void ShowMessageBox(QString title,QString value); + //继承父类的Load方法 void Load() override; + private: Ui::Depar_Task *ui; + // QStandardItemModel *model; }; #endif // DEPAR_TASK_H diff --git a/softwareDirectory/AutoVerScheme/depar_task.ui b/softwareDirectory/AutoVerScheme/depar_task.ui index ff3d44f..1a95cc4 100644 --- a/softwareDirectory/AutoVerScheme/depar_task.ui +++ b/softwareDirectory/AutoVerScheme/depar_task.ui @@ -6,7 +6,7 @@ 0 0 - 1184 + 1190 456 @@ -143,7 +143,34 @@ + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + 0 + 30 + + + + Qt::RightToLeft + + + background-color:rgb(3, 58, 152); +color:white; + + 查询 @@ -151,6 +178,20 @@ + + + 0 + 30 + + + + Qt::RightToLeft + + + background-color:rgb(207, 132, 33); +color:white; + + 重置 @@ -168,8 +209,15 @@ + + + - + + + + + diff --git a/softwareDirectory/AutoVerScheme/indexwindow.cpp b/softwareDirectory/AutoVerScheme/indexwindow.cpp index fca900a..cbba812 100644 --- a/softwareDirectory/AutoVerScheme/indexwindow.cpp +++ b/softwareDirectory/AutoVerScheme/indexwindow.cpp @@ -13,11 +13,37 @@ { ui->setupUi(this); this->initForm(); +/* + //主要作用 当页面关闭后 回到indexwindow页面 并 通过~IndexWindow 释放此页面指针所占用内存 + // 假设 ShowDataSyncView 是一个指向 DataSyncView 实例的指针 + // 当 ShowDataSyncView 关闭时,它的 closed() 信号会被发出 + // 连接这个信号到 IndexWindow 的 onNewWindowClosed() 槽函数 + if(ShowDataSyncView) { + //数据同步页面 信号槽 + connect(ShowDataSyncView, &DataSyncView::close, this, &IndexWindow::onNewWindowClosed); + } + if(ShowInfoManageView) { + //信息管理 信号槽 + connect(ShowInfoManageView, &InfoManageView::close, this, &IndexWindow::onNewWindowClosed); + } + */ } IndexWindow::~IndexWindow() { delete ui; + //释放页面内存 + /* + if (ShowDataSyncView) { + ShowDataSyncView->close(); + delete ShowDataSyncView; + } + else if(ShowInfoManageView) + { + ShowInfoManageView->close(); + delete ShowInfoManageView; + } + */ } void IndexWindow::initForm() { @@ -57,6 +83,15 @@ } + +void IndexWindow::onNewWindowClosed() +{ + // 新窗体关闭后,设置 IndexWindow 为活动窗口 + this->activateWindow(); + // 也可以设置焦点到 MainWindow 中的某个控件 + // ui->someWidget->setFocus(); +} + void IndexWindow::showCheckWindow() { CheckWindow *checkWindow = new CheckWindow; @@ -65,6 +100,26 @@ checkWindow->show(); } +//信息管理按钮 +void IndexWindow::on_tb3_clicked() +{ + InfoManageView *ShowInfoManageView = new InfoManageView(); + ShowInfoManageView->setWindowState(Qt::WindowMaximized); + ShowInfoManageView->setWindowModality(Qt::ApplicationModal); + ShowInfoManageView->show(); +} +//数据同步按钮 +void IndexWindow::on_tb6_clicked() +{ + + // 创建新窗体实例并显示 + DataSyncView *ShowDataSyncView = new DataSyncView(); + ShowDataSyncView->setWindowState(Qt::WindowMaximized); + ShowDataSyncView->setWindowModality(Qt::ApplicationModal); + ShowDataSyncView->show(); +} + + void IndexWindow::showCheckMethod() { CheckMethodManage *checkWindow = new CheckMethodManage; diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro index 1280b70..dfb0418 100644 --- a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro @@ -22,6 +22,7 @@ checkmethodmanage.cpp \ checkwindow.cpp \ create_task.cpp \ + datasyncview.cpp \ depar_task.cpp \ indexwindow.cpp \ infomanageview.cpp \ @@ -43,6 +44,7 @@ checkmethodmanage.h \ checkwindow.h \ create_task.h \ + datasyncview.h \ depar_task.h \ indexwindow.h \ infomanageview.h \ @@ -62,6 +64,7 @@ checkmethodmanage.ui \ checkwindow.ui \ create_task.ui \ + datasyncview.ui \ depar_task.ui \ indexwindow.ui \ infomanageview.ui \ diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user index 6ea03c5..93c39cb 100644 --- a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user @@ -1,10 +1,10 @@ - + EnvironmentId - {2746248a-b112-4e0f-9ae0-9e61f2a42309} + {c08df58c-84a7-4965-bca6-e98789474efa} ProjectExplorer.Project.ActiveTarget @@ -71,7 +71,7 @@ 0 0 - D:/dev/QT/AutoCalHainan/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug true @@ -119,7 +119,7 @@ 2 - D:/dev/QT/AutoCalHainan/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Release + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Release true @@ -167,7 +167,7 @@ 0 - D:/dev/QT/AutoCalHainan/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Profile + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Profile true @@ -287,8 +287,8 @@ 2 - Qt4ProjectManager.Qt4RunConfiguration:D:/dev/QT/AutoCalHainan/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro - D:/dev/QT/AutoCalHainan/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro + Qt4ProjectManager.Qt4RunConfiguration:C:/Users/admin/Desktop/SVN/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro + C:/Users/admin/Desktop/SVN/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro false @@ -299,7 +299,7 @@ false true - D:/dev/QT/AutoCalHainan/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug 1 @@ -314,7 +314,7 @@ 0 0 - D:/dev/QT/AutoCalHainan/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Debug + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Debug true @@ -362,7 +362,7 @@ 2 - D:/dev/QT/AutoCalHainan/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Release + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Release true @@ -410,7 +410,7 @@ 0 - D:/dev/QT/AutoCalHainan/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Profile + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Profile true @@ -530,14 +530,15 @@ 2 - - ProjectExplorer.CustomExecutableRunConfiguration - + AutoVerScheme2 + 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 diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user.c08df58 b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user.c08df58 deleted file mode 100644 index 495f95c..0000000 --- a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user.c08df58 +++ /dev/null @@ -1,563 +0,0 @@ - - - - - - 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 32-bit - Desktop Qt 5.14.2 MinGW 32-bit - qt.qt5.5142.win32_mingw73_kit - 0 - 0 - 0 - - D:/Auto_verification_scheme/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 - - - D:/Auto_verification_scheme/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 - - - D:/Auto_verification_scheme/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 - - D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug - - 1 - - - - ProjectExplorer.Project.Target.1 - - 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 - - D:/Auto_verification_scheme/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 - - - D:/Auto_verification_scheme/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 - - - D:/Auto_verification_scheme/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 - - AutoVerScheme2 - 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/InfoBase.h b/softwareDirectory/AutoVerScheme/InfoBase.h index 7fec63e..084cf3f 100644 --- a/softwareDirectory/AutoVerScheme/InfoBase.h +++ b/softwareDirectory/AutoVerScheme/InfoBase.h @@ -2,6 +2,7 @@ #define INFOBASE_H #include +#include "QStandardItemModel" ///信号管理页面的基类 所有信息管理页面都继承于InfoBase /// 便于统一管理 所有子类必须实现Load方法 /// 每次按钮点击切换都会调用Load方法 用于每次页面的数据刷新 @@ -11,6 +12,8 @@ InfoBase(QWidget *parent = nullptr): QWidget(parent){}; // 纯虚函数 virtual void Load()=0; + //QStandardItemModel 的实例。这个模型将用于存储和管理数据。 + QStandardItemModel *model; }; #endif // INFOBASE_H diff --git a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.cpp b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.cpp index 7ac1e87..ffb2bbc 100644 --- a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.cpp +++ b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.cpp @@ -1,14 +1,64 @@ #include "beexamined_deviceitem.h" #include "ui_beexamined_deviceitem.h" +#include "QMessageBox.h" BeExamined_DeviceItem::BeExamined_DeviceItem(QWidget *parent) : - QWidget(parent), + InfoBase(parent), ui(new Ui::BeExamined_DeviceItem) { ui->setupUi(this); + this->initForm(); } BeExamined_DeviceItem::~BeExamined_DeviceItem() { delete ui; } + +void BeExamined_DeviceItem::initForm() +{ + + //tableWidget设置 + //设置控件的边框显示 + ui->tableWidget->setStyleSheet("QHeaderView::section {" + "border: 1px solid rgba(197, 196, 196, 1);" + "border-left:none;" + "border-top:none;" + "background-color:white;" + "}"); + + ui->tableWidget->setRowCount(10); // 设置10行 + ui->tableWidget->setColumnCount(12); // 设置11列 + ui->tableWidget->setColumnWidth(0, 80); // 设置第一列的宽度为100像素 + ui->tableWidget->verticalHeader()->setParent(nullptr); //隐藏行头 + QTableWidgetItem *item = new QTableWidgetItem("测试数据"); + item->setTextAlignment(Qt::AlignCenter); + ui->tableWidget->setItem(0, 0, item); //设置数据 + + //初始化TableWidget 设置列 + QStringList headers; + headers << "序号" << "设备名称" << "型号规则" << "辅助字段" << "出厂编号" + << "生产厂家"<<"所在单位" <<"使用部门"<<"计量标识"<<"检定周期"<<"证书有效期"<<"操作"; + ui->tableWidget->setHorizontalHeaderLabels(headers); + +} +void BeExamined_DeviceItem::ShowMessageBox(QString title,QString value) { + // 创建一个QMessageBox对象 + QMessageBox msgBox; + + // 设置消息框的标题 + msgBox.setWindowTitle(title); + + // 设置消息框的文本内容 + msgBox.setText(value); + + // 设置消息框的标准按钮,这里是“确定”按钮 + msgBox.setStandardButtons(QMessageBox::Ok); + + // 显示消息框 + msgBox.exec(); +} +void BeExamined_DeviceItem::Load() +{ + //ShowMessageBox("被检设备","被检设备初始化完成"); +} diff --git a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.h b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.h index 76b061d..ae46979 100644 --- a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.h +++ b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.h @@ -2,12 +2,13 @@ #define BEEXAMINED_DEVICEITEM_H #include +#include "InfoBase.h" namespace Ui { class BeExamined_DeviceItem; } -class BeExamined_DeviceItem : public QWidget +class BeExamined_DeviceItem : public InfoBase { Q_OBJECT @@ -15,6 +16,11 @@ explicit BeExamined_DeviceItem(QWidget *parent = nullptr); ~BeExamined_DeviceItem(); +private slots: + void initForm(); //初始化界面数据 + void ShowMessageBox(QString title,QString value); + //继承父类的Load方法 + void Load() override; private: Ui::BeExamined_DeviceItem *ui; }; diff --git a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.ui b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.ui index af9f7bf..5a0a3c9 100644 --- a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.ui +++ b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.ui @@ -6,26 +6,236 @@ 0 0 - 400 - 300 + 1291 + 575 Form - - - - 130 - 140 - 89 - 24 - - - - 被检设备管理 - - + + + + + + 0 + 0 + + + + background-color:white; + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 设备名称: + + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 型号规则: + + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 出厂编号: + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 生产厂家: + + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 使用部门: + + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 使用单位: + + + + + + + + + + Qt::Horizontal + + + QSizePolicy::Expanding + + + + 40 + 20 + + + + + + + + Qt::RightToLeft + + + 查询 + + + + + + + Qt::RightToLeft + + + 重置 + + + + + + + + + + background-color:white; + + + + + + + + + + + + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/create_task.cpp b/softwareDirectory/AutoVerScheme/create_task.cpp index 4193efc..9b49a1a 100644 --- a/softwareDirectory/AutoVerScheme/create_task.cpp +++ b/softwareDirectory/AutoVerScheme/create_task.cpp @@ -1,14 +1,61 @@ #include "create_task.h" #include "ui_create_task.h" +#include "QMessageBox" Create_Task::Create_Task(QWidget *parent) : - QWidget(parent), + InfoBase(parent), ui(new Ui::Create_Task) { ui->setupUi(this); + this->initForm(); } Create_Task::~Create_Task() { delete ui; } +void Create_Task::initForm() +{ + //tableWidget设置 + //设置控件的边框显示 + ui->tableWidget->setStyleSheet("QHeaderView::section {" + "border: 1px solid rgba(197, 196, 196, 1);" + "border-left:none;" + "border-top:none;" + "background-color:white;" + "}"); + + ui->tableWidget->setRowCount(10); // 设置10行 + ui->tableWidget->setColumnCount(8); // 设置11列 + ui->tableWidget->setColumnWidth(0, 80); // 设置第一列的宽度为100像素 + ui->tableWidget->verticalHeader()->setParent(nullptr); //隐藏行头 + QTableWidgetItem *item = new QTableWidgetItem("测试数据"); + item->setTextAlignment(Qt::AlignCenter); + ui->tableWidget->setItem(0, 0, item); //设置数据 + + //初始化TableWidget 设置列 + QStringList headers; + headers << "序号" << "任务单编号" << "委托方"<< "使用部门" << "要求检完时间" << "送检人"<<"是否加急"<<"操作"; + ui->tableWidget->setHorizontalHeaderLabels(headers); + //ShowMessageBox("标题","初始化完成"); +} +void Create_Task::ShowMessageBox(QString title,QString value) { + // 创建一个QMessageBox对象 + QMessageBox msgBox; + + // 设置消息框的标题 + msgBox.setWindowTitle(title); + + // 设置消息框的文本内容 + msgBox.setText(value); + + // 设置消息框的标准按钮,这里是“确定”按钮 + msgBox.setStandardButtons(QMessageBox::Ok); + + // 显示消息框 + msgBox.exec(); +} +void Create_Task::Load() +{ + //ShowMessageBox("创建任务界面","创建任务界面初始化完成"); +} diff --git a/softwareDirectory/AutoVerScheme/create_task.h b/softwareDirectory/AutoVerScheme/create_task.h index e2264de..7cf383f 100644 --- a/softwareDirectory/AutoVerScheme/create_task.h +++ b/softwareDirectory/AutoVerScheme/create_task.h @@ -1,13 +1,14 @@ #ifndef CREATE_TASK_H #define CREATE_TASK_H +#include "InfoBase.h" #include namespace Ui { class Create_Task; } -class Create_Task : public QWidget +class Create_Task : public InfoBase { Q_OBJECT @@ -15,6 +16,11 @@ explicit Create_Task(QWidget *parent = nullptr); ~Create_Task(); +private slots: + void initForm(); //初始化界面数据 + void ShowMessageBox(QString title,QString value); + //继承父类的Load方法 + void Load() override; private: Ui::Create_Task *ui; }; diff --git a/softwareDirectory/AutoVerScheme/create_task.ui b/softwareDirectory/AutoVerScheme/create_task.ui index b79c6a1..d9d88ed 100644 --- a/softwareDirectory/AutoVerScheme/create_task.ui +++ b/softwareDirectory/AutoVerScheme/create_task.ui @@ -6,29 +6,294 @@ 0 0 - 400 - 300 + 1184 + 580 Form - - background-color:red; + + Qt::LeftToRight - - - - 140 - 120 - 89 - 24 - - - - 创建任务单 - - + + + + + + + + + 0 + 0 + + + + background-color:white; + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 任务单编号: + + + + + + + + 0 + 0 + + + + + + + + + 0 + 0 + + + + + 50 + 0 + + + + 委托方: + + + + + + + + 0 + 0 + + + + + 0 + 0 + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 使用部门: + + + + + + + + 0 + 0 + + + + + 0 + 0 + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 要求完成时间: + + + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + 0 + 30 + + + + Qt::RightToLeft + + + background-color:rgb(3, 58, 132); +color:white; + + + + 查询 + + + + + + + + 0 + 30 + + + + Qt::RightToLeft + + + background-color:rgb(207, 132, 33); +color:white; + + + + 重置 + + + + + + + + + + background-color:white; + + + + + + + 6 + + + 9 + + + 9 + + + 9 + + + + + + 0 + 0 + + + + + 120 + 40 + + + + OpenHandCursor + + + Qt::DefaultContextMenu + + + Qt::RightToLeft + + + false + + + background-color:rgb(9, 89, 179); +color:white; + + + 创建任务单 + + + true + + + + + + + + + + + + + + SizeVerCursor + + + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/datasyncview.cpp b/softwareDirectory/AutoVerScheme/datasyncview.cpp new file mode 100644 index 0000000..74cd41d --- /dev/null +++ b/softwareDirectory/AutoVerScheme/datasyncview.cpp @@ -0,0 +1,44 @@ +#include "datasyncview.h" +#include "ui_datasyncview.h" + +DataSyncView::DataSyncView(QWidget *parent) : + QWidget(parent), + ui(new Ui::DataSyncView) +{ + ui->setupUi(this); + this->initForm(); +} + +DataSyncView::~DataSyncView() +{ + delete ui; +} +void DataSyncView::initForm() +{ + //tableWidget设置 + //设置控件的边框显示 + ui->tableWidget->setStyleSheet("QHeaderView::section {" + "border: 1px solid grey;" + "border-left:none;" + "border-top:none;" + "background-color:white;" + " color:black;" + "font: bold 18px Arial, sans-serif;" + "}"); + + ui->tableWidget->setRowCount(10); // 设置10行 + ui->tableWidget->setColumnCount(4); // 设置11列 + ui->tableWidget->setColumnWidth(0, 80); // 设置第一列的宽度为100像素 + ui->tableWidget->verticalHeader()->setParent(nullptr); //隐藏行头 + QTableWidgetItem *item = new QTableWidgetItem("测试数据"); + item->setTextAlignment(Qt::AlignCenter); + ui->tableWidget->setItem(0, 0, item); //设置数据 + + //初始化TableWidget 设置列 + QStringList headers; + headers << "序号" << "同步时间" << "是否同步成功" << "备注" ; + ui->tableWidget->setHorizontalHeaderLabels(headers); + + + +} diff --git a/softwareDirectory/AutoVerScheme/datasyncview.h b/softwareDirectory/AutoVerScheme/datasyncview.h new file mode 100644 index 0000000..9a73de9 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/datasyncview.h @@ -0,0 +1,24 @@ +#ifndef DATASYNCVIEW_H +#define DATASYNCVIEW_H + +#include + +namespace Ui { +class DataSyncView; +} + +class DataSyncView : public QWidget +{ + Q_OBJECT + +public: + explicit DataSyncView(QWidget *parent = nullptr); + ~DataSyncView(); +private slots: + void initForm(); //初始化界面数据 + +private: + Ui::DataSyncView *ui; +}; + +#endif // DATASYNCVIEW_H diff --git a/softwareDirectory/AutoVerScheme/datasyncview.ui b/softwareDirectory/AutoVerScheme/datasyncview.ui new file mode 100644 index 0000000..c45bf56 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/datasyncview.ui @@ -0,0 +1,133 @@ + + + DataSyncView + + + + 0 + 0 + 874 + 531 + + + + 数据同步 + + + background-color:rgba(240, 240, 240, 1); + + + + + + background-color:white; + + + + + + + + + + 0 + 0 + + + + background-color:white; +border:0; + + + + + + + + + + 0 + 0 + + + + font:bold 20px Arial, sans-serif; +color:#334582; + + + 同步记录 + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + background-color:#334582; + font: bold 18px Arial, sans-serif; +color:white; +padding:10px; + + + 下载数据 + + + + + + + + 200 + 0 + + + + + 100 + 40 + + + + Qt::RightToLeft + + + background-color:#334582; + font: bold 18px Arial, sans-serif; +color:white; +padding:10px; + + + 发送同步请求 + + + + + + + + + + + + + + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/depar_task.cpp b/softwareDirectory/AutoVerScheme/depar_task.cpp index de39775..5f0f93a 100644 --- a/softwareDirectory/AutoVerScheme/depar_task.cpp +++ b/softwareDirectory/AutoVerScheme/depar_task.cpp @@ -2,13 +2,19 @@ #include "ui_depar_task.h" #include "QMessageBox" #include "InfoBase.h" +#include "QStandardItemModel" Depar_Task::Depar_Task(QWidget *parent) : InfoBase(parent), ui(new Ui::Depar_Task) { ui->setupUi(this); + //初始化列表 this->initForm(); + + + + } Depar_Task::~Depar_Task() @@ -17,8 +23,31 @@ } void Depar_Task::initForm() { + //tableWidget设置 + //设置控件的边框显示 + ui->tableWidget->setStyleSheet("QHeaderView::section {" + "border: 1px solid rgba(197, 196, 196, 1);" + "border-left:none;" + "border-top:none;" + "background-color:white;" + "}"); - //ShowMessageBox("标题","初始化完成"); + ui->tableWidget->setRowCount(10); // 设置10行 + ui->tableWidget->setColumnCount(10); // 设置11列 + ui->tableWidget->setColumnWidth(0, 80); // 设置第一列的宽度为100像素 + ui->tableWidget->verticalHeader()->setParent(nullptr); //隐藏行头 + QTableWidgetItem *item = new QTableWidgetItem("测试数据"); + item->setTextAlignment(Qt::AlignCenter); //文件居中 + ui->tableWidget->setItem(0, 0, item); //设置数据 + + //初始化TableWidget 设置列 + QStringList headers; + headers << "序号" << "设备名称" << "型号规则" << "辅助字段" << "辅助字段"<< "出厂编号" + << "生产厂家" <<"委托方"<<"使用部门"<<"要求检完时间"<<"是否加急"; + ui->tableWidget->setHorizontalHeaderLabels(headers); + + + } void Depar_Task::ShowMessageBox(QString title,QString value) { // 创建一个QMessageBox对象 @@ -38,5 +67,5 @@ } void Depar_Task::Load() { - ShowMessageBox("部门任务页面","部门任务初始化完成"); + //ShowMessageBox("部门任务页面","部门任务初始化完成"); } diff --git a/softwareDirectory/AutoVerScheme/depar_task.h b/softwareDirectory/AutoVerScheme/depar_task.h index 8716faf..110008d 100644 --- a/softwareDirectory/AutoVerScheme/depar_task.h +++ b/softwareDirectory/AutoVerScheme/depar_task.h @@ -3,6 +3,7 @@ #include "InfoBase.h" +#include "QStandardItemModel" namespace Ui { class Depar_Task; @@ -20,9 +21,12 @@ private slots: void initForm(); //初始化界面数据 void ShowMessageBox(QString title,QString value); + //继承父类的Load方法 void Load() override; + private: Ui::Depar_Task *ui; + // QStandardItemModel *model; }; #endif // DEPAR_TASK_H diff --git a/softwareDirectory/AutoVerScheme/depar_task.ui b/softwareDirectory/AutoVerScheme/depar_task.ui index ff3d44f..1a95cc4 100644 --- a/softwareDirectory/AutoVerScheme/depar_task.ui +++ b/softwareDirectory/AutoVerScheme/depar_task.ui @@ -6,7 +6,7 @@ 0 0 - 1184 + 1190 456 @@ -143,7 +143,34 @@ + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + 0 + 30 + + + + Qt::RightToLeft + + + background-color:rgb(3, 58, 152); +color:white; + + 查询 @@ -151,6 +178,20 @@ + + + 0 + 30 + + + + Qt::RightToLeft + + + background-color:rgb(207, 132, 33); +color:white; + + 重置 @@ -168,8 +209,15 @@ + + + - + + + + + diff --git a/softwareDirectory/AutoVerScheme/indexwindow.cpp b/softwareDirectory/AutoVerScheme/indexwindow.cpp index fca900a..cbba812 100644 --- a/softwareDirectory/AutoVerScheme/indexwindow.cpp +++ b/softwareDirectory/AutoVerScheme/indexwindow.cpp @@ -13,11 +13,37 @@ { ui->setupUi(this); this->initForm(); +/* + //主要作用 当页面关闭后 回到indexwindow页面 并 通过~IndexWindow 释放此页面指针所占用内存 + // 假设 ShowDataSyncView 是一个指向 DataSyncView 实例的指针 + // 当 ShowDataSyncView 关闭时,它的 closed() 信号会被发出 + // 连接这个信号到 IndexWindow 的 onNewWindowClosed() 槽函数 + if(ShowDataSyncView) { + //数据同步页面 信号槽 + connect(ShowDataSyncView, &DataSyncView::close, this, &IndexWindow::onNewWindowClosed); + } + if(ShowInfoManageView) { + //信息管理 信号槽 + connect(ShowInfoManageView, &InfoManageView::close, this, &IndexWindow::onNewWindowClosed); + } + */ } IndexWindow::~IndexWindow() { delete ui; + //释放页面内存 + /* + if (ShowDataSyncView) { + ShowDataSyncView->close(); + delete ShowDataSyncView; + } + else if(ShowInfoManageView) + { + ShowInfoManageView->close(); + delete ShowInfoManageView; + } + */ } void IndexWindow::initForm() { @@ -57,6 +83,15 @@ } + +void IndexWindow::onNewWindowClosed() +{ + // 新窗体关闭后,设置 IndexWindow 为活动窗口 + this->activateWindow(); + // 也可以设置焦点到 MainWindow 中的某个控件 + // ui->someWidget->setFocus(); +} + void IndexWindow::showCheckWindow() { CheckWindow *checkWindow = new CheckWindow; @@ -65,6 +100,26 @@ checkWindow->show(); } +//信息管理按钮 +void IndexWindow::on_tb3_clicked() +{ + InfoManageView *ShowInfoManageView = new InfoManageView(); + ShowInfoManageView->setWindowState(Qt::WindowMaximized); + ShowInfoManageView->setWindowModality(Qt::ApplicationModal); + ShowInfoManageView->show(); +} +//数据同步按钮 +void IndexWindow::on_tb6_clicked() +{ + + // 创建新窗体实例并显示 + DataSyncView *ShowDataSyncView = new DataSyncView(); + ShowDataSyncView->setWindowState(Qt::WindowMaximized); + ShowDataSyncView->setWindowModality(Qt::ApplicationModal); + ShowDataSyncView->show(); +} + + void IndexWindow::showCheckMethod() { CheckMethodManage *checkWindow = new CheckMethodManage; diff --git a/softwareDirectory/AutoVerScheme/indexwindow.h b/softwareDirectory/AutoVerScheme/indexwindow.h index a05d802..190b0f1 100644 --- a/softwareDirectory/AutoVerScheme/indexwindow.h +++ b/softwareDirectory/AutoVerScheme/indexwindow.h @@ -2,6 +2,8 @@ #define INDEXWINDOW_H #include +#include "datasyncView.h" +#include "infomanageview.h" namespace Ui { class IndexWindow; @@ -23,8 +25,21 @@ void showVerifyMethod(); + void on_tb3_clicked(); + + void on_tb6_clicked(); + + //页面关闭响应函数 + void onNewWindowClosed(); + + void on_tb1_clicked(); + private: Ui::IndexWindow *ui; + + //数据同步页面 指针 + //DataSyncView *ShowDataSyncView; + //InfoManageView *ShowInfoManageView; }; #endif // INDEXWINDOW_H diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro index 1280b70..dfb0418 100644 --- a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro @@ -22,6 +22,7 @@ checkmethodmanage.cpp \ checkwindow.cpp \ create_task.cpp \ + datasyncview.cpp \ depar_task.cpp \ indexwindow.cpp \ infomanageview.cpp \ @@ -43,6 +44,7 @@ checkmethodmanage.h \ checkwindow.h \ create_task.h \ + datasyncview.h \ depar_task.h \ indexwindow.h \ infomanageview.h \ @@ -62,6 +64,7 @@ checkmethodmanage.ui \ checkwindow.ui \ create_task.ui \ + datasyncview.ui \ depar_task.ui \ indexwindow.ui \ infomanageview.ui \ diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user index 6ea03c5..93c39cb 100644 --- a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user @@ -1,10 +1,10 @@ - + EnvironmentId - {2746248a-b112-4e0f-9ae0-9e61f2a42309} + {c08df58c-84a7-4965-bca6-e98789474efa} ProjectExplorer.Project.ActiveTarget @@ -71,7 +71,7 @@ 0 0 - D:/dev/QT/AutoCalHainan/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug true @@ -119,7 +119,7 @@ 2 - D:/dev/QT/AutoCalHainan/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Release + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Release true @@ -167,7 +167,7 @@ 0 - D:/dev/QT/AutoCalHainan/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Profile + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Profile true @@ -287,8 +287,8 @@ 2 - Qt4ProjectManager.Qt4RunConfiguration:D:/dev/QT/AutoCalHainan/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro - D:/dev/QT/AutoCalHainan/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro + Qt4ProjectManager.Qt4RunConfiguration:C:/Users/admin/Desktop/SVN/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro + C:/Users/admin/Desktop/SVN/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro false @@ -299,7 +299,7 @@ false true - D:/dev/QT/AutoCalHainan/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug 1 @@ -314,7 +314,7 @@ 0 0 - D:/dev/QT/AutoCalHainan/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Debug + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Debug true @@ -362,7 +362,7 @@ 2 - D:/dev/QT/AutoCalHainan/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Release + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Release true @@ -410,7 +410,7 @@ 0 - D:/dev/QT/AutoCalHainan/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Profile + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Profile true @@ -530,14 +530,15 @@ 2 - - ProjectExplorer.CustomExecutableRunConfiguration - + AutoVerScheme2 + 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 diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user.c08df58 b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user.c08df58 deleted file mode 100644 index 495f95c..0000000 --- a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user.c08df58 +++ /dev/null @@ -1,563 +0,0 @@ - - - - - - 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 32-bit - Desktop Qt 5.14.2 MinGW 32-bit - qt.qt5.5142.win32_mingw73_kit - 0 - 0 - 0 - - D:/Auto_verification_scheme/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 - - - D:/Auto_verification_scheme/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 - - - D:/Auto_verification_scheme/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 - - D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug - - 1 - - - - ProjectExplorer.Project.Target.1 - - 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 - - D:/Auto_verification_scheme/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 - - - D:/Auto_verification_scheme/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 - - - D:/Auto_verification_scheme/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 - - AutoVerScheme2 - 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/InfoBase.h b/softwareDirectory/AutoVerScheme/InfoBase.h index 7fec63e..084cf3f 100644 --- a/softwareDirectory/AutoVerScheme/InfoBase.h +++ b/softwareDirectory/AutoVerScheme/InfoBase.h @@ -2,6 +2,7 @@ #define INFOBASE_H #include +#include "QStandardItemModel" ///信号管理页面的基类 所有信息管理页面都继承于InfoBase /// 便于统一管理 所有子类必须实现Load方法 /// 每次按钮点击切换都会调用Load方法 用于每次页面的数据刷新 @@ -11,6 +12,8 @@ InfoBase(QWidget *parent = nullptr): QWidget(parent){}; // 纯虚函数 virtual void Load()=0; + //QStandardItemModel 的实例。这个模型将用于存储和管理数据。 + QStandardItemModel *model; }; #endif // INFOBASE_H diff --git a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.cpp b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.cpp index 7ac1e87..ffb2bbc 100644 --- a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.cpp +++ b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.cpp @@ -1,14 +1,64 @@ #include "beexamined_deviceitem.h" #include "ui_beexamined_deviceitem.h" +#include "QMessageBox.h" BeExamined_DeviceItem::BeExamined_DeviceItem(QWidget *parent) : - QWidget(parent), + InfoBase(parent), ui(new Ui::BeExamined_DeviceItem) { ui->setupUi(this); + this->initForm(); } BeExamined_DeviceItem::~BeExamined_DeviceItem() { delete ui; } + +void BeExamined_DeviceItem::initForm() +{ + + //tableWidget设置 + //设置控件的边框显示 + ui->tableWidget->setStyleSheet("QHeaderView::section {" + "border: 1px solid rgba(197, 196, 196, 1);" + "border-left:none;" + "border-top:none;" + "background-color:white;" + "}"); + + ui->tableWidget->setRowCount(10); // 设置10行 + ui->tableWidget->setColumnCount(12); // 设置11列 + ui->tableWidget->setColumnWidth(0, 80); // 设置第一列的宽度为100像素 + ui->tableWidget->verticalHeader()->setParent(nullptr); //隐藏行头 + QTableWidgetItem *item = new QTableWidgetItem("测试数据"); + item->setTextAlignment(Qt::AlignCenter); + ui->tableWidget->setItem(0, 0, item); //设置数据 + + //初始化TableWidget 设置列 + QStringList headers; + headers << "序号" << "设备名称" << "型号规则" << "辅助字段" << "出厂编号" + << "生产厂家"<<"所在单位" <<"使用部门"<<"计量标识"<<"检定周期"<<"证书有效期"<<"操作"; + ui->tableWidget->setHorizontalHeaderLabels(headers); + +} +void BeExamined_DeviceItem::ShowMessageBox(QString title,QString value) { + // 创建一个QMessageBox对象 + QMessageBox msgBox; + + // 设置消息框的标题 + msgBox.setWindowTitle(title); + + // 设置消息框的文本内容 + msgBox.setText(value); + + // 设置消息框的标准按钮,这里是“确定”按钮 + msgBox.setStandardButtons(QMessageBox::Ok); + + // 显示消息框 + msgBox.exec(); +} +void BeExamined_DeviceItem::Load() +{ + //ShowMessageBox("被检设备","被检设备初始化完成"); +} diff --git a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.h b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.h index 76b061d..ae46979 100644 --- a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.h +++ b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.h @@ -2,12 +2,13 @@ #define BEEXAMINED_DEVICEITEM_H #include +#include "InfoBase.h" namespace Ui { class BeExamined_DeviceItem; } -class BeExamined_DeviceItem : public QWidget +class BeExamined_DeviceItem : public InfoBase { Q_OBJECT @@ -15,6 +16,11 @@ explicit BeExamined_DeviceItem(QWidget *parent = nullptr); ~BeExamined_DeviceItem(); +private slots: + void initForm(); //初始化界面数据 + void ShowMessageBox(QString title,QString value); + //继承父类的Load方法 + void Load() override; private: Ui::BeExamined_DeviceItem *ui; }; diff --git a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.ui b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.ui index af9f7bf..5a0a3c9 100644 --- a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.ui +++ b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.ui @@ -6,26 +6,236 @@ 0 0 - 400 - 300 + 1291 + 575 Form - - - - 130 - 140 - 89 - 24 - - - - 被检设备管理 - - + + + + + + 0 + 0 + + + + background-color:white; + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 设备名称: + + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 型号规则: + + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 出厂编号: + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 生产厂家: + + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 使用部门: + + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 使用单位: + + + + + + + + + + Qt::Horizontal + + + QSizePolicy::Expanding + + + + 40 + 20 + + + + + + + + Qt::RightToLeft + + + 查询 + + + + + + + Qt::RightToLeft + + + 重置 + + + + + + + + + + background-color:white; + + + + + + + + + + + + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/create_task.cpp b/softwareDirectory/AutoVerScheme/create_task.cpp index 4193efc..9b49a1a 100644 --- a/softwareDirectory/AutoVerScheme/create_task.cpp +++ b/softwareDirectory/AutoVerScheme/create_task.cpp @@ -1,14 +1,61 @@ #include "create_task.h" #include "ui_create_task.h" +#include "QMessageBox" Create_Task::Create_Task(QWidget *parent) : - QWidget(parent), + InfoBase(parent), ui(new Ui::Create_Task) { ui->setupUi(this); + this->initForm(); } Create_Task::~Create_Task() { delete ui; } +void Create_Task::initForm() +{ + //tableWidget设置 + //设置控件的边框显示 + ui->tableWidget->setStyleSheet("QHeaderView::section {" + "border: 1px solid rgba(197, 196, 196, 1);" + "border-left:none;" + "border-top:none;" + "background-color:white;" + "}"); + + ui->tableWidget->setRowCount(10); // 设置10行 + ui->tableWidget->setColumnCount(8); // 设置11列 + ui->tableWidget->setColumnWidth(0, 80); // 设置第一列的宽度为100像素 + ui->tableWidget->verticalHeader()->setParent(nullptr); //隐藏行头 + QTableWidgetItem *item = new QTableWidgetItem("测试数据"); + item->setTextAlignment(Qt::AlignCenter); + ui->tableWidget->setItem(0, 0, item); //设置数据 + + //初始化TableWidget 设置列 + QStringList headers; + headers << "序号" << "任务单编号" << "委托方"<< "使用部门" << "要求检完时间" << "送检人"<<"是否加急"<<"操作"; + ui->tableWidget->setHorizontalHeaderLabels(headers); + //ShowMessageBox("标题","初始化完成"); +} +void Create_Task::ShowMessageBox(QString title,QString value) { + // 创建一个QMessageBox对象 + QMessageBox msgBox; + + // 设置消息框的标题 + msgBox.setWindowTitle(title); + + // 设置消息框的文本内容 + msgBox.setText(value); + + // 设置消息框的标准按钮,这里是“确定”按钮 + msgBox.setStandardButtons(QMessageBox::Ok); + + // 显示消息框 + msgBox.exec(); +} +void Create_Task::Load() +{ + //ShowMessageBox("创建任务界面","创建任务界面初始化完成"); +} diff --git a/softwareDirectory/AutoVerScheme/create_task.h b/softwareDirectory/AutoVerScheme/create_task.h index e2264de..7cf383f 100644 --- a/softwareDirectory/AutoVerScheme/create_task.h +++ b/softwareDirectory/AutoVerScheme/create_task.h @@ -1,13 +1,14 @@ #ifndef CREATE_TASK_H #define CREATE_TASK_H +#include "InfoBase.h" #include namespace Ui { class Create_Task; } -class Create_Task : public QWidget +class Create_Task : public InfoBase { Q_OBJECT @@ -15,6 +16,11 @@ explicit Create_Task(QWidget *parent = nullptr); ~Create_Task(); +private slots: + void initForm(); //初始化界面数据 + void ShowMessageBox(QString title,QString value); + //继承父类的Load方法 + void Load() override; private: Ui::Create_Task *ui; }; diff --git a/softwareDirectory/AutoVerScheme/create_task.ui b/softwareDirectory/AutoVerScheme/create_task.ui index b79c6a1..d9d88ed 100644 --- a/softwareDirectory/AutoVerScheme/create_task.ui +++ b/softwareDirectory/AutoVerScheme/create_task.ui @@ -6,29 +6,294 @@ 0 0 - 400 - 300 + 1184 + 580 Form - - background-color:red; + + Qt::LeftToRight - - - - 140 - 120 - 89 - 24 - - - - 创建任务单 - - + + + + + + + + + 0 + 0 + + + + background-color:white; + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 任务单编号: + + + + + + + + 0 + 0 + + + + + + + + + 0 + 0 + + + + + 50 + 0 + + + + 委托方: + + + + + + + + 0 + 0 + + + + + 0 + 0 + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 使用部门: + + + + + + + + 0 + 0 + + + + + 0 + 0 + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 要求完成时间: + + + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + 0 + 30 + + + + Qt::RightToLeft + + + background-color:rgb(3, 58, 132); +color:white; + + + + 查询 + + + + + + + + 0 + 30 + + + + Qt::RightToLeft + + + background-color:rgb(207, 132, 33); +color:white; + + + + 重置 + + + + + + + + + + background-color:white; + + + + + + + 6 + + + 9 + + + 9 + + + 9 + + + + + + 0 + 0 + + + + + 120 + 40 + + + + OpenHandCursor + + + Qt::DefaultContextMenu + + + Qt::RightToLeft + + + false + + + background-color:rgb(9, 89, 179); +color:white; + + + 创建任务单 + + + true + + + + + + + + + + + + + + SizeVerCursor + + + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/datasyncview.cpp b/softwareDirectory/AutoVerScheme/datasyncview.cpp new file mode 100644 index 0000000..74cd41d --- /dev/null +++ b/softwareDirectory/AutoVerScheme/datasyncview.cpp @@ -0,0 +1,44 @@ +#include "datasyncview.h" +#include "ui_datasyncview.h" + +DataSyncView::DataSyncView(QWidget *parent) : + QWidget(parent), + ui(new Ui::DataSyncView) +{ + ui->setupUi(this); + this->initForm(); +} + +DataSyncView::~DataSyncView() +{ + delete ui; +} +void DataSyncView::initForm() +{ + //tableWidget设置 + //设置控件的边框显示 + ui->tableWidget->setStyleSheet("QHeaderView::section {" + "border: 1px solid grey;" + "border-left:none;" + "border-top:none;" + "background-color:white;" + " color:black;" + "font: bold 18px Arial, sans-serif;" + "}"); + + ui->tableWidget->setRowCount(10); // 设置10行 + ui->tableWidget->setColumnCount(4); // 设置11列 + ui->tableWidget->setColumnWidth(0, 80); // 设置第一列的宽度为100像素 + ui->tableWidget->verticalHeader()->setParent(nullptr); //隐藏行头 + QTableWidgetItem *item = new QTableWidgetItem("测试数据"); + item->setTextAlignment(Qt::AlignCenter); + ui->tableWidget->setItem(0, 0, item); //设置数据 + + //初始化TableWidget 设置列 + QStringList headers; + headers << "序号" << "同步时间" << "是否同步成功" << "备注" ; + ui->tableWidget->setHorizontalHeaderLabels(headers); + + + +} diff --git a/softwareDirectory/AutoVerScheme/datasyncview.h b/softwareDirectory/AutoVerScheme/datasyncview.h new file mode 100644 index 0000000..9a73de9 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/datasyncview.h @@ -0,0 +1,24 @@ +#ifndef DATASYNCVIEW_H +#define DATASYNCVIEW_H + +#include + +namespace Ui { +class DataSyncView; +} + +class DataSyncView : public QWidget +{ + Q_OBJECT + +public: + explicit DataSyncView(QWidget *parent = nullptr); + ~DataSyncView(); +private slots: + void initForm(); //初始化界面数据 + +private: + Ui::DataSyncView *ui; +}; + +#endif // DATASYNCVIEW_H diff --git a/softwareDirectory/AutoVerScheme/datasyncview.ui b/softwareDirectory/AutoVerScheme/datasyncview.ui new file mode 100644 index 0000000..c45bf56 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/datasyncview.ui @@ -0,0 +1,133 @@ + + + DataSyncView + + + + 0 + 0 + 874 + 531 + + + + 数据同步 + + + background-color:rgba(240, 240, 240, 1); + + + + + + background-color:white; + + + + + + + + + + 0 + 0 + + + + background-color:white; +border:0; + + + + + + + + + + 0 + 0 + + + + font:bold 20px Arial, sans-serif; +color:#334582; + + + 同步记录 + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + background-color:#334582; + font: bold 18px Arial, sans-serif; +color:white; +padding:10px; + + + 下载数据 + + + + + + + + 200 + 0 + + + + + 100 + 40 + + + + Qt::RightToLeft + + + background-color:#334582; + font: bold 18px Arial, sans-serif; +color:white; +padding:10px; + + + 发送同步请求 + + + + + + + + + + + + + + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/depar_task.cpp b/softwareDirectory/AutoVerScheme/depar_task.cpp index de39775..5f0f93a 100644 --- a/softwareDirectory/AutoVerScheme/depar_task.cpp +++ b/softwareDirectory/AutoVerScheme/depar_task.cpp @@ -2,13 +2,19 @@ #include "ui_depar_task.h" #include "QMessageBox" #include "InfoBase.h" +#include "QStandardItemModel" Depar_Task::Depar_Task(QWidget *parent) : InfoBase(parent), ui(new Ui::Depar_Task) { ui->setupUi(this); + //初始化列表 this->initForm(); + + + + } Depar_Task::~Depar_Task() @@ -17,8 +23,31 @@ } void Depar_Task::initForm() { + //tableWidget设置 + //设置控件的边框显示 + ui->tableWidget->setStyleSheet("QHeaderView::section {" + "border: 1px solid rgba(197, 196, 196, 1);" + "border-left:none;" + "border-top:none;" + "background-color:white;" + "}"); - //ShowMessageBox("标题","初始化完成"); + ui->tableWidget->setRowCount(10); // 设置10行 + ui->tableWidget->setColumnCount(10); // 设置11列 + ui->tableWidget->setColumnWidth(0, 80); // 设置第一列的宽度为100像素 + ui->tableWidget->verticalHeader()->setParent(nullptr); //隐藏行头 + QTableWidgetItem *item = new QTableWidgetItem("测试数据"); + item->setTextAlignment(Qt::AlignCenter); //文件居中 + ui->tableWidget->setItem(0, 0, item); //设置数据 + + //初始化TableWidget 设置列 + QStringList headers; + headers << "序号" << "设备名称" << "型号规则" << "辅助字段" << "辅助字段"<< "出厂编号" + << "生产厂家" <<"委托方"<<"使用部门"<<"要求检完时间"<<"是否加急"; + ui->tableWidget->setHorizontalHeaderLabels(headers); + + + } void Depar_Task::ShowMessageBox(QString title,QString value) { // 创建一个QMessageBox对象 @@ -38,5 +67,5 @@ } void Depar_Task::Load() { - ShowMessageBox("部门任务页面","部门任务初始化完成"); + //ShowMessageBox("部门任务页面","部门任务初始化完成"); } diff --git a/softwareDirectory/AutoVerScheme/depar_task.h b/softwareDirectory/AutoVerScheme/depar_task.h index 8716faf..110008d 100644 --- a/softwareDirectory/AutoVerScheme/depar_task.h +++ b/softwareDirectory/AutoVerScheme/depar_task.h @@ -3,6 +3,7 @@ #include "InfoBase.h" +#include "QStandardItemModel" namespace Ui { class Depar_Task; @@ -20,9 +21,12 @@ private slots: void initForm(); //初始化界面数据 void ShowMessageBox(QString title,QString value); + //继承父类的Load方法 void Load() override; + private: Ui::Depar_Task *ui; + // QStandardItemModel *model; }; #endif // DEPAR_TASK_H diff --git a/softwareDirectory/AutoVerScheme/depar_task.ui b/softwareDirectory/AutoVerScheme/depar_task.ui index ff3d44f..1a95cc4 100644 --- a/softwareDirectory/AutoVerScheme/depar_task.ui +++ b/softwareDirectory/AutoVerScheme/depar_task.ui @@ -6,7 +6,7 @@ 0 0 - 1184 + 1190 456 @@ -143,7 +143,34 @@ + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + 0 + 30 + + + + Qt::RightToLeft + + + background-color:rgb(3, 58, 152); +color:white; + + 查询 @@ -151,6 +178,20 @@ + + + 0 + 30 + + + + Qt::RightToLeft + + + background-color:rgb(207, 132, 33); +color:white; + + 重置 @@ -168,8 +209,15 @@ + + + - + + + + + diff --git a/softwareDirectory/AutoVerScheme/indexwindow.cpp b/softwareDirectory/AutoVerScheme/indexwindow.cpp index fca900a..cbba812 100644 --- a/softwareDirectory/AutoVerScheme/indexwindow.cpp +++ b/softwareDirectory/AutoVerScheme/indexwindow.cpp @@ -13,11 +13,37 @@ { ui->setupUi(this); this->initForm(); +/* + //主要作用 当页面关闭后 回到indexwindow页面 并 通过~IndexWindow 释放此页面指针所占用内存 + // 假设 ShowDataSyncView 是一个指向 DataSyncView 实例的指针 + // 当 ShowDataSyncView 关闭时,它的 closed() 信号会被发出 + // 连接这个信号到 IndexWindow 的 onNewWindowClosed() 槽函数 + if(ShowDataSyncView) { + //数据同步页面 信号槽 + connect(ShowDataSyncView, &DataSyncView::close, this, &IndexWindow::onNewWindowClosed); + } + if(ShowInfoManageView) { + //信息管理 信号槽 + connect(ShowInfoManageView, &InfoManageView::close, this, &IndexWindow::onNewWindowClosed); + } + */ } IndexWindow::~IndexWindow() { delete ui; + //释放页面内存 + /* + if (ShowDataSyncView) { + ShowDataSyncView->close(); + delete ShowDataSyncView; + } + else if(ShowInfoManageView) + { + ShowInfoManageView->close(); + delete ShowInfoManageView; + } + */ } void IndexWindow::initForm() { @@ -57,6 +83,15 @@ } + +void IndexWindow::onNewWindowClosed() +{ + // 新窗体关闭后,设置 IndexWindow 为活动窗口 + this->activateWindow(); + // 也可以设置焦点到 MainWindow 中的某个控件 + // ui->someWidget->setFocus(); +} + void IndexWindow::showCheckWindow() { CheckWindow *checkWindow = new CheckWindow; @@ -65,6 +100,26 @@ checkWindow->show(); } +//信息管理按钮 +void IndexWindow::on_tb3_clicked() +{ + InfoManageView *ShowInfoManageView = new InfoManageView(); + ShowInfoManageView->setWindowState(Qt::WindowMaximized); + ShowInfoManageView->setWindowModality(Qt::ApplicationModal); + ShowInfoManageView->show(); +} +//数据同步按钮 +void IndexWindow::on_tb6_clicked() +{ + + // 创建新窗体实例并显示 + DataSyncView *ShowDataSyncView = new DataSyncView(); + ShowDataSyncView->setWindowState(Qt::WindowMaximized); + ShowDataSyncView->setWindowModality(Qt::ApplicationModal); + ShowDataSyncView->show(); +} + + void IndexWindow::showCheckMethod() { CheckMethodManage *checkWindow = new CheckMethodManage; diff --git a/softwareDirectory/AutoVerScheme/indexwindow.h b/softwareDirectory/AutoVerScheme/indexwindow.h index a05d802..190b0f1 100644 --- a/softwareDirectory/AutoVerScheme/indexwindow.h +++ b/softwareDirectory/AutoVerScheme/indexwindow.h @@ -2,6 +2,8 @@ #define INDEXWINDOW_H #include +#include "datasyncView.h" +#include "infomanageview.h" namespace Ui { class IndexWindow; @@ -23,8 +25,21 @@ void showVerifyMethod(); + void on_tb3_clicked(); + + void on_tb6_clicked(); + + //页面关闭响应函数 + void onNewWindowClosed(); + + void on_tb1_clicked(); + private: Ui::IndexWindow *ui; + + //数据同步页面 指针 + //DataSyncView *ShowDataSyncView; + //InfoManageView *ShowInfoManageView; }; #endif // INDEXWINDOW_H diff --git a/softwareDirectory/AutoVerScheme/indexwindow.ui b/softwareDirectory/AutoVerScheme/indexwindow.ui index d69a54d..dec7207 100644 --- a/softwareDirectory/AutoVerScheme/indexwindow.ui +++ b/softwareDirectory/AutoVerScheme/indexwindow.ui @@ -189,7 +189,7 @@ - + 0 @@ -236,7 +236,7 @@ - + 0 @@ -270,7 +270,7 @@ - + 0 @@ -310,7 +310,7 @@ - + 0 @@ -357,7 +357,7 @@ - + 0 @@ -423,7 +423,7 @@ - + 0 @@ -521,66 +521,34 @@ - toolButton_4 + tb1 clicked() IndexWindow showCheckWindow() - 214 - 250 + 260 + 276 - 351 - 107 + 666 + 394 - toolButton_6 + tb4 clicked() IndexWindow showCheckMethod() - 249 - 606 + 260 + 598 - 331 - 452 - - - - - toolButton_5 - clicked() - IndexWindow - showVerifyMethod() - - - 706 - 589 - - - 692 - 442 - - - - - toolButton_2 - clicked() - IndexWindow - showVerifyWindow() - - - 758 - 249 - - - 862 - 114 + 666 + 394 diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro index 1280b70..dfb0418 100644 --- a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro @@ -22,6 +22,7 @@ checkmethodmanage.cpp \ checkwindow.cpp \ create_task.cpp \ + datasyncview.cpp \ depar_task.cpp \ indexwindow.cpp \ infomanageview.cpp \ @@ -43,6 +44,7 @@ checkmethodmanage.h \ checkwindow.h \ create_task.h \ + datasyncview.h \ depar_task.h \ indexwindow.h \ infomanageview.h \ @@ -62,6 +64,7 @@ checkmethodmanage.ui \ checkwindow.ui \ create_task.ui \ + datasyncview.ui \ depar_task.ui \ indexwindow.ui \ infomanageview.ui \ diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user index 6ea03c5..93c39cb 100644 --- a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user @@ -1,10 +1,10 @@ - + EnvironmentId - {2746248a-b112-4e0f-9ae0-9e61f2a42309} + {c08df58c-84a7-4965-bca6-e98789474efa} ProjectExplorer.Project.ActiveTarget @@ -71,7 +71,7 @@ 0 0 - D:/dev/QT/AutoCalHainan/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug true @@ -119,7 +119,7 @@ 2 - D:/dev/QT/AutoCalHainan/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Release + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Release true @@ -167,7 +167,7 @@ 0 - D:/dev/QT/AutoCalHainan/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Profile + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Profile true @@ -287,8 +287,8 @@ 2 - Qt4ProjectManager.Qt4RunConfiguration:D:/dev/QT/AutoCalHainan/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro - D:/dev/QT/AutoCalHainan/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro + Qt4ProjectManager.Qt4RunConfiguration:C:/Users/admin/Desktop/SVN/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro + C:/Users/admin/Desktop/SVN/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro false @@ -299,7 +299,7 @@ false true - D:/dev/QT/AutoCalHainan/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug 1 @@ -314,7 +314,7 @@ 0 0 - D:/dev/QT/AutoCalHainan/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Debug + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Debug true @@ -362,7 +362,7 @@ 2 - D:/dev/QT/AutoCalHainan/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Release + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Release true @@ -410,7 +410,7 @@ 0 - D:/dev/QT/AutoCalHainan/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Profile + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Profile true @@ -530,14 +530,15 @@ 2 - - ProjectExplorer.CustomExecutableRunConfiguration - + AutoVerScheme2 + 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 diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user.c08df58 b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user.c08df58 deleted file mode 100644 index 495f95c..0000000 --- a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user.c08df58 +++ /dev/null @@ -1,563 +0,0 @@ - - - - - - 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 32-bit - Desktop Qt 5.14.2 MinGW 32-bit - qt.qt5.5142.win32_mingw73_kit - 0 - 0 - 0 - - D:/Auto_verification_scheme/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 - - - D:/Auto_verification_scheme/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 - - - D:/Auto_verification_scheme/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 - - D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug - - 1 - - - - ProjectExplorer.Project.Target.1 - - 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 - - D:/Auto_verification_scheme/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 - - - D:/Auto_verification_scheme/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 - - - D:/Auto_verification_scheme/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 - - AutoVerScheme2 - 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/InfoBase.h b/softwareDirectory/AutoVerScheme/InfoBase.h index 7fec63e..084cf3f 100644 --- a/softwareDirectory/AutoVerScheme/InfoBase.h +++ b/softwareDirectory/AutoVerScheme/InfoBase.h @@ -2,6 +2,7 @@ #define INFOBASE_H #include +#include "QStandardItemModel" ///信号管理页面的基类 所有信息管理页面都继承于InfoBase /// 便于统一管理 所有子类必须实现Load方法 /// 每次按钮点击切换都会调用Load方法 用于每次页面的数据刷新 @@ -11,6 +12,8 @@ InfoBase(QWidget *parent = nullptr): QWidget(parent){}; // 纯虚函数 virtual void Load()=0; + //QStandardItemModel 的实例。这个模型将用于存储和管理数据。 + QStandardItemModel *model; }; #endif // INFOBASE_H diff --git a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.cpp b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.cpp index 7ac1e87..ffb2bbc 100644 --- a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.cpp +++ b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.cpp @@ -1,14 +1,64 @@ #include "beexamined_deviceitem.h" #include "ui_beexamined_deviceitem.h" +#include "QMessageBox.h" BeExamined_DeviceItem::BeExamined_DeviceItem(QWidget *parent) : - QWidget(parent), + InfoBase(parent), ui(new Ui::BeExamined_DeviceItem) { ui->setupUi(this); + this->initForm(); } BeExamined_DeviceItem::~BeExamined_DeviceItem() { delete ui; } + +void BeExamined_DeviceItem::initForm() +{ + + //tableWidget设置 + //设置控件的边框显示 + ui->tableWidget->setStyleSheet("QHeaderView::section {" + "border: 1px solid rgba(197, 196, 196, 1);" + "border-left:none;" + "border-top:none;" + "background-color:white;" + "}"); + + ui->tableWidget->setRowCount(10); // 设置10行 + ui->tableWidget->setColumnCount(12); // 设置11列 + ui->tableWidget->setColumnWidth(0, 80); // 设置第一列的宽度为100像素 + ui->tableWidget->verticalHeader()->setParent(nullptr); //隐藏行头 + QTableWidgetItem *item = new QTableWidgetItem("测试数据"); + item->setTextAlignment(Qt::AlignCenter); + ui->tableWidget->setItem(0, 0, item); //设置数据 + + //初始化TableWidget 设置列 + QStringList headers; + headers << "序号" << "设备名称" << "型号规则" << "辅助字段" << "出厂编号" + << "生产厂家"<<"所在单位" <<"使用部门"<<"计量标识"<<"检定周期"<<"证书有效期"<<"操作"; + ui->tableWidget->setHorizontalHeaderLabels(headers); + +} +void BeExamined_DeviceItem::ShowMessageBox(QString title,QString value) { + // 创建一个QMessageBox对象 + QMessageBox msgBox; + + // 设置消息框的标题 + msgBox.setWindowTitle(title); + + // 设置消息框的文本内容 + msgBox.setText(value); + + // 设置消息框的标准按钮,这里是“确定”按钮 + msgBox.setStandardButtons(QMessageBox::Ok); + + // 显示消息框 + msgBox.exec(); +} +void BeExamined_DeviceItem::Load() +{ + //ShowMessageBox("被检设备","被检设备初始化完成"); +} diff --git a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.h b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.h index 76b061d..ae46979 100644 --- a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.h +++ b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.h @@ -2,12 +2,13 @@ #define BEEXAMINED_DEVICEITEM_H #include +#include "InfoBase.h" namespace Ui { class BeExamined_DeviceItem; } -class BeExamined_DeviceItem : public QWidget +class BeExamined_DeviceItem : public InfoBase { Q_OBJECT @@ -15,6 +16,11 @@ explicit BeExamined_DeviceItem(QWidget *parent = nullptr); ~BeExamined_DeviceItem(); +private slots: + void initForm(); //初始化界面数据 + void ShowMessageBox(QString title,QString value); + //继承父类的Load方法 + void Load() override; private: Ui::BeExamined_DeviceItem *ui; }; diff --git a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.ui b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.ui index af9f7bf..5a0a3c9 100644 --- a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.ui +++ b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.ui @@ -6,26 +6,236 @@ 0 0 - 400 - 300 + 1291 + 575 Form - - - - 130 - 140 - 89 - 24 - - - - 被检设备管理 - - + + + + + + 0 + 0 + + + + background-color:white; + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 设备名称: + + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 型号规则: + + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 出厂编号: + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 生产厂家: + + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 使用部门: + + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 使用单位: + + + + + + + + + + Qt::Horizontal + + + QSizePolicy::Expanding + + + + 40 + 20 + + + + + + + + Qt::RightToLeft + + + 查询 + + + + + + + Qt::RightToLeft + + + 重置 + + + + + + + + + + background-color:white; + + + + + + + + + + + + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/create_task.cpp b/softwareDirectory/AutoVerScheme/create_task.cpp index 4193efc..9b49a1a 100644 --- a/softwareDirectory/AutoVerScheme/create_task.cpp +++ b/softwareDirectory/AutoVerScheme/create_task.cpp @@ -1,14 +1,61 @@ #include "create_task.h" #include "ui_create_task.h" +#include "QMessageBox" Create_Task::Create_Task(QWidget *parent) : - QWidget(parent), + InfoBase(parent), ui(new Ui::Create_Task) { ui->setupUi(this); + this->initForm(); } Create_Task::~Create_Task() { delete ui; } +void Create_Task::initForm() +{ + //tableWidget设置 + //设置控件的边框显示 + ui->tableWidget->setStyleSheet("QHeaderView::section {" + "border: 1px solid rgba(197, 196, 196, 1);" + "border-left:none;" + "border-top:none;" + "background-color:white;" + "}"); + + ui->tableWidget->setRowCount(10); // 设置10行 + ui->tableWidget->setColumnCount(8); // 设置11列 + ui->tableWidget->setColumnWidth(0, 80); // 设置第一列的宽度为100像素 + ui->tableWidget->verticalHeader()->setParent(nullptr); //隐藏行头 + QTableWidgetItem *item = new QTableWidgetItem("测试数据"); + item->setTextAlignment(Qt::AlignCenter); + ui->tableWidget->setItem(0, 0, item); //设置数据 + + //初始化TableWidget 设置列 + QStringList headers; + headers << "序号" << "任务单编号" << "委托方"<< "使用部门" << "要求检完时间" << "送检人"<<"是否加急"<<"操作"; + ui->tableWidget->setHorizontalHeaderLabels(headers); + //ShowMessageBox("标题","初始化完成"); +} +void Create_Task::ShowMessageBox(QString title,QString value) { + // 创建一个QMessageBox对象 + QMessageBox msgBox; + + // 设置消息框的标题 + msgBox.setWindowTitle(title); + + // 设置消息框的文本内容 + msgBox.setText(value); + + // 设置消息框的标准按钮,这里是“确定”按钮 + msgBox.setStandardButtons(QMessageBox::Ok); + + // 显示消息框 + msgBox.exec(); +} +void Create_Task::Load() +{ + //ShowMessageBox("创建任务界面","创建任务界面初始化完成"); +} diff --git a/softwareDirectory/AutoVerScheme/create_task.h b/softwareDirectory/AutoVerScheme/create_task.h index e2264de..7cf383f 100644 --- a/softwareDirectory/AutoVerScheme/create_task.h +++ b/softwareDirectory/AutoVerScheme/create_task.h @@ -1,13 +1,14 @@ #ifndef CREATE_TASK_H #define CREATE_TASK_H +#include "InfoBase.h" #include namespace Ui { class Create_Task; } -class Create_Task : public QWidget +class Create_Task : public InfoBase { Q_OBJECT @@ -15,6 +16,11 @@ explicit Create_Task(QWidget *parent = nullptr); ~Create_Task(); +private slots: + void initForm(); //初始化界面数据 + void ShowMessageBox(QString title,QString value); + //继承父类的Load方法 + void Load() override; private: Ui::Create_Task *ui; }; diff --git a/softwareDirectory/AutoVerScheme/create_task.ui b/softwareDirectory/AutoVerScheme/create_task.ui index b79c6a1..d9d88ed 100644 --- a/softwareDirectory/AutoVerScheme/create_task.ui +++ b/softwareDirectory/AutoVerScheme/create_task.ui @@ -6,29 +6,294 @@ 0 0 - 400 - 300 + 1184 + 580 Form - - background-color:red; + + Qt::LeftToRight - - - - 140 - 120 - 89 - 24 - - - - 创建任务单 - - + + + + + + + + + 0 + 0 + + + + background-color:white; + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 任务单编号: + + + + + + + + 0 + 0 + + + + + + + + + 0 + 0 + + + + + 50 + 0 + + + + 委托方: + + + + + + + + 0 + 0 + + + + + 0 + 0 + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 使用部门: + + + + + + + + 0 + 0 + + + + + 0 + 0 + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 要求完成时间: + + + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + 0 + 30 + + + + Qt::RightToLeft + + + background-color:rgb(3, 58, 132); +color:white; + + + + 查询 + + + + + + + + 0 + 30 + + + + Qt::RightToLeft + + + background-color:rgb(207, 132, 33); +color:white; + + + + 重置 + + + + + + + + + + background-color:white; + + + + + + + 6 + + + 9 + + + 9 + + + 9 + + + + + + 0 + 0 + + + + + 120 + 40 + + + + OpenHandCursor + + + Qt::DefaultContextMenu + + + Qt::RightToLeft + + + false + + + background-color:rgb(9, 89, 179); +color:white; + + + 创建任务单 + + + true + + + + + + + + + + + + + + SizeVerCursor + + + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/datasyncview.cpp b/softwareDirectory/AutoVerScheme/datasyncview.cpp new file mode 100644 index 0000000..74cd41d --- /dev/null +++ b/softwareDirectory/AutoVerScheme/datasyncview.cpp @@ -0,0 +1,44 @@ +#include "datasyncview.h" +#include "ui_datasyncview.h" + +DataSyncView::DataSyncView(QWidget *parent) : + QWidget(parent), + ui(new Ui::DataSyncView) +{ + ui->setupUi(this); + this->initForm(); +} + +DataSyncView::~DataSyncView() +{ + delete ui; +} +void DataSyncView::initForm() +{ + //tableWidget设置 + //设置控件的边框显示 + ui->tableWidget->setStyleSheet("QHeaderView::section {" + "border: 1px solid grey;" + "border-left:none;" + "border-top:none;" + "background-color:white;" + " color:black;" + "font: bold 18px Arial, sans-serif;" + "}"); + + ui->tableWidget->setRowCount(10); // 设置10行 + ui->tableWidget->setColumnCount(4); // 设置11列 + ui->tableWidget->setColumnWidth(0, 80); // 设置第一列的宽度为100像素 + ui->tableWidget->verticalHeader()->setParent(nullptr); //隐藏行头 + QTableWidgetItem *item = new QTableWidgetItem("测试数据"); + item->setTextAlignment(Qt::AlignCenter); + ui->tableWidget->setItem(0, 0, item); //设置数据 + + //初始化TableWidget 设置列 + QStringList headers; + headers << "序号" << "同步时间" << "是否同步成功" << "备注" ; + ui->tableWidget->setHorizontalHeaderLabels(headers); + + + +} diff --git a/softwareDirectory/AutoVerScheme/datasyncview.h b/softwareDirectory/AutoVerScheme/datasyncview.h new file mode 100644 index 0000000..9a73de9 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/datasyncview.h @@ -0,0 +1,24 @@ +#ifndef DATASYNCVIEW_H +#define DATASYNCVIEW_H + +#include + +namespace Ui { +class DataSyncView; +} + +class DataSyncView : public QWidget +{ + Q_OBJECT + +public: + explicit DataSyncView(QWidget *parent = nullptr); + ~DataSyncView(); +private slots: + void initForm(); //初始化界面数据 + +private: + Ui::DataSyncView *ui; +}; + +#endif // DATASYNCVIEW_H diff --git a/softwareDirectory/AutoVerScheme/datasyncview.ui b/softwareDirectory/AutoVerScheme/datasyncview.ui new file mode 100644 index 0000000..c45bf56 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/datasyncview.ui @@ -0,0 +1,133 @@ + + + DataSyncView + + + + 0 + 0 + 874 + 531 + + + + 数据同步 + + + background-color:rgba(240, 240, 240, 1); + + + + + + background-color:white; + + + + + + + + + + 0 + 0 + + + + background-color:white; +border:0; + + + + + + + + + + 0 + 0 + + + + font:bold 20px Arial, sans-serif; +color:#334582; + + + 同步记录 + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + background-color:#334582; + font: bold 18px Arial, sans-serif; +color:white; +padding:10px; + + + 下载数据 + + + + + + + + 200 + 0 + + + + + 100 + 40 + + + + Qt::RightToLeft + + + background-color:#334582; + font: bold 18px Arial, sans-serif; +color:white; +padding:10px; + + + 发送同步请求 + + + + + + + + + + + + + + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/depar_task.cpp b/softwareDirectory/AutoVerScheme/depar_task.cpp index de39775..5f0f93a 100644 --- a/softwareDirectory/AutoVerScheme/depar_task.cpp +++ b/softwareDirectory/AutoVerScheme/depar_task.cpp @@ -2,13 +2,19 @@ #include "ui_depar_task.h" #include "QMessageBox" #include "InfoBase.h" +#include "QStandardItemModel" Depar_Task::Depar_Task(QWidget *parent) : InfoBase(parent), ui(new Ui::Depar_Task) { ui->setupUi(this); + //初始化列表 this->initForm(); + + + + } Depar_Task::~Depar_Task() @@ -17,8 +23,31 @@ } void Depar_Task::initForm() { + //tableWidget设置 + //设置控件的边框显示 + ui->tableWidget->setStyleSheet("QHeaderView::section {" + "border: 1px solid rgba(197, 196, 196, 1);" + "border-left:none;" + "border-top:none;" + "background-color:white;" + "}"); - //ShowMessageBox("标题","初始化完成"); + ui->tableWidget->setRowCount(10); // 设置10行 + ui->tableWidget->setColumnCount(10); // 设置11列 + ui->tableWidget->setColumnWidth(0, 80); // 设置第一列的宽度为100像素 + ui->tableWidget->verticalHeader()->setParent(nullptr); //隐藏行头 + QTableWidgetItem *item = new QTableWidgetItem("测试数据"); + item->setTextAlignment(Qt::AlignCenter); //文件居中 + ui->tableWidget->setItem(0, 0, item); //设置数据 + + //初始化TableWidget 设置列 + QStringList headers; + headers << "序号" << "设备名称" << "型号规则" << "辅助字段" << "辅助字段"<< "出厂编号" + << "生产厂家" <<"委托方"<<"使用部门"<<"要求检完时间"<<"是否加急"; + ui->tableWidget->setHorizontalHeaderLabels(headers); + + + } void Depar_Task::ShowMessageBox(QString title,QString value) { // 创建一个QMessageBox对象 @@ -38,5 +67,5 @@ } void Depar_Task::Load() { - ShowMessageBox("部门任务页面","部门任务初始化完成"); + //ShowMessageBox("部门任务页面","部门任务初始化完成"); } diff --git a/softwareDirectory/AutoVerScheme/depar_task.h b/softwareDirectory/AutoVerScheme/depar_task.h index 8716faf..110008d 100644 --- a/softwareDirectory/AutoVerScheme/depar_task.h +++ b/softwareDirectory/AutoVerScheme/depar_task.h @@ -3,6 +3,7 @@ #include "InfoBase.h" +#include "QStandardItemModel" namespace Ui { class Depar_Task; @@ -20,9 +21,12 @@ private slots: void initForm(); //初始化界面数据 void ShowMessageBox(QString title,QString value); + //继承父类的Load方法 void Load() override; + private: Ui::Depar_Task *ui; + // QStandardItemModel *model; }; #endif // DEPAR_TASK_H diff --git a/softwareDirectory/AutoVerScheme/depar_task.ui b/softwareDirectory/AutoVerScheme/depar_task.ui index ff3d44f..1a95cc4 100644 --- a/softwareDirectory/AutoVerScheme/depar_task.ui +++ b/softwareDirectory/AutoVerScheme/depar_task.ui @@ -6,7 +6,7 @@ 0 0 - 1184 + 1190 456 @@ -143,7 +143,34 @@ + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + 0 + 30 + + + + Qt::RightToLeft + + + background-color:rgb(3, 58, 152); +color:white; + + 查询 @@ -151,6 +178,20 @@ + + + 0 + 30 + + + + Qt::RightToLeft + + + background-color:rgb(207, 132, 33); +color:white; + + 重置 @@ -168,8 +209,15 @@ + + + - + + + + + diff --git a/softwareDirectory/AutoVerScheme/indexwindow.cpp b/softwareDirectory/AutoVerScheme/indexwindow.cpp index fca900a..cbba812 100644 --- a/softwareDirectory/AutoVerScheme/indexwindow.cpp +++ b/softwareDirectory/AutoVerScheme/indexwindow.cpp @@ -13,11 +13,37 @@ { ui->setupUi(this); this->initForm(); +/* + //主要作用 当页面关闭后 回到indexwindow页面 并 通过~IndexWindow 释放此页面指针所占用内存 + // 假设 ShowDataSyncView 是一个指向 DataSyncView 实例的指针 + // 当 ShowDataSyncView 关闭时,它的 closed() 信号会被发出 + // 连接这个信号到 IndexWindow 的 onNewWindowClosed() 槽函数 + if(ShowDataSyncView) { + //数据同步页面 信号槽 + connect(ShowDataSyncView, &DataSyncView::close, this, &IndexWindow::onNewWindowClosed); + } + if(ShowInfoManageView) { + //信息管理 信号槽 + connect(ShowInfoManageView, &InfoManageView::close, this, &IndexWindow::onNewWindowClosed); + } + */ } IndexWindow::~IndexWindow() { delete ui; + //释放页面内存 + /* + if (ShowDataSyncView) { + ShowDataSyncView->close(); + delete ShowDataSyncView; + } + else if(ShowInfoManageView) + { + ShowInfoManageView->close(); + delete ShowInfoManageView; + } + */ } void IndexWindow::initForm() { @@ -57,6 +83,15 @@ } + +void IndexWindow::onNewWindowClosed() +{ + // 新窗体关闭后,设置 IndexWindow 为活动窗口 + this->activateWindow(); + // 也可以设置焦点到 MainWindow 中的某个控件 + // ui->someWidget->setFocus(); +} + void IndexWindow::showCheckWindow() { CheckWindow *checkWindow = new CheckWindow; @@ -65,6 +100,26 @@ checkWindow->show(); } +//信息管理按钮 +void IndexWindow::on_tb3_clicked() +{ + InfoManageView *ShowInfoManageView = new InfoManageView(); + ShowInfoManageView->setWindowState(Qt::WindowMaximized); + ShowInfoManageView->setWindowModality(Qt::ApplicationModal); + ShowInfoManageView->show(); +} +//数据同步按钮 +void IndexWindow::on_tb6_clicked() +{ + + // 创建新窗体实例并显示 + DataSyncView *ShowDataSyncView = new DataSyncView(); + ShowDataSyncView->setWindowState(Qt::WindowMaximized); + ShowDataSyncView->setWindowModality(Qt::ApplicationModal); + ShowDataSyncView->show(); +} + + void IndexWindow::showCheckMethod() { CheckMethodManage *checkWindow = new CheckMethodManage; diff --git a/softwareDirectory/AutoVerScheme/indexwindow.h b/softwareDirectory/AutoVerScheme/indexwindow.h index a05d802..190b0f1 100644 --- a/softwareDirectory/AutoVerScheme/indexwindow.h +++ b/softwareDirectory/AutoVerScheme/indexwindow.h @@ -2,6 +2,8 @@ #define INDEXWINDOW_H #include +#include "datasyncView.h" +#include "infomanageview.h" namespace Ui { class IndexWindow; @@ -23,8 +25,21 @@ void showVerifyMethod(); + void on_tb3_clicked(); + + void on_tb6_clicked(); + + //页面关闭响应函数 + void onNewWindowClosed(); + + void on_tb1_clicked(); + private: Ui::IndexWindow *ui; + + //数据同步页面 指针 + //DataSyncView *ShowDataSyncView; + //InfoManageView *ShowInfoManageView; }; #endif // INDEXWINDOW_H diff --git a/softwareDirectory/AutoVerScheme/indexwindow.ui b/softwareDirectory/AutoVerScheme/indexwindow.ui index d69a54d..dec7207 100644 --- a/softwareDirectory/AutoVerScheme/indexwindow.ui +++ b/softwareDirectory/AutoVerScheme/indexwindow.ui @@ -189,7 +189,7 @@ - + 0 @@ -236,7 +236,7 @@ - + 0 @@ -270,7 +270,7 @@ - + 0 @@ -310,7 +310,7 @@ - + 0 @@ -357,7 +357,7 @@ - + 0 @@ -423,7 +423,7 @@ - + 0 @@ -521,66 +521,34 @@ - toolButton_4 + tb1 clicked() IndexWindow showCheckWindow() - 214 - 250 + 260 + 276 - 351 - 107 + 666 + 394 - toolButton_6 + tb4 clicked() IndexWindow showCheckMethod() - 249 - 606 + 260 + 598 - 331 - 452 - - - - - toolButton_5 - clicked() - IndexWindow - showVerifyMethod() - - - 706 - 589 - - - 692 - 442 - - - - - toolButton_2 - clicked() - IndexWindow - showVerifyWindow() - - - 758 - 249 - - - 862 - 114 + 666 + 394 diff --git a/softwareDirectory/AutoVerScheme/infomanageview.cpp b/softwareDirectory/AutoVerScheme/infomanageview.cpp index a206c6f..d045c60 100644 --- a/softwareDirectory/AutoVerScheme/infomanageview.cpp +++ b/softwareDirectory/AutoVerScheme/infomanageview.cpp @@ -2,6 +2,7 @@ #include "ui_infomanageview.h" #include #include +#include //子窗体 #include "depar_task.h" #include "my_task.h" @@ -19,6 +20,7 @@ { ui->setupUi(this); this->setWindowTitle("信息管理"); + //初始化调用所有函数 this->initForm(); this->initWidget(); @@ -115,7 +117,8 @@ //底部加个弹簧 QSpacerItem *verticalSpacer = new QSpacerItem(20, 40, QSizePolicy::Minimum, QSizePolicy::Expanding); ui->widgetLeft->layout()->addItem(verticalSpacer); - btns.at(names.count() - 1)->click(); + + btns.at(0)->click();//选择启动页面 第一个 } //按钮点击切换UI事件 void InfoManageView::buttonClicked() diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro index 1280b70..dfb0418 100644 --- a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro @@ -22,6 +22,7 @@ checkmethodmanage.cpp \ checkwindow.cpp \ create_task.cpp \ + datasyncview.cpp \ depar_task.cpp \ indexwindow.cpp \ infomanageview.cpp \ @@ -43,6 +44,7 @@ checkmethodmanage.h \ checkwindow.h \ create_task.h \ + datasyncview.h \ depar_task.h \ indexwindow.h \ infomanageview.h \ @@ -62,6 +64,7 @@ checkmethodmanage.ui \ checkwindow.ui \ create_task.ui \ + datasyncview.ui \ depar_task.ui \ indexwindow.ui \ infomanageview.ui \ diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user index 6ea03c5..93c39cb 100644 --- a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user @@ -1,10 +1,10 @@ - + EnvironmentId - {2746248a-b112-4e0f-9ae0-9e61f2a42309} + {c08df58c-84a7-4965-bca6-e98789474efa} ProjectExplorer.Project.ActiveTarget @@ -71,7 +71,7 @@ 0 0 - D:/dev/QT/AutoCalHainan/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug true @@ -119,7 +119,7 @@ 2 - D:/dev/QT/AutoCalHainan/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Release + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Release true @@ -167,7 +167,7 @@ 0 - D:/dev/QT/AutoCalHainan/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Profile + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Profile true @@ -287,8 +287,8 @@ 2 - Qt4ProjectManager.Qt4RunConfiguration:D:/dev/QT/AutoCalHainan/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro - D:/dev/QT/AutoCalHainan/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro + Qt4ProjectManager.Qt4RunConfiguration:C:/Users/admin/Desktop/SVN/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro + C:/Users/admin/Desktop/SVN/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro false @@ -299,7 +299,7 @@ false true - D:/dev/QT/AutoCalHainan/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug 1 @@ -314,7 +314,7 @@ 0 0 - D:/dev/QT/AutoCalHainan/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Debug + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Debug true @@ -362,7 +362,7 @@ 2 - D:/dev/QT/AutoCalHainan/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Release + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Release true @@ -410,7 +410,7 @@ 0 - D:/dev/QT/AutoCalHainan/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Profile + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Profile true @@ -530,14 +530,15 @@ 2 - - ProjectExplorer.CustomExecutableRunConfiguration - + AutoVerScheme2 + 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 diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user.c08df58 b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user.c08df58 deleted file mode 100644 index 495f95c..0000000 --- a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user.c08df58 +++ /dev/null @@ -1,563 +0,0 @@ - - - - - - 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 32-bit - Desktop Qt 5.14.2 MinGW 32-bit - qt.qt5.5142.win32_mingw73_kit - 0 - 0 - 0 - - D:/Auto_verification_scheme/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 - - - D:/Auto_verification_scheme/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 - - - D:/Auto_verification_scheme/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 - - D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug - - 1 - - - - ProjectExplorer.Project.Target.1 - - 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 - - D:/Auto_verification_scheme/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 - - - D:/Auto_verification_scheme/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 - - - D:/Auto_verification_scheme/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 - - AutoVerScheme2 - 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/InfoBase.h b/softwareDirectory/AutoVerScheme/InfoBase.h index 7fec63e..084cf3f 100644 --- a/softwareDirectory/AutoVerScheme/InfoBase.h +++ b/softwareDirectory/AutoVerScheme/InfoBase.h @@ -2,6 +2,7 @@ #define INFOBASE_H #include +#include "QStandardItemModel" ///信号管理页面的基类 所有信息管理页面都继承于InfoBase /// 便于统一管理 所有子类必须实现Load方法 /// 每次按钮点击切换都会调用Load方法 用于每次页面的数据刷新 @@ -11,6 +12,8 @@ InfoBase(QWidget *parent = nullptr): QWidget(parent){}; // 纯虚函数 virtual void Load()=0; + //QStandardItemModel 的实例。这个模型将用于存储和管理数据。 + QStandardItemModel *model; }; #endif // INFOBASE_H diff --git a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.cpp b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.cpp index 7ac1e87..ffb2bbc 100644 --- a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.cpp +++ b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.cpp @@ -1,14 +1,64 @@ #include "beexamined_deviceitem.h" #include "ui_beexamined_deviceitem.h" +#include "QMessageBox.h" BeExamined_DeviceItem::BeExamined_DeviceItem(QWidget *parent) : - QWidget(parent), + InfoBase(parent), ui(new Ui::BeExamined_DeviceItem) { ui->setupUi(this); + this->initForm(); } BeExamined_DeviceItem::~BeExamined_DeviceItem() { delete ui; } + +void BeExamined_DeviceItem::initForm() +{ + + //tableWidget设置 + //设置控件的边框显示 + ui->tableWidget->setStyleSheet("QHeaderView::section {" + "border: 1px solid rgba(197, 196, 196, 1);" + "border-left:none;" + "border-top:none;" + "background-color:white;" + "}"); + + ui->tableWidget->setRowCount(10); // 设置10行 + ui->tableWidget->setColumnCount(12); // 设置11列 + ui->tableWidget->setColumnWidth(0, 80); // 设置第一列的宽度为100像素 + ui->tableWidget->verticalHeader()->setParent(nullptr); //隐藏行头 + QTableWidgetItem *item = new QTableWidgetItem("测试数据"); + item->setTextAlignment(Qt::AlignCenter); + ui->tableWidget->setItem(0, 0, item); //设置数据 + + //初始化TableWidget 设置列 + QStringList headers; + headers << "序号" << "设备名称" << "型号规则" << "辅助字段" << "出厂编号" + << "生产厂家"<<"所在单位" <<"使用部门"<<"计量标识"<<"检定周期"<<"证书有效期"<<"操作"; + ui->tableWidget->setHorizontalHeaderLabels(headers); + +} +void BeExamined_DeviceItem::ShowMessageBox(QString title,QString value) { + // 创建一个QMessageBox对象 + QMessageBox msgBox; + + // 设置消息框的标题 + msgBox.setWindowTitle(title); + + // 设置消息框的文本内容 + msgBox.setText(value); + + // 设置消息框的标准按钮,这里是“确定”按钮 + msgBox.setStandardButtons(QMessageBox::Ok); + + // 显示消息框 + msgBox.exec(); +} +void BeExamined_DeviceItem::Load() +{ + //ShowMessageBox("被检设备","被检设备初始化完成"); +} diff --git a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.h b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.h index 76b061d..ae46979 100644 --- a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.h +++ b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.h @@ -2,12 +2,13 @@ #define BEEXAMINED_DEVICEITEM_H #include +#include "InfoBase.h" namespace Ui { class BeExamined_DeviceItem; } -class BeExamined_DeviceItem : public QWidget +class BeExamined_DeviceItem : public InfoBase { Q_OBJECT @@ -15,6 +16,11 @@ explicit BeExamined_DeviceItem(QWidget *parent = nullptr); ~BeExamined_DeviceItem(); +private slots: + void initForm(); //初始化界面数据 + void ShowMessageBox(QString title,QString value); + //继承父类的Load方法 + void Load() override; private: Ui::BeExamined_DeviceItem *ui; }; diff --git a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.ui b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.ui index af9f7bf..5a0a3c9 100644 --- a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.ui +++ b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.ui @@ -6,26 +6,236 @@ 0 0 - 400 - 300 + 1291 + 575 Form - - - - 130 - 140 - 89 - 24 - - - - 被检设备管理 - - + + + + + + 0 + 0 + + + + background-color:white; + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 设备名称: + + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 型号规则: + + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 出厂编号: + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 生产厂家: + + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 使用部门: + + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 使用单位: + + + + + + + + + + Qt::Horizontal + + + QSizePolicy::Expanding + + + + 40 + 20 + + + + + + + + Qt::RightToLeft + + + 查询 + + + + + + + Qt::RightToLeft + + + 重置 + + + + + + + + + + background-color:white; + + + + + + + + + + + + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/create_task.cpp b/softwareDirectory/AutoVerScheme/create_task.cpp index 4193efc..9b49a1a 100644 --- a/softwareDirectory/AutoVerScheme/create_task.cpp +++ b/softwareDirectory/AutoVerScheme/create_task.cpp @@ -1,14 +1,61 @@ #include "create_task.h" #include "ui_create_task.h" +#include "QMessageBox" Create_Task::Create_Task(QWidget *parent) : - QWidget(parent), + InfoBase(parent), ui(new Ui::Create_Task) { ui->setupUi(this); + this->initForm(); } Create_Task::~Create_Task() { delete ui; } +void Create_Task::initForm() +{ + //tableWidget设置 + //设置控件的边框显示 + ui->tableWidget->setStyleSheet("QHeaderView::section {" + "border: 1px solid rgba(197, 196, 196, 1);" + "border-left:none;" + "border-top:none;" + "background-color:white;" + "}"); + + ui->tableWidget->setRowCount(10); // 设置10行 + ui->tableWidget->setColumnCount(8); // 设置11列 + ui->tableWidget->setColumnWidth(0, 80); // 设置第一列的宽度为100像素 + ui->tableWidget->verticalHeader()->setParent(nullptr); //隐藏行头 + QTableWidgetItem *item = new QTableWidgetItem("测试数据"); + item->setTextAlignment(Qt::AlignCenter); + ui->tableWidget->setItem(0, 0, item); //设置数据 + + //初始化TableWidget 设置列 + QStringList headers; + headers << "序号" << "任务单编号" << "委托方"<< "使用部门" << "要求检完时间" << "送检人"<<"是否加急"<<"操作"; + ui->tableWidget->setHorizontalHeaderLabels(headers); + //ShowMessageBox("标题","初始化完成"); +} +void Create_Task::ShowMessageBox(QString title,QString value) { + // 创建一个QMessageBox对象 + QMessageBox msgBox; + + // 设置消息框的标题 + msgBox.setWindowTitle(title); + + // 设置消息框的文本内容 + msgBox.setText(value); + + // 设置消息框的标准按钮,这里是“确定”按钮 + msgBox.setStandardButtons(QMessageBox::Ok); + + // 显示消息框 + msgBox.exec(); +} +void Create_Task::Load() +{ + //ShowMessageBox("创建任务界面","创建任务界面初始化完成"); +} diff --git a/softwareDirectory/AutoVerScheme/create_task.h b/softwareDirectory/AutoVerScheme/create_task.h index e2264de..7cf383f 100644 --- a/softwareDirectory/AutoVerScheme/create_task.h +++ b/softwareDirectory/AutoVerScheme/create_task.h @@ -1,13 +1,14 @@ #ifndef CREATE_TASK_H #define CREATE_TASK_H +#include "InfoBase.h" #include namespace Ui { class Create_Task; } -class Create_Task : public QWidget +class Create_Task : public InfoBase { Q_OBJECT @@ -15,6 +16,11 @@ explicit Create_Task(QWidget *parent = nullptr); ~Create_Task(); +private slots: + void initForm(); //初始化界面数据 + void ShowMessageBox(QString title,QString value); + //继承父类的Load方法 + void Load() override; private: Ui::Create_Task *ui; }; diff --git a/softwareDirectory/AutoVerScheme/create_task.ui b/softwareDirectory/AutoVerScheme/create_task.ui index b79c6a1..d9d88ed 100644 --- a/softwareDirectory/AutoVerScheme/create_task.ui +++ b/softwareDirectory/AutoVerScheme/create_task.ui @@ -6,29 +6,294 @@ 0 0 - 400 - 300 + 1184 + 580 Form - - background-color:red; + + Qt::LeftToRight - - - - 140 - 120 - 89 - 24 - - - - 创建任务单 - - + + + + + + + + + 0 + 0 + + + + background-color:white; + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 任务单编号: + + + + + + + + 0 + 0 + + + + + + + + + 0 + 0 + + + + + 50 + 0 + + + + 委托方: + + + + + + + + 0 + 0 + + + + + 0 + 0 + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 使用部门: + + + + + + + + 0 + 0 + + + + + 0 + 0 + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 要求完成时间: + + + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + 0 + 30 + + + + Qt::RightToLeft + + + background-color:rgb(3, 58, 132); +color:white; + + + + 查询 + + + + + + + + 0 + 30 + + + + Qt::RightToLeft + + + background-color:rgb(207, 132, 33); +color:white; + + + + 重置 + + + + + + + + + + background-color:white; + + + + + + + 6 + + + 9 + + + 9 + + + 9 + + + + + + 0 + 0 + + + + + 120 + 40 + + + + OpenHandCursor + + + Qt::DefaultContextMenu + + + Qt::RightToLeft + + + false + + + background-color:rgb(9, 89, 179); +color:white; + + + 创建任务单 + + + true + + + + + + + + + + + + + + SizeVerCursor + + + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/datasyncview.cpp b/softwareDirectory/AutoVerScheme/datasyncview.cpp new file mode 100644 index 0000000..74cd41d --- /dev/null +++ b/softwareDirectory/AutoVerScheme/datasyncview.cpp @@ -0,0 +1,44 @@ +#include "datasyncview.h" +#include "ui_datasyncview.h" + +DataSyncView::DataSyncView(QWidget *parent) : + QWidget(parent), + ui(new Ui::DataSyncView) +{ + ui->setupUi(this); + this->initForm(); +} + +DataSyncView::~DataSyncView() +{ + delete ui; +} +void DataSyncView::initForm() +{ + //tableWidget设置 + //设置控件的边框显示 + ui->tableWidget->setStyleSheet("QHeaderView::section {" + "border: 1px solid grey;" + "border-left:none;" + "border-top:none;" + "background-color:white;" + " color:black;" + "font: bold 18px Arial, sans-serif;" + "}"); + + ui->tableWidget->setRowCount(10); // 设置10行 + ui->tableWidget->setColumnCount(4); // 设置11列 + ui->tableWidget->setColumnWidth(0, 80); // 设置第一列的宽度为100像素 + ui->tableWidget->verticalHeader()->setParent(nullptr); //隐藏行头 + QTableWidgetItem *item = new QTableWidgetItem("测试数据"); + item->setTextAlignment(Qt::AlignCenter); + ui->tableWidget->setItem(0, 0, item); //设置数据 + + //初始化TableWidget 设置列 + QStringList headers; + headers << "序号" << "同步时间" << "是否同步成功" << "备注" ; + ui->tableWidget->setHorizontalHeaderLabels(headers); + + + +} diff --git a/softwareDirectory/AutoVerScheme/datasyncview.h b/softwareDirectory/AutoVerScheme/datasyncview.h new file mode 100644 index 0000000..9a73de9 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/datasyncview.h @@ -0,0 +1,24 @@ +#ifndef DATASYNCVIEW_H +#define DATASYNCVIEW_H + +#include + +namespace Ui { +class DataSyncView; +} + +class DataSyncView : public QWidget +{ + Q_OBJECT + +public: + explicit DataSyncView(QWidget *parent = nullptr); + ~DataSyncView(); +private slots: + void initForm(); //初始化界面数据 + +private: + Ui::DataSyncView *ui; +}; + +#endif // DATASYNCVIEW_H diff --git a/softwareDirectory/AutoVerScheme/datasyncview.ui b/softwareDirectory/AutoVerScheme/datasyncview.ui new file mode 100644 index 0000000..c45bf56 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/datasyncview.ui @@ -0,0 +1,133 @@ + + + DataSyncView + + + + 0 + 0 + 874 + 531 + + + + 数据同步 + + + background-color:rgba(240, 240, 240, 1); + + + + + + background-color:white; + + + + + + + + + + 0 + 0 + + + + background-color:white; +border:0; + + + + + + + + + + 0 + 0 + + + + font:bold 20px Arial, sans-serif; +color:#334582; + + + 同步记录 + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + background-color:#334582; + font: bold 18px Arial, sans-serif; +color:white; +padding:10px; + + + 下载数据 + + + + + + + + 200 + 0 + + + + + 100 + 40 + + + + Qt::RightToLeft + + + background-color:#334582; + font: bold 18px Arial, sans-serif; +color:white; +padding:10px; + + + 发送同步请求 + + + + + + + + + + + + + + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/depar_task.cpp b/softwareDirectory/AutoVerScheme/depar_task.cpp index de39775..5f0f93a 100644 --- a/softwareDirectory/AutoVerScheme/depar_task.cpp +++ b/softwareDirectory/AutoVerScheme/depar_task.cpp @@ -2,13 +2,19 @@ #include "ui_depar_task.h" #include "QMessageBox" #include "InfoBase.h" +#include "QStandardItemModel" Depar_Task::Depar_Task(QWidget *parent) : InfoBase(parent), ui(new Ui::Depar_Task) { ui->setupUi(this); + //初始化列表 this->initForm(); + + + + } Depar_Task::~Depar_Task() @@ -17,8 +23,31 @@ } void Depar_Task::initForm() { + //tableWidget设置 + //设置控件的边框显示 + ui->tableWidget->setStyleSheet("QHeaderView::section {" + "border: 1px solid rgba(197, 196, 196, 1);" + "border-left:none;" + "border-top:none;" + "background-color:white;" + "}"); - //ShowMessageBox("标题","初始化完成"); + ui->tableWidget->setRowCount(10); // 设置10行 + ui->tableWidget->setColumnCount(10); // 设置11列 + ui->tableWidget->setColumnWidth(0, 80); // 设置第一列的宽度为100像素 + ui->tableWidget->verticalHeader()->setParent(nullptr); //隐藏行头 + QTableWidgetItem *item = new QTableWidgetItem("测试数据"); + item->setTextAlignment(Qt::AlignCenter); //文件居中 + ui->tableWidget->setItem(0, 0, item); //设置数据 + + //初始化TableWidget 设置列 + QStringList headers; + headers << "序号" << "设备名称" << "型号规则" << "辅助字段" << "辅助字段"<< "出厂编号" + << "生产厂家" <<"委托方"<<"使用部门"<<"要求检完时间"<<"是否加急"; + ui->tableWidget->setHorizontalHeaderLabels(headers); + + + } void Depar_Task::ShowMessageBox(QString title,QString value) { // 创建一个QMessageBox对象 @@ -38,5 +67,5 @@ } void Depar_Task::Load() { - ShowMessageBox("部门任务页面","部门任务初始化完成"); + //ShowMessageBox("部门任务页面","部门任务初始化完成"); } diff --git a/softwareDirectory/AutoVerScheme/depar_task.h b/softwareDirectory/AutoVerScheme/depar_task.h index 8716faf..110008d 100644 --- a/softwareDirectory/AutoVerScheme/depar_task.h +++ b/softwareDirectory/AutoVerScheme/depar_task.h @@ -3,6 +3,7 @@ #include "InfoBase.h" +#include "QStandardItemModel" namespace Ui { class Depar_Task; @@ -20,9 +21,12 @@ private slots: void initForm(); //初始化界面数据 void ShowMessageBox(QString title,QString value); + //继承父类的Load方法 void Load() override; + private: Ui::Depar_Task *ui; + // QStandardItemModel *model; }; #endif // DEPAR_TASK_H diff --git a/softwareDirectory/AutoVerScheme/depar_task.ui b/softwareDirectory/AutoVerScheme/depar_task.ui index ff3d44f..1a95cc4 100644 --- a/softwareDirectory/AutoVerScheme/depar_task.ui +++ b/softwareDirectory/AutoVerScheme/depar_task.ui @@ -6,7 +6,7 @@ 0 0 - 1184 + 1190 456 @@ -143,7 +143,34 @@ + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + 0 + 30 + + + + Qt::RightToLeft + + + background-color:rgb(3, 58, 152); +color:white; + + 查询 @@ -151,6 +178,20 @@ + + + 0 + 30 + + + + Qt::RightToLeft + + + background-color:rgb(207, 132, 33); +color:white; + + 重置 @@ -168,8 +209,15 @@ + + + - + + + + + diff --git a/softwareDirectory/AutoVerScheme/indexwindow.cpp b/softwareDirectory/AutoVerScheme/indexwindow.cpp index fca900a..cbba812 100644 --- a/softwareDirectory/AutoVerScheme/indexwindow.cpp +++ b/softwareDirectory/AutoVerScheme/indexwindow.cpp @@ -13,11 +13,37 @@ { ui->setupUi(this); this->initForm(); +/* + //主要作用 当页面关闭后 回到indexwindow页面 并 通过~IndexWindow 释放此页面指针所占用内存 + // 假设 ShowDataSyncView 是一个指向 DataSyncView 实例的指针 + // 当 ShowDataSyncView 关闭时,它的 closed() 信号会被发出 + // 连接这个信号到 IndexWindow 的 onNewWindowClosed() 槽函数 + if(ShowDataSyncView) { + //数据同步页面 信号槽 + connect(ShowDataSyncView, &DataSyncView::close, this, &IndexWindow::onNewWindowClosed); + } + if(ShowInfoManageView) { + //信息管理 信号槽 + connect(ShowInfoManageView, &InfoManageView::close, this, &IndexWindow::onNewWindowClosed); + } + */ } IndexWindow::~IndexWindow() { delete ui; + //释放页面内存 + /* + if (ShowDataSyncView) { + ShowDataSyncView->close(); + delete ShowDataSyncView; + } + else if(ShowInfoManageView) + { + ShowInfoManageView->close(); + delete ShowInfoManageView; + } + */ } void IndexWindow::initForm() { @@ -57,6 +83,15 @@ } + +void IndexWindow::onNewWindowClosed() +{ + // 新窗体关闭后,设置 IndexWindow 为活动窗口 + this->activateWindow(); + // 也可以设置焦点到 MainWindow 中的某个控件 + // ui->someWidget->setFocus(); +} + void IndexWindow::showCheckWindow() { CheckWindow *checkWindow = new CheckWindow; @@ -65,6 +100,26 @@ checkWindow->show(); } +//信息管理按钮 +void IndexWindow::on_tb3_clicked() +{ + InfoManageView *ShowInfoManageView = new InfoManageView(); + ShowInfoManageView->setWindowState(Qt::WindowMaximized); + ShowInfoManageView->setWindowModality(Qt::ApplicationModal); + ShowInfoManageView->show(); +} +//数据同步按钮 +void IndexWindow::on_tb6_clicked() +{ + + // 创建新窗体实例并显示 + DataSyncView *ShowDataSyncView = new DataSyncView(); + ShowDataSyncView->setWindowState(Qt::WindowMaximized); + ShowDataSyncView->setWindowModality(Qt::ApplicationModal); + ShowDataSyncView->show(); +} + + void IndexWindow::showCheckMethod() { CheckMethodManage *checkWindow = new CheckMethodManage; diff --git a/softwareDirectory/AutoVerScheme/indexwindow.h b/softwareDirectory/AutoVerScheme/indexwindow.h index a05d802..190b0f1 100644 --- a/softwareDirectory/AutoVerScheme/indexwindow.h +++ b/softwareDirectory/AutoVerScheme/indexwindow.h @@ -2,6 +2,8 @@ #define INDEXWINDOW_H #include +#include "datasyncView.h" +#include "infomanageview.h" namespace Ui { class IndexWindow; @@ -23,8 +25,21 @@ void showVerifyMethod(); + void on_tb3_clicked(); + + void on_tb6_clicked(); + + //页面关闭响应函数 + void onNewWindowClosed(); + + void on_tb1_clicked(); + private: Ui::IndexWindow *ui; + + //数据同步页面 指针 + //DataSyncView *ShowDataSyncView; + //InfoManageView *ShowInfoManageView; }; #endif // INDEXWINDOW_H diff --git a/softwareDirectory/AutoVerScheme/indexwindow.ui b/softwareDirectory/AutoVerScheme/indexwindow.ui index d69a54d..dec7207 100644 --- a/softwareDirectory/AutoVerScheme/indexwindow.ui +++ b/softwareDirectory/AutoVerScheme/indexwindow.ui @@ -189,7 +189,7 @@ - + 0 @@ -236,7 +236,7 @@ - + 0 @@ -270,7 +270,7 @@ - + 0 @@ -310,7 +310,7 @@ - + 0 @@ -357,7 +357,7 @@ - + 0 @@ -423,7 +423,7 @@ - + 0 @@ -521,66 +521,34 @@ - toolButton_4 + tb1 clicked() IndexWindow showCheckWindow() - 214 - 250 + 260 + 276 - 351 - 107 + 666 + 394 - toolButton_6 + tb4 clicked() IndexWindow showCheckMethod() - 249 - 606 + 260 + 598 - 331 - 452 - - - - - toolButton_5 - clicked() - IndexWindow - showVerifyMethod() - - - 706 - 589 - - - 692 - 442 - - - - - toolButton_2 - clicked() - IndexWindow - showVerifyWindow() - - - 758 - 249 - - - 862 - 114 + 666 + 394 diff --git a/softwareDirectory/AutoVerScheme/infomanageview.cpp b/softwareDirectory/AutoVerScheme/infomanageview.cpp index a206c6f..d045c60 100644 --- a/softwareDirectory/AutoVerScheme/infomanageview.cpp +++ b/softwareDirectory/AutoVerScheme/infomanageview.cpp @@ -2,6 +2,7 @@ #include "ui_infomanageview.h" #include #include +#include //子窗体 #include "depar_task.h" #include "my_task.h" @@ -19,6 +20,7 @@ { ui->setupUi(this); this->setWindowTitle("信息管理"); + //初始化调用所有函数 this->initForm(); this->initWidget(); @@ -115,7 +117,8 @@ //底部加个弹簧 QSpacerItem *verticalSpacer = new QSpacerItem(20, 40, QSizePolicy::Minimum, QSizePolicy::Expanding); ui->widgetLeft->layout()->addItem(verticalSpacer); - btns.at(names.count() - 1)->click(); + + btns.at(0)->click();//选择启动页面 第一个 } //按钮点击切换UI事件 void InfoManageView::buttonClicked() diff --git a/softwareDirectory/AutoVerScheme/infomanageview.h b/softwareDirectory/AutoVerScheme/infomanageview.h index 3c1463f..5e44bba 100644 --- a/softwareDirectory/AutoVerScheme/infomanageview.h +++ b/softwareDirectory/AutoVerScheme/infomanageview.h @@ -2,6 +2,7 @@ #define INFOMANAGEVIEW_H #include +#include class QAbstractButton; diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro index 1280b70..dfb0418 100644 --- a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro @@ -22,6 +22,7 @@ checkmethodmanage.cpp \ checkwindow.cpp \ create_task.cpp \ + datasyncview.cpp \ depar_task.cpp \ indexwindow.cpp \ infomanageview.cpp \ @@ -43,6 +44,7 @@ checkmethodmanage.h \ checkwindow.h \ create_task.h \ + datasyncview.h \ depar_task.h \ indexwindow.h \ infomanageview.h \ @@ -62,6 +64,7 @@ checkmethodmanage.ui \ checkwindow.ui \ create_task.ui \ + datasyncview.ui \ depar_task.ui \ indexwindow.ui \ infomanageview.ui \ diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user index 6ea03c5..93c39cb 100644 --- a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user @@ -1,10 +1,10 @@ - + EnvironmentId - {2746248a-b112-4e0f-9ae0-9e61f2a42309} + {c08df58c-84a7-4965-bca6-e98789474efa} ProjectExplorer.Project.ActiveTarget @@ -71,7 +71,7 @@ 0 0 - D:/dev/QT/AutoCalHainan/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug true @@ -119,7 +119,7 @@ 2 - D:/dev/QT/AutoCalHainan/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Release + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Release true @@ -167,7 +167,7 @@ 0 - D:/dev/QT/AutoCalHainan/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Profile + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Profile true @@ -287,8 +287,8 @@ 2 - Qt4ProjectManager.Qt4RunConfiguration:D:/dev/QT/AutoCalHainan/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro - D:/dev/QT/AutoCalHainan/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro + Qt4ProjectManager.Qt4RunConfiguration:C:/Users/admin/Desktop/SVN/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro + C:/Users/admin/Desktop/SVN/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro false @@ -299,7 +299,7 @@ false true - D:/dev/QT/AutoCalHainan/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug 1 @@ -314,7 +314,7 @@ 0 0 - D:/dev/QT/AutoCalHainan/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Debug + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Debug true @@ -362,7 +362,7 @@ 2 - D:/dev/QT/AutoCalHainan/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Release + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Release true @@ -410,7 +410,7 @@ 0 - D:/dev/QT/AutoCalHainan/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Profile + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Profile true @@ -530,14 +530,15 @@ 2 - - ProjectExplorer.CustomExecutableRunConfiguration - + AutoVerScheme2 + 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 diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user.c08df58 b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user.c08df58 deleted file mode 100644 index 495f95c..0000000 --- a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user.c08df58 +++ /dev/null @@ -1,563 +0,0 @@ - - - - - - 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 32-bit - Desktop Qt 5.14.2 MinGW 32-bit - qt.qt5.5142.win32_mingw73_kit - 0 - 0 - 0 - - D:/Auto_verification_scheme/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 - - - D:/Auto_verification_scheme/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 - - - D:/Auto_verification_scheme/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 - - D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug - - 1 - - - - ProjectExplorer.Project.Target.1 - - 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 - - D:/Auto_verification_scheme/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 - - - D:/Auto_verification_scheme/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 - - - D:/Auto_verification_scheme/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 - - AutoVerScheme2 - 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/InfoBase.h b/softwareDirectory/AutoVerScheme/InfoBase.h index 7fec63e..084cf3f 100644 --- a/softwareDirectory/AutoVerScheme/InfoBase.h +++ b/softwareDirectory/AutoVerScheme/InfoBase.h @@ -2,6 +2,7 @@ #define INFOBASE_H #include +#include "QStandardItemModel" ///信号管理页面的基类 所有信息管理页面都继承于InfoBase /// 便于统一管理 所有子类必须实现Load方法 /// 每次按钮点击切换都会调用Load方法 用于每次页面的数据刷新 @@ -11,6 +12,8 @@ InfoBase(QWidget *parent = nullptr): QWidget(parent){}; // 纯虚函数 virtual void Load()=0; + //QStandardItemModel 的实例。这个模型将用于存储和管理数据。 + QStandardItemModel *model; }; #endif // INFOBASE_H diff --git a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.cpp b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.cpp index 7ac1e87..ffb2bbc 100644 --- a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.cpp +++ b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.cpp @@ -1,14 +1,64 @@ #include "beexamined_deviceitem.h" #include "ui_beexamined_deviceitem.h" +#include "QMessageBox.h" BeExamined_DeviceItem::BeExamined_DeviceItem(QWidget *parent) : - QWidget(parent), + InfoBase(parent), ui(new Ui::BeExamined_DeviceItem) { ui->setupUi(this); + this->initForm(); } BeExamined_DeviceItem::~BeExamined_DeviceItem() { delete ui; } + +void BeExamined_DeviceItem::initForm() +{ + + //tableWidget设置 + //设置控件的边框显示 + ui->tableWidget->setStyleSheet("QHeaderView::section {" + "border: 1px solid rgba(197, 196, 196, 1);" + "border-left:none;" + "border-top:none;" + "background-color:white;" + "}"); + + ui->tableWidget->setRowCount(10); // 设置10行 + ui->tableWidget->setColumnCount(12); // 设置11列 + ui->tableWidget->setColumnWidth(0, 80); // 设置第一列的宽度为100像素 + ui->tableWidget->verticalHeader()->setParent(nullptr); //隐藏行头 + QTableWidgetItem *item = new QTableWidgetItem("测试数据"); + item->setTextAlignment(Qt::AlignCenter); + ui->tableWidget->setItem(0, 0, item); //设置数据 + + //初始化TableWidget 设置列 + QStringList headers; + headers << "序号" << "设备名称" << "型号规则" << "辅助字段" << "出厂编号" + << "生产厂家"<<"所在单位" <<"使用部门"<<"计量标识"<<"检定周期"<<"证书有效期"<<"操作"; + ui->tableWidget->setHorizontalHeaderLabels(headers); + +} +void BeExamined_DeviceItem::ShowMessageBox(QString title,QString value) { + // 创建一个QMessageBox对象 + QMessageBox msgBox; + + // 设置消息框的标题 + msgBox.setWindowTitle(title); + + // 设置消息框的文本内容 + msgBox.setText(value); + + // 设置消息框的标准按钮,这里是“确定”按钮 + msgBox.setStandardButtons(QMessageBox::Ok); + + // 显示消息框 + msgBox.exec(); +} +void BeExamined_DeviceItem::Load() +{ + //ShowMessageBox("被检设备","被检设备初始化完成"); +} diff --git a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.h b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.h index 76b061d..ae46979 100644 --- a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.h +++ b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.h @@ -2,12 +2,13 @@ #define BEEXAMINED_DEVICEITEM_H #include +#include "InfoBase.h" namespace Ui { class BeExamined_DeviceItem; } -class BeExamined_DeviceItem : public QWidget +class BeExamined_DeviceItem : public InfoBase { Q_OBJECT @@ -15,6 +16,11 @@ explicit BeExamined_DeviceItem(QWidget *parent = nullptr); ~BeExamined_DeviceItem(); +private slots: + void initForm(); //初始化界面数据 + void ShowMessageBox(QString title,QString value); + //继承父类的Load方法 + void Load() override; private: Ui::BeExamined_DeviceItem *ui; }; diff --git a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.ui b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.ui index af9f7bf..5a0a3c9 100644 --- a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.ui +++ b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.ui @@ -6,26 +6,236 @@ 0 0 - 400 - 300 + 1291 + 575 Form - - - - 130 - 140 - 89 - 24 - - - - 被检设备管理 - - + + + + + + 0 + 0 + + + + background-color:white; + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 设备名称: + + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 型号规则: + + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 出厂编号: + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 生产厂家: + + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 使用部门: + + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 使用单位: + + + + + + + + + + Qt::Horizontal + + + QSizePolicy::Expanding + + + + 40 + 20 + + + + + + + + Qt::RightToLeft + + + 查询 + + + + + + + Qt::RightToLeft + + + 重置 + + + + + + + + + + background-color:white; + + + + + + + + + + + + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/create_task.cpp b/softwareDirectory/AutoVerScheme/create_task.cpp index 4193efc..9b49a1a 100644 --- a/softwareDirectory/AutoVerScheme/create_task.cpp +++ b/softwareDirectory/AutoVerScheme/create_task.cpp @@ -1,14 +1,61 @@ #include "create_task.h" #include "ui_create_task.h" +#include "QMessageBox" Create_Task::Create_Task(QWidget *parent) : - QWidget(parent), + InfoBase(parent), ui(new Ui::Create_Task) { ui->setupUi(this); + this->initForm(); } Create_Task::~Create_Task() { delete ui; } +void Create_Task::initForm() +{ + //tableWidget设置 + //设置控件的边框显示 + ui->tableWidget->setStyleSheet("QHeaderView::section {" + "border: 1px solid rgba(197, 196, 196, 1);" + "border-left:none;" + "border-top:none;" + "background-color:white;" + "}"); + + ui->tableWidget->setRowCount(10); // 设置10行 + ui->tableWidget->setColumnCount(8); // 设置11列 + ui->tableWidget->setColumnWidth(0, 80); // 设置第一列的宽度为100像素 + ui->tableWidget->verticalHeader()->setParent(nullptr); //隐藏行头 + QTableWidgetItem *item = new QTableWidgetItem("测试数据"); + item->setTextAlignment(Qt::AlignCenter); + ui->tableWidget->setItem(0, 0, item); //设置数据 + + //初始化TableWidget 设置列 + QStringList headers; + headers << "序号" << "任务单编号" << "委托方"<< "使用部门" << "要求检完时间" << "送检人"<<"是否加急"<<"操作"; + ui->tableWidget->setHorizontalHeaderLabels(headers); + //ShowMessageBox("标题","初始化完成"); +} +void Create_Task::ShowMessageBox(QString title,QString value) { + // 创建一个QMessageBox对象 + QMessageBox msgBox; + + // 设置消息框的标题 + msgBox.setWindowTitle(title); + + // 设置消息框的文本内容 + msgBox.setText(value); + + // 设置消息框的标准按钮,这里是“确定”按钮 + msgBox.setStandardButtons(QMessageBox::Ok); + + // 显示消息框 + msgBox.exec(); +} +void Create_Task::Load() +{ + //ShowMessageBox("创建任务界面","创建任务界面初始化完成"); +} diff --git a/softwareDirectory/AutoVerScheme/create_task.h b/softwareDirectory/AutoVerScheme/create_task.h index e2264de..7cf383f 100644 --- a/softwareDirectory/AutoVerScheme/create_task.h +++ b/softwareDirectory/AutoVerScheme/create_task.h @@ -1,13 +1,14 @@ #ifndef CREATE_TASK_H #define CREATE_TASK_H +#include "InfoBase.h" #include namespace Ui { class Create_Task; } -class Create_Task : public QWidget +class Create_Task : public InfoBase { Q_OBJECT @@ -15,6 +16,11 @@ explicit Create_Task(QWidget *parent = nullptr); ~Create_Task(); +private slots: + void initForm(); //初始化界面数据 + void ShowMessageBox(QString title,QString value); + //继承父类的Load方法 + void Load() override; private: Ui::Create_Task *ui; }; diff --git a/softwareDirectory/AutoVerScheme/create_task.ui b/softwareDirectory/AutoVerScheme/create_task.ui index b79c6a1..d9d88ed 100644 --- a/softwareDirectory/AutoVerScheme/create_task.ui +++ b/softwareDirectory/AutoVerScheme/create_task.ui @@ -6,29 +6,294 @@ 0 0 - 400 - 300 + 1184 + 580 Form - - background-color:red; + + Qt::LeftToRight - - - - 140 - 120 - 89 - 24 - - - - 创建任务单 - - + + + + + + + + + 0 + 0 + + + + background-color:white; + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 任务单编号: + + + + + + + + 0 + 0 + + + + + + + + + 0 + 0 + + + + + 50 + 0 + + + + 委托方: + + + + + + + + 0 + 0 + + + + + 0 + 0 + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 使用部门: + + + + + + + + 0 + 0 + + + + + 0 + 0 + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 要求完成时间: + + + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + 0 + 30 + + + + Qt::RightToLeft + + + background-color:rgb(3, 58, 132); +color:white; + + + + 查询 + + + + + + + + 0 + 30 + + + + Qt::RightToLeft + + + background-color:rgb(207, 132, 33); +color:white; + + + + 重置 + + + + + + + + + + background-color:white; + + + + + + + 6 + + + 9 + + + 9 + + + 9 + + + + + + 0 + 0 + + + + + 120 + 40 + + + + OpenHandCursor + + + Qt::DefaultContextMenu + + + Qt::RightToLeft + + + false + + + background-color:rgb(9, 89, 179); +color:white; + + + 创建任务单 + + + true + + + + + + + + + + + + + + SizeVerCursor + + + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/datasyncview.cpp b/softwareDirectory/AutoVerScheme/datasyncview.cpp new file mode 100644 index 0000000..74cd41d --- /dev/null +++ b/softwareDirectory/AutoVerScheme/datasyncview.cpp @@ -0,0 +1,44 @@ +#include "datasyncview.h" +#include "ui_datasyncview.h" + +DataSyncView::DataSyncView(QWidget *parent) : + QWidget(parent), + ui(new Ui::DataSyncView) +{ + ui->setupUi(this); + this->initForm(); +} + +DataSyncView::~DataSyncView() +{ + delete ui; +} +void DataSyncView::initForm() +{ + //tableWidget设置 + //设置控件的边框显示 + ui->tableWidget->setStyleSheet("QHeaderView::section {" + "border: 1px solid grey;" + "border-left:none;" + "border-top:none;" + "background-color:white;" + " color:black;" + "font: bold 18px Arial, sans-serif;" + "}"); + + ui->tableWidget->setRowCount(10); // 设置10行 + ui->tableWidget->setColumnCount(4); // 设置11列 + ui->tableWidget->setColumnWidth(0, 80); // 设置第一列的宽度为100像素 + ui->tableWidget->verticalHeader()->setParent(nullptr); //隐藏行头 + QTableWidgetItem *item = new QTableWidgetItem("测试数据"); + item->setTextAlignment(Qt::AlignCenter); + ui->tableWidget->setItem(0, 0, item); //设置数据 + + //初始化TableWidget 设置列 + QStringList headers; + headers << "序号" << "同步时间" << "是否同步成功" << "备注" ; + ui->tableWidget->setHorizontalHeaderLabels(headers); + + + +} diff --git a/softwareDirectory/AutoVerScheme/datasyncview.h b/softwareDirectory/AutoVerScheme/datasyncview.h new file mode 100644 index 0000000..9a73de9 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/datasyncview.h @@ -0,0 +1,24 @@ +#ifndef DATASYNCVIEW_H +#define DATASYNCVIEW_H + +#include + +namespace Ui { +class DataSyncView; +} + +class DataSyncView : public QWidget +{ + Q_OBJECT + +public: + explicit DataSyncView(QWidget *parent = nullptr); + ~DataSyncView(); +private slots: + void initForm(); //初始化界面数据 + +private: + Ui::DataSyncView *ui; +}; + +#endif // DATASYNCVIEW_H diff --git a/softwareDirectory/AutoVerScheme/datasyncview.ui b/softwareDirectory/AutoVerScheme/datasyncview.ui new file mode 100644 index 0000000..c45bf56 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/datasyncview.ui @@ -0,0 +1,133 @@ + + + DataSyncView + + + + 0 + 0 + 874 + 531 + + + + 数据同步 + + + background-color:rgba(240, 240, 240, 1); + + + + + + background-color:white; + + + + + + + + + + 0 + 0 + + + + background-color:white; +border:0; + + + + + + + + + + 0 + 0 + + + + font:bold 20px Arial, sans-serif; +color:#334582; + + + 同步记录 + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + background-color:#334582; + font: bold 18px Arial, sans-serif; +color:white; +padding:10px; + + + 下载数据 + + + + + + + + 200 + 0 + + + + + 100 + 40 + + + + Qt::RightToLeft + + + background-color:#334582; + font: bold 18px Arial, sans-serif; +color:white; +padding:10px; + + + 发送同步请求 + + + + + + + + + + + + + + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/depar_task.cpp b/softwareDirectory/AutoVerScheme/depar_task.cpp index de39775..5f0f93a 100644 --- a/softwareDirectory/AutoVerScheme/depar_task.cpp +++ b/softwareDirectory/AutoVerScheme/depar_task.cpp @@ -2,13 +2,19 @@ #include "ui_depar_task.h" #include "QMessageBox" #include "InfoBase.h" +#include "QStandardItemModel" Depar_Task::Depar_Task(QWidget *parent) : InfoBase(parent), ui(new Ui::Depar_Task) { ui->setupUi(this); + //初始化列表 this->initForm(); + + + + } Depar_Task::~Depar_Task() @@ -17,8 +23,31 @@ } void Depar_Task::initForm() { + //tableWidget设置 + //设置控件的边框显示 + ui->tableWidget->setStyleSheet("QHeaderView::section {" + "border: 1px solid rgba(197, 196, 196, 1);" + "border-left:none;" + "border-top:none;" + "background-color:white;" + "}"); - //ShowMessageBox("标题","初始化完成"); + ui->tableWidget->setRowCount(10); // 设置10行 + ui->tableWidget->setColumnCount(10); // 设置11列 + ui->tableWidget->setColumnWidth(0, 80); // 设置第一列的宽度为100像素 + ui->tableWidget->verticalHeader()->setParent(nullptr); //隐藏行头 + QTableWidgetItem *item = new QTableWidgetItem("测试数据"); + item->setTextAlignment(Qt::AlignCenter); //文件居中 + ui->tableWidget->setItem(0, 0, item); //设置数据 + + //初始化TableWidget 设置列 + QStringList headers; + headers << "序号" << "设备名称" << "型号规则" << "辅助字段" << "辅助字段"<< "出厂编号" + << "生产厂家" <<"委托方"<<"使用部门"<<"要求检完时间"<<"是否加急"; + ui->tableWidget->setHorizontalHeaderLabels(headers); + + + } void Depar_Task::ShowMessageBox(QString title,QString value) { // 创建一个QMessageBox对象 @@ -38,5 +67,5 @@ } void Depar_Task::Load() { - ShowMessageBox("部门任务页面","部门任务初始化完成"); + //ShowMessageBox("部门任务页面","部门任务初始化完成"); } diff --git a/softwareDirectory/AutoVerScheme/depar_task.h b/softwareDirectory/AutoVerScheme/depar_task.h index 8716faf..110008d 100644 --- a/softwareDirectory/AutoVerScheme/depar_task.h +++ b/softwareDirectory/AutoVerScheme/depar_task.h @@ -3,6 +3,7 @@ #include "InfoBase.h" +#include "QStandardItemModel" namespace Ui { class Depar_Task; @@ -20,9 +21,12 @@ private slots: void initForm(); //初始化界面数据 void ShowMessageBox(QString title,QString value); + //继承父类的Load方法 void Load() override; + private: Ui::Depar_Task *ui; + // QStandardItemModel *model; }; #endif // DEPAR_TASK_H diff --git a/softwareDirectory/AutoVerScheme/depar_task.ui b/softwareDirectory/AutoVerScheme/depar_task.ui index ff3d44f..1a95cc4 100644 --- a/softwareDirectory/AutoVerScheme/depar_task.ui +++ b/softwareDirectory/AutoVerScheme/depar_task.ui @@ -6,7 +6,7 @@ 0 0 - 1184 + 1190 456 @@ -143,7 +143,34 @@ + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + 0 + 30 + + + + Qt::RightToLeft + + + background-color:rgb(3, 58, 152); +color:white; + + 查询 @@ -151,6 +178,20 @@ + + + 0 + 30 + + + + Qt::RightToLeft + + + background-color:rgb(207, 132, 33); +color:white; + + 重置 @@ -168,8 +209,15 @@ + + + - + + + + + diff --git a/softwareDirectory/AutoVerScheme/indexwindow.cpp b/softwareDirectory/AutoVerScheme/indexwindow.cpp index fca900a..cbba812 100644 --- a/softwareDirectory/AutoVerScheme/indexwindow.cpp +++ b/softwareDirectory/AutoVerScheme/indexwindow.cpp @@ -13,11 +13,37 @@ { ui->setupUi(this); this->initForm(); +/* + //主要作用 当页面关闭后 回到indexwindow页面 并 通过~IndexWindow 释放此页面指针所占用内存 + // 假设 ShowDataSyncView 是一个指向 DataSyncView 实例的指针 + // 当 ShowDataSyncView 关闭时,它的 closed() 信号会被发出 + // 连接这个信号到 IndexWindow 的 onNewWindowClosed() 槽函数 + if(ShowDataSyncView) { + //数据同步页面 信号槽 + connect(ShowDataSyncView, &DataSyncView::close, this, &IndexWindow::onNewWindowClosed); + } + if(ShowInfoManageView) { + //信息管理 信号槽 + connect(ShowInfoManageView, &InfoManageView::close, this, &IndexWindow::onNewWindowClosed); + } + */ } IndexWindow::~IndexWindow() { delete ui; + //释放页面内存 + /* + if (ShowDataSyncView) { + ShowDataSyncView->close(); + delete ShowDataSyncView; + } + else if(ShowInfoManageView) + { + ShowInfoManageView->close(); + delete ShowInfoManageView; + } + */ } void IndexWindow::initForm() { @@ -57,6 +83,15 @@ } + +void IndexWindow::onNewWindowClosed() +{ + // 新窗体关闭后,设置 IndexWindow 为活动窗口 + this->activateWindow(); + // 也可以设置焦点到 MainWindow 中的某个控件 + // ui->someWidget->setFocus(); +} + void IndexWindow::showCheckWindow() { CheckWindow *checkWindow = new CheckWindow; @@ -65,6 +100,26 @@ checkWindow->show(); } +//信息管理按钮 +void IndexWindow::on_tb3_clicked() +{ + InfoManageView *ShowInfoManageView = new InfoManageView(); + ShowInfoManageView->setWindowState(Qt::WindowMaximized); + ShowInfoManageView->setWindowModality(Qt::ApplicationModal); + ShowInfoManageView->show(); +} +//数据同步按钮 +void IndexWindow::on_tb6_clicked() +{ + + // 创建新窗体实例并显示 + DataSyncView *ShowDataSyncView = new DataSyncView(); + ShowDataSyncView->setWindowState(Qt::WindowMaximized); + ShowDataSyncView->setWindowModality(Qt::ApplicationModal); + ShowDataSyncView->show(); +} + + void IndexWindow::showCheckMethod() { CheckMethodManage *checkWindow = new CheckMethodManage; diff --git a/softwareDirectory/AutoVerScheme/indexwindow.h b/softwareDirectory/AutoVerScheme/indexwindow.h index a05d802..190b0f1 100644 --- a/softwareDirectory/AutoVerScheme/indexwindow.h +++ b/softwareDirectory/AutoVerScheme/indexwindow.h @@ -2,6 +2,8 @@ #define INDEXWINDOW_H #include +#include "datasyncView.h" +#include "infomanageview.h" namespace Ui { class IndexWindow; @@ -23,8 +25,21 @@ void showVerifyMethod(); + void on_tb3_clicked(); + + void on_tb6_clicked(); + + //页面关闭响应函数 + void onNewWindowClosed(); + + void on_tb1_clicked(); + private: Ui::IndexWindow *ui; + + //数据同步页面 指针 + //DataSyncView *ShowDataSyncView; + //InfoManageView *ShowInfoManageView; }; #endif // INDEXWINDOW_H diff --git a/softwareDirectory/AutoVerScheme/indexwindow.ui b/softwareDirectory/AutoVerScheme/indexwindow.ui index d69a54d..dec7207 100644 --- a/softwareDirectory/AutoVerScheme/indexwindow.ui +++ b/softwareDirectory/AutoVerScheme/indexwindow.ui @@ -189,7 +189,7 @@ - + 0 @@ -236,7 +236,7 @@ - + 0 @@ -270,7 +270,7 @@ - + 0 @@ -310,7 +310,7 @@ - + 0 @@ -357,7 +357,7 @@ - + 0 @@ -423,7 +423,7 @@ - + 0 @@ -521,66 +521,34 @@ - toolButton_4 + tb1 clicked() IndexWindow showCheckWindow() - 214 - 250 + 260 + 276 - 351 - 107 + 666 + 394 - toolButton_6 + tb4 clicked() IndexWindow showCheckMethod() - 249 - 606 + 260 + 598 - 331 - 452 - - - - - toolButton_5 - clicked() - IndexWindow - showVerifyMethod() - - - 706 - 589 - - - 692 - 442 - - - - - toolButton_2 - clicked() - IndexWindow - showVerifyWindow() - - - 758 - 249 - - - 862 - 114 + 666 + 394 diff --git a/softwareDirectory/AutoVerScheme/infomanageview.cpp b/softwareDirectory/AutoVerScheme/infomanageview.cpp index a206c6f..d045c60 100644 --- a/softwareDirectory/AutoVerScheme/infomanageview.cpp +++ b/softwareDirectory/AutoVerScheme/infomanageview.cpp @@ -2,6 +2,7 @@ #include "ui_infomanageview.h" #include #include +#include //子窗体 #include "depar_task.h" #include "my_task.h" @@ -19,6 +20,7 @@ { ui->setupUi(this); this->setWindowTitle("信息管理"); + //初始化调用所有函数 this->initForm(); this->initWidget(); @@ -115,7 +117,8 @@ //底部加个弹簧 QSpacerItem *verticalSpacer = new QSpacerItem(20, 40, QSizePolicy::Minimum, QSizePolicy::Expanding); ui->widgetLeft->layout()->addItem(verticalSpacer); - btns.at(names.count() - 1)->click(); + + btns.at(0)->click();//选择启动页面 第一个 } //按钮点击切换UI事件 void InfoManageView::buttonClicked() diff --git a/softwareDirectory/AutoVerScheme/infomanageview.h b/softwareDirectory/AutoVerScheme/infomanageview.h index 3c1463f..5e44bba 100644 --- a/softwareDirectory/AutoVerScheme/infomanageview.h +++ b/softwareDirectory/AutoVerScheme/infomanageview.h @@ -2,6 +2,7 @@ #define INFOMANAGEVIEW_H #include +#include class QAbstractButton; diff --git a/softwareDirectory/AutoVerScheme/infomanageview.ui b/softwareDirectory/AutoVerScheme/infomanageview.ui index 4b39e7d..ef0b87b 100644 --- a/softwareDirectory/AutoVerScheme/infomanageview.ui +++ b/softwareDirectory/AutoVerScheme/infomanageview.ui @@ -10,8 +10,15 @@ 644 + + Qt::DefaultContextMenu + - Form + 信息管理 + + + color:black; +background-color:rgba(240, 240, 240, 1); @@ -68,8 +75,8 @@ - - 170 + + 0 0 diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro index 1280b70..dfb0418 100644 --- a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro @@ -22,6 +22,7 @@ checkmethodmanage.cpp \ checkwindow.cpp \ create_task.cpp \ + datasyncview.cpp \ depar_task.cpp \ indexwindow.cpp \ infomanageview.cpp \ @@ -43,6 +44,7 @@ checkmethodmanage.h \ checkwindow.h \ create_task.h \ + datasyncview.h \ depar_task.h \ indexwindow.h \ infomanageview.h \ @@ -62,6 +64,7 @@ checkmethodmanage.ui \ checkwindow.ui \ create_task.ui \ + datasyncview.ui \ depar_task.ui \ indexwindow.ui \ infomanageview.ui \ diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user index 6ea03c5..93c39cb 100644 --- a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user @@ -1,10 +1,10 @@ - + EnvironmentId - {2746248a-b112-4e0f-9ae0-9e61f2a42309} + {c08df58c-84a7-4965-bca6-e98789474efa} ProjectExplorer.Project.ActiveTarget @@ -71,7 +71,7 @@ 0 0 - D:/dev/QT/AutoCalHainan/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug true @@ -119,7 +119,7 @@ 2 - D:/dev/QT/AutoCalHainan/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Release + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Release true @@ -167,7 +167,7 @@ 0 - D:/dev/QT/AutoCalHainan/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Profile + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Profile true @@ -287,8 +287,8 @@ 2 - Qt4ProjectManager.Qt4RunConfiguration:D:/dev/QT/AutoCalHainan/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro - D:/dev/QT/AutoCalHainan/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro + Qt4ProjectManager.Qt4RunConfiguration:C:/Users/admin/Desktop/SVN/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro + C:/Users/admin/Desktop/SVN/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro false @@ -299,7 +299,7 @@ false true - D:/dev/QT/AutoCalHainan/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug 1 @@ -314,7 +314,7 @@ 0 0 - D:/dev/QT/AutoCalHainan/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Debug + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Debug true @@ -362,7 +362,7 @@ 2 - D:/dev/QT/AutoCalHainan/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Release + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Release true @@ -410,7 +410,7 @@ 0 - D:/dev/QT/AutoCalHainan/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Profile + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Profile true @@ -530,14 +530,15 @@ 2 - - ProjectExplorer.CustomExecutableRunConfiguration - + AutoVerScheme2 + 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 diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user.c08df58 b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user.c08df58 deleted file mode 100644 index 495f95c..0000000 --- a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user.c08df58 +++ /dev/null @@ -1,563 +0,0 @@ - - - - - - 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 32-bit - Desktop Qt 5.14.2 MinGW 32-bit - qt.qt5.5142.win32_mingw73_kit - 0 - 0 - 0 - - D:/Auto_verification_scheme/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 - - - D:/Auto_verification_scheme/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 - - - D:/Auto_verification_scheme/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 - - D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug - - 1 - - - - ProjectExplorer.Project.Target.1 - - 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 - - D:/Auto_verification_scheme/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 - - - D:/Auto_verification_scheme/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 - - - D:/Auto_verification_scheme/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 - - AutoVerScheme2 - 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/InfoBase.h b/softwareDirectory/AutoVerScheme/InfoBase.h index 7fec63e..084cf3f 100644 --- a/softwareDirectory/AutoVerScheme/InfoBase.h +++ b/softwareDirectory/AutoVerScheme/InfoBase.h @@ -2,6 +2,7 @@ #define INFOBASE_H #include +#include "QStandardItemModel" ///信号管理页面的基类 所有信息管理页面都继承于InfoBase /// 便于统一管理 所有子类必须实现Load方法 /// 每次按钮点击切换都会调用Load方法 用于每次页面的数据刷新 @@ -11,6 +12,8 @@ InfoBase(QWidget *parent = nullptr): QWidget(parent){}; // 纯虚函数 virtual void Load()=0; + //QStandardItemModel 的实例。这个模型将用于存储和管理数据。 + QStandardItemModel *model; }; #endif // INFOBASE_H diff --git a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.cpp b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.cpp index 7ac1e87..ffb2bbc 100644 --- a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.cpp +++ b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.cpp @@ -1,14 +1,64 @@ #include "beexamined_deviceitem.h" #include "ui_beexamined_deviceitem.h" +#include "QMessageBox.h" BeExamined_DeviceItem::BeExamined_DeviceItem(QWidget *parent) : - QWidget(parent), + InfoBase(parent), ui(new Ui::BeExamined_DeviceItem) { ui->setupUi(this); + this->initForm(); } BeExamined_DeviceItem::~BeExamined_DeviceItem() { delete ui; } + +void BeExamined_DeviceItem::initForm() +{ + + //tableWidget设置 + //设置控件的边框显示 + ui->tableWidget->setStyleSheet("QHeaderView::section {" + "border: 1px solid rgba(197, 196, 196, 1);" + "border-left:none;" + "border-top:none;" + "background-color:white;" + "}"); + + ui->tableWidget->setRowCount(10); // 设置10行 + ui->tableWidget->setColumnCount(12); // 设置11列 + ui->tableWidget->setColumnWidth(0, 80); // 设置第一列的宽度为100像素 + ui->tableWidget->verticalHeader()->setParent(nullptr); //隐藏行头 + QTableWidgetItem *item = new QTableWidgetItem("测试数据"); + item->setTextAlignment(Qt::AlignCenter); + ui->tableWidget->setItem(0, 0, item); //设置数据 + + //初始化TableWidget 设置列 + QStringList headers; + headers << "序号" << "设备名称" << "型号规则" << "辅助字段" << "出厂编号" + << "生产厂家"<<"所在单位" <<"使用部门"<<"计量标识"<<"检定周期"<<"证书有效期"<<"操作"; + ui->tableWidget->setHorizontalHeaderLabels(headers); + +} +void BeExamined_DeviceItem::ShowMessageBox(QString title,QString value) { + // 创建一个QMessageBox对象 + QMessageBox msgBox; + + // 设置消息框的标题 + msgBox.setWindowTitle(title); + + // 设置消息框的文本内容 + msgBox.setText(value); + + // 设置消息框的标准按钮,这里是“确定”按钮 + msgBox.setStandardButtons(QMessageBox::Ok); + + // 显示消息框 + msgBox.exec(); +} +void BeExamined_DeviceItem::Load() +{ + //ShowMessageBox("被检设备","被检设备初始化完成"); +} diff --git a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.h b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.h index 76b061d..ae46979 100644 --- a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.h +++ b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.h @@ -2,12 +2,13 @@ #define BEEXAMINED_DEVICEITEM_H #include +#include "InfoBase.h" namespace Ui { class BeExamined_DeviceItem; } -class BeExamined_DeviceItem : public QWidget +class BeExamined_DeviceItem : public InfoBase { Q_OBJECT @@ -15,6 +16,11 @@ explicit BeExamined_DeviceItem(QWidget *parent = nullptr); ~BeExamined_DeviceItem(); +private slots: + void initForm(); //初始化界面数据 + void ShowMessageBox(QString title,QString value); + //继承父类的Load方法 + void Load() override; private: Ui::BeExamined_DeviceItem *ui; }; diff --git a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.ui b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.ui index af9f7bf..5a0a3c9 100644 --- a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.ui +++ b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.ui @@ -6,26 +6,236 @@ 0 0 - 400 - 300 + 1291 + 575 Form - - - - 130 - 140 - 89 - 24 - - - - 被检设备管理 - - + + + + + + 0 + 0 + + + + background-color:white; + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 设备名称: + + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 型号规则: + + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 出厂编号: + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 生产厂家: + + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 使用部门: + + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 使用单位: + + + + + + + + + + Qt::Horizontal + + + QSizePolicy::Expanding + + + + 40 + 20 + + + + + + + + Qt::RightToLeft + + + 查询 + + + + + + + Qt::RightToLeft + + + 重置 + + + + + + + + + + background-color:white; + + + + + + + + + + + + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/create_task.cpp b/softwareDirectory/AutoVerScheme/create_task.cpp index 4193efc..9b49a1a 100644 --- a/softwareDirectory/AutoVerScheme/create_task.cpp +++ b/softwareDirectory/AutoVerScheme/create_task.cpp @@ -1,14 +1,61 @@ #include "create_task.h" #include "ui_create_task.h" +#include "QMessageBox" Create_Task::Create_Task(QWidget *parent) : - QWidget(parent), + InfoBase(parent), ui(new Ui::Create_Task) { ui->setupUi(this); + this->initForm(); } Create_Task::~Create_Task() { delete ui; } +void Create_Task::initForm() +{ + //tableWidget设置 + //设置控件的边框显示 + ui->tableWidget->setStyleSheet("QHeaderView::section {" + "border: 1px solid rgba(197, 196, 196, 1);" + "border-left:none;" + "border-top:none;" + "background-color:white;" + "}"); + + ui->tableWidget->setRowCount(10); // 设置10行 + ui->tableWidget->setColumnCount(8); // 设置11列 + ui->tableWidget->setColumnWidth(0, 80); // 设置第一列的宽度为100像素 + ui->tableWidget->verticalHeader()->setParent(nullptr); //隐藏行头 + QTableWidgetItem *item = new QTableWidgetItem("测试数据"); + item->setTextAlignment(Qt::AlignCenter); + ui->tableWidget->setItem(0, 0, item); //设置数据 + + //初始化TableWidget 设置列 + QStringList headers; + headers << "序号" << "任务单编号" << "委托方"<< "使用部门" << "要求检完时间" << "送检人"<<"是否加急"<<"操作"; + ui->tableWidget->setHorizontalHeaderLabels(headers); + //ShowMessageBox("标题","初始化完成"); +} +void Create_Task::ShowMessageBox(QString title,QString value) { + // 创建一个QMessageBox对象 + QMessageBox msgBox; + + // 设置消息框的标题 + msgBox.setWindowTitle(title); + + // 设置消息框的文本内容 + msgBox.setText(value); + + // 设置消息框的标准按钮,这里是“确定”按钮 + msgBox.setStandardButtons(QMessageBox::Ok); + + // 显示消息框 + msgBox.exec(); +} +void Create_Task::Load() +{ + //ShowMessageBox("创建任务界面","创建任务界面初始化完成"); +} diff --git a/softwareDirectory/AutoVerScheme/create_task.h b/softwareDirectory/AutoVerScheme/create_task.h index e2264de..7cf383f 100644 --- a/softwareDirectory/AutoVerScheme/create_task.h +++ b/softwareDirectory/AutoVerScheme/create_task.h @@ -1,13 +1,14 @@ #ifndef CREATE_TASK_H #define CREATE_TASK_H +#include "InfoBase.h" #include namespace Ui { class Create_Task; } -class Create_Task : public QWidget +class Create_Task : public InfoBase { Q_OBJECT @@ -15,6 +16,11 @@ explicit Create_Task(QWidget *parent = nullptr); ~Create_Task(); +private slots: + void initForm(); //初始化界面数据 + void ShowMessageBox(QString title,QString value); + //继承父类的Load方法 + void Load() override; private: Ui::Create_Task *ui; }; diff --git a/softwareDirectory/AutoVerScheme/create_task.ui b/softwareDirectory/AutoVerScheme/create_task.ui index b79c6a1..d9d88ed 100644 --- a/softwareDirectory/AutoVerScheme/create_task.ui +++ b/softwareDirectory/AutoVerScheme/create_task.ui @@ -6,29 +6,294 @@ 0 0 - 400 - 300 + 1184 + 580 Form - - background-color:red; + + Qt::LeftToRight - - - - 140 - 120 - 89 - 24 - - - - 创建任务单 - - + + + + + + + + + 0 + 0 + + + + background-color:white; + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 任务单编号: + + + + + + + + 0 + 0 + + + + + + + + + 0 + 0 + + + + + 50 + 0 + + + + 委托方: + + + + + + + + 0 + 0 + + + + + 0 + 0 + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 使用部门: + + + + + + + + 0 + 0 + + + + + 0 + 0 + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 要求完成时间: + + + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + 0 + 30 + + + + Qt::RightToLeft + + + background-color:rgb(3, 58, 132); +color:white; + + + + 查询 + + + + + + + + 0 + 30 + + + + Qt::RightToLeft + + + background-color:rgb(207, 132, 33); +color:white; + + + + 重置 + + + + + + + + + + background-color:white; + + + + + + + 6 + + + 9 + + + 9 + + + 9 + + + + + + 0 + 0 + + + + + 120 + 40 + + + + OpenHandCursor + + + Qt::DefaultContextMenu + + + Qt::RightToLeft + + + false + + + background-color:rgb(9, 89, 179); +color:white; + + + 创建任务单 + + + true + + + + + + + + + + + + + + SizeVerCursor + + + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/datasyncview.cpp b/softwareDirectory/AutoVerScheme/datasyncview.cpp new file mode 100644 index 0000000..74cd41d --- /dev/null +++ b/softwareDirectory/AutoVerScheme/datasyncview.cpp @@ -0,0 +1,44 @@ +#include "datasyncview.h" +#include "ui_datasyncview.h" + +DataSyncView::DataSyncView(QWidget *parent) : + QWidget(parent), + ui(new Ui::DataSyncView) +{ + ui->setupUi(this); + this->initForm(); +} + +DataSyncView::~DataSyncView() +{ + delete ui; +} +void DataSyncView::initForm() +{ + //tableWidget设置 + //设置控件的边框显示 + ui->tableWidget->setStyleSheet("QHeaderView::section {" + "border: 1px solid grey;" + "border-left:none;" + "border-top:none;" + "background-color:white;" + " color:black;" + "font: bold 18px Arial, sans-serif;" + "}"); + + ui->tableWidget->setRowCount(10); // 设置10行 + ui->tableWidget->setColumnCount(4); // 设置11列 + ui->tableWidget->setColumnWidth(0, 80); // 设置第一列的宽度为100像素 + ui->tableWidget->verticalHeader()->setParent(nullptr); //隐藏行头 + QTableWidgetItem *item = new QTableWidgetItem("测试数据"); + item->setTextAlignment(Qt::AlignCenter); + ui->tableWidget->setItem(0, 0, item); //设置数据 + + //初始化TableWidget 设置列 + QStringList headers; + headers << "序号" << "同步时间" << "是否同步成功" << "备注" ; + ui->tableWidget->setHorizontalHeaderLabels(headers); + + + +} diff --git a/softwareDirectory/AutoVerScheme/datasyncview.h b/softwareDirectory/AutoVerScheme/datasyncview.h new file mode 100644 index 0000000..9a73de9 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/datasyncview.h @@ -0,0 +1,24 @@ +#ifndef DATASYNCVIEW_H +#define DATASYNCVIEW_H + +#include + +namespace Ui { +class DataSyncView; +} + +class DataSyncView : public QWidget +{ + Q_OBJECT + +public: + explicit DataSyncView(QWidget *parent = nullptr); + ~DataSyncView(); +private slots: + void initForm(); //初始化界面数据 + +private: + Ui::DataSyncView *ui; +}; + +#endif // DATASYNCVIEW_H diff --git a/softwareDirectory/AutoVerScheme/datasyncview.ui b/softwareDirectory/AutoVerScheme/datasyncview.ui new file mode 100644 index 0000000..c45bf56 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/datasyncview.ui @@ -0,0 +1,133 @@ + + + DataSyncView + + + + 0 + 0 + 874 + 531 + + + + 数据同步 + + + background-color:rgba(240, 240, 240, 1); + + + + + + background-color:white; + + + + + + + + + + 0 + 0 + + + + background-color:white; +border:0; + + + + + + + + + + 0 + 0 + + + + font:bold 20px Arial, sans-serif; +color:#334582; + + + 同步记录 + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + background-color:#334582; + font: bold 18px Arial, sans-serif; +color:white; +padding:10px; + + + 下载数据 + + + + + + + + 200 + 0 + + + + + 100 + 40 + + + + Qt::RightToLeft + + + background-color:#334582; + font: bold 18px Arial, sans-serif; +color:white; +padding:10px; + + + 发送同步请求 + + + + + + + + + + + + + + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/depar_task.cpp b/softwareDirectory/AutoVerScheme/depar_task.cpp index de39775..5f0f93a 100644 --- a/softwareDirectory/AutoVerScheme/depar_task.cpp +++ b/softwareDirectory/AutoVerScheme/depar_task.cpp @@ -2,13 +2,19 @@ #include "ui_depar_task.h" #include "QMessageBox" #include "InfoBase.h" +#include "QStandardItemModel" Depar_Task::Depar_Task(QWidget *parent) : InfoBase(parent), ui(new Ui::Depar_Task) { ui->setupUi(this); + //初始化列表 this->initForm(); + + + + } Depar_Task::~Depar_Task() @@ -17,8 +23,31 @@ } void Depar_Task::initForm() { + //tableWidget设置 + //设置控件的边框显示 + ui->tableWidget->setStyleSheet("QHeaderView::section {" + "border: 1px solid rgba(197, 196, 196, 1);" + "border-left:none;" + "border-top:none;" + "background-color:white;" + "}"); - //ShowMessageBox("标题","初始化完成"); + ui->tableWidget->setRowCount(10); // 设置10行 + ui->tableWidget->setColumnCount(10); // 设置11列 + ui->tableWidget->setColumnWidth(0, 80); // 设置第一列的宽度为100像素 + ui->tableWidget->verticalHeader()->setParent(nullptr); //隐藏行头 + QTableWidgetItem *item = new QTableWidgetItem("测试数据"); + item->setTextAlignment(Qt::AlignCenter); //文件居中 + ui->tableWidget->setItem(0, 0, item); //设置数据 + + //初始化TableWidget 设置列 + QStringList headers; + headers << "序号" << "设备名称" << "型号规则" << "辅助字段" << "辅助字段"<< "出厂编号" + << "生产厂家" <<"委托方"<<"使用部门"<<"要求检完时间"<<"是否加急"; + ui->tableWidget->setHorizontalHeaderLabels(headers); + + + } void Depar_Task::ShowMessageBox(QString title,QString value) { // 创建一个QMessageBox对象 @@ -38,5 +67,5 @@ } void Depar_Task::Load() { - ShowMessageBox("部门任务页面","部门任务初始化完成"); + //ShowMessageBox("部门任务页面","部门任务初始化完成"); } diff --git a/softwareDirectory/AutoVerScheme/depar_task.h b/softwareDirectory/AutoVerScheme/depar_task.h index 8716faf..110008d 100644 --- a/softwareDirectory/AutoVerScheme/depar_task.h +++ b/softwareDirectory/AutoVerScheme/depar_task.h @@ -3,6 +3,7 @@ #include "InfoBase.h" +#include "QStandardItemModel" namespace Ui { class Depar_Task; @@ -20,9 +21,12 @@ private slots: void initForm(); //初始化界面数据 void ShowMessageBox(QString title,QString value); + //继承父类的Load方法 void Load() override; + private: Ui::Depar_Task *ui; + // QStandardItemModel *model; }; #endif // DEPAR_TASK_H diff --git a/softwareDirectory/AutoVerScheme/depar_task.ui b/softwareDirectory/AutoVerScheme/depar_task.ui index ff3d44f..1a95cc4 100644 --- a/softwareDirectory/AutoVerScheme/depar_task.ui +++ b/softwareDirectory/AutoVerScheme/depar_task.ui @@ -6,7 +6,7 @@ 0 0 - 1184 + 1190 456 @@ -143,7 +143,34 @@ + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + 0 + 30 + + + + Qt::RightToLeft + + + background-color:rgb(3, 58, 152); +color:white; + + 查询 @@ -151,6 +178,20 @@ + + + 0 + 30 + + + + Qt::RightToLeft + + + background-color:rgb(207, 132, 33); +color:white; + + 重置 @@ -168,8 +209,15 @@ + + + - + + + + + diff --git a/softwareDirectory/AutoVerScheme/indexwindow.cpp b/softwareDirectory/AutoVerScheme/indexwindow.cpp index fca900a..cbba812 100644 --- a/softwareDirectory/AutoVerScheme/indexwindow.cpp +++ b/softwareDirectory/AutoVerScheme/indexwindow.cpp @@ -13,11 +13,37 @@ { ui->setupUi(this); this->initForm(); +/* + //主要作用 当页面关闭后 回到indexwindow页面 并 通过~IndexWindow 释放此页面指针所占用内存 + // 假设 ShowDataSyncView 是一个指向 DataSyncView 实例的指针 + // 当 ShowDataSyncView 关闭时,它的 closed() 信号会被发出 + // 连接这个信号到 IndexWindow 的 onNewWindowClosed() 槽函数 + if(ShowDataSyncView) { + //数据同步页面 信号槽 + connect(ShowDataSyncView, &DataSyncView::close, this, &IndexWindow::onNewWindowClosed); + } + if(ShowInfoManageView) { + //信息管理 信号槽 + connect(ShowInfoManageView, &InfoManageView::close, this, &IndexWindow::onNewWindowClosed); + } + */ } IndexWindow::~IndexWindow() { delete ui; + //释放页面内存 + /* + if (ShowDataSyncView) { + ShowDataSyncView->close(); + delete ShowDataSyncView; + } + else if(ShowInfoManageView) + { + ShowInfoManageView->close(); + delete ShowInfoManageView; + } + */ } void IndexWindow::initForm() { @@ -57,6 +83,15 @@ } + +void IndexWindow::onNewWindowClosed() +{ + // 新窗体关闭后,设置 IndexWindow 为活动窗口 + this->activateWindow(); + // 也可以设置焦点到 MainWindow 中的某个控件 + // ui->someWidget->setFocus(); +} + void IndexWindow::showCheckWindow() { CheckWindow *checkWindow = new CheckWindow; @@ -65,6 +100,26 @@ checkWindow->show(); } +//信息管理按钮 +void IndexWindow::on_tb3_clicked() +{ + InfoManageView *ShowInfoManageView = new InfoManageView(); + ShowInfoManageView->setWindowState(Qt::WindowMaximized); + ShowInfoManageView->setWindowModality(Qt::ApplicationModal); + ShowInfoManageView->show(); +} +//数据同步按钮 +void IndexWindow::on_tb6_clicked() +{ + + // 创建新窗体实例并显示 + DataSyncView *ShowDataSyncView = new DataSyncView(); + ShowDataSyncView->setWindowState(Qt::WindowMaximized); + ShowDataSyncView->setWindowModality(Qt::ApplicationModal); + ShowDataSyncView->show(); +} + + void IndexWindow::showCheckMethod() { CheckMethodManage *checkWindow = new CheckMethodManage; diff --git a/softwareDirectory/AutoVerScheme/indexwindow.h b/softwareDirectory/AutoVerScheme/indexwindow.h index a05d802..190b0f1 100644 --- a/softwareDirectory/AutoVerScheme/indexwindow.h +++ b/softwareDirectory/AutoVerScheme/indexwindow.h @@ -2,6 +2,8 @@ #define INDEXWINDOW_H #include +#include "datasyncView.h" +#include "infomanageview.h" namespace Ui { class IndexWindow; @@ -23,8 +25,21 @@ void showVerifyMethod(); + void on_tb3_clicked(); + + void on_tb6_clicked(); + + //页面关闭响应函数 + void onNewWindowClosed(); + + void on_tb1_clicked(); + private: Ui::IndexWindow *ui; + + //数据同步页面 指针 + //DataSyncView *ShowDataSyncView; + //InfoManageView *ShowInfoManageView; }; #endif // INDEXWINDOW_H diff --git a/softwareDirectory/AutoVerScheme/indexwindow.ui b/softwareDirectory/AutoVerScheme/indexwindow.ui index d69a54d..dec7207 100644 --- a/softwareDirectory/AutoVerScheme/indexwindow.ui +++ b/softwareDirectory/AutoVerScheme/indexwindow.ui @@ -189,7 +189,7 @@ - + 0 @@ -236,7 +236,7 @@ - + 0 @@ -270,7 +270,7 @@ - + 0 @@ -310,7 +310,7 @@ - + 0 @@ -357,7 +357,7 @@ - + 0 @@ -423,7 +423,7 @@ - + 0 @@ -521,66 +521,34 @@ - toolButton_4 + tb1 clicked() IndexWindow showCheckWindow() - 214 - 250 + 260 + 276 - 351 - 107 + 666 + 394 - toolButton_6 + tb4 clicked() IndexWindow showCheckMethod() - 249 - 606 + 260 + 598 - 331 - 452 - - - - - toolButton_5 - clicked() - IndexWindow - showVerifyMethod() - - - 706 - 589 - - - 692 - 442 - - - - - toolButton_2 - clicked() - IndexWindow - showVerifyWindow() - - - 758 - 249 - - - 862 - 114 + 666 + 394 diff --git a/softwareDirectory/AutoVerScheme/infomanageview.cpp b/softwareDirectory/AutoVerScheme/infomanageview.cpp index a206c6f..d045c60 100644 --- a/softwareDirectory/AutoVerScheme/infomanageview.cpp +++ b/softwareDirectory/AutoVerScheme/infomanageview.cpp @@ -2,6 +2,7 @@ #include "ui_infomanageview.h" #include #include +#include //子窗体 #include "depar_task.h" #include "my_task.h" @@ -19,6 +20,7 @@ { ui->setupUi(this); this->setWindowTitle("信息管理"); + //初始化调用所有函数 this->initForm(); this->initWidget(); @@ -115,7 +117,8 @@ //底部加个弹簧 QSpacerItem *verticalSpacer = new QSpacerItem(20, 40, QSizePolicy::Minimum, QSizePolicy::Expanding); ui->widgetLeft->layout()->addItem(verticalSpacer); - btns.at(names.count() - 1)->click(); + + btns.at(0)->click();//选择启动页面 第一个 } //按钮点击切换UI事件 void InfoManageView::buttonClicked() diff --git a/softwareDirectory/AutoVerScheme/infomanageview.h b/softwareDirectory/AutoVerScheme/infomanageview.h index 3c1463f..5e44bba 100644 --- a/softwareDirectory/AutoVerScheme/infomanageview.h +++ b/softwareDirectory/AutoVerScheme/infomanageview.h @@ -2,6 +2,7 @@ #define INFOMANAGEVIEW_H #include +#include class QAbstractButton; diff --git a/softwareDirectory/AutoVerScheme/infomanageview.ui b/softwareDirectory/AutoVerScheme/infomanageview.ui index 4b39e7d..ef0b87b 100644 --- a/softwareDirectory/AutoVerScheme/infomanageview.ui +++ b/softwareDirectory/AutoVerScheme/infomanageview.ui @@ -10,8 +10,15 @@ 644 + + Qt::DefaultContextMenu + - Form + 信息管理 + + + color:black; +background-color:rgba(240, 240, 240, 1); @@ -68,8 +75,8 @@ - - 170 + + 0 0 diff --git a/softwareDirectory/AutoVerScheme/inspectdataitem.cpp b/softwareDirectory/AutoVerScheme/inspectdataitem.cpp index e9c2adc..efc00ba 100644 --- a/softwareDirectory/AutoVerScheme/inspectdataitem.cpp +++ b/softwareDirectory/AutoVerScheme/inspectdataitem.cpp @@ -1,14 +1,62 @@ #include "inspectdataitem.h" #include "ui_inspectdataitem.h" +#include "QMessageBox.h" InspectDataItem::InspectDataItem(QWidget *parent) : - QWidget(parent), + InfoBase(parent), ui(new Ui::InspectDataItem) { ui->setupUi(this); + this->initForm(); } InspectDataItem::~InspectDataItem() { delete ui; } +void InspectDataItem::initForm() +{ + //tableWidget设置 + //设置控件的边框显示 + ui->tableWidget->setStyleSheet("QHeaderView::section {" + "border: 1px solid rgba(197, 196, 196, 1);" + "border-left:none;" + "border-top:none;" + "background-color:white;" + "}"); + + ui->tableWidget->setRowCount(10); // 设置10行 + ui->tableWidget->setColumnCount(12); // 设置11列 + ui->tableWidget->setColumnWidth(0, 80); // 设置第一列的宽度为100像素 + ui->tableWidget->verticalHeader()->setParent(nullptr); //隐藏行头 + QTableWidgetItem *item = new QTableWidgetItem("测试数据"); + item->setTextAlignment(Qt::AlignCenter); + ui->tableWidget->setItem(0, 0, item); //设置数据 + + //初始化TableWidget 设置列 + QStringList headers; + headers << "序号" << "设备名称" << "型号规则" << "出厂编号" + <<"核查件名称"<<"核查件型号"<<"核查件编号" <<"核查员" + << "核查日期" <<"实验室"<<"部门"<<"操作"; + ui->tableWidget->setHorizontalHeaderLabels(headers); +} +void InspectDataItem::ShowMessageBox(QString title,QString value) { + // 创建一个QMessageBox对象 + QMessageBox msgBox; + + // 设置消息框的标题 + msgBox.setWindowTitle(title); + + // 设置消息框的文本内容 + msgBox.setText(value); + + // 设置消息框的标准按钮,这里是“确定”按钮 + msgBox.setStandardButtons(QMessageBox::Ok); + + // 显示消息框 + msgBox.exec(); +} +void InspectDataItem::Load() +{ + //ShowMessageBox("核查数据","核查数据"); +} diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro index 1280b70..dfb0418 100644 --- a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro @@ -22,6 +22,7 @@ checkmethodmanage.cpp \ checkwindow.cpp \ create_task.cpp \ + datasyncview.cpp \ depar_task.cpp \ indexwindow.cpp \ infomanageview.cpp \ @@ -43,6 +44,7 @@ checkmethodmanage.h \ checkwindow.h \ create_task.h \ + datasyncview.h \ depar_task.h \ indexwindow.h \ infomanageview.h \ @@ -62,6 +64,7 @@ checkmethodmanage.ui \ checkwindow.ui \ create_task.ui \ + datasyncview.ui \ depar_task.ui \ indexwindow.ui \ infomanageview.ui \ diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user index 6ea03c5..93c39cb 100644 --- a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user @@ -1,10 +1,10 @@ - + EnvironmentId - {2746248a-b112-4e0f-9ae0-9e61f2a42309} + {c08df58c-84a7-4965-bca6-e98789474efa} ProjectExplorer.Project.ActiveTarget @@ -71,7 +71,7 @@ 0 0 - D:/dev/QT/AutoCalHainan/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug true @@ -119,7 +119,7 @@ 2 - D:/dev/QT/AutoCalHainan/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Release + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Release true @@ -167,7 +167,7 @@ 0 - D:/dev/QT/AutoCalHainan/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Profile + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Profile true @@ -287,8 +287,8 @@ 2 - Qt4ProjectManager.Qt4RunConfiguration:D:/dev/QT/AutoCalHainan/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro - D:/dev/QT/AutoCalHainan/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro + Qt4ProjectManager.Qt4RunConfiguration:C:/Users/admin/Desktop/SVN/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro + C:/Users/admin/Desktop/SVN/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro false @@ -299,7 +299,7 @@ false true - D:/dev/QT/AutoCalHainan/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug 1 @@ -314,7 +314,7 @@ 0 0 - D:/dev/QT/AutoCalHainan/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Debug + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Debug true @@ -362,7 +362,7 @@ 2 - D:/dev/QT/AutoCalHainan/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Release + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Release true @@ -410,7 +410,7 @@ 0 - D:/dev/QT/AutoCalHainan/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Profile + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Profile true @@ -530,14 +530,15 @@ 2 - - ProjectExplorer.CustomExecutableRunConfiguration - + AutoVerScheme2 + 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 diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user.c08df58 b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user.c08df58 deleted file mode 100644 index 495f95c..0000000 --- a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user.c08df58 +++ /dev/null @@ -1,563 +0,0 @@ - - - - - - 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 32-bit - Desktop Qt 5.14.2 MinGW 32-bit - qt.qt5.5142.win32_mingw73_kit - 0 - 0 - 0 - - D:/Auto_verification_scheme/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 - - - D:/Auto_verification_scheme/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 - - - D:/Auto_verification_scheme/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 - - D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug - - 1 - - - - ProjectExplorer.Project.Target.1 - - 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 - - D:/Auto_verification_scheme/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 - - - D:/Auto_verification_scheme/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 - - - D:/Auto_verification_scheme/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 - - AutoVerScheme2 - 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/InfoBase.h b/softwareDirectory/AutoVerScheme/InfoBase.h index 7fec63e..084cf3f 100644 --- a/softwareDirectory/AutoVerScheme/InfoBase.h +++ b/softwareDirectory/AutoVerScheme/InfoBase.h @@ -2,6 +2,7 @@ #define INFOBASE_H #include +#include "QStandardItemModel" ///信号管理页面的基类 所有信息管理页面都继承于InfoBase /// 便于统一管理 所有子类必须实现Load方法 /// 每次按钮点击切换都会调用Load方法 用于每次页面的数据刷新 @@ -11,6 +12,8 @@ InfoBase(QWidget *parent = nullptr): QWidget(parent){}; // 纯虚函数 virtual void Load()=0; + //QStandardItemModel 的实例。这个模型将用于存储和管理数据。 + QStandardItemModel *model; }; #endif // INFOBASE_H diff --git a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.cpp b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.cpp index 7ac1e87..ffb2bbc 100644 --- a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.cpp +++ b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.cpp @@ -1,14 +1,64 @@ #include "beexamined_deviceitem.h" #include "ui_beexamined_deviceitem.h" +#include "QMessageBox.h" BeExamined_DeviceItem::BeExamined_DeviceItem(QWidget *parent) : - QWidget(parent), + InfoBase(parent), ui(new Ui::BeExamined_DeviceItem) { ui->setupUi(this); + this->initForm(); } BeExamined_DeviceItem::~BeExamined_DeviceItem() { delete ui; } + +void BeExamined_DeviceItem::initForm() +{ + + //tableWidget设置 + //设置控件的边框显示 + ui->tableWidget->setStyleSheet("QHeaderView::section {" + "border: 1px solid rgba(197, 196, 196, 1);" + "border-left:none;" + "border-top:none;" + "background-color:white;" + "}"); + + ui->tableWidget->setRowCount(10); // 设置10行 + ui->tableWidget->setColumnCount(12); // 设置11列 + ui->tableWidget->setColumnWidth(0, 80); // 设置第一列的宽度为100像素 + ui->tableWidget->verticalHeader()->setParent(nullptr); //隐藏行头 + QTableWidgetItem *item = new QTableWidgetItem("测试数据"); + item->setTextAlignment(Qt::AlignCenter); + ui->tableWidget->setItem(0, 0, item); //设置数据 + + //初始化TableWidget 设置列 + QStringList headers; + headers << "序号" << "设备名称" << "型号规则" << "辅助字段" << "出厂编号" + << "生产厂家"<<"所在单位" <<"使用部门"<<"计量标识"<<"检定周期"<<"证书有效期"<<"操作"; + ui->tableWidget->setHorizontalHeaderLabels(headers); + +} +void BeExamined_DeviceItem::ShowMessageBox(QString title,QString value) { + // 创建一个QMessageBox对象 + QMessageBox msgBox; + + // 设置消息框的标题 + msgBox.setWindowTitle(title); + + // 设置消息框的文本内容 + msgBox.setText(value); + + // 设置消息框的标准按钮,这里是“确定”按钮 + msgBox.setStandardButtons(QMessageBox::Ok); + + // 显示消息框 + msgBox.exec(); +} +void BeExamined_DeviceItem::Load() +{ + //ShowMessageBox("被检设备","被检设备初始化完成"); +} diff --git a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.h b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.h index 76b061d..ae46979 100644 --- a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.h +++ b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.h @@ -2,12 +2,13 @@ #define BEEXAMINED_DEVICEITEM_H #include +#include "InfoBase.h" namespace Ui { class BeExamined_DeviceItem; } -class BeExamined_DeviceItem : public QWidget +class BeExamined_DeviceItem : public InfoBase { Q_OBJECT @@ -15,6 +16,11 @@ explicit BeExamined_DeviceItem(QWidget *parent = nullptr); ~BeExamined_DeviceItem(); +private slots: + void initForm(); //初始化界面数据 + void ShowMessageBox(QString title,QString value); + //继承父类的Load方法 + void Load() override; private: Ui::BeExamined_DeviceItem *ui; }; diff --git a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.ui b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.ui index af9f7bf..5a0a3c9 100644 --- a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.ui +++ b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.ui @@ -6,26 +6,236 @@ 0 0 - 400 - 300 + 1291 + 575 Form - - - - 130 - 140 - 89 - 24 - - - - 被检设备管理 - - + + + + + + 0 + 0 + + + + background-color:white; + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 设备名称: + + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 型号规则: + + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 出厂编号: + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 生产厂家: + + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 使用部门: + + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 使用单位: + + + + + + + + + + Qt::Horizontal + + + QSizePolicy::Expanding + + + + 40 + 20 + + + + + + + + Qt::RightToLeft + + + 查询 + + + + + + + Qt::RightToLeft + + + 重置 + + + + + + + + + + background-color:white; + + + + + + + + + + + + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/create_task.cpp b/softwareDirectory/AutoVerScheme/create_task.cpp index 4193efc..9b49a1a 100644 --- a/softwareDirectory/AutoVerScheme/create_task.cpp +++ b/softwareDirectory/AutoVerScheme/create_task.cpp @@ -1,14 +1,61 @@ #include "create_task.h" #include "ui_create_task.h" +#include "QMessageBox" Create_Task::Create_Task(QWidget *parent) : - QWidget(parent), + InfoBase(parent), ui(new Ui::Create_Task) { ui->setupUi(this); + this->initForm(); } Create_Task::~Create_Task() { delete ui; } +void Create_Task::initForm() +{ + //tableWidget设置 + //设置控件的边框显示 + ui->tableWidget->setStyleSheet("QHeaderView::section {" + "border: 1px solid rgba(197, 196, 196, 1);" + "border-left:none;" + "border-top:none;" + "background-color:white;" + "}"); + + ui->tableWidget->setRowCount(10); // 设置10行 + ui->tableWidget->setColumnCount(8); // 设置11列 + ui->tableWidget->setColumnWidth(0, 80); // 设置第一列的宽度为100像素 + ui->tableWidget->verticalHeader()->setParent(nullptr); //隐藏行头 + QTableWidgetItem *item = new QTableWidgetItem("测试数据"); + item->setTextAlignment(Qt::AlignCenter); + ui->tableWidget->setItem(0, 0, item); //设置数据 + + //初始化TableWidget 设置列 + QStringList headers; + headers << "序号" << "任务单编号" << "委托方"<< "使用部门" << "要求检完时间" << "送检人"<<"是否加急"<<"操作"; + ui->tableWidget->setHorizontalHeaderLabels(headers); + //ShowMessageBox("标题","初始化完成"); +} +void Create_Task::ShowMessageBox(QString title,QString value) { + // 创建一个QMessageBox对象 + QMessageBox msgBox; + + // 设置消息框的标题 + msgBox.setWindowTitle(title); + + // 设置消息框的文本内容 + msgBox.setText(value); + + // 设置消息框的标准按钮,这里是“确定”按钮 + msgBox.setStandardButtons(QMessageBox::Ok); + + // 显示消息框 + msgBox.exec(); +} +void Create_Task::Load() +{ + //ShowMessageBox("创建任务界面","创建任务界面初始化完成"); +} diff --git a/softwareDirectory/AutoVerScheme/create_task.h b/softwareDirectory/AutoVerScheme/create_task.h index e2264de..7cf383f 100644 --- a/softwareDirectory/AutoVerScheme/create_task.h +++ b/softwareDirectory/AutoVerScheme/create_task.h @@ -1,13 +1,14 @@ #ifndef CREATE_TASK_H #define CREATE_TASK_H +#include "InfoBase.h" #include namespace Ui { class Create_Task; } -class Create_Task : public QWidget +class Create_Task : public InfoBase { Q_OBJECT @@ -15,6 +16,11 @@ explicit Create_Task(QWidget *parent = nullptr); ~Create_Task(); +private slots: + void initForm(); //初始化界面数据 + void ShowMessageBox(QString title,QString value); + //继承父类的Load方法 + void Load() override; private: Ui::Create_Task *ui; }; diff --git a/softwareDirectory/AutoVerScheme/create_task.ui b/softwareDirectory/AutoVerScheme/create_task.ui index b79c6a1..d9d88ed 100644 --- a/softwareDirectory/AutoVerScheme/create_task.ui +++ b/softwareDirectory/AutoVerScheme/create_task.ui @@ -6,29 +6,294 @@ 0 0 - 400 - 300 + 1184 + 580 Form - - background-color:red; + + Qt::LeftToRight - - - - 140 - 120 - 89 - 24 - - - - 创建任务单 - - + + + + + + + + + 0 + 0 + + + + background-color:white; + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 任务单编号: + + + + + + + + 0 + 0 + + + + + + + + + 0 + 0 + + + + + 50 + 0 + + + + 委托方: + + + + + + + + 0 + 0 + + + + + 0 + 0 + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 使用部门: + + + + + + + + 0 + 0 + + + + + 0 + 0 + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 要求完成时间: + + + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + 0 + 30 + + + + Qt::RightToLeft + + + background-color:rgb(3, 58, 132); +color:white; + + + + 查询 + + + + + + + + 0 + 30 + + + + Qt::RightToLeft + + + background-color:rgb(207, 132, 33); +color:white; + + + + 重置 + + + + + + + + + + background-color:white; + + + + + + + 6 + + + 9 + + + 9 + + + 9 + + + + + + 0 + 0 + + + + + 120 + 40 + + + + OpenHandCursor + + + Qt::DefaultContextMenu + + + Qt::RightToLeft + + + false + + + background-color:rgb(9, 89, 179); +color:white; + + + 创建任务单 + + + true + + + + + + + + + + + + + + SizeVerCursor + + + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/datasyncview.cpp b/softwareDirectory/AutoVerScheme/datasyncview.cpp new file mode 100644 index 0000000..74cd41d --- /dev/null +++ b/softwareDirectory/AutoVerScheme/datasyncview.cpp @@ -0,0 +1,44 @@ +#include "datasyncview.h" +#include "ui_datasyncview.h" + +DataSyncView::DataSyncView(QWidget *parent) : + QWidget(parent), + ui(new Ui::DataSyncView) +{ + ui->setupUi(this); + this->initForm(); +} + +DataSyncView::~DataSyncView() +{ + delete ui; +} +void DataSyncView::initForm() +{ + //tableWidget设置 + //设置控件的边框显示 + ui->tableWidget->setStyleSheet("QHeaderView::section {" + "border: 1px solid grey;" + "border-left:none;" + "border-top:none;" + "background-color:white;" + " color:black;" + "font: bold 18px Arial, sans-serif;" + "}"); + + ui->tableWidget->setRowCount(10); // 设置10行 + ui->tableWidget->setColumnCount(4); // 设置11列 + ui->tableWidget->setColumnWidth(0, 80); // 设置第一列的宽度为100像素 + ui->tableWidget->verticalHeader()->setParent(nullptr); //隐藏行头 + QTableWidgetItem *item = new QTableWidgetItem("测试数据"); + item->setTextAlignment(Qt::AlignCenter); + ui->tableWidget->setItem(0, 0, item); //设置数据 + + //初始化TableWidget 设置列 + QStringList headers; + headers << "序号" << "同步时间" << "是否同步成功" << "备注" ; + ui->tableWidget->setHorizontalHeaderLabels(headers); + + + +} diff --git a/softwareDirectory/AutoVerScheme/datasyncview.h b/softwareDirectory/AutoVerScheme/datasyncview.h new file mode 100644 index 0000000..9a73de9 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/datasyncview.h @@ -0,0 +1,24 @@ +#ifndef DATASYNCVIEW_H +#define DATASYNCVIEW_H + +#include + +namespace Ui { +class DataSyncView; +} + +class DataSyncView : public QWidget +{ + Q_OBJECT + +public: + explicit DataSyncView(QWidget *parent = nullptr); + ~DataSyncView(); +private slots: + void initForm(); //初始化界面数据 + +private: + Ui::DataSyncView *ui; +}; + +#endif // DATASYNCVIEW_H diff --git a/softwareDirectory/AutoVerScheme/datasyncview.ui b/softwareDirectory/AutoVerScheme/datasyncview.ui new file mode 100644 index 0000000..c45bf56 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/datasyncview.ui @@ -0,0 +1,133 @@ + + + DataSyncView + + + + 0 + 0 + 874 + 531 + + + + 数据同步 + + + background-color:rgba(240, 240, 240, 1); + + + + + + background-color:white; + + + + + + + + + + 0 + 0 + + + + background-color:white; +border:0; + + + + + + + + + + 0 + 0 + + + + font:bold 20px Arial, sans-serif; +color:#334582; + + + 同步记录 + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + background-color:#334582; + font: bold 18px Arial, sans-serif; +color:white; +padding:10px; + + + 下载数据 + + + + + + + + 200 + 0 + + + + + 100 + 40 + + + + Qt::RightToLeft + + + background-color:#334582; + font: bold 18px Arial, sans-serif; +color:white; +padding:10px; + + + 发送同步请求 + + + + + + + + + + + + + + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/depar_task.cpp b/softwareDirectory/AutoVerScheme/depar_task.cpp index de39775..5f0f93a 100644 --- a/softwareDirectory/AutoVerScheme/depar_task.cpp +++ b/softwareDirectory/AutoVerScheme/depar_task.cpp @@ -2,13 +2,19 @@ #include "ui_depar_task.h" #include "QMessageBox" #include "InfoBase.h" +#include "QStandardItemModel" Depar_Task::Depar_Task(QWidget *parent) : InfoBase(parent), ui(new Ui::Depar_Task) { ui->setupUi(this); + //初始化列表 this->initForm(); + + + + } Depar_Task::~Depar_Task() @@ -17,8 +23,31 @@ } void Depar_Task::initForm() { + //tableWidget设置 + //设置控件的边框显示 + ui->tableWidget->setStyleSheet("QHeaderView::section {" + "border: 1px solid rgba(197, 196, 196, 1);" + "border-left:none;" + "border-top:none;" + "background-color:white;" + "}"); - //ShowMessageBox("标题","初始化完成"); + ui->tableWidget->setRowCount(10); // 设置10行 + ui->tableWidget->setColumnCount(10); // 设置11列 + ui->tableWidget->setColumnWidth(0, 80); // 设置第一列的宽度为100像素 + ui->tableWidget->verticalHeader()->setParent(nullptr); //隐藏行头 + QTableWidgetItem *item = new QTableWidgetItem("测试数据"); + item->setTextAlignment(Qt::AlignCenter); //文件居中 + ui->tableWidget->setItem(0, 0, item); //设置数据 + + //初始化TableWidget 设置列 + QStringList headers; + headers << "序号" << "设备名称" << "型号规则" << "辅助字段" << "辅助字段"<< "出厂编号" + << "生产厂家" <<"委托方"<<"使用部门"<<"要求检完时间"<<"是否加急"; + ui->tableWidget->setHorizontalHeaderLabels(headers); + + + } void Depar_Task::ShowMessageBox(QString title,QString value) { // 创建一个QMessageBox对象 @@ -38,5 +67,5 @@ } void Depar_Task::Load() { - ShowMessageBox("部门任务页面","部门任务初始化完成"); + //ShowMessageBox("部门任务页面","部门任务初始化完成"); } diff --git a/softwareDirectory/AutoVerScheme/depar_task.h b/softwareDirectory/AutoVerScheme/depar_task.h index 8716faf..110008d 100644 --- a/softwareDirectory/AutoVerScheme/depar_task.h +++ b/softwareDirectory/AutoVerScheme/depar_task.h @@ -3,6 +3,7 @@ #include "InfoBase.h" +#include "QStandardItemModel" namespace Ui { class Depar_Task; @@ -20,9 +21,12 @@ private slots: void initForm(); //初始化界面数据 void ShowMessageBox(QString title,QString value); + //继承父类的Load方法 void Load() override; + private: Ui::Depar_Task *ui; + // QStandardItemModel *model; }; #endif // DEPAR_TASK_H diff --git a/softwareDirectory/AutoVerScheme/depar_task.ui b/softwareDirectory/AutoVerScheme/depar_task.ui index ff3d44f..1a95cc4 100644 --- a/softwareDirectory/AutoVerScheme/depar_task.ui +++ b/softwareDirectory/AutoVerScheme/depar_task.ui @@ -6,7 +6,7 @@ 0 0 - 1184 + 1190 456 @@ -143,7 +143,34 @@ + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + 0 + 30 + + + + Qt::RightToLeft + + + background-color:rgb(3, 58, 152); +color:white; + + 查询 @@ -151,6 +178,20 @@ + + + 0 + 30 + + + + Qt::RightToLeft + + + background-color:rgb(207, 132, 33); +color:white; + + 重置 @@ -168,8 +209,15 @@ + + + - + + + + + diff --git a/softwareDirectory/AutoVerScheme/indexwindow.cpp b/softwareDirectory/AutoVerScheme/indexwindow.cpp index fca900a..cbba812 100644 --- a/softwareDirectory/AutoVerScheme/indexwindow.cpp +++ b/softwareDirectory/AutoVerScheme/indexwindow.cpp @@ -13,11 +13,37 @@ { ui->setupUi(this); this->initForm(); +/* + //主要作用 当页面关闭后 回到indexwindow页面 并 通过~IndexWindow 释放此页面指针所占用内存 + // 假设 ShowDataSyncView 是一个指向 DataSyncView 实例的指针 + // 当 ShowDataSyncView 关闭时,它的 closed() 信号会被发出 + // 连接这个信号到 IndexWindow 的 onNewWindowClosed() 槽函数 + if(ShowDataSyncView) { + //数据同步页面 信号槽 + connect(ShowDataSyncView, &DataSyncView::close, this, &IndexWindow::onNewWindowClosed); + } + if(ShowInfoManageView) { + //信息管理 信号槽 + connect(ShowInfoManageView, &InfoManageView::close, this, &IndexWindow::onNewWindowClosed); + } + */ } IndexWindow::~IndexWindow() { delete ui; + //释放页面内存 + /* + if (ShowDataSyncView) { + ShowDataSyncView->close(); + delete ShowDataSyncView; + } + else if(ShowInfoManageView) + { + ShowInfoManageView->close(); + delete ShowInfoManageView; + } + */ } void IndexWindow::initForm() { @@ -57,6 +83,15 @@ } + +void IndexWindow::onNewWindowClosed() +{ + // 新窗体关闭后,设置 IndexWindow 为活动窗口 + this->activateWindow(); + // 也可以设置焦点到 MainWindow 中的某个控件 + // ui->someWidget->setFocus(); +} + void IndexWindow::showCheckWindow() { CheckWindow *checkWindow = new CheckWindow; @@ -65,6 +100,26 @@ checkWindow->show(); } +//信息管理按钮 +void IndexWindow::on_tb3_clicked() +{ + InfoManageView *ShowInfoManageView = new InfoManageView(); + ShowInfoManageView->setWindowState(Qt::WindowMaximized); + ShowInfoManageView->setWindowModality(Qt::ApplicationModal); + ShowInfoManageView->show(); +} +//数据同步按钮 +void IndexWindow::on_tb6_clicked() +{ + + // 创建新窗体实例并显示 + DataSyncView *ShowDataSyncView = new DataSyncView(); + ShowDataSyncView->setWindowState(Qt::WindowMaximized); + ShowDataSyncView->setWindowModality(Qt::ApplicationModal); + ShowDataSyncView->show(); +} + + void IndexWindow::showCheckMethod() { CheckMethodManage *checkWindow = new CheckMethodManage; diff --git a/softwareDirectory/AutoVerScheme/indexwindow.h b/softwareDirectory/AutoVerScheme/indexwindow.h index a05d802..190b0f1 100644 --- a/softwareDirectory/AutoVerScheme/indexwindow.h +++ b/softwareDirectory/AutoVerScheme/indexwindow.h @@ -2,6 +2,8 @@ #define INDEXWINDOW_H #include +#include "datasyncView.h" +#include "infomanageview.h" namespace Ui { class IndexWindow; @@ -23,8 +25,21 @@ void showVerifyMethod(); + void on_tb3_clicked(); + + void on_tb6_clicked(); + + //页面关闭响应函数 + void onNewWindowClosed(); + + void on_tb1_clicked(); + private: Ui::IndexWindow *ui; + + //数据同步页面 指针 + //DataSyncView *ShowDataSyncView; + //InfoManageView *ShowInfoManageView; }; #endif // INDEXWINDOW_H diff --git a/softwareDirectory/AutoVerScheme/indexwindow.ui b/softwareDirectory/AutoVerScheme/indexwindow.ui index d69a54d..dec7207 100644 --- a/softwareDirectory/AutoVerScheme/indexwindow.ui +++ b/softwareDirectory/AutoVerScheme/indexwindow.ui @@ -189,7 +189,7 @@ - + 0 @@ -236,7 +236,7 @@ - + 0 @@ -270,7 +270,7 @@ - + 0 @@ -310,7 +310,7 @@ - + 0 @@ -357,7 +357,7 @@ - + 0 @@ -423,7 +423,7 @@ - + 0 @@ -521,66 +521,34 @@ - toolButton_4 + tb1 clicked() IndexWindow showCheckWindow() - 214 - 250 + 260 + 276 - 351 - 107 + 666 + 394 - toolButton_6 + tb4 clicked() IndexWindow showCheckMethod() - 249 - 606 + 260 + 598 - 331 - 452 - - - - - toolButton_5 - clicked() - IndexWindow - showVerifyMethod() - - - 706 - 589 - - - 692 - 442 - - - - - toolButton_2 - clicked() - IndexWindow - showVerifyWindow() - - - 758 - 249 - - - 862 - 114 + 666 + 394 diff --git a/softwareDirectory/AutoVerScheme/infomanageview.cpp b/softwareDirectory/AutoVerScheme/infomanageview.cpp index a206c6f..d045c60 100644 --- a/softwareDirectory/AutoVerScheme/infomanageview.cpp +++ b/softwareDirectory/AutoVerScheme/infomanageview.cpp @@ -2,6 +2,7 @@ #include "ui_infomanageview.h" #include #include +#include //子窗体 #include "depar_task.h" #include "my_task.h" @@ -19,6 +20,7 @@ { ui->setupUi(this); this->setWindowTitle("信息管理"); + //初始化调用所有函数 this->initForm(); this->initWidget(); @@ -115,7 +117,8 @@ //底部加个弹簧 QSpacerItem *verticalSpacer = new QSpacerItem(20, 40, QSizePolicy::Minimum, QSizePolicy::Expanding); ui->widgetLeft->layout()->addItem(verticalSpacer); - btns.at(names.count() - 1)->click(); + + btns.at(0)->click();//选择启动页面 第一个 } //按钮点击切换UI事件 void InfoManageView::buttonClicked() diff --git a/softwareDirectory/AutoVerScheme/infomanageview.h b/softwareDirectory/AutoVerScheme/infomanageview.h index 3c1463f..5e44bba 100644 --- a/softwareDirectory/AutoVerScheme/infomanageview.h +++ b/softwareDirectory/AutoVerScheme/infomanageview.h @@ -2,6 +2,7 @@ #define INFOMANAGEVIEW_H #include +#include class QAbstractButton; diff --git a/softwareDirectory/AutoVerScheme/infomanageview.ui b/softwareDirectory/AutoVerScheme/infomanageview.ui index 4b39e7d..ef0b87b 100644 --- a/softwareDirectory/AutoVerScheme/infomanageview.ui +++ b/softwareDirectory/AutoVerScheme/infomanageview.ui @@ -10,8 +10,15 @@ 644 + + Qt::DefaultContextMenu + - Form + 信息管理 + + + color:black; +background-color:rgba(240, 240, 240, 1); @@ -68,8 +75,8 @@ - - 170 + + 0 0 diff --git a/softwareDirectory/AutoVerScheme/inspectdataitem.cpp b/softwareDirectory/AutoVerScheme/inspectdataitem.cpp index e9c2adc..efc00ba 100644 --- a/softwareDirectory/AutoVerScheme/inspectdataitem.cpp +++ b/softwareDirectory/AutoVerScheme/inspectdataitem.cpp @@ -1,14 +1,62 @@ #include "inspectdataitem.h" #include "ui_inspectdataitem.h" +#include "QMessageBox.h" InspectDataItem::InspectDataItem(QWidget *parent) : - QWidget(parent), + InfoBase(parent), ui(new Ui::InspectDataItem) { ui->setupUi(this); + this->initForm(); } InspectDataItem::~InspectDataItem() { delete ui; } +void InspectDataItem::initForm() +{ + //tableWidget设置 + //设置控件的边框显示 + ui->tableWidget->setStyleSheet("QHeaderView::section {" + "border: 1px solid rgba(197, 196, 196, 1);" + "border-left:none;" + "border-top:none;" + "background-color:white;" + "}"); + + ui->tableWidget->setRowCount(10); // 设置10行 + ui->tableWidget->setColumnCount(12); // 设置11列 + ui->tableWidget->setColumnWidth(0, 80); // 设置第一列的宽度为100像素 + ui->tableWidget->verticalHeader()->setParent(nullptr); //隐藏行头 + QTableWidgetItem *item = new QTableWidgetItem("测试数据"); + item->setTextAlignment(Qt::AlignCenter); + ui->tableWidget->setItem(0, 0, item); //设置数据 + + //初始化TableWidget 设置列 + QStringList headers; + headers << "序号" << "设备名称" << "型号规则" << "出厂编号" + <<"核查件名称"<<"核查件型号"<<"核查件编号" <<"核查员" + << "核查日期" <<"实验室"<<"部门"<<"操作"; + ui->tableWidget->setHorizontalHeaderLabels(headers); +} +void InspectDataItem::ShowMessageBox(QString title,QString value) { + // 创建一个QMessageBox对象 + QMessageBox msgBox; + + // 设置消息框的标题 + msgBox.setWindowTitle(title); + + // 设置消息框的文本内容 + msgBox.setText(value); + + // 设置消息框的标准按钮,这里是“确定”按钮 + msgBox.setStandardButtons(QMessageBox::Ok); + + // 显示消息框 + msgBox.exec(); +} +void InspectDataItem::Load() +{ + //ShowMessageBox("核查数据","核查数据"); +} diff --git a/softwareDirectory/AutoVerScheme/inspectdataitem.h b/softwareDirectory/AutoVerScheme/inspectdataitem.h index 57551bb..bdf7066 100644 --- a/softwareDirectory/AutoVerScheme/inspectdataitem.h +++ b/softwareDirectory/AutoVerScheme/inspectdataitem.h @@ -2,19 +2,24 @@ #define INSPECTDATAITEM_H #include +#include "InfoBase.h" namespace Ui { class InspectDataItem; } -class InspectDataItem : public QWidget +class InspectDataItem : public InfoBase { Q_OBJECT public: explicit InspectDataItem(QWidget *parent = nullptr); ~InspectDataItem(); - +private slots: + void initForm(); //初始化界面数据 + void ShowMessageBox(QString title,QString value); + //继承父类的Load方法 + void Load() override; private: Ui::InspectDataItem *ui; }; diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro index 1280b70..dfb0418 100644 --- a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro @@ -22,6 +22,7 @@ checkmethodmanage.cpp \ checkwindow.cpp \ create_task.cpp \ + datasyncview.cpp \ depar_task.cpp \ indexwindow.cpp \ infomanageview.cpp \ @@ -43,6 +44,7 @@ checkmethodmanage.h \ checkwindow.h \ create_task.h \ + datasyncview.h \ depar_task.h \ indexwindow.h \ infomanageview.h \ @@ -62,6 +64,7 @@ checkmethodmanage.ui \ checkwindow.ui \ create_task.ui \ + datasyncview.ui \ depar_task.ui \ indexwindow.ui \ infomanageview.ui \ diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user index 6ea03c5..93c39cb 100644 --- a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user @@ -1,10 +1,10 @@ - + EnvironmentId - {2746248a-b112-4e0f-9ae0-9e61f2a42309} + {c08df58c-84a7-4965-bca6-e98789474efa} ProjectExplorer.Project.ActiveTarget @@ -71,7 +71,7 @@ 0 0 - D:/dev/QT/AutoCalHainan/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug true @@ -119,7 +119,7 @@ 2 - D:/dev/QT/AutoCalHainan/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Release + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Release true @@ -167,7 +167,7 @@ 0 - D:/dev/QT/AutoCalHainan/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Profile + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Profile true @@ -287,8 +287,8 @@ 2 - Qt4ProjectManager.Qt4RunConfiguration:D:/dev/QT/AutoCalHainan/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro - D:/dev/QT/AutoCalHainan/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro + Qt4ProjectManager.Qt4RunConfiguration:C:/Users/admin/Desktop/SVN/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro + C:/Users/admin/Desktop/SVN/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro false @@ -299,7 +299,7 @@ false true - D:/dev/QT/AutoCalHainan/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug 1 @@ -314,7 +314,7 @@ 0 0 - D:/dev/QT/AutoCalHainan/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Debug + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Debug true @@ -362,7 +362,7 @@ 2 - D:/dev/QT/AutoCalHainan/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Release + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Release true @@ -410,7 +410,7 @@ 0 - D:/dev/QT/AutoCalHainan/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Profile + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Profile true @@ -530,14 +530,15 @@ 2 - - ProjectExplorer.CustomExecutableRunConfiguration - + AutoVerScheme2 + 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 diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user.c08df58 b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user.c08df58 deleted file mode 100644 index 495f95c..0000000 --- a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user.c08df58 +++ /dev/null @@ -1,563 +0,0 @@ - - - - - - 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 32-bit - Desktop Qt 5.14.2 MinGW 32-bit - qt.qt5.5142.win32_mingw73_kit - 0 - 0 - 0 - - D:/Auto_verification_scheme/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 - - - D:/Auto_verification_scheme/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 - - - D:/Auto_verification_scheme/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 - - D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug - - 1 - - - - ProjectExplorer.Project.Target.1 - - 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 - - D:/Auto_verification_scheme/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 - - - D:/Auto_verification_scheme/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 - - - D:/Auto_verification_scheme/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 - - AutoVerScheme2 - 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/InfoBase.h b/softwareDirectory/AutoVerScheme/InfoBase.h index 7fec63e..084cf3f 100644 --- a/softwareDirectory/AutoVerScheme/InfoBase.h +++ b/softwareDirectory/AutoVerScheme/InfoBase.h @@ -2,6 +2,7 @@ #define INFOBASE_H #include +#include "QStandardItemModel" ///信号管理页面的基类 所有信息管理页面都继承于InfoBase /// 便于统一管理 所有子类必须实现Load方法 /// 每次按钮点击切换都会调用Load方法 用于每次页面的数据刷新 @@ -11,6 +12,8 @@ InfoBase(QWidget *parent = nullptr): QWidget(parent){}; // 纯虚函数 virtual void Load()=0; + //QStandardItemModel 的实例。这个模型将用于存储和管理数据。 + QStandardItemModel *model; }; #endif // INFOBASE_H diff --git a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.cpp b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.cpp index 7ac1e87..ffb2bbc 100644 --- a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.cpp +++ b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.cpp @@ -1,14 +1,64 @@ #include "beexamined_deviceitem.h" #include "ui_beexamined_deviceitem.h" +#include "QMessageBox.h" BeExamined_DeviceItem::BeExamined_DeviceItem(QWidget *parent) : - QWidget(parent), + InfoBase(parent), ui(new Ui::BeExamined_DeviceItem) { ui->setupUi(this); + this->initForm(); } BeExamined_DeviceItem::~BeExamined_DeviceItem() { delete ui; } + +void BeExamined_DeviceItem::initForm() +{ + + //tableWidget设置 + //设置控件的边框显示 + ui->tableWidget->setStyleSheet("QHeaderView::section {" + "border: 1px solid rgba(197, 196, 196, 1);" + "border-left:none;" + "border-top:none;" + "background-color:white;" + "}"); + + ui->tableWidget->setRowCount(10); // 设置10行 + ui->tableWidget->setColumnCount(12); // 设置11列 + ui->tableWidget->setColumnWidth(0, 80); // 设置第一列的宽度为100像素 + ui->tableWidget->verticalHeader()->setParent(nullptr); //隐藏行头 + QTableWidgetItem *item = new QTableWidgetItem("测试数据"); + item->setTextAlignment(Qt::AlignCenter); + ui->tableWidget->setItem(0, 0, item); //设置数据 + + //初始化TableWidget 设置列 + QStringList headers; + headers << "序号" << "设备名称" << "型号规则" << "辅助字段" << "出厂编号" + << "生产厂家"<<"所在单位" <<"使用部门"<<"计量标识"<<"检定周期"<<"证书有效期"<<"操作"; + ui->tableWidget->setHorizontalHeaderLabels(headers); + +} +void BeExamined_DeviceItem::ShowMessageBox(QString title,QString value) { + // 创建一个QMessageBox对象 + QMessageBox msgBox; + + // 设置消息框的标题 + msgBox.setWindowTitle(title); + + // 设置消息框的文本内容 + msgBox.setText(value); + + // 设置消息框的标准按钮,这里是“确定”按钮 + msgBox.setStandardButtons(QMessageBox::Ok); + + // 显示消息框 + msgBox.exec(); +} +void BeExamined_DeviceItem::Load() +{ + //ShowMessageBox("被检设备","被检设备初始化完成"); +} diff --git a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.h b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.h index 76b061d..ae46979 100644 --- a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.h +++ b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.h @@ -2,12 +2,13 @@ #define BEEXAMINED_DEVICEITEM_H #include +#include "InfoBase.h" namespace Ui { class BeExamined_DeviceItem; } -class BeExamined_DeviceItem : public QWidget +class BeExamined_DeviceItem : public InfoBase { Q_OBJECT @@ -15,6 +16,11 @@ explicit BeExamined_DeviceItem(QWidget *parent = nullptr); ~BeExamined_DeviceItem(); +private slots: + void initForm(); //初始化界面数据 + void ShowMessageBox(QString title,QString value); + //继承父类的Load方法 + void Load() override; private: Ui::BeExamined_DeviceItem *ui; }; diff --git a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.ui b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.ui index af9f7bf..5a0a3c9 100644 --- a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.ui +++ b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.ui @@ -6,26 +6,236 @@ 0 0 - 400 - 300 + 1291 + 575 Form - - - - 130 - 140 - 89 - 24 - - - - 被检设备管理 - - + + + + + + 0 + 0 + + + + background-color:white; + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 设备名称: + + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 型号规则: + + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 出厂编号: + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 生产厂家: + + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 使用部门: + + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 使用单位: + + + + + + + + + + Qt::Horizontal + + + QSizePolicy::Expanding + + + + 40 + 20 + + + + + + + + Qt::RightToLeft + + + 查询 + + + + + + + Qt::RightToLeft + + + 重置 + + + + + + + + + + background-color:white; + + + + + + + + + + + + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/create_task.cpp b/softwareDirectory/AutoVerScheme/create_task.cpp index 4193efc..9b49a1a 100644 --- a/softwareDirectory/AutoVerScheme/create_task.cpp +++ b/softwareDirectory/AutoVerScheme/create_task.cpp @@ -1,14 +1,61 @@ #include "create_task.h" #include "ui_create_task.h" +#include "QMessageBox" Create_Task::Create_Task(QWidget *parent) : - QWidget(parent), + InfoBase(parent), ui(new Ui::Create_Task) { ui->setupUi(this); + this->initForm(); } Create_Task::~Create_Task() { delete ui; } +void Create_Task::initForm() +{ + //tableWidget设置 + //设置控件的边框显示 + ui->tableWidget->setStyleSheet("QHeaderView::section {" + "border: 1px solid rgba(197, 196, 196, 1);" + "border-left:none;" + "border-top:none;" + "background-color:white;" + "}"); + + ui->tableWidget->setRowCount(10); // 设置10行 + ui->tableWidget->setColumnCount(8); // 设置11列 + ui->tableWidget->setColumnWidth(0, 80); // 设置第一列的宽度为100像素 + ui->tableWidget->verticalHeader()->setParent(nullptr); //隐藏行头 + QTableWidgetItem *item = new QTableWidgetItem("测试数据"); + item->setTextAlignment(Qt::AlignCenter); + ui->tableWidget->setItem(0, 0, item); //设置数据 + + //初始化TableWidget 设置列 + QStringList headers; + headers << "序号" << "任务单编号" << "委托方"<< "使用部门" << "要求检完时间" << "送检人"<<"是否加急"<<"操作"; + ui->tableWidget->setHorizontalHeaderLabels(headers); + //ShowMessageBox("标题","初始化完成"); +} +void Create_Task::ShowMessageBox(QString title,QString value) { + // 创建一个QMessageBox对象 + QMessageBox msgBox; + + // 设置消息框的标题 + msgBox.setWindowTitle(title); + + // 设置消息框的文本内容 + msgBox.setText(value); + + // 设置消息框的标准按钮,这里是“确定”按钮 + msgBox.setStandardButtons(QMessageBox::Ok); + + // 显示消息框 + msgBox.exec(); +} +void Create_Task::Load() +{ + //ShowMessageBox("创建任务界面","创建任务界面初始化完成"); +} diff --git a/softwareDirectory/AutoVerScheme/create_task.h b/softwareDirectory/AutoVerScheme/create_task.h index e2264de..7cf383f 100644 --- a/softwareDirectory/AutoVerScheme/create_task.h +++ b/softwareDirectory/AutoVerScheme/create_task.h @@ -1,13 +1,14 @@ #ifndef CREATE_TASK_H #define CREATE_TASK_H +#include "InfoBase.h" #include namespace Ui { class Create_Task; } -class Create_Task : public QWidget +class Create_Task : public InfoBase { Q_OBJECT @@ -15,6 +16,11 @@ explicit Create_Task(QWidget *parent = nullptr); ~Create_Task(); +private slots: + void initForm(); //初始化界面数据 + void ShowMessageBox(QString title,QString value); + //继承父类的Load方法 + void Load() override; private: Ui::Create_Task *ui; }; diff --git a/softwareDirectory/AutoVerScheme/create_task.ui b/softwareDirectory/AutoVerScheme/create_task.ui index b79c6a1..d9d88ed 100644 --- a/softwareDirectory/AutoVerScheme/create_task.ui +++ b/softwareDirectory/AutoVerScheme/create_task.ui @@ -6,29 +6,294 @@ 0 0 - 400 - 300 + 1184 + 580 Form - - background-color:red; + + Qt::LeftToRight - - - - 140 - 120 - 89 - 24 - - - - 创建任务单 - - + + + + + + + + + 0 + 0 + + + + background-color:white; + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 任务单编号: + + + + + + + + 0 + 0 + + + + + + + + + 0 + 0 + + + + + 50 + 0 + + + + 委托方: + + + + + + + + 0 + 0 + + + + + 0 + 0 + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 使用部门: + + + + + + + + 0 + 0 + + + + + 0 + 0 + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 要求完成时间: + + + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + 0 + 30 + + + + Qt::RightToLeft + + + background-color:rgb(3, 58, 132); +color:white; + + + + 查询 + + + + + + + + 0 + 30 + + + + Qt::RightToLeft + + + background-color:rgb(207, 132, 33); +color:white; + + + + 重置 + + + + + + + + + + background-color:white; + + + + + + + 6 + + + 9 + + + 9 + + + 9 + + + + + + 0 + 0 + + + + + 120 + 40 + + + + OpenHandCursor + + + Qt::DefaultContextMenu + + + Qt::RightToLeft + + + false + + + background-color:rgb(9, 89, 179); +color:white; + + + 创建任务单 + + + true + + + + + + + + + + + + + + SizeVerCursor + + + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/datasyncview.cpp b/softwareDirectory/AutoVerScheme/datasyncview.cpp new file mode 100644 index 0000000..74cd41d --- /dev/null +++ b/softwareDirectory/AutoVerScheme/datasyncview.cpp @@ -0,0 +1,44 @@ +#include "datasyncview.h" +#include "ui_datasyncview.h" + +DataSyncView::DataSyncView(QWidget *parent) : + QWidget(parent), + ui(new Ui::DataSyncView) +{ + ui->setupUi(this); + this->initForm(); +} + +DataSyncView::~DataSyncView() +{ + delete ui; +} +void DataSyncView::initForm() +{ + //tableWidget设置 + //设置控件的边框显示 + ui->tableWidget->setStyleSheet("QHeaderView::section {" + "border: 1px solid grey;" + "border-left:none;" + "border-top:none;" + "background-color:white;" + " color:black;" + "font: bold 18px Arial, sans-serif;" + "}"); + + ui->tableWidget->setRowCount(10); // 设置10行 + ui->tableWidget->setColumnCount(4); // 设置11列 + ui->tableWidget->setColumnWidth(0, 80); // 设置第一列的宽度为100像素 + ui->tableWidget->verticalHeader()->setParent(nullptr); //隐藏行头 + QTableWidgetItem *item = new QTableWidgetItem("测试数据"); + item->setTextAlignment(Qt::AlignCenter); + ui->tableWidget->setItem(0, 0, item); //设置数据 + + //初始化TableWidget 设置列 + QStringList headers; + headers << "序号" << "同步时间" << "是否同步成功" << "备注" ; + ui->tableWidget->setHorizontalHeaderLabels(headers); + + + +} diff --git a/softwareDirectory/AutoVerScheme/datasyncview.h b/softwareDirectory/AutoVerScheme/datasyncview.h new file mode 100644 index 0000000..9a73de9 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/datasyncview.h @@ -0,0 +1,24 @@ +#ifndef DATASYNCVIEW_H +#define DATASYNCVIEW_H + +#include + +namespace Ui { +class DataSyncView; +} + +class DataSyncView : public QWidget +{ + Q_OBJECT + +public: + explicit DataSyncView(QWidget *parent = nullptr); + ~DataSyncView(); +private slots: + void initForm(); //初始化界面数据 + +private: + Ui::DataSyncView *ui; +}; + +#endif // DATASYNCVIEW_H diff --git a/softwareDirectory/AutoVerScheme/datasyncview.ui b/softwareDirectory/AutoVerScheme/datasyncview.ui new file mode 100644 index 0000000..c45bf56 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/datasyncview.ui @@ -0,0 +1,133 @@ + + + DataSyncView + + + + 0 + 0 + 874 + 531 + + + + 数据同步 + + + background-color:rgba(240, 240, 240, 1); + + + + + + background-color:white; + + + + + + + + + + 0 + 0 + + + + background-color:white; +border:0; + + + + + + + + + + 0 + 0 + + + + font:bold 20px Arial, sans-serif; +color:#334582; + + + 同步记录 + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + background-color:#334582; + font: bold 18px Arial, sans-serif; +color:white; +padding:10px; + + + 下载数据 + + + + + + + + 200 + 0 + + + + + 100 + 40 + + + + Qt::RightToLeft + + + background-color:#334582; + font: bold 18px Arial, sans-serif; +color:white; +padding:10px; + + + 发送同步请求 + + + + + + + + + + + + + + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/depar_task.cpp b/softwareDirectory/AutoVerScheme/depar_task.cpp index de39775..5f0f93a 100644 --- a/softwareDirectory/AutoVerScheme/depar_task.cpp +++ b/softwareDirectory/AutoVerScheme/depar_task.cpp @@ -2,13 +2,19 @@ #include "ui_depar_task.h" #include "QMessageBox" #include "InfoBase.h" +#include "QStandardItemModel" Depar_Task::Depar_Task(QWidget *parent) : InfoBase(parent), ui(new Ui::Depar_Task) { ui->setupUi(this); + //初始化列表 this->initForm(); + + + + } Depar_Task::~Depar_Task() @@ -17,8 +23,31 @@ } void Depar_Task::initForm() { + //tableWidget设置 + //设置控件的边框显示 + ui->tableWidget->setStyleSheet("QHeaderView::section {" + "border: 1px solid rgba(197, 196, 196, 1);" + "border-left:none;" + "border-top:none;" + "background-color:white;" + "}"); - //ShowMessageBox("标题","初始化完成"); + ui->tableWidget->setRowCount(10); // 设置10行 + ui->tableWidget->setColumnCount(10); // 设置11列 + ui->tableWidget->setColumnWidth(0, 80); // 设置第一列的宽度为100像素 + ui->tableWidget->verticalHeader()->setParent(nullptr); //隐藏行头 + QTableWidgetItem *item = new QTableWidgetItem("测试数据"); + item->setTextAlignment(Qt::AlignCenter); //文件居中 + ui->tableWidget->setItem(0, 0, item); //设置数据 + + //初始化TableWidget 设置列 + QStringList headers; + headers << "序号" << "设备名称" << "型号规则" << "辅助字段" << "辅助字段"<< "出厂编号" + << "生产厂家" <<"委托方"<<"使用部门"<<"要求检完时间"<<"是否加急"; + ui->tableWidget->setHorizontalHeaderLabels(headers); + + + } void Depar_Task::ShowMessageBox(QString title,QString value) { // 创建一个QMessageBox对象 @@ -38,5 +67,5 @@ } void Depar_Task::Load() { - ShowMessageBox("部门任务页面","部门任务初始化完成"); + //ShowMessageBox("部门任务页面","部门任务初始化完成"); } diff --git a/softwareDirectory/AutoVerScheme/depar_task.h b/softwareDirectory/AutoVerScheme/depar_task.h index 8716faf..110008d 100644 --- a/softwareDirectory/AutoVerScheme/depar_task.h +++ b/softwareDirectory/AutoVerScheme/depar_task.h @@ -3,6 +3,7 @@ #include "InfoBase.h" +#include "QStandardItemModel" namespace Ui { class Depar_Task; @@ -20,9 +21,12 @@ private slots: void initForm(); //初始化界面数据 void ShowMessageBox(QString title,QString value); + //继承父类的Load方法 void Load() override; + private: Ui::Depar_Task *ui; + // QStandardItemModel *model; }; #endif // DEPAR_TASK_H diff --git a/softwareDirectory/AutoVerScheme/depar_task.ui b/softwareDirectory/AutoVerScheme/depar_task.ui index ff3d44f..1a95cc4 100644 --- a/softwareDirectory/AutoVerScheme/depar_task.ui +++ b/softwareDirectory/AutoVerScheme/depar_task.ui @@ -6,7 +6,7 @@ 0 0 - 1184 + 1190 456 @@ -143,7 +143,34 @@ + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + 0 + 30 + + + + Qt::RightToLeft + + + background-color:rgb(3, 58, 152); +color:white; + + 查询 @@ -151,6 +178,20 @@ + + + 0 + 30 + + + + Qt::RightToLeft + + + background-color:rgb(207, 132, 33); +color:white; + + 重置 @@ -168,8 +209,15 @@ + + + - + + + + + diff --git a/softwareDirectory/AutoVerScheme/indexwindow.cpp b/softwareDirectory/AutoVerScheme/indexwindow.cpp index fca900a..cbba812 100644 --- a/softwareDirectory/AutoVerScheme/indexwindow.cpp +++ b/softwareDirectory/AutoVerScheme/indexwindow.cpp @@ -13,11 +13,37 @@ { ui->setupUi(this); this->initForm(); +/* + //主要作用 当页面关闭后 回到indexwindow页面 并 通过~IndexWindow 释放此页面指针所占用内存 + // 假设 ShowDataSyncView 是一个指向 DataSyncView 实例的指针 + // 当 ShowDataSyncView 关闭时,它的 closed() 信号会被发出 + // 连接这个信号到 IndexWindow 的 onNewWindowClosed() 槽函数 + if(ShowDataSyncView) { + //数据同步页面 信号槽 + connect(ShowDataSyncView, &DataSyncView::close, this, &IndexWindow::onNewWindowClosed); + } + if(ShowInfoManageView) { + //信息管理 信号槽 + connect(ShowInfoManageView, &InfoManageView::close, this, &IndexWindow::onNewWindowClosed); + } + */ } IndexWindow::~IndexWindow() { delete ui; + //释放页面内存 + /* + if (ShowDataSyncView) { + ShowDataSyncView->close(); + delete ShowDataSyncView; + } + else if(ShowInfoManageView) + { + ShowInfoManageView->close(); + delete ShowInfoManageView; + } + */ } void IndexWindow::initForm() { @@ -57,6 +83,15 @@ } + +void IndexWindow::onNewWindowClosed() +{ + // 新窗体关闭后,设置 IndexWindow 为活动窗口 + this->activateWindow(); + // 也可以设置焦点到 MainWindow 中的某个控件 + // ui->someWidget->setFocus(); +} + void IndexWindow::showCheckWindow() { CheckWindow *checkWindow = new CheckWindow; @@ -65,6 +100,26 @@ checkWindow->show(); } +//信息管理按钮 +void IndexWindow::on_tb3_clicked() +{ + InfoManageView *ShowInfoManageView = new InfoManageView(); + ShowInfoManageView->setWindowState(Qt::WindowMaximized); + ShowInfoManageView->setWindowModality(Qt::ApplicationModal); + ShowInfoManageView->show(); +} +//数据同步按钮 +void IndexWindow::on_tb6_clicked() +{ + + // 创建新窗体实例并显示 + DataSyncView *ShowDataSyncView = new DataSyncView(); + ShowDataSyncView->setWindowState(Qt::WindowMaximized); + ShowDataSyncView->setWindowModality(Qt::ApplicationModal); + ShowDataSyncView->show(); +} + + void IndexWindow::showCheckMethod() { CheckMethodManage *checkWindow = new CheckMethodManage; diff --git a/softwareDirectory/AutoVerScheme/indexwindow.h b/softwareDirectory/AutoVerScheme/indexwindow.h index a05d802..190b0f1 100644 --- a/softwareDirectory/AutoVerScheme/indexwindow.h +++ b/softwareDirectory/AutoVerScheme/indexwindow.h @@ -2,6 +2,8 @@ #define INDEXWINDOW_H #include +#include "datasyncView.h" +#include "infomanageview.h" namespace Ui { class IndexWindow; @@ -23,8 +25,21 @@ void showVerifyMethod(); + void on_tb3_clicked(); + + void on_tb6_clicked(); + + //页面关闭响应函数 + void onNewWindowClosed(); + + void on_tb1_clicked(); + private: Ui::IndexWindow *ui; + + //数据同步页面 指针 + //DataSyncView *ShowDataSyncView; + //InfoManageView *ShowInfoManageView; }; #endif // INDEXWINDOW_H diff --git a/softwareDirectory/AutoVerScheme/indexwindow.ui b/softwareDirectory/AutoVerScheme/indexwindow.ui index d69a54d..dec7207 100644 --- a/softwareDirectory/AutoVerScheme/indexwindow.ui +++ b/softwareDirectory/AutoVerScheme/indexwindow.ui @@ -189,7 +189,7 @@ - + 0 @@ -236,7 +236,7 @@ - + 0 @@ -270,7 +270,7 @@ - + 0 @@ -310,7 +310,7 @@ - + 0 @@ -357,7 +357,7 @@ - + 0 @@ -423,7 +423,7 @@ - + 0 @@ -521,66 +521,34 @@ - toolButton_4 + tb1 clicked() IndexWindow showCheckWindow() - 214 - 250 + 260 + 276 - 351 - 107 + 666 + 394 - toolButton_6 + tb4 clicked() IndexWindow showCheckMethod() - 249 - 606 + 260 + 598 - 331 - 452 - - - - - toolButton_5 - clicked() - IndexWindow - showVerifyMethod() - - - 706 - 589 - - - 692 - 442 - - - - - toolButton_2 - clicked() - IndexWindow - showVerifyWindow() - - - 758 - 249 - - - 862 - 114 + 666 + 394 diff --git a/softwareDirectory/AutoVerScheme/infomanageview.cpp b/softwareDirectory/AutoVerScheme/infomanageview.cpp index a206c6f..d045c60 100644 --- a/softwareDirectory/AutoVerScheme/infomanageview.cpp +++ b/softwareDirectory/AutoVerScheme/infomanageview.cpp @@ -2,6 +2,7 @@ #include "ui_infomanageview.h" #include #include +#include //子窗体 #include "depar_task.h" #include "my_task.h" @@ -19,6 +20,7 @@ { ui->setupUi(this); this->setWindowTitle("信息管理"); + //初始化调用所有函数 this->initForm(); this->initWidget(); @@ -115,7 +117,8 @@ //底部加个弹簧 QSpacerItem *verticalSpacer = new QSpacerItem(20, 40, QSizePolicy::Minimum, QSizePolicy::Expanding); ui->widgetLeft->layout()->addItem(verticalSpacer); - btns.at(names.count() - 1)->click(); + + btns.at(0)->click();//选择启动页面 第一个 } //按钮点击切换UI事件 void InfoManageView::buttonClicked() diff --git a/softwareDirectory/AutoVerScheme/infomanageview.h b/softwareDirectory/AutoVerScheme/infomanageview.h index 3c1463f..5e44bba 100644 --- a/softwareDirectory/AutoVerScheme/infomanageview.h +++ b/softwareDirectory/AutoVerScheme/infomanageview.h @@ -2,6 +2,7 @@ #define INFOMANAGEVIEW_H #include +#include class QAbstractButton; diff --git a/softwareDirectory/AutoVerScheme/infomanageview.ui b/softwareDirectory/AutoVerScheme/infomanageview.ui index 4b39e7d..ef0b87b 100644 --- a/softwareDirectory/AutoVerScheme/infomanageview.ui +++ b/softwareDirectory/AutoVerScheme/infomanageview.ui @@ -10,8 +10,15 @@ 644 + + Qt::DefaultContextMenu + - Form + 信息管理 + + + color:black; +background-color:rgba(240, 240, 240, 1); @@ -68,8 +75,8 @@ - - 170 + + 0 0 diff --git a/softwareDirectory/AutoVerScheme/inspectdataitem.cpp b/softwareDirectory/AutoVerScheme/inspectdataitem.cpp index e9c2adc..efc00ba 100644 --- a/softwareDirectory/AutoVerScheme/inspectdataitem.cpp +++ b/softwareDirectory/AutoVerScheme/inspectdataitem.cpp @@ -1,14 +1,62 @@ #include "inspectdataitem.h" #include "ui_inspectdataitem.h" +#include "QMessageBox.h" InspectDataItem::InspectDataItem(QWidget *parent) : - QWidget(parent), + InfoBase(parent), ui(new Ui::InspectDataItem) { ui->setupUi(this); + this->initForm(); } InspectDataItem::~InspectDataItem() { delete ui; } +void InspectDataItem::initForm() +{ + //tableWidget设置 + //设置控件的边框显示 + ui->tableWidget->setStyleSheet("QHeaderView::section {" + "border: 1px solid rgba(197, 196, 196, 1);" + "border-left:none;" + "border-top:none;" + "background-color:white;" + "}"); + + ui->tableWidget->setRowCount(10); // 设置10行 + ui->tableWidget->setColumnCount(12); // 设置11列 + ui->tableWidget->setColumnWidth(0, 80); // 设置第一列的宽度为100像素 + ui->tableWidget->verticalHeader()->setParent(nullptr); //隐藏行头 + QTableWidgetItem *item = new QTableWidgetItem("测试数据"); + item->setTextAlignment(Qt::AlignCenter); + ui->tableWidget->setItem(0, 0, item); //设置数据 + + //初始化TableWidget 设置列 + QStringList headers; + headers << "序号" << "设备名称" << "型号规则" << "出厂编号" + <<"核查件名称"<<"核查件型号"<<"核查件编号" <<"核查员" + << "核查日期" <<"实验室"<<"部门"<<"操作"; + ui->tableWidget->setHorizontalHeaderLabels(headers); +} +void InspectDataItem::ShowMessageBox(QString title,QString value) { + // 创建一个QMessageBox对象 + QMessageBox msgBox; + + // 设置消息框的标题 + msgBox.setWindowTitle(title); + + // 设置消息框的文本内容 + msgBox.setText(value); + + // 设置消息框的标准按钮,这里是“确定”按钮 + msgBox.setStandardButtons(QMessageBox::Ok); + + // 显示消息框 + msgBox.exec(); +} +void InspectDataItem::Load() +{ + //ShowMessageBox("核查数据","核查数据"); +} diff --git a/softwareDirectory/AutoVerScheme/inspectdataitem.h b/softwareDirectory/AutoVerScheme/inspectdataitem.h index 57551bb..bdf7066 100644 --- a/softwareDirectory/AutoVerScheme/inspectdataitem.h +++ b/softwareDirectory/AutoVerScheme/inspectdataitem.h @@ -2,19 +2,24 @@ #define INSPECTDATAITEM_H #include +#include "InfoBase.h" namespace Ui { class InspectDataItem; } -class InspectDataItem : public QWidget +class InspectDataItem : public InfoBase { Q_OBJECT public: explicit InspectDataItem(QWidget *parent = nullptr); ~InspectDataItem(); - +private slots: + void initForm(); //初始化界面数据 + void ShowMessageBox(QString title,QString value); + //继承父类的Load方法 + void Load() override; private: Ui::InspectDataItem *ui; }; diff --git a/softwareDirectory/AutoVerScheme/inspectdataitem.ui b/softwareDirectory/AutoVerScheme/inspectdataitem.ui index 45f04e0..86786c9 100644 --- a/softwareDirectory/AutoVerScheme/inspectdataitem.ui +++ b/softwareDirectory/AutoVerScheme/inspectdataitem.ui @@ -6,26 +6,236 @@ 0 0 - 400 - 300 + 1362 + 543 Form - - - - 120 - 130 - 89 - 24 - - - - 核查数据管理 - - + + + + + + 0 + 0 + + + + background-color:white; + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 设备名称: + + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 型号规则: + + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 出厂编号: + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 核查员: + + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 核查日期: + + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 实验室: + + + + + + + + + + Qt::Horizontal + + + QSizePolicy::Expanding + + + + 40 + 20 + + + + + + + + Qt::RightToLeft + + + 查询 + + + + + + + Qt::RightToLeft + + + 重置 + + + + + + + + + + background-color:white; + + + + + + + + + + + + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro index 1280b70..dfb0418 100644 --- a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro @@ -22,6 +22,7 @@ checkmethodmanage.cpp \ checkwindow.cpp \ create_task.cpp \ + datasyncview.cpp \ depar_task.cpp \ indexwindow.cpp \ infomanageview.cpp \ @@ -43,6 +44,7 @@ checkmethodmanage.h \ checkwindow.h \ create_task.h \ + datasyncview.h \ depar_task.h \ indexwindow.h \ infomanageview.h \ @@ -62,6 +64,7 @@ checkmethodmanage.ui \ checkwindow.ui \ create_task.ui \ + datasyncview.ui \ depar_task.ui \ indexwindow.ui \ infomanageview.ui \ diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user index 6ea03c5..93c39cb 100644 --- a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user @@ -1,10 +1,10 @@ - + EnvironmentId - {2746248a-b112-4e0f-9ae0-9e61f2a42309} + {c08df58c-84a7-4965-bca6-e98789474efa} ProjectExplorer.Project.ActiveTarget @@ -71,7 +71,7 @@ 0 0 - D:/dev/QT/AutoCalHainan/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug true @@ -119,7 +119,7 @@ 2 - D:/dev/QT/AutoCalHainan/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Release + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Release true @@ -167,7 +167,7 @@ 0 - D:/dev/QT/AutoCalHainan/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Profile + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Profile true @@ -287,8 +287,8 @@ 2 - Qt4ProjectManager.Qt4RunConfiguration:D:/dev/QT/AutoCalHainan/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro - D:/dev/QT/AutoCalHainan/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro + Qt4ProjectManager.Qt4RunConfiguration:C:/Users/admin/Desktop/SVN/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro + C:/Users/admin/Desktop/SVN/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro false @@ -299,7 +299,7 @@ false true - D:/dev/QT/AutoCalHainan/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug 1 @@ -314,7 +314,7 @@ 0 0 - D:/dev/QT/AutoCalHainan/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Debug + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Debug true @@ -362,7 +362,7 @@ 2 - D:/dev/QT/AutoCalHainan/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Release + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Release true @@ -410,7 +410,7 @@ 0 - D:/dev/QT/AutoCalHainan/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Profile + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Profile true @@ -530,14 +530,15 @@ 2 - - ProjectExplorer.CustomExecutableRunConfiguration - + AutoVerScheme2 + 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 diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user.c08df58 b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user.c08df58 deleted file mode 100644 index 495f95c..0000000 --- a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user.c08df58 +++ /dev/null @@ -1,563 +0,0 @@ - - - - - - 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 32-bit - Desktop Qt 5.14.2 MinGW 32-bit - qt.qt5.5142.win32_mingw73_kit - 0 - 0 - 0 - - D:/Auto_verification_scheme/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 - - - D:/Auto_verification_scheme/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 - - - D:/Auto_verification_scheme/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 - - D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug - - 1 - - - - ProjectExplorer.Project.Target.1 - - 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 - - D:/Auto_verification_scheme/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 - - - D:/Auto_verification_scheme/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 - - - D:/Auto_verification_scheme/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 - - AutoVerScheme2 - 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/InfoBase.h b/softwareDirectory/AutoVerScheme/InfoBase.h index 7fec63e..084cf3f 100644 --- a/softwareDirectory/AutoVerScheme/InfoBase.h +++ b/softwareDirectory/AutoVerScheme/InfoBase.h @@ -2,6 +2,7 @@ #define INFOBASE_H #include +#include "QStandardItemModel" ///信号管理页面的基类 所有信息管理页面都继承于InfoBase /// 便于统一管理 所有子类必须实现Load方法 /// 每次按钮点击切换都会调用Load方法 用于每次页面的数据刷新 @@ -11,6 +12,8 @@ InfoBase(QWidget *parent = nullptr): QWidget(parent){}; // 纯虚函数 virtual void Load()=0; + //QStandardItemModel 的实例。这个模型将用于存储和管理数据。 + QStandardItemModel *model; }; #endif // INFOBASE_H diff --git a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.cpp b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.cpp index 7ac1e87..ffb2bbc 100644 --- a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.cpp +++ b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.cpp @@ -1,14 +1,64 @@ #include "beexamined_deviceitem.h" #include "ui_beexamined_deviceitem.h" +#include "QMessageBox.h" BeExamined_DeviceItem::BeExamined_DeviceItem(QWidget *parent) : - QWidget(parent), + InfoBase(parent), ui(new Ui::BeExamined_DeviceItem) { ui->setupUi(this); + this->initForm(); } BeExamined_DeviceItem::~BeExamined_DeviceItem() { delete ui; } + +void BeExamined_DeviceItem::initForm() +{ + + //tableWidget设置 + //设置控件的边框显示 + ui->tableWidget->setStyleSheet("QHeaderView::section {" + "border: 1px solid rgba(197, 196, 196, 1);" + "border-left:none;" + "border-top:none;" + "background-color:white;" + "}"); + + ui->tableWidget->setRowCount(10); // 设置10行 + ui->tableWidget->setColumnCount(12); // 设置11列 + ui->tableWidget->setColumnWidth(0, 80); // 设置第一列的宽度为100像素 + ui->tableWidget->verticalHeader()->setParent(nullptr); //隐藏行头 + QTableWidgetItem *item = new QTableWidgetItem("测试数据"); + item->setTextAlignment(Qt::AlignCenter); + ui->tableWidget->setItem(0, 0, item); //设置数据 + + //初始化TableWidget 设置列 + QStringList headers; + headers << "序号" << "设备名称" << "型号规则" << "辅助字段" << "出厂编号" + << "生产厂家"<<"所在单位" <<"使用部门"<<"计量标识"<<"检定周期"<<"证书有效期"<<"操作"; + ui->tableWidget->setHorizontalHeaderLabels(headers); + +} +void BeExamined_DeviceItem::ShowMessageBox(QString title,QString value) { + // 创建一个QMessageBox对象 + QMessageBox msgBox; + + // 设置消息框的标题 + msgBox.setWindowTitle(title); + + // 设置消息框的文本内容 + msgBox.setText(value); + + // 设置消息框的标准按钮,这里是“确定”按钮 + msgBox.setStandardButtons(QMessageBox::Ok); + + // 显示消息框 + msgBox.exec(); +} +void BeExamined_DeviceItem::Load() +{ + //ShowMessageBox("被检设备","被检设备初始化完成"); +} diff --git a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.h b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.h index 76b061d..ae46979 100644 --- a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.h +++ b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.h @@ -2,12 +2,13 @@ #define BEEXAMINED_DEVICEITEM_H #include +#include "InfoBase.h" namespace Ui { class BeExamined_DeviceItem; } -class BeExamined_DeviceItem : public QWidget +class BeExamined_DeviceItem : public InfoBase { Q_OBJECT @@ -15,6 +16,11 @@ explicit BeExamined_DeviceItem(QWidget *parent = nullptr); ~BeExamined_DeviceItem(); +private slots: + void initForm(); //初始化界面数据 + void ShowMessageBox(QString title,QString value); + //继承父类的Load方法 + void Load() override; private: Ui::BeExamined_DeviceItem *ui; }; diff --git a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.ui b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.ui index af9f7bf..5a0a3c9 100644 --- a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.ui +++ b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.ui @@ -6,26 +6,236 @@ 0 0 - 400 - 300 + 1291 + 575 Form - - - - 130 - 140 - 89 - 24 - - - - 被检设备管理 - - + + + + + + 0 + 0 + + + + background-color:white; + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 设备名称: + + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 型号规则: + + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 出厂编号: + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 生产厂家: + + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 使用部门: + + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 使用单位: + + + + + + + + + + Qt::Horizontal + + + QSizePolicy::Expanding + + + + 40 + 20 + + + + + + + + Qt::RightToLeft + + + 查询 + + + + + + + Qt::RightToLeft + + + 重置 + + + + + + + + + + background-color:white; + + + + + + + + + + + + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/create_task.cpp b/softwareDirectory/AutoVerScheme/create_task.cpp index 4193efc..9b49a1a 100644 --- a/softwareDirectory/AutoVerScheme/create_task.cpp +++ b/softwareDirectory/AutoVerScheme/create_task.cpp @@ -1,14 +1,61 @@ #include "create_task.h" #include "ui_create_task.h" +#include "QMessageBox" Create_Task::Create_Task(QWidget *parent) : - QWidget(parent), + InfoBase(parent), ui(new Ui::Create_Task) { ui->setupUi(this); + this->initForm(); } Create_Task::~Create_Task() { delete ui; } +void Create_Task::initForm() +{ + //tableWidget设置 + //设置控件的边框显示 + ui->tableWidget->setStyleSheet("QHeaderView::section {" + "border: 1px solid rgba(197, 196, 196, 1);" + "border-left:none;" + "border-top:none;" + "background-color:white;" + "}"); + + ui->tableWidget->setRowCount(10); // 设置10行 + ui->tableWidget->setColumnCount(8); // 设置11列 + ui->tableWidget->setColumnWidth(0, 80); // 设置第一列的宽度为100像素 + ui->tableWidget->verticalHeader()->setParent(nullptr); //隐藏行头 + QTableWidgetItem *item = new QTableWidgetItem("测试数据"); + item->setTextAlignment(Qt::AlignCenter); + ui->tableWidget->setItem(0, 0, item); //设置数据 + + //初始化TableWidget 设置列 + QStringList headers; + headers << "序号" << "任务单编号" << "委托方"<< "使用部门" << "要求检完时间" << "送检人"<<"是否加急"<<"操作"; + ui->tableWidget->setHorizontalHeaderLabels(headers); + //ShowMessageBox("标题","初始化完成"); +} +void Create_Task::ShowMessageBox(QString title,QString value) { + // 创建一个QMessageBox对象 + QMessageBox msgBox; + + // 设置消息框的标题 + msgBox.setWindowTitle(title); + + // 设置消息框的文本内容 + msgBox.setText(value); + + // 设置消息框的标准按钮,这里是“确定”按钮 + msgBox.setStandardButtons(QMessageBox::Ok); + + // 显示消息框 + msgBox.exec(); +} +void Create_Task::Load() +{ + //ShowMessageBox("创建任务界面","创建任务界面初始化完成"); +} diff --git a/softwareDirectory/AutoVerScheme/create_task.h b/softwareDirectory/AutoVerScheme/create_task.h index e2264de..7cf383f 100644 --- a/softwareDirectory/AutoVerScheme/create_task.h +++ b/softwareDirectory/AutoVerScheme/create_task.h @@ -1,13 +1,14 @@ #ifndef CREATE_TASK_H #define CREATE_TASK_H +#include "InfoBase.h" #include namespace Ui { class Create_Task; } -class Create_Task : public QWidget +class Create_Task : public InfoBase { Q_OBJECT @@ -15,6 +16,11 @@ explicit Create_Task(QWidget *parent = nullptr); ~Create_Task(); +private slots: + void initForm(); //初始化界面数据 + void ShowMessageBox(QString title,QString value); + //继承父类的Load方法 + void Load() override; private: Ui::Create_Task *ui; }; diff --git a/softwareDirectory/AutoVerScheme/create_task.ui b/softwareDirectory/AutoVerScheme/create_task.ui index b79c6a1..d9d88ed 100644 --- a/softwareDirectory/AutoVerScheme/create_task.ui +++ b/softwareDirectory/AutoVerScheme/create_task.ui @@ -6,29 +6,294 @@ 0 0 - 400 - 300 + 1184 + 580 Form - - background-color:red; + + Qt::LeftToRight - - - - 140 - 120 - 89 - 24 - - - - 创建任务单 - - + + + + + + + + + 0 + 0 + + + + background-color:white; + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 任务单编号: + + + + + + + + 0 + 0 + + + + + + + + + 0 + 0 + + + + + 50 + 0 + + + + 委托方: + + + + + + + + 0 + 0 + + + + + 0 + 0 + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 使用部门: + + + + + + + + 0 + 0 + + + + + 0 + 0 + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 要求完成时间: + + + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + 0 + 30 + + + + Qt::RightToLeft + + + background-color:rgb(3, 58, 132); +color:white; + + + + 查询 + + + + + + + + 0 + 30 + + + + Qt::RightToLeft + + + background-color:rgb(207, 132, 33); +color:white; + + + + 重置 + + + + + + + + + + background-color:white; + + + + + + + 6 + + + 9 + + + 9 + + + 9 + + + + + + 0 + 0 + + + + + 120 + 40 + + + + OpenHandCursor + + + Qt::DefaultContextMenu + + + Qt::RightToLeft + + + false + + + background-color:rgb(9, 89, 179); +color:white; + + + 创建任务单 + + + true + + + + + + + + + + + + + + SizeVerCursor + + + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/datasyncview.cpp b/softwareDirectory/AutoVerScheme/datasyncview.cpp new file mode 100644 index 0000000..74cd41d --- /dev/null +++ b/softwareDirectory/AutoVerScheme/datasyncview.cpp @@ -0,0 +1,44 @@ +#include "datasyncview.h" +#include "ui_datasyncview.h" + +DataSyncView::DataSyncView(QWidget *parent) : + QWidget(parent), + ui(new Ui::DataSyncView) +{ + ui->setupUi(this); + this->initForm(); +} + +DataSyncView::~DataSyncView() +{ + delete ui; +} +void DataSyncView::initForm() +{ + //tableWidget设置 + //设置控件的边框显示 + ui->tableWidget->setStyleSheet("QHeaderView::section {" + "border: 1px solid grey;" + "border-left:none;" + "border-top:none;" + "background-color:white;" + " color:black;" + "font: bold 18px Arial, sans-serif;" + "}"); + + ui->tableWidget->setRowCount(10); // 设置10行 + ui->tableWidget->setColumnCount(4); // 设置11列 + ui->tableWidget->setColumnWidth(0, 80); // 设置第一列的宽度为100像素 + ui->tableWidget->verticalHeader()->setParent(nullptr); //隐藏行头 + QTableWidgetItem *item = new QTableWidgetItem("测试数据"); + item->setTextAlignment(Qt::AlignCenter); + ui->tableWidget->setItem(0, 0, item); //设置数据 + + //初始化TableWidget 设置列 + QStringList headers; + headers << "序号" << "同步时间" << "是否同步成功" << "备注" ; + ui->tableWidget->setHorizontalHeaderLabels(headers); + + + +} diff --git a/softwareDirectory/AutoVerScheme/datasyncview.h b/softwareDirectory/AutoVerScheme/datasyncview.h new file mode 100644 index 0000000..9a73de9 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/datasyncview.h @@ -0,0 +1,24 @@ +#ifndef DATASYNCVIEW_H +#define DATASYNCVIEW_H + +#include + +namespace Ui { +class DataSyncView; +} + +class DataSyncView : public QWidget +{ + Q_OBJECT + +public: + explicit DataSyncView(QWidget *parent = nullptr); + ~DataSyncView(); +private slots: + void initForm(); //初始化界面数据 + +private: + Ui::DataSyncView *ui; +}; + +#endif // DATASYNCVIEW_H diff --git a/softwareDirectory/AutoVerScheme/datasyncview.ui b/softwareDirectory/AutoVerScheme/datasyncview.ui new file mode 100644 index 0000000..c45bf56 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/datasyncview.ui @@ -0,0 +1,133 @@ + + + DataSyncView + + + + 0 + 0 + 874 + 531 + + + + 数据同步 + + + background-color:rgba(240, 240, 240, 1); + + + + + + background-color:white; + + + + + + + + + + 0 + 0 + + + + background-color:white; +border:0; + + + + + + + + + + 0 + 0 + + + + font:bold 20px Arial, sans-serif; +color:#334582; + + + 同步记录 + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + background-color:#334582; + font: bold 18px Arial, sans-serif; +color:white; +padding:10px; + + + 下载数据 + + + + + + + + 200 + 0 + + + + + 100 + 40 + + + + Qt::RightToLeft + + + background-color:#334582; + font: bold 18px Arial, sans-serif; +color:white; +padding:10px; + + + 发送同步请求 + + + + + + + + + + + + + + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/depar_task.cpp b/softwareDirectory/AutoVerScheme/depar_task.cpp index de39775..5f0f93a 100644 --- a/softwareDirectory/AutoVerScheme/depar_task.cpp +++ b/softwareDirectory/AutoVerScheme/depar_task.cpp @@ -2,13 +2,19 @@ #include "ui_depar_task.h" #include "QMessageBox" #include "InfoBase.h" +#include "QStandardItemModel" Depar_Task::Depar_Task(QWidget *parent) : InfoBase(parent), ui(new Ui::Depar_Task) { ui->setupUi(this); + //初始化列表 this->initForm(); + + + + } Depar_Task::~Depar_Task() @@ -17,8 +23,31 @@ } void Depar_Task::initForm() { + //tableWidget设置 + //设置控件的边框显示 + ui->tableWidget->setStyleSheet("QHeaderView::section {" + "border: 1px solid rgba(197, 196, 196, 1);" + "border-left:none;" + "border-top:none;" + "background-color:white;" + "}"); - //ShowMessageBox("标题","初始化完成"); + ui->tableWidget->setRowCount(10); // 设置10行 + ui->tableWidget->setColumnCount(10); // 设置11列 + ui->tableWidget->setColumnWidth(0, 80); // 设置第一列的宽度为100像素 + ui->tableWidget->verticalHeader()->setParent(nullptr); //隐藏行头 + QTableWidgetItem *item = new QTableWidgetItem("测试数据"); + item->setTextAlignment(Qt::AlignCenter); //文件居中 + ui->tableWidget->setItem(0, 0, item); //设置数据 + + //初始化TableWidget 设置列 + QStringList headers; + headers << "序号" << "设备名称" << "型号规则" << "辅助字段" << "辅助字段"<< "出厂编号" + << "生产厂家" <<"委托方"<<"使用部门"<<"要求检完时间"<<"是否加急"; + ui->tableWidget->setHorizontalHeaderLabels(headers); + + + } void Depar_Task::ShowMessageBox(QString title,QString value) { // 创建一个QMessageBox对象 @@ -38,5 +67,5 @@ } void Depar_Task::Load() { - ShowMessageBox("部门任务页面","部门任务初始化完成"); + //ShowMessageBox("部门任务页面","部门任务初始化完成"); } diff --git a/softwareDirectory/AutoVerScheme/depar_task.h b/softwareDirectory/AutoVerScheme/depar_task.h index 8716faf..110008d 100644 --- a/softwareDirectory/AutoVerScheme/depar_task.h +++ b/softwareDirectory/AutoVerScheme/depar_task.h @@ -3,6 +3,7 @@ #include "InfoBase.h" +#include "QStandardItemModel" namespace Ui { class Depar_Task; @@ -20,9 +21,12 @@ private slots: void initForm(); //初始化界面数据 void ShowMessageBox(QString title,QString value); + //继承父类的Load方法 void Load() override; + private: Ui::Depar_Task *ui; + // QStandardItemModel *model; }; #endif // DEPAR_TASK_H diff --git a/softwareDirectory/AutoVerScheme/depar_task.ui b/softwareDirectory/AutoVerScheme/depar_task.ui index ff3d44f..1a95cc4 100644 --- a/softwareDirectory/AutoVerScheme/depar_task.ui +++ b/softwareDirectory/AutoVerScheme/depar_task.ui @@ -6,7 +6,7 @@ 0 0 - 1184 + 1190 456 @@ -143,7 +143,34 @@ + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + 0 + 30 + + + + Qt::RightToLeft + + + background-color:rgb(3, 58, 152); +color:white; + + 查询 @@ -151,6 +178,20 @@ + + + 0 + 30 + + + + Qt::RightToLeft + + + background-color:rgb(207, 132, 33); +color:white; + + 重置 @@ -168,8 +209,15 @@ + + + - + + + + + diff --git a/softwareDirectory/AutoVerScheme/indexwindow.cpp b/softwareDirectory/AutoVerScheme/indexwindow.cpp index fca900a..cbba812 100644 --- a/softwareDirectory/AutoVerScheme/indexwindow.cpp +++ b/softwareDirectory/AutoVerScheme/indexwindow.cpp @@ -13,11 +13,37 @@ { ui->setupUi(this); this->initForm(); +/* + //主要作用 当页面关闭后 回到indexwindow页面 并 通过~IndexWindow 释放此页面指针所占用内存 + // 假设 ShowDataSyncView 是一个指向 DataSyncView 实例的指针 + // 当 ShowDataSyncView 关闭时,它的 closed() 信号会被发出 + // 连接这个信号到 IndexWindow 的 onNewWindowClosed() 槽函数 + if(ShowDataSyncView) { + //数据同步页面 信号槽 + connect(ShowDataSyncView, &DataSyncView::close, this, &IndexWindow::onNewWindowClosed); + } + if(ShowInfoManageView) { + //信息管理 信号槽 + connect(ShowInfoManageView, &InfoManageView::close, this, &IndexWindow::onNewWindowClosed); + } + */ } IndexWindow::~IndexWindow() { delete ui; + //释放页面内存 + /* + if (ShowDataSyncView) { + ShowDataSyncView->close(); + delete ShowDataSyncView; + } + else if(ShowInfoManageView) + { + ShowInfoManageView->close(); + delete ShowInfoManageView; + } + */ } void IndexWindow::initForm() { @@ -57,6 +83,15 @@ } + +void IndexWindow::onNewWindowClosed() +{ + // 新窗体关闭后,设置 IndexWindow 为活动窗口 + this->activateWindow(); + // 也可以设置焦点到 MainWindow 中的某个控件 + // ui->someWidget->setFocus(); +} + void IndexWindow::showCheckWindow() { CheckWindow *checkWindow = new CheckWindow; @@ -65,6 +100,26 @@ checkWindow->show(); } +//信息管理按钮 +void IndexWindow::on_tb3_clicked() +{ + InfoManageView *ShowInfoManageView = new InfoManageView(); + ShowInfoManageView->setWindowState(Qt::WindowMaximized); + ShowInfoManageView->setWindowModality(Qt::ApplicationModal); + ShowInfoManageView->show(); +} +//数据同步按钮 +void IndexWindow::on_tb6_clicked() +{ + + // 创建新窗体实例并显示 + DataSyncView *ShowDataSyncView = new DataSyncView(); + ShowDataSyncView->setWindowState(Qt::WindowMaximized); + ShowDataSyncView->setWindowModality(Qt::ApplicationModal); + ShowDataSyncView->show(); +} + + void IndexWindow::showCheckMethod() { CheckMethodManage *checkWindow = new CheckMethodManage; diff --git a/softwareDirectory/AutoVerScheme/indexwindow.h b/softwareDirectory/AutoVerScheme/indexwindow.h index a05d802..190b0f1 100644 --- a/softwareDirectory/AutoVerScheme/indexwindow.h +++ b/softwareDirectory/AutoVerScheme/indexwindow.h @@ -2,6 +2,8 @@ #define INDEXWINDOW_H #include +#include "datasyncView.h" +#include "infomanageview.h" namespace Ui { class IndexWindow; @@ -23,8 +25,21 @@ void showVerifyMethod(); + void on_tb3_clicked(); + + void on_tb6_clicked(); + + //页面关闭响应函数 + void onNewWindowClosed(); + + void on_tb1_clicked(); + private: Ui::IndexWindow *ui; + + //数据同步页面 指针 + //DataSyncView *ShowDataSyncView; + //InfoManageView *ShowInfoManageView; }; #endif // INDEXWINDOW_H diff --git a/softwareDirectory/AutoVerScheme/indexwindow.ui b/softwareDirectory/AutoVerScheme/indexwindow.ui index d69a54d..dec7207 100644 --- a/softwareDirectory/AutoVerScheme/indexwindow.ui +++ b/softwareDirectory/AutoVerScheme/indexwindow.ui @@ -189,7 +189,7 @@ - + 0 @@ -236,7 +236,7 @@ - + 0 @@ -270,7 +270,7 @@ - + 0 @@ -310,7 +310,7 @@ - + 0 @@ -357,7 +357,7 @@ - + 0 @@ -423,7 +423,7 @@ - + 0 @@ -521,66 +521,34 @@ - toolButton_4 + tb1 clicked() IndexWindow showCheckWindow() - 214 - 250 + 260 + 276 - 351 - 107 + 666 + 394 - toolButton_6 + tb4 clicked() IndexWindow showCheckMethod() - 249 - 606 + 260 + 598 - 331 - 452 - - - - - toolButton_5 - clicked() - IndexWindow - showVerifyMethod() - - - 706 - 589 - - - 692 - 442 - - - - - toolButton_2 - clicked() - IndexWindow - showVerifyWindow() - - - 758 - 249 - - - 862 - 114 + 666 + 394 diff --git a/softwareDirectory/AutoVerScheme/infomanageview.cpp b/softwareDirectory/AutoVerScheme/infomanageview.cpp index a206c6f..d045c60 100644 --- a/softwareDirectory/AutoVerScheme/infomanageview.cpp +++ b/softwareDirectory/AutoVerScheme/infomanageview.cpp @@ -2,6 +2,7 @@ #include "ui_infomanageview.h" #include #include +#include //子窗体 #include "depar_task.h" #include "my_task.h" @@ -19,6 +20,7 @@ { ui->setupUi(this); this->setWindowTitle("信息管理"); + //初始化调用所有函数 this->initForm(); this->initWidget(); @@ -115,7 +117,8 @@ //底部加个弹簧 QSpacerItem *verticalSpacer = new QSpacerItem(20, 40, QSizePolicy::Minimum, QSizePolicy::Expanding); ui->widgetLeft->layout()->addItem(verticalSpacer); - btns.at(names.count() - 1)->click(); + + btns.at(0)->click();//选择启动页面 第一个 } //按钮点击切换UI事件 void InfoManageView::buttonClicked() diff --git a/softwareDirectory/AutoVerScheme/infomanageview.h b/softwareDirectory/AutoVerScheme/infomanageview.h index 3c1463f..5e44bba 100644 --- a/softwareDirectory/AutoVerScheme/infomanageview.h +++ b/softwareDirectory/AutoVerScheme/infomanageview.h @@ -2,6 +2,7 @@ #define INFOMANAGEVIEW_H #include +#include class QAbstractButton; diff --git a/softwareDirectory/AutoVerScheme/infomanageview.ui b/softwareDirectory/AutoVerScheme/infomanageview.ui index 4b39e7d..ef0b87b 100644 --- a/softwareDirectory/AutoVerScheme/infomanageview.ui +++ b/softwareDirectory/AutoVerScheme/infomanageview.ui @@ -10,8 +10,15 @@ 644 + + Qt::DefaultContextMenu + - Form + 信息管理 + + + color:black; +background-color:rgba(240, 240, 240, 1); @@ -68,8 +75,8 @@ - - 170 + + 0 0 diff --git a/softwareDirectory/AutoVerScheme/inspectdataitem.cpp b/softwareDirectory/AutoVerScheme/inspectdataitem.cpp index e9c2adc..efc00ba 100644 --- a/softwareDirectory/AutoVerScheme/inspectdataitem.cpp +++ b/softwareDirectory/AutoVerScheme/inspectdataitem.cpp @@ -1,14 +1,62 @@ #include "inspectdataitem.h" #include "ui_inspectdataitem.h" +#include "QMessageBox.h" InspectDataItem::InspectDataItem(QWidget *parent) : - QWidget(parent), + InfoBase(parent), ui(new Ui::InspectDataItem) { ui->setupUi(this); + this->initForm(); } InspectDataItem::~InspectDataItem() { delete ui; } +void InspectDataItem::initForm() +{ + //tableWidget设置 + //设置控件的边框显示 + ui->tableWidget->setStyleSheet("QHeaderView::section {" + "border: 1px solid rgba(197, 196, 196, 1);" + "border-left:none;" + "border-top:none;" + "background-color:white;" + "}"); + + ui->tableWidget->setRowCount(10); // 设置10行 + ui->tableWidget->setColumnCount(12); // 设置11列 + ui->tableWidget->setColumnWidth(0, 80); // 设置第一列的宽度为100像素 + ui->tableWidget->verticalHeader()->setParent(nullptr); //隐藏行头 + QTableWidgetItem *item = new QTableWidgetItem("测试数据"); + item->setTextAlignment(Qt::AlignCenter); + ui->tableWidget->setItem(0, 0, item); //设置数据 + + //初始化TableWidget 设置列 + QStringList headers; + headers << "序号" << "设备名称" << "型号规则" << "出厂编号" + <<"核查件名称"<<"核查件型号"<<"核查件编号" <<"核查员" + << "核查日期" <<"实验室"<<"部门"<<"操作"; + ui->tableWidget->setHorizontalHeaderLabels(headers); +} +void InspectDataItem::ShowMessageBox(QString title,QString value) { + // 创建一个QMessageBox对象 + QMessageBox msgBox; + + // 设置消息框的标题 + msgBox.setWindowTitle(title); + + // 设置消息框的文本内容 + msgBox.setText(value); + + // 设置消息框的标准按钮,这里是“确定”按钮 + msgBox.setStandardButtons(QMessageBox::Ok); + + // 显示消息框 + msgBox.exec(); +} +void InspectDataItem::Load() +{ + //ShowMessageBox("核查数据","核查数据"); +} diff --git a/softwareDirectory/AutoVerScheme/inspectdataitem.h b/softwareDirectory/AutoVerScheme/inspectdataitem.h index 57551bb..bdf7066 100644 --- a/softwareDirectory/AutoVerScheme/inspectdataitem.h +++ b/softwareDirectory/AutoVerScheme/inspectdataitem.h @@ -2,19 +2,24 @@ #define INSPECTDATAITEM_H #include +#include "InfoBase.h" namespace Ui { class InspectDataItem; } -class InspectDataItem : public QWidget +class InspectDataItem : public InfoBase { Q_OBJECT public: explicit InspectDataItem(QWidget *parent = nullptr); ~InspectDataItem(); - +private slots: + void initForm(); //初始化界面数据 + void ShowMessageBox(QString title,QString value); + //继承父类的Load方法 + void Load() override; private: Ui::InspectDataItem *ui; }; diff --git a/softwareDirectory/AutoVerScheme/inspectdataitem.ui b/softwareDirectory/AutoVerScheme/inspectdataitem.ui index 45f04e0..86786c9 100644 --- a/softwareDirectory/AutoVerScheme/inspectdataitem.ui +++ b/softwareDirectory/AutoVerScheme/inspectdataitem.ui @@ -6,26 +6,236 @@ 0 0 - 400 - 300 + 1362 + 543 Form - - - - 120 - 130 - 89 - 24 - - - - 核查数据管理 - - + + + + + + 0 + 0 + + + + background-color:white; + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 设备名称: + + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 型号规则: + + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 出厂编号: + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 核查员: + + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 核查日期: + + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 实验室: + + + + + + + + + + Qt::Horizontal + + + QSizePolicy::Expanding + + + + 40 + 20 + + + + + + + + Qt::RightToLeft + + + 查询 + + + + + + + Qt::RightToLeft + + + 重置 + + + + + + + + + + background-color:white; + + + + + + + + + + + + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/my_task.cpp b/softwareDirectory/AutoVerScheme/my_task.cpp index 40aceb2..559a73b 100644 --- a/softwareDirectory/AutoVerScheme/my_task.cpp +++ b/softwareDirectory/AutoVerScheme/my_task.cpp @@ -7,7 +7,8 @@ ui(new Ui::My_Task) { ui->setupUi(this); - + //初始化QStandardItemModel + model=new QStandardItemModel(parent); this->initForm(); } @@ -17,7 +18,28 @@ } void My_Task::initForm() { + //tableWidget设置 + //设置控件的边框显示 + ui->tableWidget->setStyleSheet("QHeaderView::section {" + "border: 1px solid rgba(197, 196, 196, 1);" + "border-left:none;" + "border-top:none;" + "background-color:white;" + "}"); + ui->tableWidget->setRowCount(10); // 设置10行 + ui->tableWidget->setColumnCount(10); // 设置11列 + ui->tableWidget->setColumnWidth(0, 80); // 设置第一列的宽度为100像素 + ui->tableWidget->verticalHeader()->setParent(nullptr); //隐藏行头 + QTableWidgetItem *item = new QTableWidgetItem("测试数据"); + item->setTextAlignment(Qt::AlignCenter); + ui->tableWidget->setItem(0, 0, item); //设置数据 + + //初始化TableWidget 设置列 + QStringList headers; + headers << "序号" << "设备名称" << "型号规则" << "辅助字段" << "辅助字段"<< "出厂编号" + << "生产厂家" <<"委托方"<<"使用部门"<<"要求检完时间"<<"是否加急"; + ui->tableWidget->setHorizontalHeaderLabels(headers); } void My_Task::ShowMessageBox(QString title,QString value) { @@ -38,5 +60,5 @@ } void My_Task::Load() { - ShowMessageBox("我的任务页面","我的任务初始化完成"); + //ShowMessageBox("我的任务页面","我的任务初始化完成"); } diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro index 1280b70..dfb0418 100644 --- a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro @@ -22,6 +22,7 @@ checkmethodmanage.cpp \ checkwindow.cpp \ create_task.cpp \ + datasyncview.cpp \ depar_task.cpp \ indexwindow.cpp \ infomanageview.cpp \ @@ -43,6 +44,7 @@ checkmethodmanage.h \ checkwindow.h \ create_task.h \ + datasyncview.h \ depar_task.h \ indexwindow.h \ infomanageview.h \ @@ -62,6 +64,7 @@ checkmethodmanage.ui \ checkwindow.ui \ create_task.ui \ + datasyncview.ui \ depar_task.ui \ indexwindow.ui \ infomanageview.ui \ diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user index 6ea03c5..93c39cb 100644 --- a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user @@ -1,10 +1,10 @@ - + EnvironmentId - {2746248a-b112-4e0f-9ae0-9e61f2a42309} + {c08df58c-84a7-4965-bca6-e98789474efa} ProjectExplorer.Project.ActiveTarget @@ -71,7 +71,7 @@ 0 0 - D:/dev/QT/AutoCalHainan/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug true @@ -119,7 +119,7 @@ 2 - D:/dev/QT/AutoCalHainan/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Release + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Release true @@ -167,7 +167,7 @@ 0 - D:/dev/QT/AutoCalHainan/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Profile + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Profile true @@ -287,8 +287,8 @@ 2 - Qt4ProjectManager.Qt4RunConfiguration:D:/dev/QT/AutoCalHainan/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro - D:/dev/QT/AutoCalHainan/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro + Qt4ProjectManager.Qt4RunConfiguration:C:/Users/admin/Desktop/SVN/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro + C:/Users/admin/Desktop/SVN/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro false @@ -299,7 +299,7 @@ false true - D:/dev/QT/AutoCalHainan/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug 1 @@ -314,7 +314,7 @@ 0 0 - D:/dev/QT/AutoCalHainan/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Debug + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Debug true @@ -362,7 +362,7 @@ 2 - D:/dev/QT/AutoCalHainan/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Release + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Release true @@ -410,7 +410,7 @@ 0 - D:/dev/QT/AutoCalHainan/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Profile + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Profile true @@ -530,14 +530,15 @@ 2 - - ProjectExplorer.CustomExecutableRunConfiguration - + AutoVerScheme2 + 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 diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user.c08df58 b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user.c08df58 deleted file mode 100644 index 495f95c..0000000 --- a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user.c08df58 +++ /dev/null @@ -1,563 +0,0 @@ - - - - - - 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 32-bit - Desktop Qt 5.14.2 MinGW 32-bit - qt.qt5.5142.win32_mingw73_kit - 0 - 0 - 0 - - D:/Auto_verification_scheme/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 - - - D:/Auto_verification_scheme/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 - - - D:/Auto_verification_scheme/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 - - D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug - - 1 - - - - ProjectExplorer.Project.Target.1 - - 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 - - D:/Auto_verification_scheme/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 - - - D:/Auto_verification_scheme/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 - - - D:/Auto_verification_scheme/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 - - AutoVerScheme2 - 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/InfoBase.h b/softwareDirectory/AutoVerScheme/InfoBase.h index 7fec63e..084cf3f 100644 --- a/softwareDirectory/AutoVerScheme/InfoBase.h +++ b/softwareDirectory/AutoVerScheme/InfoBase.h @@ -2,6 +2,7 @@ #define INFOBASE_H #include +#include "QStandardItemModel" ///信号管理页面的基类 所有信息管理页面都继承于InfoBase /// 便于统一管理 所有子类必须实现Load方法 /// 每次按钮点击切换都会调用Load方法 用于每次页面的数据刷新 @@ -11,6 +12,8 @@ InfoBase(QWidget *parent = nullptr): QWidget(parent){}; // 纯虚函数 virtual void Load()=0; + //QStandardItemModel 的实例。这个模型将用于存储和管理数据。 + QStandardItemModel *model; }; #endif // INFOBASE_H diff --git a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.cpp b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.cpp index 7ac1e87..ffb2bbc 100644 --- a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.cpp +++ b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.cpp @@ -1,14 +1,64 @@ #include "beexamined_deviceitem.h" #include "ui_beexamined_deviceitem.h" +#include "QMessageBox.h" BeExamined_DeviceItem::BeExamined_DeviceItem(QWidget *parent) : - QWidget(parent), + InfoBase(parent), ui(new Ui::BeExamined_DeviceItem) { ui->setupUi(this); + this->initForm(); } BeExamined_DeviceItem::~BeExamined_DeviceItem() { delete ui; } + +void BeExamined_DeviceItem::initForm() +{ + + //tableWidget设置 + //设置控件的边框显示 + ui->tableWidget->setStyleSheet("QHeaderView::section {" + "border: 1px solid rgba(197, 196, 196, 1);" + "border-left:none;" + "border-top:none;" + "background-color:white;" + "}"); + + ui->tableWidget->setRowCount(10); // 设置10行 + ui->tableWidget->setColumnCount(12); // 设置11列 + ui->tableWidget->setColumnWidth(0, 80); // 设置第一列的宽度为100像素 + ui->tableWidget->verticalHeader()->setParent(nullptr); //隐藏行头 + QTableWidgetItem *item = new QTableWidgetItem("测试数据"); + item->setTextAlignment(Qt::AlignCenter); + ui->tableWidget->setItem(0, 0, item); //设置数据 + + //初始化TableWidget 设置列 + QStringList headers; + headers << "序号" << "设备名称" << "型号规则" << "辅助字段" << "出厂编号" + << "生产厂家"<<"所在单位" <<"使用部门"<<"计量标识"<<"检定周期"<<"证书有效期"<<"操作"; + ui->tableWidget->setHorizontalHeaderLabels(headers); + +} +void BeExamined_DeviceItem::ShowMessageBox(QString title,QString value) { + // 创建一个QMessageBox对象 + QMessageBox msgBox; + + // 设置消息框的标题 + msgBox.setWindowTitle(title); + + // 设置消息框的文本内容 + msgBox.setText(value); + + // 设置消息框的标准按钮,这里是“确定”按钮 + msgBox.setStandardButtons(QMessageBox::Ok); + + // 显示消息框 + msgBox.exec(); +} +void BeExamined_DeviceItem::Load() +{ + //ShowMessageBox("被检设备","被检设备初始化完成"); +} diff --git a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.h b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.h index 76b061d..ae46979 100644 --- a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.h +++ b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.h @@ -2,12 +2,13 @@ #define BEEXAMINED_DEVICEITEM_H #include +#include "InfoBase.h" namespace Ui { class BeExamined_DeviceItem; } -class BeExamined_DeviceItem : public QWidget +class BeExamined_DeviceItem : public InfoBase { Q_OBJECT @@ -15,6 +16,11 @@ explicit BeExamined_DeviceItem(QWidget *parent = nullptr); ~BeExamined_DeviceItem(); +private slots: + void initForm(); //初始化界面数据 + void ShowMessageBox(QString title,QString value); + //继承父类的Load方法 + void Load() override; private: Ui::BeExamined_DeviceItem *ui; }; diff --git a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.ui b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.ui index af9f7bf..5a0a3c9 100644 --- a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.ui +++ b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.ui @@ -6,26 +6,236 @@ 0 0 - 400 - 300 + 1291 + 575 Form - - - - 130 - 140 - 89 - 24 - - - - 被检设备管理 - - + + + + + + 0 + 0 + + + + background-color:white; + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 设备名称: + + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 型号规则: + + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 出厂编号: + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 生产厂家: + + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 使用部门: + + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 使用单位: + + + + + + + + + + Qt::Horizontal + + + QSizePolicy::Expanding + + + + 40 + 20 + + + + + + + + Qt::RightToLeft + + + 查询 + + + + + + + Qt::RightToLeft + + + 重置 + + + + + + + + + + background-color:white; + + + + + + + + + + + + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/create_task.cpp b/softwareDirectory/AutoVerScheme/create_task.cpp index 4193efc..9b49a1a 100644 --- a/softwareDirectory/AutoVerScheme/create_task.cpp +++ b/softwareDirectory/AutoVerScheme/create_task.cpp @@ -1,14 +1,61 @@ #include "create_task.h" #include "ui_create_task.h" +#include "QMessageBox" Create_Task::Create_Task(QWidget *parent) : - QWidget(parent), + InfoBase(parent), ui(new Ui::Create_Task) { ui->setupUi(this); + this->initForm(); } Create_Task::~Create_Task() { delete ui; } +void Create_Task::initForm() +{ + //tableWidget设置 + //设置控件的边框显示 + ui->tableWidget->setStyleSheet("QHeaderView::section {" + "border: 1px solid rgba(197, 196, 196, 1);" + "border-left:none;" + "border-top:none;" + "background-color:white;" + "}"); + + ui->tableWidget->setRowCount(10); // 设置10行 + ui->tableWidget->setColumnCount(8); // 设置11列 + ui->tableWidget->setColumnWidth(0, 80); // 设置第一列的宽度为100像素 + ui->tableWidget->verticalHeader()->setParent(nullptr); //隐藏行头 + QTableWidgetItem *item = new QTableWidgetItem("测试数据"); + item->setTextAlignment(Qt::AlignCenter); + ui->tableWidget->setItem(0, 0, item); //设置数据 + + //初始化TableWidget 设置列 + QStringList headers; + headers << "序号" << "任务单编号" << "委托方"<< "使用部门" << "要求检完时间" << "送检人"<<"是否加急"<<"操作"; + ui->tableWidget->setHorizontalHeaderLabels(headers); + //ShowMessageBox("标题","初始化完成"); +} +void Create_Task::ShowMessageBox(QString title,QString value) { + // 创建一个QMessageBox对象 + QMessageBox msgBox; + + // 设置消息框的标题 + msgBox.setWindowTitle(title); + + // 设置消息框的文本内容 + msgBox.setText(value); + + // 设置消息框的标准按钮,这里是“确定”按钮 + msgBox.setStandardButtons(QMessageBox::Ok); + + // 显示消息框 + msgBox.exec(); +} +void Create_Task::Load() +{ + //ShowMessageBox("创建任务界面","创建任务界面初始化完成"); +} diff --git a/softwareDirectory/AutoVerScheme/create_task.h b/softwareDirectory/AutoVerScheme/create_task.h index e2264de..7cf383f 100644 --- a/softwareDirectory/AutoVerScheme/create_task.h +++ b/softwareDirectory/AutoVerScheme/create_task.h @@ -1,13 +1,14 @@ #ifndef CREATE_TASK_H #define CREATE_TASK_H +#include "InfoBase.h" #include namespace Ui { class Create_Task; } -class Create_Task : public QWidget +class Create_Task : public InfoBase { Q_OBJECT @@ -15,6 +16,11 @@ explicit Create_Task(QWidget *parent = nullptr); ~Create_Task(); +private slots: + void initForm(); //初始化界面数据 + void ShowMessageBox(QString title,QString value); + //继承父类的Load方法 + void Load() override; private: Ui::Create_Task *ui; }; diff --git a/softwareDirectory/AutoVerScheme/create_task.ui b/softwareDirectory/AutoVerScheme/create_task.ui index b79c6a1..d9d88ed 100644 --- a/softwareDirectory/AutoVerScheme/create_task.ui +++ b/softwareDirectory/AutoVerScheme/create_task.ui @@ -6,29 +6,294 @@ 0 0 - 400 - 300 + 1184 + 580 Form - - background-color:red; + + Qt::LeftToRight - - - - 140 - 120 - 89 - 24 - - - - 创建任务单 - - + + + + + + + + + 0 + 0 + + + + background-color:white; + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 任务单编号: + + + + + + + + 0 + 0 + + + + + + + + + 0 + 0 + + + + + 50 + 0 + + + + 委托方: + + + + + + + + 0 + 0 + + + + + 0 + 0 + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 使用部门: + + + + + + + + 0 + 0 + + + + + 0 + 0 + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 要求完成时间: + + + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + 0 + 30 + + + + Qt::RightToLeft + + + background-color:rgb(3, 58, 132); +color:white; + + + + 查询 + + + + + + + + 0 + 30 + + + + Qt::RightToLeft + + + background-color:rgb(207, 132, 33); +color:white; + + + + 重置 + + + + + + + + + + background-color:white; + + + + + + + 6 + + + 9 + + + 9 + + + 9 + + + + + + 0 + 0 + + + + + 120 + 40 + + + + OpenHandCursor + + + Qt::DefaultContextMenu + + + Qt::RightToLeft + + + false + + + background-color:rgb(9, 89, 179); +color:white; + + + 创建任务单 + + + true + + + + + + + + + + + + + + SizeVerCursor + + + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/datasyncview.cpp b/softwareDirectory/AutoVerScheme/datasyncview.cpp new file mode 100644 index 0000000..74cd41d --- /dev/null +++ b/softwareDirectory/AutoVerScheme/datasyncview.cpp @@ -0,0 +1,44 @@ +#include "datasyncview.h" +#include "ui_datasyncview.h" + +DataSyncView::DataSyncView(QWidget *parent) : + QWidget(parent), + ui(new Ui::DataSyncView) +{ + ui->setupUi(this); + this->initForm(); +} + +DataSyncView::~DataSyncView() +{ + delete ui; +} +void DataSyncView::initForm() +{ + //tableWidget设置 + //设置控件的边框显示 + ui->tableWidget->setStyleSheet("QHeaderView::section {" + "border: 1px solid grey;" + "border-left:none;" + "border-top:none;" + "background-color:white;" + " color:black;" + "font: bold 18px Arial, sans-serif;" + "}"); + + ui->tableWidget->setRowCount(10); // 设置10行 + ui->tableWidget->setColumnCount(4); // 设置11列 + ui->tableWidget->setColumnWidth(0, 80); // 设置第一列的宽度为100像素 + ui->tableWidget->verticalHeader()->setParent(nullptr); //隐藏行头 + QTableWidgetItem *item = new QTableWidgetItem("测试数据"); + item->setTextAlignment(Qt::AlignCenter); + ui->tableWidget->setItem(0, 0, item); //设置数据 + + //初始化TableWidget 设置列 + QStringList headers; + headers << "序号" << "同步时间" << "是否同步成功" << "备注" ; + ui->tableWidget->setHorizontalHeaderLabels(headers); + + + +} diff --git a/softwareDirectory/AutoVerScheme/datasyncview.h b/softwareDirectory/AutoVerScheme/datasyncview.h new file mode 100644 index 0000000..9a73de9 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/datasyncview.h @@ -0,0 +1,24 @@ +#ifndef DATASYNCVIEW_H +#define DATASYNCVIEW_H + +#include + +namespace Ui { +class DataSyncView; +} + +class DataSyncView : public QWidget +{ + Q_OBJECT + +public: + explicit DataSyncView(QWidget *parent = nullptr); + ~DataSyncView(); +private slots: + void initForm(); //初始化界面数据 + +private: + Ui::DataSyncView *ui; +}; + +#endif // DATASYNCVIEW_H diff --git a/softwareDirectory/AutoVerScheme/datasyncview.ui b/softwareDirectory/AutoVerScheme/datasyncview.ui new file mode 100644 index 0000000..c45bf56 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/datasyncview.ui @@ -0,0 +1,133 @@ + + + DataSyncView + + + + 0 + 0 + 874 + 531 + + + + 数据同步 + + + background-color:rgba(240, 240, 240, 1); + + + + + + background-color:white; + + + + + + + + + + 0 + 0 + + + + background-color:white; +border:0; + + + + + + + + + + 0 + 0 + + + + font:bold 20px Arial, sans-serif; +color:#334582; + + + 同步记录 + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + background-color:#334582; + font: bold 18px Arial, sans-serif; +color:white; +padding:10px; + + + 下载数据 + + + + + + + + 200 + 0 + + + + + 100 + 40 + + + + Qt::RightToLeft + + + background-color:#334582; + font: bold 18px Arial, sans-serif; +color:white; +padding:10px; + + + 发送同步请求 + + + + + + + + + + + + + + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/depar_task.cpp b/softwareDirectory/AutoVerScheme/depar_task.cpp index de39775..5f0f93a 100644 --- a/softwareDirectory/AutoVerScheme/depar_task.cpp +++ b/softwareDirectory/AutoVerScheme/depar_task.cpp @@ -2,13 +2,19 @@ #include "ui_depar_task.h" #include "QMessageBox" #include "InfoBase.h" +#include "QStandardItemModel" Depar_Task::Depar_Task(QWidget *parent) : InfoBase(parent), ui(new Ui::Depar_Task) { ui->setupUi(this); + //初始化列表 this->initForm(); + + + + } Depar_Task::~Depar_Task() @@ -17,8 +23,31 @@ } void Depar_Task::initForm() { + //tableWidget设置 + //设置控件的边框显示 + ui->tableWidget->setStyleSheet("QHeaderView::section {" + "border: 1px solid rgba(197, 196, 196, 1);" + "border-left:none;" + "border-top:none;" + "background-color:white;" + "}"); - //ShowMessageBox("标题","初始化完成"); + ui->tableWidget->setRowCount(10); // 设置10行 + ui->tableWidget->setColumnCount(10); // 设置11列 + ui->tableWidget->setColumnWidth(0, 80); // 设置第一列的宽度为100像素 + ui->tableWidget->verticalHeader()->setParent(nullptr); //隐藏行头 + QTableWidgetItem *item = new QTableWidgetItem("测试数据"); + item->setTextAlignment(Qt::AlignCenter); //文件居中 + ui->tableWidget->setItem(0, 0, item); //设置数据 + + //初始化TableWidget 设置列 + QStringList headers; + headers << "序号" << "设备名称" << "型号规则" << "辅助字段" << "辅助字段"<< "出厂编号" + << "生产厂家" <<"委托方"<<"使用部门"<<"要求检完时间"<<"是否加急"; + ui->tableWidget->setHorizontalHeaderLabels(headers); + + + } void Depar_Task::ShowMessageBox(QString title,QString value) { // 创建一个QMessageBox对象 @@ -38,5 +67,5 @@ } void Depar_Task::Load() { - ShowMessageBox("部门任务页面","部门任务初始化完成"); + //ShowMessageBox("部门任务页面","部门任务初始化完成"); } diff --git a/softwareDirectory/AutoVerScheme/depar_task.h b/softwareDirectory/AutoVerScheme/depar_task.h index 8716faf..110008d 100644 --- a/softwareDirectory/AutoVerScheme/depar_task.h +++ b/softwareDirectory/AutoVerScheme/depar_task.h @@ -3,6 +3,7 @@ #include "InfoBase.h" +#include "QStandardItemModel" namespace Ui { class Depar_Task; @@ -20,9 +21,12 @@ private slots: void initForm(); //初始化界面数据 void ShowMessageBox(QString title,QString value); + //继承父类的Load方法 void Load() override; + private: Ui::Depar_Task *ui; + // QStandardItemModel *model; }; #endif // DEPAR_TASK_H diff --git a/softwareDirectory/AutoVerScheme/depar_task.ui b/softwareDirectory/AutoVerScheme/depar_task.ui index ff3d44f..1a95cc4 100644 --- a/softwareDirectory/AutoVerScheme/depar_task.ui +++ b/softwareDirectory/AutoVerScheme/depar_task.ui @@ -6,7 +6,7 @@ 0 0 - 1184 + 1190 456 @@ -143,7 +143,34 @@ + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + 0 + 30 + + + + Qt::RightToLeft + + + background-color:rgb(3, 58, 152); +color:white; + + 查询 @@ -151,6 +178,20 @@ + + + 0 + 30 + + + + Qt::RightToLeft + + + background-color:rgb(207, 132, 33); +color:white; + + 重置 @@ -168,8 +209,15 @@ + + + - + + + + + diff --git a/softwareDirectory/AutoVerScheme/indexwindow.cpp b/softwareDirectory/AutoVerScheme/indexwindow.cpp index fca900a..cbba812 100644 --- a/softwareDirectory/AutoVerScheme/indexwindow.cpp +++ b/softwareDirectory/AutoVerScheme/indexwindow.cpp @@ -13,11 +13,37 @@ { ui->setupUi(this); this->initForm(); +/* + //主要作用 当页面关闭后 回到indexwindow页面 并 通过~IndexWindow 释放此页面指针所占用内存 + // 假设 ShowDataSyncView 是一个指向 DataSyncView 实例的指针 + // 当 ShowDataSyncView 关闭时,它的 closed() 信号会被发出 + // 连接这个信号到 IndexWindow 的 onNewWindowClosed() 槽函数 + if(ShowDataSyncView) { + //数据同步页面 信号槽 + connect(ShowDataSyncView, &DataSyncView::close, this, &IndexWindow::onNewWindowClosed); + } + if(ShowInfoManageView) { + //信息管理 信号槽 + connect(ShowInfoManageView, &InfoManageView::close, this, &IndexWindow::onNewWindowClosed); + } + */ } IndexWindow::~IndexWindow() { delete ui; + //释放页面内存 + /* + if (ShowDataSyncView) { + ShowDataSyncView->close(); + delete ShowDataSyncView; + } + else if(ShowInfoManageView) + { + ShowInfoManageView->close(); + delete ShowInfoManageView; + } + */ } void IndexWindow::initForm() { @@ -57,6 +83,15 @@ } + +void IndexWindow::onNewWindowClosed() +{ + // 新窗体关闭后,设置 IndexWindow 为活动窗口 + this->activateWindow(); + // 也可以设置焦点到 MainWindow 中的某个控件 + // ui->someWidget->setFocus(); +} + void IndexWindow::showCheckWindow() { CheckWindow *checkWindow = new CheckWindow; @@ -65,6 +100,26 @@ checkWindow->show(); } +//信息管理按钮 +void IndexWindow::on_tb3_clicked() +{ + InfoManageView *ShowInfoManageView = new InfoManageView(); + ShowInfoManageView->setWindowState(Qt::WindowMaximized); + ShowInfoManageView->setWindowModality(Qt::ApplicationModal); + ShowInfoManageView->show(); +} +//数据同步按钮 +void IndexWindow::on_tb6_clicked() +{ + + // 创建新窗体实例并显示 + DataSyncView *ShowDataSyncView = new DataSyncView(); + ShowDataSyncView->setWindowState(Qt::WindowMaximized); + ShowDataSyncView->setWindowModality(Qt::ApplicationModal); + ShowDataSyncView->show(); +} + + void IndexWindow::showCheckMethod() { CheckMethodManage *checkWindow = new CheckMethodManage; diff --git a/softwareDirectory/AutoVerScheme/indexwindow.h b/softwareDirectory/AutoVerScheme/indexwindow.h index a05d802..190b0f1 100644 --- a/softwareDirectory/AutoVerScheme/indexwindow.h +++ b/softwareDirectory/AutoVerScheme/indexwindow.h @@ -2,6 +2,8 @@ #define INDEXWINDOW_H #include +#include "datasyncView.h" +#include "infomanageview.h" namespace Ui { class IndexWindow; @@ -23,8 +25,21 @@ void showVerifyMethod(); + void on_tb3_clicked(); + + void on_tb6_clicked(); + + //页面关闭响应函数 + void onNewWindowClosed(); + + void on_tb1_clicked(); + private: Ui::IndexWindow *ui; + + //数据同步页面 指针 + //DataSyncView *ShowDataSyncView; + //InfoManageView *ShowInfoManageView; }; #endif // INDEXWINDOW_H diff --git a/softwareDirectory/AutoVerScheme/indexwindow.ui b/softwareDirectory/AutoVerScheme/indexwindow.ui index d69a54d..dec7207 100644 --- a/softwareDirectory/AutoVerScheme/indexwindow.ui +++ b/softwareDirectory/AutoVerScheme/indexwindow.ui @@ -189,7 +189,7 @@ - + 0 @@ -236,7 +236,7 @@ - + 0 @@ -270,7 +270,7 @@ - + 0 @@ -310,7 +310,7 @@ - + 0 @@ -357,7 +357,7 @@ - + 0 @@ -423,7 +423,7 @@ - + 0 @@ -521,66 +521,34 @@ - toolButton_4 + tb1 clicked() IndexWindow showCheckWindow() - 214 - 250 + 260 + 276 - 351 - 107 + 666 + 394 - toolButton_6 + tb4 clicked() IndexWindow showCheckMethod() - 249 - 606 + 260 + 598 - 331 - 452 - - - - - toolButton_5 - clicked() - IndexWindow - showVerifyMethod() - - - 706 - 589 - - - 692 - 442 - - - - - toolButton_2 - clicked() - IndexWindow - showVerifyWindow() - - - 758 - 249 - - - 862 - 114 + 666 + 394 diff --git a/softwareDirectory/AutoVerScheme/infomanageview.cpp b/softwareDirectory/AutoVerScheme/infomanageview.cpp index a206c6f..d045c60 100644 --- a/softwareDirectory/AutoVerScheme/infomanageview.cpp +++ b/softwareDirectory/AutoVerScheme/infomanageview.cpp @@ -2,6 +2,7 @@ #include "ui_infomanageview.h" #include #include +#include //子窗体 #include "depar_task.h" #include "my_task.h" @@ -19,6 +20,7 @@ { ui->setupUi(this); this->setWindowTitle("信息管理"); + //初始化调用所有函数 this->initForm(); this->initWidget(); @@ -115,7 +117,8 @@ //底部加个弹簧 QSpacerItem *verticalSpacer = new QSpacerItem(20, 40, QSizePolicy::Minimum, QSizePolicy::Expanding); ui->widgetLeft->layout()->addItem(verticalSpacer); - btns.at(names.count() - 1)->click(); + + btns.at(0)->click();//选择启动页面 第一个 } //按钮点击切换UI事件 void InfoManageView::buttonClicked() diff --git a/softwareDirectory/AutoVerScheme/infomanageview.h b/softwareDirectory/AutoVerScheme/infomanageview.h index 3c1463f..5e44bba 100644 --- a/softwareDirectory/AutoVerScheme/infomanageview.h +++ b/softwareDirectory/AutoVerScheme/infomanageview.h @@ -2,6 +2,7 @@ #define INFOMANAGEVIEW_H #include +#include class QAbstractButton; diff --git a/softwareDirectory/AutoVerScheme/infomanageview.ui b/softwareDirectory/AutoVerScheme/infomanageview.ui index 4b39e7d..ef0b87b 100644 --- a/softwareDirectory/AutoVerScheme/infomanageview.ui +++ b/softwareDirectory/AutoVerScheme/infomanageview.ui @@ -10,8 +10,15 @@ 644 + + Qt::DefaultContextMenu + - Form + 信息管理 + + + color:black; +background-color:rgba(240, 240, 240, 1); @@ -68,8 +75,8 @@ - - 170 + + 0 0 diff --git a/softwareDirectory/AutoVerScheme/inspectdataitem.cpp b/softwareDirectory/AutoVerScheme/inspectdataitem.cpp index e9c2adc..efc00ba 100644 --- a/softwareDirectory/AutoVerScheme/inspectdataitem.cpp +++ b/softwareDirectory/AutoVerScheme/inspectdataitem.cpp @@ -1,14 +1,62 @@ #include "inspectdataitem.h" #include "ui_inspectdataitem.h" +#include "QMessageBox.h" InspectDataItem::InspectDataItem(QWidget *parent) : - QWidget(parent), + InfoBase(parent), ui(new Ui::InspectDataItem) { ui->setupUi(this); + this->initForm(); } InspectDataItem::~InspectDataItem() { delete ui; } +void InspectDataItem::initForm() +{ + //tableWidget设置 + //设置控件的边框显示 + ui->tableWidget->setStyleSheet("QHeaderView::section {" + "border: 1px solid rgba(197, 196, 196, 1);" + "border-left:none;" + "border-top:none;" + "background-color:white;" + "}"); + + ui->tableWidget->setRowCount(10); // 设置10行 + ui->tableWidget->setColumnCount(12); // 设置11列 + ui->tableWidget->setColumnWidth(0, 80); // 设置第一列的宽度为100像素 + ui->tableWidget->verticalHeader()->setParent(nullptr); //隐藏行头 + QTableWidgetItem *item = new QTableWidgetItem("测试数据"); + item->setTextAlignment(Qt::AlignCenter); + ui->tableWidget->setItem(0, 0, item); //设置数据 + + //初始化TableWidget 设置列 + QStringList headers; + headers << "序号" << "设备名称" << "型号规则" << "出厂编号" + <<"核查件名称"<<"核查件型号"<<"核查件编号" <<"核查员" + << "核查日期" <<"实验室"<<"部门"<<"操作"; + ui->tableWidget->setHorizontalHeaderLabels(headers); +} +void InspectDataItem::ShowMessageBox(QString title,QString value) { + // 创建一个QMessageBox对象 + QMessageBox msgBox; + + // 设置消息框的标题 + msgBox.setWindowTitle(title); + + // 设置消息框的文本内容 + msgBox.setText(value); + + // 设置消息框的标准按钮,这里是“确定”按钮 + msgBox.setStandardButtons(QMessageBox::Ok); + + // 显示消息框 + msgBox.exec(); +} +void InspectDataItem::Load() +{ + //ShowMessageBox("核查数据","核查数据"); +} diff --git a/softwareDirectory/AutoVerScheme/inspectdataitem.h b/softwareDirectory/AutoVerScheme/inspectdataitem.h index 57551bb..bdf7066 100644 --- a/softwareDirectory/AutoVerScheme/inspectdataitem.h +++ b/softwareDirectory/AutoVerScheme/inspectdataitem.h @@ -2,19 +2,24 @@ #define INSPECTDATAITEM_H #include +#include "InfoBase.h" namespace Ui { class InspectDataItem; } -class InspectDataItem : public QWidget +class InspectDataItem : public InfoBase { Q_OBJECT public: explicit InspectDataItem(QWidget *parent = nullptr); ~InspectDataItem(); - +private slots: + void initForm(); //初始化界面数据 + void ShowMessageBox(QString title,QString value); + //继承父类的Load方法 + void Load() override; private: Ui::InspectDataItem *ui; }; diff --git a/softwareDirectory/AutoVerScheme/inspectdataitem.ui b/softwareDirectory/AutoVerScheme/inspectdataitem.ui index 45f04e0..86786c9 100644 --- a/softwareDirectory/AutoVerScheme/inspectdataitem.ui +++ b/softwareDirectory/AutoVerScheme/inspectdataitem.ui @@ -6,26 +6,236 @@ 0 0 - 400 - 300 + 1362 + 543 Form - - - - 120 - 130 - 89 - 24 - - - - 核查数据管理 - - + + + + + + 0 + 0 + + + + background-color:white; + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 设备名称: + + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 型号规则: + + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 出厂编号: + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 核查员: + + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 核查日期: + + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 实验室: + + + + + + + + + + Qt::Horizontal + + + QSizePolicy::Expanding + + + + 40 + 20 + + + + + + + + Qt::RightToLeft + + + 查询 + + + + + + + Qt::RightToLeft + + + 重置 + + + + + + + + + + background-color:white; + + + + + + + + + + + + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/my_task.cpp b/softwareDirectory/AutoVerScheme/my_task.cpp index 40aceb2..559a73b 100644 --- a/softwareDirectory/AutoVerScheme/my_task.cpp +++ b/softwareDirectory/AutoVerScheme/my_task.cpp @@ -7,7 +7,8 @@ ui(new Ui::My_Task) { ui->setupUi(this); - + //初始化QStandardItemModel + model=new QStandardItemModel(parent); this->initForm(); } @@ -17,7 +18,28 @@ } void My_Task::initForm() { + //tableWidget设置 + //设置控件的边框显示 + ui->tableWidget->setStyleSheet("QHeaderView::section {" + "border: 1px solid rgba(197, 196, 196, 1);" + "border-left:none;" + "border-top:none;" + "background-color:white;" + "}"); + ui->tableWidget->setRowCount(10); // 设置10行 + ui->tableWidget->setColumnCount(10); // 设置11列 + ui->tableWidget->setColumnWidth(0, 80); // 设置第一列的宽度为100像素 + ui->tableWidget->verticalHeader()->setParent(nullptr); //隐藏行头 + QTableWidgetItem *item = new QTableWidgetItem("测试数据"); + item->setTextAlignment(Qt::AlignCenter); + ui->tableWidget->setItem(0, 0, item); //设置数据 + + //初始化TableWidget 设置列 + QStringList headers; + headers << "序号" << "设备名称" << "型号规则" << "辅助字段" << "辅助字段"<< "出厂编号" + << "生产厂家" <<"委托方"<<"使用部门"<<"要求检完时间"<<"是否加急"; + ui->tableWidget->setHorizontalHeaderLabels(headers); } void My_Task::ShowMessageBox(QString title,QString value) { @@ -38,5 +60,5 @@ } void My_Task::Load() { - ShowMessageBox("我的任务页面","我的任务初始化完成"); + //ShowMessageBox("我的任务页面","我的任务初始化完成"); } diff --git a/softwareDirectory/AutoVerScheme/my_task.ui b/softwareDirectory/AutoVerScheme/my_task.ui index 89245b8..a078840 100644 --- a/softwareDirectory/AutoVerScheme/my_task.ui +++ b/softwareDirectory/AutoVerScheme/my_task.ui @@ -6,8 +6,8 @@ 0 0 - 857 - 511 + 1190 + 577 @@ -140,7 +140,23 @@ + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + Qt::RightToLeft + 查询 @@ -148,6 +164,9 @@ + + Qt::RightToLeft + 重置 @@ -166,7 +185,14 @@ - + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro index 1280b70..dfb0418 100644 --- a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro @@ -22,6 +22,7 @@ checkmethodmanage.cpp \ checkwindow.cpp \ create_task.cpp \ + datasyncview.cpp \ depar_task.cpp \ indexwindow.cpp \ infomanageview.cpp \ @@ -43,6 +44,7 @@ checkmethodmanage.h \ checkwindow.h \ create_task.h \ + datasyncview.h \ depar_task.h \ indexwindow.h \ infomanageview.h \ @@ -62,6 +64,7 @@ checkmethodmanage.ui \ checkwindow.ui \ create_task.ui \ + datasyncview.ui \ depar_task.ui \ indexwindow.ui \ infomanageview.ui \ diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user index 6ea03c5..93c39cb 100644 --- a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user @@ -1,10 +1,10 @@ - + EnvironmentId - {2746248a-b112-4e0f-9ae0-9e61f2a42309} + {c08df58c-84a7-4965-bca6-e98789474efa} ProjectExplorer.Project.ActiveTarget @@ -71,7 +71,7 @@ 0 0 - D:/dev/QT/AutoCalHainan/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug true @@ -119,7 +119,7 @@ 2 - D:/dev/QT/AutoCalHainan/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Release + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Release true @@ -167,7 +167,7 @@ 0 - D:/dev/QT/AutoCalHainan/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Profile + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Profile true @@ -287,8 +287,8 @@ 2 - Qt4ProjectManager.Qt4RunConfiguration:D:/dev/QT/AutoCalHainan/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro - D:/dev/QT/AutoCalHainan/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro + Qt4ProjectManager.Qt4RunConfiguration:C:/Users/admin/Desktop/SVN/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro + C:/Users/admin/Desktop/SVN/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro false @@ -299,7 +299,7 @@ false true - D:/dev/QT/AutoCalHainan/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug 1 @@ -314,7 +314,7 @@ 0 0 - D:/dev/QT/AutoCalHainan/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Debug + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Debug true @@ -362,7 +362,7 @@ 2 - D:/dev/QT/AutoCalHainan/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Release + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Release true @@ -410,7 +410,7 @@ 0 - D:/dev/QT/AutoCalHainan/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Profile + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Profile true @@ -530,14 +530,15 @@ 2 - - ProjectExplorer.CustomExecutableRunConfiguration - + AutoVerScheme2 + 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 diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user.c08df58 b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user.c08df58 deleted file mode 100644 index 495f95c..0000000 --- a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user.c08df58 +++ /dev/null @@ -1,563 +0,0 @@ - - - - - - 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 32-bit - Desktop Qt 5.14.2 MinGW 32-bit - qt.qt5.5142.win32_mingw73_kit - 0 - 0 - 0 - - D:/Auto_verification_scheme/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 - - - D:/Auto_verification_scheme/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 - - - D:/Auto_verification_scheme/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 - - D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug - - 1 - - - - ProjectExplorer.Project.Target.1 - - 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 - - D:/Auto_verification_scheme/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 - - - D:/Auto_verification_scheme/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 - - - D:/Auto_verification_scheme/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 - - AutoVerScheme2 - 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/InfoBase.h b/softwareDirectory/AutoVerScheme/InfoBase.h index 7fec63e..084cf3f 100644 --- a/softwareDirectory/AutoVerScheme/InfoBase.h +++ b/softwareDirectory/AutoVerScheme/InfoBase.h @@ -2,6 +2,7 @@ #define INFOBASE_H #include +#include "QStandardItemModel" ///信号管理页面的基类 所有信息管理页面都继承于InfoBase /// 便于统一管理 所有子类必须实现Load方法 /// 每次按钮点击切换都会调用Load方法 用于每次页面的数据刷新 @@ -11,6 +12,8 @@ InfoBase(QWidget *parent = nullptr): QWidget(parent){}; // 纯虚函数 virtual void Load()=0; + //QStandardItemModel 的实例。这个模型将用于存储和管理数据。 + QStandardItemModel *model; }; #endif // INFOBASE_H diff --git a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.cpp b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.cpp index 7ac1e87..ffb2bbc 100644 --- a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.cpp +++ b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.cpp @@ -1,14 +1,64 @@ #include "beexamined_deviceitem.h" #include "ui_beexamined_deviceitem.h" +#include "QMessageBox.h" BeExamined_DeviceItem::BeExamined_DeviceItem(QWidget *parent) : - QWidget(parent), + InfoBase(parent), ui(new Ui::BeExamined_DeviceItem) { ui->setupUi(this); + this->initForm(); } BeExamined_DeviceItem::~BeExamined_DeviceItem() { delete ui; } + +void BeExamined_DeviceItem::initForm() +{ + + //tableWidget设置 + //设置控件的边框显示 + ui->tableWidget->setStyleSheet("QHeaderView::section {" + "border: 1px solid rgba(197, 196, 196, 1);" + "border-left:none;" + "border-top:none;" + "background-color:white;" + "}"); + + ui->tableWidget->setRowCount(10); // 设置10行 + ui->tableWidget->setColumnCount(12); // 设置11列 + ui->tableWidget->setColumnWidth(0, 80); // 设置第一列的宽度为100像素 + ui->tableWidget->verticalHeader()->setParent(nullptr); //隐藏行头 + QTableWidgetItem *item = new QTableWidgetItem("测试数据"); + item->setTextAlignment(Qt::AlignCenter); + ui->tableWidget->setItem(0, 0, item); //设置数据 + + //初始化TableWidget 设置列 + QStringList headers; + headers << "序号" << "设备名称" << "型号规则" << "辅助字段" << "出厂编号" + << "生产厂家"<<"所在单位" <<"使用部门"<<"计量标识"<<"检定周期"<<"证书有效期"<<"操作"; + ui->tableWidget->setHorizontalHeaderLabels(headers); + +} +void BeExamined_DeviceItem::ShowMessageBox(QString title,QString value) { + // 创建一个QMessageBox对象 + QMessageBox msgBox; + + // 设置消息框的标题 + msgBox.setWindowTitle(title); + + // 设置消息框的文本内容 + msgBox.setText(value); + + // 设置消息框的标准按钮,这里是“确定”按钮 + msgBox.setStandardButtons(QMessageBox::Ok); + + // 显示消息框 + msgBox.exec(); +} +void BeExamined_DeviceItem::Load() +{ + //ShowMessageBox("被检设备","被检设备初始化完成"); +} diff --git a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.h b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.h index 76b061d..ae46979 100644 --- a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.h +++ b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.h @@ -2,12 +2,13 @@ #define BEEXAMINED_DEVICEITEM_H #include +#include "InfoBase.h" namespace Ui { class BeExamined_DeviceItem; } -class BeExamined_DeviceItem : public QWidget +class BeExamined_DeviceItem : public InfoBase { Q_OBJECT @@ -15,6 +16,11 @@ explicit BeExamined_DeviceItem(QWidget *parent = nullptr); ~BeExamined_DeviceItem(); +private slots: + void initForm(); //初始化界面数据 + void ShowMessageBox(QString title,QString value); + //继承父类的Load方法 + void Load() override; private: Ui::BeExamined_DeviceItem *ui; }; diff --git a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.ui b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.ui index af9f7bf..5a0a3c9 100644 --- a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.ui +++ b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.ui @@ -6,26 +6,236 @@ 0 0 - 400 - 300 + 1291 + 575 Form - - - - 130 - 140 - 89 - 24 - - - - 被检设备管理 - - + + + + + + 0 + 0 + + + + background-color:white; + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 设备名称: + + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 型号规则: + + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 出厂编号: + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 生产厂家: + + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 使用部门: + + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 使用单位: + + + + + + + + + + Qt::Horizontal + + + QSizePolicy::Expanding + + + + 40 + 20 + + + + + + + + Qt::RightToLeft + + + 查询 + + + + + + + Qt::RightToLeft + + + 重置 + + + + + + + + + + background-color:white; + + + + + + + + + + + + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/create_task.cpp b/softwareDirectory/AutoVerScheme/create_task.cpp index 4193efc..9b49a1a 100644 --- a/softwareDirectory/AutoVerScheme/create_task.cpp +++ b/softwareDirectory/AutoVerScheme/create_task.cpp @@ -1,14 +1,61 @@ #include "create_task.h" #include "ui_create_task.h" +#include "QMessageBox" Create_Task::Create_Task(QWidget *parent) : - QWidget(parent), + InfoBase(parent), ui(new Ui::Create_Task) { ui->setupUi(this); + this->initForm(); } Create_Task::~Create_Task() { delete ui; } +void Create_Task::initForm() +{ + //tableWidget设置 + //设置控件的边框显示 + ui->tableWidget->setStyleSheet("QHeaderView::section {" + "border: 1px solid rgba(197, 196, 196, 1);" + "border-left:none;" + "border-top:none;" + "background-color:white;" + "}"); + + ui->tableWidget->setRowCount(10); // 设置10行 + ui->tableWidget->setColumnCount(8); // 设置11列 + ui->tableWidget->setColumnWidth(0, 80); // 设置第一列的宽度为100像素 + ui->tableWidget->verticalHeader()->setParent(nullptr); //隐藏行头 + QTableWidgetItem *item = new QTableWidgetItem("测试数据"); + item->setTextAlignment(Qt::AlignCenter); + ui->tableWidget->setItem(0, 0, item); //设置数据 + + //初始化TableWidget 设置列 + QStringList headers; + headers << "序号" << "任务单编号" << "委托方"<< "使用部门" << "要求检完时间" << "送检人"<<"是否加急"<<"操作"; + ui->tableWidget->setHorizontalHeaderLabels(headers); + //ShowMessageBox("标题","初始化完成"); +} +void Create_Task::ShowMessageBox(QString title,QString value) { + // 创建一个QMessageBox对象 + QMessageBox msgBox; + + // 设置消息框的标题 + msgBox.setWindowTitle(title); + + // 设置消息框的文本内容 + msgBox.setText(value); + + // 设置消息框的标准按钮,这里是“确定”按钮 + msgBox.setStandardButtons(QMessageBox::Ok); + + // 显示消息框 + msgBox.exec(); +} +void Create_Task::Load() +{ + //ShowMessageBox("创建任务界面","创建任务界面初始化完成"); +} diff --git a/softwareDirectory/AutoVerScheme/create_task.h b/softwareDirectory/AutoVerScheme/create_task.h index e2264de..7cf383f 100644 --- a/softwareDirectory/AutoVerScheme/create_task.h +++ b/softwareDirectory/AutoVerScheme/create_task.h @@ -1,13 +1,14 @@ #ifndef CREATE_TASK_H #define CREATE_TASK_H +#include "InfoBase.h" #include namespace Ui { class Create_Task; } -class Create_Task : public QWidget +class Create_Task : public InfoBase { Q_OBJECT @@ -15,6 +16,11 @@ explicit Create_Task(QWidget *parent = nullptr); ~Create_Task(); +private slots: + void initForm(); //初始化界面数据 + void ShowMessageBox(QString title,QString value); + //继承父类的Load方法 + void Load() override; private: Ui::Create_Task *ui; }; diff --git a/softwareDirectory/AutoVerScheme/create_task.ui b/softwareDirectory/AutoVerScheme/create_task.ui index b79c6a1..d9d88ed 100644 --- a/softwareDirectory/AutoVerScheme/create_task.ui +++ b/softwareDirectory/AutoVerScheme/create_task.ui @@ -6,29 +6,294 @@ 0 0 - 400 - 300 + 1184 + 580 Form - - background-color:red; + + Qt::LeftToRight - - - - 140 - 120 - 89 - 24 - - - - 创建任务单 - - + + + + + + + + + 0 + 0 + + + + background-color:white; + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 任务单编号: + + + + + + + + 0 + 0 + + + + + + + + + 0 + 0 + + + + + 50 + 0 + + + + 委托方: + + + + + + + + 0 + 0 + + + + + 0 + 0 + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 使用部门: + + + + + + + + 0 + 0 + + + + + 0 + 0 + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 要求完成时间: + + + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + 0 + 30 + + + + Qt::RightToLeft + + + background-color:rgb(3, 58, 132); +color:white; + + + + 查询 + + + + + + + + 0 + 30 + + + + Qt::RightToLeft + + + background-color:rgb(207, 132, 33); +color:white; + + + + 重置 + + + + + + + + + + background-color:white; + + + + + + + 6 + + + 9 + + + 9 + + + 9 + + + + + + 0 + 0 + + + + + 120 + 40 + + + + OpenHandCursor + + + Qt::DefaultContextMenu + + + Qt::RightToLeft + + + false + + + background-color:rgb(9, 89, 179); +color:white; + + + 创建任务单 + + + true + + + + + + + + + + + + + + SizeVerCursor + + + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/datasyncview.cpp b/softwareDirectory/AutoVerScheme/datasyncview.cpp new file mode 100644 index 0000000..74cd41d --- /dev/null +++ b/softwareDirectory/AutoVerScheme/datasyncview.cpp @@ -0,0 +1,44 @@ +#include "datasyncview.h" +#include "ui_datasyncview.h" + +DataSyncView::DataSyncView(QWidget *parent) : + QWidget(parent), + ui(new Ui::DataSyncView) +{ + ui->setupUi(this); + this->initForm(); +} + +DataSyncView::~DataSyncView() +{ + delete ui; +} +void DataSyncView::initForm() +{ + //tableWidget设置 + //设置控件的边框显示 + ui->tableWidget->setStyleSheet("QHeaderView::section {" + "border: 1px solid grey;" + "border-left:none;" + "border-top:none;" + "background-color:white;" + " color:black;" + "font: bold 18px Arial, sans-serif;" + "}"); + + ui->tableWidget->setRowCount(10); // 设置10行 + ui->tableWidget->setColumnCount(4); // 设置11列 + ui->tableWidget->setColumnWidth(0, 80); // 设置第一列的宽度为100像素 + ui->tableWidget->verticalHeader()->setParent(nullptr); //隐藏行头 + QTableWidgetItem *item = new QTableWidgetItem("测试数据"); + item->setTextAlignment(Qt::AlignCenter); + ui->tableWidget->setItem(0, 0, item); //设置数据 + + //初始化TableWidget 设置列 + QStringList headers; + headers << "序号" << "同步时间" << "是否同步成功" << "备注" ; + ui->tableWidget->setHorizontalHeaderLabels(headers); + + + +} diff --git a/softwareDirectory/AutoVerScheme/datasyncview.h b/softwareDirectory/AutoVerScheme/datasyncview.h new file mode 100644 index 0000000..9a73de9 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/datasyncview.h @@ -0,0 +1,24 @@ +#ifndef DATASYNCVIEW_H +#define DATASYNCVIEW_H + +#include + +namespace Ui { +class DataSyncView; +} + +class DataSyncView : public QWidget +{ + Q_OBJECT + +public: + explicit DataSyncView(QWidget *parent = nullptr); + ~DataSyncView(); +private slots: + void initForm(); //初始化界面数据 + +private: + Ui::DataSyncView *ui; +}; + +#endif // DATASYNCVIEW_H diff --git a/softwareDirectory/AutoVerScheme/datasyncview.ui b/softwareDirectory/AutoVerScheme/datasyncview.ui new file mode 100644 index 0000000..c45bf56 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/datasyncview.ui @@ -0,0 +1,133 @@ + + + DataSyncView + + + + 0 + 0 + 874 + 531 + + + + 数据同步 + + + background-color:rgba(240, 240, 240, 1); + + + + + + background-color:white; + + + + + + + + + + 0 + 0 + + + + background-color:white; +border:0; + + + + + + + + + + 0 + 0 + + + + font:bold 20px Arial, sans-serif; +color:#334582; + + + 同步记录 + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + background-color:#334582; + font: bold 18px Arial, sans-serif; +color:white; +padding:10px; + + + 下载数据 + + + + + + + + 200 + 0 + + + + + 100 + 40 + + + + Qt::RightToLeft + + + background-color:#334582; + font: bold 18px Arial, sans-serif; +color:white; +padding:10px; + + + 发送同步请求 + + + + + + + + + + + + + + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/depar_task.cpp b/softwareDirectory/AutoVerScheme/depar_task.cpp index de39775..5f0f93a 100644 --- a/softwareDirectory/AutoVerScheme/depar_task.cpp +++ b/softwareDirectory/AutoVerScheme/depar_task.cpp @@ -2,13 +2,19 @@ #include "ui_depar_task.h" #include "QMessageBox" #include "InfoBase.h" +#include "QStandardItemModel" Depar_Task::Depar_Task(QWidget *parent) : InfoBase(parent), ui(new Ui::Depar_Task) { ui->setupUi(this); + //初始化列表 this->initForm(); + + + + } Depar_Task::~Depar_Task() @@ -17,8 +23,31 @@ } void Depar_Task::initForm() { + //tableWidget设置 + //设置控件的边框显示 + ui->tableWidget->setStyleSheet("QHeaderView::section {" + "border: 1px solid rgba(197, 196, 196, 1);" + "border-left:none;" + "border-top:none;" + "background-color:white;" + "}"); - //ShowMessageBox("标题","初始化完成"); + ui->tableWidget->setRowCount(10); // 设置10行 + ui->tableWidget->setColumnCount(10); // 设置11列 + ui->tableWidget->setColumnWidth(0, 80); // 设置第一列的宽度为100像素 + ui->tableWidget->verticalHeader()->setParent(nullptr); //隐藏行头 + QTableWidgetItem *item = new QTableWidgetItem("测试数据"); + item->setTextAlignment(Qt::AlignCenter); //文件居中 + ui->tableWidget->setItem(0, 0, item); //设置数据 + + //初始化TableWidget 设置列 + QStringList headers; + headers << "序号" << "设备名称" << "型号规则" << "辅助字段" << "辅助字段"<< "出厂编号" + << "生产厂家" <<"委托方"<<"使用部门"<<"要求检完时间"<<"是否加急"; + ui->tableWidget->setHorizontalHeaderLabels(headers); + + + } void Depar_Task::ShowMessageBox(QString title,QString value) { // 创建一个QMessageBox对象 @@ -38,5 +67,5 @@ } void Depar_Task::Load() { - ShowMessageBox("部门任务页面","部门任务初始化完成"); + //ShowMessageBox("部门任务页面","部门任务初始化完成"); } diff --git a/softwareDirectory/AutoVerScheme/depar_task.h b/softwareDirectory/AutoVerScheme/depar_task.h index 8716faf..110008d 100644 --- a/softwareDirectory/AutoVerScheme/depar_task.h +++ b/softwareDirectory/AutoVerScheme/depar_task.h @@ -3,6 +3,7 @@ #include "InfoBase.h" +#include "QStandardItemModel" namespace Ui { class Depar_Task; @@ -20,9 +21,12 @@ private slots: void initForm(); //初始化界面数据 void ShowMessageBox(QString title,QString value); + //继承父类的Load方法 void Load() override; + private: Ui::Depar_Task *ui; + // QStandardItemModel *model; }; #endif // DEPAR_TASK_H diff --git a/softwareDirectory/AutoVerScheme/depar_task.ui b/softwareDirectory/AutoVerScheme/depar_task.ui index ff3d44f..1a95cc4 100644 --- a/softwareDirectory/AutoVerScheme/depar_task.ui +++ b/softwareDirectory/AutoVerScheme/depar_task.ui @@ -6,7 +6,7 @@ 0 0 - 1184 + 1190 456 @@ -143,7 +143,34 @@ + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + 0 + 30 + + + + Qt::RightToLeft + + + background-color:rgb(3, 58, 152); +color:white; + + 查询 @@ -151,6 +178,20 @@ + + + 0 + 30 + + + + Qt::RightToLeft + + + background-color:rgb(207, 132, 33); +color:white; + + 重置 @@ -168,8 +209,15 @@ + + + - + + + + + diff --git a/softwareDirectory/AutoVerScheme/indexwindow.cpp b/softwareDirectory/AutoVerScheme/indexwindow.cpp index fca900a..cbba812 100644 --- a/softwareDirectory/AutoVerScheme/indexwindow.cpp +++ b/softwareDirectory/AutoVerScheme/indexwindow.cpp @@ -13,11 +13,37 @@ { ui->setupUi(this); this->initForm(); +/* + //主要作用 当页面关闭后 回到indexwindow页面 并 通过~IndexWindow 释放此页面指针所占用内存 + // 假设 ShowDataSyncView 是一个指向 DataSyncView 实例的指针 + // 当 ShowDataSyncView 关闭时,它的 closed() 信号会被发出 + // 连接这个信号到 IndexWindow 的 onNewWindowClosed() 槽函数 + if(ShowDataSyncView) { + //数据同步页面 信号槽 + connect(ShowDataSyncView, &DataSyncView::close, this, &IndexWindow::onNewWindowClosed); + } + if(ShowInfoManageView) { + //信息管理 信号槽 + connect(ShowInfoManageView, &InfoManageView::close, this, &IndexWindow::onNewWindowClosed); + } + */ } IndexWindow::~IndexWindow() { delete ui; + //释放页面内存 + /* + if (ShowDataSyncView) { + ShowDataSyncView->close(); + delete ShowDataSyncView; + } + else if(ShowInfoManageView) + { + ShowInfoManageView->close(); + delete ShowInfoManageView; + } + */ } void IndexWindow::initForm() { @@ -57,6 +83,15 @@ } + +void IndexWindow::onNewWindowClosed() +{ + // 新窗体关闭后,设置 IndexWindow 为活动窗口 + this->activateWindow(); + // 也可以设置焦点到 MainWindow 中的某个控件 + // ui->someWidget->setFocus(); +} + void IndexWindow::showCheckWindow() { CheckWindow *checkWindow = new CheckWindow; @@ -65,6 +100,26 @@ checkWindow->show(); } +//信息管理按钮 +void IndexWindow::on_tb3_clicked() +{ + InfoManageView *ShowInfoManageView = new InfoManageView(); + ShowInfoManageView->setWindowState(Qt::WindowMaximized); + ShowInfoManageView->setWindowModality(Qt::ApplicationModal); + ShowInfoManageView->show(); +} +//数据同步按钮 +void IndexWindow::on_tb6_clicked() +{ + + // 创建新窗体实例并显示 + DataSyncView *ShowDataSyncView = new DataSyncView(); + ShowDataSyncView->setWindowState(Qt::WindowMaximized); + ShowDataSyncView->setWindowModality(Qt::ApplicationModal); + ShowDataSyncView->show(); +} + + void IndexWindow::showCheckMethod() { CheckMethodManage *checkWindow = new CheckMethodManage; diff --git a/softwareDirectory/AutoVerScheme/indexwindow.h b/softwareDirectory/AutoVerScheme/indexwindow.h index a05d802..190b0f1 100644 --- a/softwareDirectory/AutoVerScheme/indexwindow.h +++ b/softwareDirectory/AutoVerScheme/indexwindow.h @@ -2,6 +2,8 @@ #define INDEXWINDOW_H #include +#include "datasyncView.h" +#include "infomanageview.h" namespace Ui { class IndexWindow; @@ -23,8 +25,21 @@ void showVerifyMethod(); + void on_tb3_clicked(); + + void on_tb6_clicked(); + + //页面关闭响应函数 + void onNewWindowClosed(); + + void on_tb1_clicked(); + private: Ui::IndexWindow *ui; + + //数据同步页面 指针 + //DataSyncView *ShowDataSyncView; + //InfoManageView *ShowInfoManageView; }; #endif // INDEXWINDOW_H diff --git a/softwareDirectory/AutoVerScheme/indexwindow.ui b/softwareDirectory/AutoVerScheme/indexwindow.ui index d69a54d..dec7207 100644 --- a/softwareDirectory/AutoVerScheme/indexwindow.ui +++ b/softwareDirectory/AutoVerScheme/indexwindow.ui @@ -189,7 +189,7 @@ - + 0 @@ -236,7 +236,7 @@ - + 0 @@ -270,7 +270,7 @@ - + 0 @@ -310,7 +310,7 @@ - + 0 @@ -357,7 +357,7 @@ - + 0 @@ -423,7 +423,7 @@ - + 0 @@ -521,66 +521,34 @@ - toolButton_4 + tb1 clicked() IndexWindow showCheckWindow() - 214 - 250 + 260 + 276 - 351 - 107 + 666 + 394 - toolButton_6 + tb4 clicked() IndexWindow showCheckMethod() - 249 - 606 + 260 + 598 - 331 - 452 - - - - - toolButton_5 - clicked() - IndexWindow - showVerifyMethod() - - - 706 - 589 - - - 692 - 442 - - - - - toolButton_2 - clicked() - IndexWindow - showVerifyWindow() - - - 758 - 249 - - - 862 - 114 + 666 + 394 diff --git a/softwareDirectory/AutoVerScheme/infomanageview.cpp b/softwareDirectory/AutoVerScheme/infomanageview.cpp index a206c6f..d045c60 100644 --- a/softwareDirectory/AutoVerScheme/infomanageview.cpp +++ b/softwareDirectory/AutoVerScheme/infomanageview.cpp @@ -2,6 +2,7 @@ #include "ui_infomanageview.h" #include #include +#include //子窗体 #include "depar_task.h" #include "my_task.h" @@ -19,6 +20,7 @@ { ui->setupUi(this); this->setWindowTitle("信息管理"); + //初始化调用所有函数 this->initForm(); this->initWidget(); @@ -115,7 +117,8 @@ //底部加个弹簧 QSpacerItem *verticalSpacer = new QSpacerItem(20, 40, QSizePolicy::Minimum, QSizePolicy::Expanding); ui->widgetLeft->layout()->addItem(verticalSpacer); - btns.at(names.count() - 1)->click(); + + btns.at(0)->click();//选择启动页面 第一个 } //按钮点击切换UI事件 void InfoManageView::buttonClicked() diff --git a/softwareDirectory/AutoVerScheme/infomanageview.h b/softwareDirectory/AutoVerScheme/infomanageview.h index 3c1463f..5e44bba 100644 --- a/softwareDirectory/AutoVerScheme/infomanageview.h +++ b/softwareDirectory/AutoVerScheme/infomanageview.h @@ -2,6 +2,7 @@ #define INFOMANAGEVIEW_H #include +#include class QAbstractButton; diff --git a/softwareDirectory/AutoVerScheme/infomanageview.ui b/softwareDirectory/AutoVerScheme/infomanageview.ui index 4b39e7d..ef0b87b 100644 --- a/softwareDirectory/AutoVerScheme/infomanageview.ui +++ b/softwareDirectory/AutoVerScheme/infomanageview.ui @@ -10,8 +10,15 @@ 644 + + Qt::DefaultContextMenu + - Form + 信息管理 + + + color:black; +background-color:rgba(240, 240, 240, 1); @@ -68,8 +75,8 @@ - - 170 + + 0 0 diff --git a/softwareDirectory/AutoVerScheme/inspectdataitem.cpp b/softwareDirectory/AutoVerScheme/inspectdataitem.cpp index e9c2adc..efc00ba 100644 --- a/softwareDirectory/AutoVerScheme/inspectdataitem.cpp +++ b/softwareDirectory/AutoVerScheme/inspectdataitem.cpp @@ -1,14 +1,62 @@ #include "inspectdataitem.h" #include "ui_inspectdataitem.h" +#include "QMessageBox.h" InspectDataItem::InspectDataItem(QWidget *parent) : - QWidget(parent), + InfoBase(parent), ui(new Ui::InspectDataItem) { ui->setupUi(this); + this->initForm(); } InspectDataItem::~InspectDataItem() { delete ui; } +void InspectDataItem::initForm() +{ + //tableWidget设置 + //设置控件的边框显示 + ui->tableWidget->setStyleSheet("QHeaderView::section {" + "border: 1px solid rgba(197, 196, 196, 1);" + "border-left:none;" + "border-top:none;" + "background-color:white;" + "}"); + + ui->tableWidget->setRowCount(10); // 设置10行 + ui->tableWidget->setColumnCount(12); // 设置11列 + ui->tableWidget->setColumnWidth(0, 80); // 设置第一列的宽度为100像素 + ui->tableWidget->verticalHeader()->setParent(nullptr); //隐藏行头 + QTableWidgetItem *item = new QTableWidgetItem("测试数据"); + item->setTextAlignment(Qt::AlignCenter); + ui->tableWidget->setItem(0, 0, item); //设置数据 + + //初始化TableWidget 设置列 + QStringList headers; + headers << "序号" << "设备名称" << "型号规则" << "出厂编号" + <<"核查件名称"<<"核查件型号"<<"核查件编号" <<"核查员" + << "核查日期" <<"实验室"<<"部门"<<"操作"; + ui->tableWidget->setHorizontalHeaderLabels(headers); +} +void InspectDataItem::ShowMessageBox(QString title,QString value) { + // 创建一个QMessageBox对象 + QMessageBox msgBox; + + // 设置消息框的标题 + msgBox.setWindowTitle(title); + + // 设置消息框的文本内容 + msgBox.setText(value); + + // 设置消息框的标准按钮,这里是“确定”按钮 + msgBox.setStandardButtons(QMessageBox::Ok); + + // 显示消息框 + msgBox.exec(); +} +void InspectDataItem::Load() +{ + //ShowMessageBox("核查数据","核查数据"); +} diff --git a/softwareDirectory/AutoVerScheme/inspectdataitem.h b/softwareDirectory/AutoVerScheme/inspectdataitem.h index 57551bb..bdf7066 100644 --- a/softwareDirectory/AutoVerScheme/inspectdataitem.h +++ b/softwareDirectory/AutoVerScheme/inspectdataitem.h @@ -2,19 +2,24 @@ #define INSPECTDATAITEM_H #include +#include "InfoBase.h" namespace Ui { class InspectDataItem; } -class InspectDataItem : public QWidget +class InspectDataItem : public InfoBase { Q_OBJECT public: explicit InspectDataItem(QWidget *parent = nullptr); ~InspectDataItem(); - +private slots: + void initForm(); //初始化界面数据 + void ShowMessageBox(QString title,QString value); + //继承父类的Load方法 + void Load() override; private: Ui::InspectDataItem *ui; }; diff --git a/softwareDirectory/AutoVerScheme/inspectdataitem.ui b/softwareDirectory/AutoVerScheme/inspectdataitem.ui index 45f04e0..86786c9 100644 --- a/softwareDirectory/AutoVerScheme/inspectdataitem.ui +++ b/softwareDirectory/AutoVerScheme/inspectdataitem.ui @@ -6,26 +6,236 @@ 0 0 - 400 - 300 + 1362 + 543 Form - - - - 120 - 130 - 89 - 24 - - - - 核查数据管理 - - + + + + + + 0 + 0 + + + + background-color:white; + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 设备名称: + + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 型号规则: + + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 出厂编号: + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 核查员: + + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 核查日期: + + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 实验室: + + + + + + + + + + Qt::Horizontal + + + QSizePolicy::Expanding + + + + 40 + 20 + + + + + + + + Qt::RightToLeft + + + 查询 + + + + + + + Qt::RightToLeft + + + 重置 + + + + + + + + + + background-color:white; + + + + + + + + + + + + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/my_task.cpp b/softwareDirectory/AutoVerScheme/my_task.cpp index 40aceb2..559a73b 100644 --- a/softwareDirectory/AutoVerScheme/my_task.cpp +++ b/softwareDirectory/AutoVerScheme/my_task.cpp @@ -7,7 +7,8 @@ ui(new Ui::My_Task) { ui->setupUi(this); - + //初始化QStandardItemModel + model=new QStandardItemModel(parent); this->initForm(); } @@ -17,7 +18,28 @@ } void My_Task::initForm() { + //tableWidget设置 + //设置控件的边框显示 + ui->tableWidget->setStyleSheet("QHeaderView::section {" + "border: 1px solid rgba(197, 196, 196, 1);" + "border-left:none;" + "border-top:none;" + "background-color:white;" + "}"); + ui->tableWidget->setRowCount(10); // 设置10行 + ui->tableWidget->setColumnCount(10); // 设置11列 + ui->tableWidget->setColumnWidth(0, 80); // 设置第一列的宽度为100像素 + ui->tableWidget->verticalHeader()->setParent(nullptr); //隐藏行头 + QTableWidgetItem *item = new QTableWidgetItem("测试数据"); + item->setTextAlignment(Qt::AlignCenter); + ui->tableWidget->setItem(0, 0, item); //设置数据 + + //初始化TableWidget 设置列 + QStringList headers; + headers << "序号" << "设备名称" << "型号规则" << "辅助字段" << "辅助字段"<< "出厂编号" + << "生产厂家" <<"委托方"<<"使用部门"<<"要求检完时间"<<"是否加急"; + ui->tableWidget->setHorizontalHeaderLabels(headers); } void My_Task::ShowMessageBox(QString title,QString value) { @@ -38,5 +60,5 @@ } void My_Task::Load() { - ShowMessageBox("我的任务页面","我的任务初始化完成"); + //ShowMessageBox("我的任务页面","我的任务初始化完成"); } diff --git a/softwareDirectory/AutoVerScheme/my_task.ui b/softwareDirectory/AutoVerScheme/my_task.ui index 89245b8..a078840 100644 --- a/softwareDirectory/AutoVerScheme/my_task.ui +++ b/softwareDirectory/AutoVerScheme/my_task.ui @@ -6,8 +6,8 @@ 0 0 - 857 - 511 + 1190 + 577 @@ -140,7 +140,23 @@ + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + Qt::RightToLeft + 查询 @@ -148,6 +164,9 @@ + + Qt::RightToLeft + 重置 @@ -166,7 +185,14 @@ - + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/res/qss/Index.css b/softwareDirectory/AutoVerScheme/res/qss/Index.css index 8fad195..d2ba43e 100644 --- a/softwareDirectory/AutoVerScheme/res/qss/Index.css +++ b/softwareDirectory/AutoVerScheme/res/qss/Index.css @@ -1,18 +1,25 @@ -*{ - -color:black; -font: 18pt 微软雅黑; - -} -QMainWindow +QMainWindow#IndexWindow { background-image: url(:/image/Index/u15.png); background-color:white; } -QToolButton:hover{ +QToolButton#tb1:hover{ background-image: url(:/image/Index/u26_mouseOver.svg); } -QToolButton{ +QToolButton#tb2:hover{ + background-image: url(:/image/Index/u26_mouseOver.svg); +} +QToolButton#tb3:hover{ + background-image: url(:/image/Index/u26_mouseOver.svg); +}QToolButton#tb4:hover{ +background-image: url(:/image/Index/u26_mouseOver.svg); +}QToolButton#tb5:hover{ +background-image: url(:/image/Index/u26_mouseOver.svg); +} +QToolButton#tb6:hover{ + background-image: url(:/image/Index/u26_mouseOver.svg); +} +QToolButton#tb1{ color: white; background-image: url(:/image/Index/u26.svg); font-weight: bold; @@ -20,4 +27,52 @@ text-align: center; margin:10; margin-right: 180px; +font: 18pt 微软雅黑; +} +QToolButton#tb2{ +color: white; +background-image: url(:/image/Index/u26.svg); +font-weight: bold; +border-radius: 5px; +text-align: center; +margin:10; +margin-right: 180px; +font: 18pt 微软雅黑; +} +QToolButton#tb3{ +color: white; +background-image: url(:/image/Index/u26.svg); +font-weight: bold; +border-radius: 5px; +text-align: center; +margin:10; +margin-right: 180px; +font: 18pt 微软雅黑; +}QToolButton#tb4{ +color: white; +background-image: url(:/image/Index/u26.svg); +font-weight: bold; +border-radius: 5px; +text-align: center; +margin:10; +margin-right: 180px; +font: 18pt 微软雅黑; +}QToolButton#tb5{ +color: white; +background-image: url(:/image/Index/u26.svg); +font-weight: bold; +border-radius: 5px; +text-align: center; +margin:10; +margin-right: 180px; +font: 18pt 微软雅黑; +}QToolButton#tb6{ +color: white; +background-image: url(:/image/Index/u26.svg); +font-weight: bold; +border-radius: 5px; +text-align: center; +margin:10; +margin-right: 180px; +font: 18pt 微软雅黑; } diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro index 1280b70..dfb0418 100644 --- a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro @@ -22,6 +22,7 @@ checkmethodmanage.cpp \ checkwindow.cpp \ create_task.cpp \ + datasyncview.cpp \ depar_task.cpp \ indexwindow.cpp \ infomanageview.cpp \ @@ -43,6 +44,7 @@ checkmethodmanage.h \ checkwindow.h \ create_task.h \ + datasyncview.h \ depar_task.h \ indexwindow.h \ infomanageview.h \ @@ -62,6 +64,7 @@ checkmethodmanage.ui \ checkwindow.ui \ create_task.ui \ + datasyncview.ui \ depar_task.ui \ indexwindow.ui \ infomanageview.ui \ diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user index 6ea03c5..93c39cb 100644 --- a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user @@ -1,10 +1,10 @@ - + EnvironmentId - {2746248a-b112-4e0f-9ae0-9e61f2a42309} + {c08df58c-84a7-4965-bca6-e98789474efa} ProjectExplorer.Project.ActiveTarget @@ -71,7 +71,7 @@ 0 0 - D:/dev/QT/AutoCalHainan/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug true @@ -119,7 +119,7 @@ 2 - D:/dev/QT/AutoCalHainan/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Release + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Release true @@ -167,7 +167,7 @@ 0 - D:/dev/QT/AutoCalHainan/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Profile + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Profile true @@ -287,8 +287,8 @@ 2 - Qt4ProjectManager.Qt4RunConfiguration:D:/dev/QT/AutoCalHainan/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro - D:/dev/QT/AutoCalHainan/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro + Qt4ProjectManager.Qt4RunConfiguration:C:/Users/admin/Desktop/SVN/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro + C:/Users/admin/Desktop/SVN/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro false @@ -299,7 +299,7 @@ false true - D:/dev/QT/AutoCalHainan/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug 1 @@ -314,7 +314,7 @@ 0 0 - D:/dev/QT/AutoCalHainan/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Debug + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Debug true @@ -362,7 +362,7 @@ 2 - D:/dev/QT/AutoCalHainan/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Release + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Release true @@ -410,7 +410,7 @@ 0 - D:/dev/QT/AutoCalHainan/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Profile + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Profile true @@ -530,14 +530,15 @@ 2 - - ProjectExplorer.CustomExecutableRunConfiguration - + AutoVerScheme2 + 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 diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user.c08df58 b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user.c08df58 deleted file mode 100644 index 495f95c..0000000 --- a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user.c08df58 +++ /dev/null @@ -1,563 +0,0 @@ - - - - - - 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 32-bit - Desktop Qt 5.14.2 MinGW 32-bit - qt.qt5.5142.win32_mingw73_kit - 0 - 0 - 0 - - D:/Auto_verification_scheme/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 - - - D:/Auto_verification_scheme/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 - - - D:/Auto_verification_scheme/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 - - D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug - - 1 - - - - ProjectExplorer.Project.Target.1 - - 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 - - D:/Auto_verification_scheme/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 - - - D:/Auto_verification_scheme/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 - - - D:/Auto_verification_scheme/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 - - AutoVerScheme2 - 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/InfoBase.h b/softwareDirectory/AutoVerScheme/InfoBase.h index 7fec63e..084cf3f 100644 --- a/softwareDirectory/AutoVerScheme/InfoBase.h +++ b/softwareDirectory/AutoVerScheme/InfoBase.h @@ -2,6 +2,7 @@ #define INFOBASE_H #include +#include "QStandardItemModel" ///信号管理页面的基类 所有信息管理页面都继承于InfoBase /// 便于统一管理 所有子类必须实现Load方法 /// 每次按钮点击切换都会调用Load方法 用于每次页面的数据刷新 @@ -11,6 +12,8 @@ InfoBase(QWidget *parent = nullptr): QWidget(parent){}; // 纯虚函数 virtual void Load()=0; + //QStandardItemModel 的实例。这个模型将用于存储和管理数据。 + QStandardItemModel *model; }; #endif // INFOBASE_H diff --git a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.cpp b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.cpp index 7ac1e87..ffb2bbc 100644 --- a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.cpp +++ b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.cpp @@ -1,14 +1,64 @@ #include "beexamined_deviceitem.h" #include "ui_beexamined_deviceitem.h" +#include "QMessageBox.h" BeExamined_DeviceItem::BeExamined_DeviceItem(QWidget *parent) : - QWidget(parent), + InfoBase(parent), ui(new Ui::BeExamined_DeviceItem) { ui->setupUi(this); + this->initForm(); } BeExamined_DeviceItem::~BeExamined_DeviceItem() { delete ui; } + +void BeExamined_DeviceItem::initForm() +{ + + //tableWidget设置 + //设置控件的边框显示 + ui->tableWidget->setStyleSheet("QHeaderView::section {" + "border: 1px solid rgba(197, 196, 196, 1);" + "border-left:none;" + "border-top:none;" + "background-color:white;" + "}"); + + ui->tableWidget->setRowCount(10); // 设置10行 + ui->tableWidget->setColumnCount(12); // 设置11列 + ui->tableWidget->setColumnWidth(0, 80); // 设置第一列的宽度为100像素 + ui->tableWidget->verticalHeader()->setParent(nullptr); //隐藏行头 + QTableWidgetItem *item = new QTableWidgetItem("测试数据"); + item->setTextAlignment(Qt::AlignCenter); + ui->tableWidget->setItem(0, 0, item); //设置数据 + + //初始化TableWidget 设置列 + QStringList headers; + headers << "序号" << "设备名称" << "型号规则" << "辅助字段" << "出厂编号" + << "生产厂家"<<"所在单位" <<"使用部门"<<"计量标识"<<"检定周期"<<"证书有效期"<<"操作"; + ui->tableWidget->setHorizontalHeaderLabels(headers); + +} +void BeExamined_DeviceItem::ShowMessageBox(QString title,QString value) { + // 创建一个QMessageBox对象 + QMessageBox msgBox; + + // 设置消息框的标题 + msgBox.setWindowTitle(title); + + // 设置消息框的文本内容 + msgBox.setText(value); + + // 设置消息框的标准按钮,这里是“确定”按钮 + msgBox.setStandardButtons(QMessageBox::Ok); + + // 显示消息框 + msgBox.exec(); +} +void BeExamined_DeviceItem::Load() +{ + //ShowMessageBox("被检设备","被检设备初始化完成"); +} diff --git a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.h b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.h index 76b061d..ae46979 100644 --- a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.h +++ b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.h @@ -2,12 +2,13 @@ #define BEEXAMINED_DEVICEITEM_H #include +#include "InfoBase.h" namespace Ui { class BeExamined_DeviceItem; } -class BeExamined_DeviceItem : public QWidget +class BeExamined_DeviceItem : public InfoBase { Q_OBJECT @@ -15,6 +16,11 @@ explicit BeExamined_DeviceItem(QWidget *parent = nullptr); ~BeExamined_DeviceItem(); +private slots: + void initForm(); //初始化界面数据 + void ShowMessageBox(QString title,QString value); + //继承父类的Load方法 + void Load() override; private: Ui::BeExamined_DeviceItem *ui; }; diff --git a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.ui b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.ui index af9f7bf..5a0a3c9 100644 --- a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.ui +++ b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.ui @@ -6,26 +6,236 @@ 0 0 - 400 - 300 + 1291 + 575 Form - - - - 130 - 140 - 89 - 24 - - - - 被检设备管理 - - + + + + + + 0 + 0 + + + + background-color:white; + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 设备名称: + + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 型号规则: + + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 出厂编号: + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 生产厂家: + + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 使用部门: + + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 使用单位: + + + + + + + + + + Qt::Horizontal + + + QSizePolicy::Expanding + + + + 40 + 20 + + + + + + + + Qt::RightToLeft + + + 查询 + + + + + + + Qt::RightToLeft + + + 重置 + + + + + + + + + + background-color:white; + + + + + + + + + + + + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/create_task.cpp b/softwareDirectory/AutoVerScheme/create_task.cpp index 4193efc..9b49a1a 100644 --- a/softwareDirectory/AutoVerScheme/create_task.cpp +++ b/softwareDirectory/AutoVerScheme/create_task.cpp @@ -1,14 +1,61 @@ #include "create_task.h" #include "ui_create_task.h" +#include "QMessageBox" Create_Task::Create_Task(QWidget *parent) : - QWidget(parent), + InfoBase(parent), ui(new Ui::Create_Task) { ui->setupUi(this); + this->initForm(); } Create_Task::~Create_Task() { delete ui; } +void Create_Task::initForm() +{ + //tableWidget设置 + //设置控件的边框显示 + ui->tableWidget->setStyleSheet("QHeaderView::section {" + "border: 1px solid rgba(197, 196, 196, 1);" + "border-left:none;" + "border-top:none;" + "background-color:white;" + "}"); + + ui->tableWidget->setRowCount(10); // 设置10行 + ui->tableWidget->setColumnCount(8); // 设置11列 + ui->tableWidget->setColumnWidth(0, 80); // 设置第一列的宽度为100像素 + ui->tableWidget->verticalHeader()->setParent(nullptr); //隐藏行头 + QTableWidgetItem *item = new QTableWidgetItem("测试数据"); + item->setTextAlignment(Qt::AlignCenter); + ui->tableWidget->setItem(0, 0, item); //设置数据 + + //初始化TableWidget 设置列 + QStringList headers; + headers << "序号" << "任务单编号" << "委托方"<< "使用部门" << "要求检完时间" << "送检人"<<"是否加急"<<"操作"; + ui->tableWidget->setHorizontalHeaderLabels(headers); + //ShowMessageBox("标题","初始化完成"); +} +void Create_Task::ShowMessageBox(QString title,QString value) { + // 创建一个QMessageBox对象 + QMessageBox msgBox; + + // 设置消息框的标题 + msgBox.setWindowTitle(title); + + // 设置消息框的文本内容 + msgBox.setText(value); + + // 设置消息框的标准按钮,这里是“确定”按钮 + msgBox.setStandardButtons(QMessageBox::Ok); + + // 显示消息框 + msgBox.exec(); +} +void Create_Task::Load() +{ + //ShowMessageBox("创建任务界面","创建任务界面初始化完成"); +} diff --git a/softwareDirectory/AutoVerScheme/create_task.h b/softwareDirectory/AutoVerScheme/create_task.h index e2264de..7cf383f 100644 --- a/softwareDirectory/AutoVerScheme/create_task.h +++ b/softwareDirectory/AutoVerScheme/create_task.h @@ -1,13 +1,14 @@ #ifndef CREATE_TASK_H #define CREATE_TASK_H +#include "InfoBase.h" #include namespace Ui { class Create_Task; } -class Create_Task : public QWidget +class Create_Task : public InfoBase { Q_OBJECT @@ -15,6 +16,11 @@ explicit Create_Task(QWidget *parent = nullptr); ~Create_Task(); +private slots: + void initForm(); //初始化界面数据 + void ShowMessageBox(QString title,QString value); + //继承父类的Load方法 + void Load() override; private: Ui::Create_Task *ui; }; diff --git a/softwareDirectory/AutoVerScheme/create_task.ui b/softwareDirectory/AutoVerScheme/create_task.ui index b79c6a1..d9d88ed 100644 --- a/softwareDirectory/AutoVerScheme/create_task.ui +++ b/softwareDirectory/AutoVerScheme/create_task.ui @@ -6,29 +6,294 @@ 0 0 - 400 - 300 + 1184 + 580 Form - - background-color:red; + + Qt::LeftToRight - - - - 140 - 120 - 89 - 24 - - - - 创建任务单 - - + + + + + + + + + 0 + 0 + + + + background-color:white; + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 任务单编号: + + + + + + + + 0 + 0 + + + + + + + + + 0 + 0 + + + + + 50 + 0 + + + + 委托方: + + + + + + + + 0 + 0 + + + + + 0 + 0 + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 使用部门: + + + + + + + + 0 + 0 + + + + + 0 + 0 + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 要求完成时间: + + + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + 0 + 30 + + + + Qt::RightToLeft + + + background-color:rgb(3, 58, 132); +color:white; + + + + 查询 + + + + + + + + 0 + 30 + + + + Qt::RightToLeft + + + background-color:rgb(207, 132, 33); +color:white; + + + + 重置 + + + + + + + + + + background-color:white; + + + + + + + 6 + + + 9 + + + 9 + + + 9 + + + + + + 0 + 0 + + + + + 120 + 40 + + + + OpenHandCursor + + + Qt::DefaultContextMenu + + + Qt::RightToLeft + + + false + + + background-color:rgb(9, 89, 179); +color:white; + + + 创建任务单 + + + true + + + + + + + + + + + + + + SizeVerCursor + + + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/datasyncview.cpp b/softwareDirectory/AutoVerScheme/datasyncview.cpp new file mode 100644 index 0000000..74cd41d --- /dev/null +++ b/softwareDirectory/AutoVerScheme/datasyncview.cpp @@ -0,0 +1,44 @@ +#include "datasyncview.h" +#include "ui_datasyncview.h" + +DataSyncView::DataSyncView(QWidget *parent) : + QWidget(parent), + ui(new Ui::DataSyncView) +{ + ui->setupUi(this); + this->initForm(); +} + +DataSyncView::~DataSyncView() +{ + delete ui; +} +void DataSyncView::initForm() +{ + //tableWidget设置 + //设置控件的边框显示 + ui->tableWidget->setStyleSheet("QHeaderView::section {" + "border: 1px solid grey;" + "border-left:none;" + "border-top:none;" + "background-color:white;" + " color:black;" + "font: bold 18px Arial, sans-serif;" + "}"); + + ui->tableWidget->setRowCount(10); // 设置10行 + ui->tableWidget->setColumnCount(4); // 设置11列 + ui->tableWidget->setColumnWidth(0, 80); // 设置第一列的宽度为100像素 + ui->tableWidget->verticalHeader()->setParent(nullptr); //隐藏行头 + QTableWidgetItem *item = new QTableWidgetItem("测试数据"); + item->setTextAlignment(Qt::AlignCenter); + ui->tableWidget->setItem(0, 0, item); //设置数据 + + //初始化TableWidget 设置列 + QStringList headers; + headers << "序号" << "同步时间" << "是否同步成功" << "备注" ; + ui->tableWidget->setHorizontalHeaderLabels(headers); + + + +} diff --git a/softwareDirectory/AutoVerScheme/datasyncview.h b/softwareDirectory/AutoVerScheme/datasyncview.h new file mode 100644 index 0000000..9a73de9 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/datasyncview.h @@ -0,0 +1,24 @@ +#ifndef DATASYNCVIEW_H +#define DATASYNCVIEW_H + +#include + +namespace Ui { +class DataSyncView; +} + +class DataSyncView : public QWidget +{ + Q_OBJECT + +public: + explicit DataSyncView(QWidget *parent = nullptr); + ~DataSyncView(); +private slots: + void initForm(); //初始化界面数据 + +private: + Ui::DataSyncView *ui; +}; + +#endif // DATASYNCVIEW_H diff --git a/softwareDirectory/AutoVerScheme/datasyncview.ui b/softwareDirectory/AutoVerScheme/datasyncview.ui new file mode 100644 index 0000000..c45bf56 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/datasyncview.ui @@ -0,0 +1,133 @@ + + + DataSyncView + + + + 0 + 0 + 874 + 531 + + + + 数据同步 + + + background-color:rgba(240, 240, 240, 1); + + + + + + background-color:white; + + + + + + + + + + 0 + 0 + + + + background-color:white; +border:0; + + + + + + + + + + 0 + 0 + + + + font:bold 20px Arial, sans-serif; +color:#334582; + + + 同步记录 + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + background-color:#334582; + font: bold 18px Arial, sans-serif; +color:white; +padding:10px; + + + 下载数据 + + + + + + + + 200 + 0 + + + + + 100 + 40 + + + + Qt::RightToLeft + + + background-color:#334582; + font: bold 18px Arial, sans-serif; +color:white; +padding:10px; + + + 发送同步请求 + + + + + + + + + + + + + + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/depar_task.cpp b/softwareDirectory/AutoVerScheme/depar_task.cpp index de39775..5f0f93a 100644 --- a/softwareDirectory/AutoVerScheme/depar_task.cpp +++ b/softwareDirectory/AutoVerScheme/depar_task.cpp @@ -2,13 +2,19 @@ #include "ui_depar_task.h" #include "QMessageBox" #include "InfoBase.h" +#include "QStandardItemModel" Depar_Task::Depar_Task(QWidget *parent) : InfoBase(parent), ui(new Ui::Depar_Task) { ui->setupUi(this); + //初始化列表 this->initForm(); + + + + } Depar_Task::~Depar_Task() @@ -17,8 +23,31 @@ } void Depar_Task::initForm() { + //tableWidget设置 + //设置控件的边框显示 + ui->tableWidget->setStyleSheet("QHeaderView::section {" + "border: 1px solid rgba(197, 196, 196, 1);" + "border-left:none;" + "border-top:none;" + "background-color:white;" + "}"); - //ShowMessageBox("标题","初始化完成"); + ui->tableWidget->setRowCount(10); // 设置10行 + ui->tableWidget->setColumnCount(10); // 设置11列 + ui->tableWidget->setColumnWidth(0, 80); // 设置第一列的宽度为100像素 + ui->tableWidget->verticalHeader()->setParent(nullptr); //隐藏行头 + QTableWidgetItem *item = new QTableWidgetItem("测试数据"); + item->setTextAlignment(Qt::AlignCenter); //文件居中 + ui->tableWidget->setItem(0, 0, item); //设置数据 + + //初始化TableWidget 设置列 + QStringList headers; + headers << "序号" << "设备名称" << "型号规则" << "辅助字段" << "辅助字段"<< "出厂编号" + << "生产厂家" <<"委托方"<<"使用部门"<<"要求检完时间"<<"是否加急"; + ui->tableWidget->setHorizontalHeaderLabels(headers); + + + } void Depar_Task::ShowMessageBox(QString title,QString value) { // 创建一个QMessageBox对象 @@ -38,5 +67,5 @@ } void Depar_Task::Load() { - ShowMessageBox("部门任务页面","部门任务初始化完成"); + //ShowMessageBox("部门任务页面","部门任务初始化完成"); } diff --git a/softwareDirectory/AutoVerScheme/depar_task.h b/softwareDirectory/AutoVerScheme/depar_task.h index 8716faf..110008d 100644 --- a/softwareDirectory/AutoVerScheme/depar_task.h +++ b/softwareDirectory/AutoVerScheme/depar_task.h @@ -3,6 +3,7 @@ #include "InfoBase.h" +#include "QStandardItemModel" namespace Ui { class Depar_Task; @@ -20,9 +21,12 @@ private slots: void initForm(); //初始化界面数据 void ShowMessageBox(QString title,QString value); + //继承父类的Load方法 void Load() override; + private: Ui::Depar_Task *ui; + // QStandardItemModel *model; }; #endif // DEPAR_TASK_H diff --git a/softwareDirectory/AutoVerScheme/depar_task.ui b/softwareDirectory/AutoVerScheme/depar_task.ui index ff3d44f..1a95cc4 100644 --- a/softwareDirectory/AutoVerScheme/depar_task.ui +++ b/softwareDirectory/AutoVerScheme/depar_task.ui @@ -6,7 +6,7 @@ 0 0 - 1184 + 1190 456 @@ -143,7 +143,34 @@ + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + 0 + 30 + + + + Qt::RightToLeft + + + background-color:rgb(3, 58, 152); +color:white; + + 查询 @@ -151,6 +178,20 @@ + + + 0 + 30 + + + + Qt::RightToLeft + + + background-color:rgb(207, 132, 33); +color:white; + + 重置 @@ -168,8 +209,15 @@ + + + - + + + + + diff --git a/softwareDirectory/AutoVerScheme/indexwindow.cpp b/softwareDirectory/AutoVerScheme/indexwindow.cpp index fca900a..cbba812 100644 --- a/softwareDirectory/AutoVerScheme/indexwindow.cpp +++ b/softwareDirectory/AutoVerScheme/indexwindow.cpp @@ -13,11 +13,37 @@ { ui->setupUi(this); this->initForm(); +/* + //主要作用 当页面关闭后 回到indexwindow页面 并 通过~IndexWindow 释放此页面指针所占用内存 + // 假设 ShowDataSyncView 是一个指向 DataSyncView 实例的指针 + // 当 ShowDataSyncView 关闭时,它的 closed() 信号会被发出 + // 连接这个信号到 IndexWindow 的 onNewWindowClosed() 槽函数 + if(ShowDataSyncView) { + //数据同步页面 信号槽 + connect(ShowDataSyncView, &DataSyncView::close, this, &IndexWindow::onNewWindowClosed); + } + if(ShowInfoManageView) { + //信息管理 信号槽 + connect(ShowInfoManageView, &InfoManageView::close, this, &IndexWindow::onNewWindowClosed); + } + */ } IndexWindow::~IndexWindow() { delete ui; + //释放页面内存 + /* + if (ShowDataSyncView) { + ShowDataSyncView->close(); + delete ShowDataSyncView; + } + else if(ShowInfoManageView) + { + ShowInfoManageView->close(); + delete ShowInfoManageView; + } + */ } void IndexWindow::initForm() { @@ -57,6 +83,15 @@ } + +void IndexWindow::onNewWindowClosed() +{ + // 新窗体关闭后,设置 IndexWindow 为活动窗口 + this->activateWindow(); + // 也可以设置焦点到 MainWindow 中的某个控件 + // ui->someWidget->setFocus(); +} + void IndexWindow::showCheckWindow() { CheckWindow *checkWindow = new CheckWindow; @@ -65,6 +100,26 @@ checkWindow->show(); } +//信息管理按钮 +void IndexWindow::on_tb3_clicked() +{ + InfoManageView *ShowInfoManageView = new InfoManageView(); + ShowInfoManageView->setWindowState(Qt::WindowMaximized); + ShowInfoManageView->setWindowModality(Qt::ApplicationModal); + ShowInfoManageView->show(); +} +//数据同步按钮 +void IndexWindow::on_tb6_clicked() +{ + + // 创建新窗体实例并显示 + DataSyncView *ShowDataSyncView = new DataSyncView(); + ShowDataSyncView->setWindowState(Qt::WindowMaximized); + ShowDataSyncView->setWindowModality(Qt::ApplicationModal); + ShowDataSyncView->show(); +} + + void IndexWindow::showCheckMethod() { CheckMethodManage *checkWindow = new CheckMethodManage; diff --git a/softwareDirectory/AutoVerScheme/indexwindow.h b/softwareDirectory/AutoVerScheme/indexwindow.h index a05d802..190b0f1 100644 --- a/softwareDirectory/AutoVerScheme/indexwindow.h +++ b/softwareDirectory/AutoVerScheme/indexwindow.h @@ -2,6 +2,8 @@ #define INDEXWINDOW_H #include +#include "datasyncView.h" +#include "infomanageview.h" namespace Ui { class IndexWindow; @@ -23,8 +25,21 @@ void showVerifyMethod(); + void on_tb3_clicked(); + + void on_tb6_clicked(); + + //页面关闭响应函数 + void onNewWindowClosed(); + + void on_tb1_clicked(); + private: Ui::IndexWindow *ui; + + //数据同步页面 指针 + //DataSyncView *ShowDataSyncView; + //InfoManageView *ShowInfoManageView; }; #endif // INDEXWINDOW_H diff --git a/softwareDirectory/AutoVerScheme/indexwindow.ui b/softwareDirectory/AutoVerScheme/indexwindow.ui index d69a54d..dec7207 100644 --- a/softwareDirectory/AutoVerScheme/indexwindow.ui +++ b/softwareDirectory/AutoVerScheme/indexwindow.ui @@ -189,7 +189,7 @@ - + 0 @@ -236,7 +236,7 @@ - + 0 @@ -270,7 +270,7 @@ - + 0 @@ -310,7 +310,7 @@ - + 0 @@ -357,7 +357,7 @@ - + 0 @@ -423,7 +423,7 @@ - + 0 @@ -521,66 +521,34 @@ - toolButton_4 + tb1 clicked() IndexWindow showCheckWindow() - 214 - 250 + 260 + 276 - 351 - 107 + 666 + 394 - toolButton_6 + tb4 clicked() IndexWindow showCheckMethod() - 249 - 606 + 260 + 598 - 331 - 452 - - - - - toolButton_5 - clicked() - IndexWindow - showVerifyMethod() - - - 706 - 589 - - - 692 - 442 - - - - - toolButton_2 - clicked() - IndexWindow - showVerifyWindow() - - - 758 - 249 - - - 862 - 114 + 666 + 394 diff --git a/softwareDirectory/AutoVerScheme/infomanageview.cpp b/softwareDirectory/AutoVerScheme/infomanageview.cpp index a206c6f..d045c60 100644 --- a/softwareDirectory/AutoVerScheme/infomanageview.cpp +++ b/softwareDirectory/AutoVerScheme/infomanageview.cpp @@ -2,6 +2,7 @@ #include "ui_infomanageview.h" #include #include +#include //子窗体 #include "depar_task.h" #include "my_task.h" @@ -19,6 +20,7 @@ { ui->setupUi(this); this->setWindowTitle("信息管理"); + //初始化调用所有函数 this->initForm(); this->initWidget(); @@ -115,7 +117,8 @@ //底部加个弹簧 QSpacerItem *verticalSpacer = new QSpacerItem(20, 40, QSizePolicy::Minimum, QSizePolicy::Expanding); ui->widgetLeft->layout()->addItem(verticalSpacer); - btns.at(names.count() - 1)->click(); + + btns.at(0)->click();//选择启动页面 第一个 } //按钮点击切换UI事件 void InfoManageView::buttonClicked() diff --git a/softwareDirectory/AutoVerScheme/infomanageview.h b/softwareDirectory/AutoVerScheme/infomanageview.h index 3c1463f..5e44bba 100644 --- a/softwareDirectory/AutoVerScheme/infomanageview.h +++ b/softwareDirectory/AutoVerScheme/infomanageview.h @@ -2,6 +2,7 @@ #define INFOMANAGEVIEW_H #include +#include class QAbstractButton; diff --git a/softwareDirectory/AutoVerScheme/infomanageview.ui b/softwareDirectory/AutoVerScheme/infomanageview.ui index 4b39e7d..ef0b87b 100644 --- a/softwareDirectory/AutoVerScheme/infomanageview.ui +++ b/softwareDirectory/AutoVerScheme/infomanageview.ui @@ -10,8 +10,15 @@ 644 + + Qt::DefaultContextMenu + - Form + 信息管理 + + + color:black; +background-color:rgba(240, 240, 240, 1); @@ -68,8 +75,8 @@ - - 170 + + 0 0 diff --git a/softwareDirectory/AutoVerScheme/inspectdataitem.cpp b/softwareDirectory/AutoVerScheme/inspectdataitem.cpp index e9c2adc..efc00ba 100644 --- a/softwareDirectory/AutoVerScheme/inspectdataitem.cpp +++ b/softwareDirectory/AutoVerScheme/inspectdataitem.cpp @@ -1,14 +1,62 @@ #include "inspectdataitem.h" #include "ui_inspectdataitem.h" +#include "QMessageBox.h" InspectDataItem::InspectDataItem(QWidget *parent) : - QWidget(parent), + InfoBase(parent), ui(new Ui::InspectDataItem) { ui->setupUi(this); + this->initForm(); } InspectDataItem::~InspectDataItem() { delete ui; } +void InspectDataItem::initForm() +{ + //tableWidget设置 + //设置控件的边框显示 + ui->tableWidget->setStyleSheet("QHeaderView::section {" + "border: 1px solid rgba(197, 196, 196, 1);" + "border-left:none;" + "border-top:none;" + "background-color:white;" + "}"); + + ui->tableWidget->setRowCount(10); // 设置10行 + ui->tableWidget->setColumnCount(12); // 设置11列 + ui->tableWidget->setColumnWidth(0, 80); // 设置第一列的宽度为100像素 + ui->tableWidget->verticalHeader()->setParent(nullptr); //隐藏行头 + QTableWidgetItem *item = new QTableWidgetItem("测试数据"); + item->setTextAlignment(Qt::AlignCenter); + ui->tableWidget->setItem(0, 0, item); //设置数据 + + //初始化TableWidget 设置列 + QStringList headers; + headers << "序号" << "设备名称" << "型号规则" << "出厂编号" + <<"核查件名称"<<"核查件型号"<<"核查件编号" <<"核查员" + << "核查日期" <<"实验室"<<"部门"<<"操作"; + ui->tableWidget->setHorizontalHeaderLabels(headers); +} +void InspectDataItem::ShowMessageBox(QString title,QString value) { + // 创建一个QMessageBox对象 + QMessageBox msgBox; + + // 设置消息框的标题 + msgBox.setWindowTitle(title); + + // 设置消息框的文本内容 + msgBox.setText(value); + + // 设置消息框的标准按钮,这里是“确定”按钮 + msgBox.setStandardButtons(QMessageBox::Ok); + + // 显示消息框 + msgBox.exec(); +} +void InspectDataItem::Load() +{ + //ShowMessageBox("核查数据","核查数据"); +} diff --git a/softwareDirectory/AutoVerScheme/inspectdataitem.h b/softwareDirectory/AutoVerScheme/inspectdataitem.h index 57551bb..bdf7066 100644 --- a/softwareDirectory/AutoVerScheme/inspectdataitem.h +++ b/softwareDirectory/AutoVerScheme/inspectdataitem.h @@ -2,19 +2,24 @@ #define INSPECTDATAITEM_H #include +#include "InfoBase.h" namespace Ui { class InspectDataItem; } -class InspectDataItem : public QWidget +class InspectDataItem : public InfoBase { Q_OBJECT public: explicit InspectDataItem(QWidget *parent = nullptr); ~InspectDataItem(); - +private slots: + void initForm(); //初始化界面数据 + void ShowMessageBox(QString title,QString value); + //继承父类的Load方法 + void Load() override; private: Ui::InspectDataItem *ui; }; diff --git a/softwareDirectory/AutoVerScheme/inspectdataitem.ui b/softwareDirectory/AutoVerScheme/inspectdataitem.ui index 45f04e0..86786c9 100644 --- a/softwareDirectory/AutoVerScheme/inspectdataitem.ui +++ b/softwareDirectory/AutoVerScheme/inspectdataitem.ui @@ -6,26 +6,236 @@ 0 0 - 400 - 300 + 1362 + 543 Form - - - - 120 - 130 - 89 - 24 - - - - 核查数据管理 - - + + + + + + 0 + 0 + + + + background-color:white; + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 设备名称: + + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 型号规则: + + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 出厂编号: + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 核查员: + + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 核查日期: + + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 实验室: + + + + + + + + + + Qt::Horizontal + + + QSizePolicy::Expanding + + + + 40 + 20 + + + + + + + + Qt::RightToLeft + + + 查询 + + + + + + + Qt::RightToLeft + + + 重置 + + + + + + + + + + background-color:white; + + + + + + + + + + + + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/my_task.cpp b/softwareDirectory/AutoVerScheme/my_task.cpp index 40aceb2..559a73b 100644 --- a/softwareDirectory/AutoVerScheme/my_task.cpp +++ b/softwareDirectory/AutoVerScheme/my_task.cpp @@ -7,7 +7,8 @@ ui(new Ui::My_Task) { ui->setupUi(this); - + //初始化QStandardItemModel + model=new QStandardItemModel(parent); this->initForm(); } @@ -17,7 +18,28 @@ } void My_Task::initForm() { + //tableWidget设置 + //设置控件的边框显示 + ui->tableWidget->setStyleSheet("QHeaderView::section {" + "border: 1px solid rgba(197, 196, 196, 1);" + "border-left:none;" + "border-top:none;" + "background-color:white;" + "}"); + ui->tableWidget->setRowCount(10); // 设置10行 + ui->tableWidget->setColumnCount(10); // 设置11列 + ui->tableWidget->setColumnWidth(0, 80); // 设置第一列的宽度为100像素 + ui->tableWidget->verticalHeader()->setParent(nullptr); //隐藏行头 + QTableWidgetItem *item = new QTableWidgetItem("测试数据"); + item->setTextAlignment(Qt::AlignCenter); + ui->tableWidget->setItem(0, 0, item); //设置数据 + + //初始化TableWidget 设置列 + QStringList headers; + headers << "序号" << "设备名称" << "型号规则" << "辅助字段" << "辅助字段"<< "出厂编号" + << "生产厂家" <<"委托方"<<"使用部门"<<"要求检完时间"<<"是否加急"; + ui->tableWidget->setHorizontalHeaderLabels(headers); } void My_Task::ShowMessageBox(QString title,QString value) { @@ -38,5 +60,5 @@ } void My_Task::Load() { - ShowMessageBox("我的任务页面","我的任务初始化完成"); + //ShowMessageBox("我的任务页面","我的任务初始化完成"); } diff --git a/softwareDirectory/AutoVerScheme/my_task.ui b/softwareDirectory/AutoVerScheme/my_task.ui index 89245b8..a078840 100644 --- a/softwareDirectory/AutoVerScheme/my_task.ui +++ b/softwareDirectory/AutoVerScheme/my_task.ui @@ -6,8 +6,8 @@ 0 0 - 857 - 511 + 1190 + 577 @@ -140,7 +140,23 @@ + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + Qt::RightToLeft + 查询 @@ -148,6 +164,9 @@ + + Qt::RightToLeft + 重置 @@ -166,7 +185,14 @@ - + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/res/qss/Index.css b/softwareDirectory/AutoVerScheme/res/qss/Index.css index 8fad195..d2ba43e 100644 --- a/softwareDirectory/AutoVerScheme/res/qss/Index.css +++ b/softwareDirectory/AutoVerScheme/res/qss/Index.css @@ -1,18 +1,25 @@ -*{ - -color:black; -font: 18pt 微软雅黑; - -} -QMainWindow +QMainWindow#IndexWindow { background-image: url(:/image/Index/u15.png); background-color:white; } -QToolButton:hover{ +QToolButton#tb1:hover{ background-image: url(:/image/Index/u26_mouseOver.svg); } -QToolButton{ +QToolButton#tb2:hover{ + background-image: url(:/image/Index/u26_mouseOver.svg); +} +QToolButton#tb3:hover{ + background-image: url(:/image/Index/u26_mouseOver.svg); +}QToolButton#tb4:hover{ +background-image: url(:/image/Index/u26_mouseOver.svg); +}QToolButton#tb5:hover{ +background-image: url(:/image/Index/u26_mouseOver.svg); +} +QToolButton#tb6:hover{ + background-image: url(:/image/Index/u26_mouseOver.svg); +} +QToolButton#tb1{ color: white; background-image: url(:/image/Index/u26.svg); font-weight: bold; @@ -20,4 +27,52 @@ text-align: center; margin:10; margin-right: 180px; +font: 18pt 微软雅黑; +} +QToolButton#tb2{ +color: white; +background-image: url(:/image/Index/u26.svg); +font-weight: bold; +border-radius: 5px; +text-align: center; +margin:10; +margin-right: 180px; +font: 18pt 微软雅黑; +} +QToolButton#tb3{ +color: white; +background-image: url(:/image/Index/u26.svg); +font-weight: bold; +border-radius: 5px; +text-align: center; +margin:10; +margin-right: 180px; +font: 18pt 微软雅黑; +}QToolButton#tb4{ +color: white; +background-image: url(:/image/Index/u26.svg); +font-weight: bold; +border-radius: 5px; +text-align: center; +margin:10; +margin-right: 180px; +font: 18pt 微软雅黑; +}QToolButton#tb5{ +color: white; +background-image: url(:/image/Index/u26.svg); +font-weight: bold; +border-radius: 5px; +text-align: center; +margin:10; +margin-right: 180px; +font: 18pt 微软雅黑; +}QToolButton#tb6{ +color: white; +background-image: url(:/image/Index/u26.svg); +font-weight: bold; +border-radius: 5px; +text-align: center; +margin:10; +margin-right: 180px; +font: 18pt 微软雅黑; } diff --git a/softwareDirectory/AutoVerScheme/rulefileitem.cpp b/softwareDirectory/AutoVerScheme/rulefileitem.cpp index 6f9ddd3..095165e 100644 --- a/softwareDirectory/AutoVerScheme/rulefileitem.cpp +++ b/softwareDirectory/AutoVerScheme/rulefileitem.cpp @@ -1,14 +1,63 @@ #include "rulefileitem.h" #include "ui_rulefileitem.h" +#include "QMessageBox" + RuleFileItem::RuleFileItem(QWidget *parent) : - QWidget(parent), + InfoBase(parent), ui(new Ui::RuleFileItem) { ui->setupUi(this); + this->initForm(); } RuleFileItem::~RuleFileItem() { delete ui; } +void RuleFileItem::initForm() +{ + + //tableWidget设置 + //设置控件的边框显示 + ui->tableWidget->setStyleSheet("QHeaderView::section {" + "border: 1px solid rgba(197, 196, 196, 1);" + "border-left:none;" + "border-top:none;" + "background-color:white;" + "}"); + + ui->tableWidget->setRowCount(10); // 设置10行 + ui->tableWidget->setColumnCount(9); // 设置11列 + ui->tableWidget->setColumnWidth(0, 80); // 设置第一列的宽度为100像素 + ui->tableWidget->verticalHeader()->setParent(nullptr); //隐藏行头 + QTableWidgetItem *item = new QTableWidgetItem("测试数据"); + item->setTextAlignment(Qt::AlignCenter); + ui->tableWidget->setItem(0, 0, item); //设置数据 + + //初始化TableWidget 设置列 + QStringList headers; + headers << "序号" << "文件号" << "文件名称" << "版本号" << "文件类型"<< "颁布时间" + << "实施时间" <<"备注"<<"操作"; + ui->tableWidget->setHorizontalHeaderLabels(headers); +} +void RuleFileItem::ShowMessageBox(QString title,QString value) { + // 创建一个QMessageBox对象 + QMessageBox msgBox; + + // 设置消息框的标题 + msgBox.setWindowTitle(title); + + // 设置消息框的文本内容 + msgBox.setText(value); + + // 设置消息框的标准按钮,这里是“确定”按钮 + msgBox.setStandardButtons(QMessageBox::Ok); + + // 显示消息框 + msgBox.exec(); +} +void RuleFileItem::Load() +{ + //ShowMessageBox("技术文件","技术文件初始化完成"); +} diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro index 1280b70..dfb0418 100644 --- a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro @@ -22,6 +22,7 @@ checkmethodmanage.cpp \ checkwindow.cpp \ create_task.cpp \ + datasyncview.cpp \ depar_task.cpp \ indexwindow.cpp \ infomanageview.cpp \ @@ -43,6 +44,7 @@ checkmethodmanage.h \ checkwindow.h \ create_task.h \ + datasyncview.h \ depar_task.h \ indexwindow.h \ infomanageview.h \ @@ -62,6 +64,7 @@ checkmethodmanage.ui \ checkwindow.ui \ create_task.ui \ + datasyncview.ui \ depar_task.ui \ indexwindow.ui \ infomanageview.ui \ diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user index 6ea03c5..93c39cb 100644 --- a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user @@ -1,10 +1,10 @@ - + EnvironmentId - {2746248a-b112-4e0f-9ae0-9e61f2a42309} + {c08df58c-84a7-4965-bca6-e98789474efa} ProjectExplorer.Project.ActiveTarget @@ -71,7 +71,7 @@ 0 0 - D:/dev/QT/AutoCalHainan/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug true @@ -119,7 +119,7 @@ 2 - D:/dev/QT/AutoCalHainan/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Release + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Release true @@ -167,7 +167,7 @@ 0 - D:/dev/QT/AutoCalHainan/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Profile + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Profile true @@ -287,8 +287,8 @@ 2 - Qt4ProjectManager.Qt4RunConfiguration:D:/dev/QT/AutoCalHainan/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro - D:/dev/QT/AutoCalHainan/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro + Qt4ProjectManager.Qt4RunConfiguration:C:/Users/admin/Desktop/SVN/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro + C:/Users/admin/Desktop/SVN/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro false @@ -299,7 +299,7 @@ false true - D:/dev/QT/AutoCalHainan/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug 1 @@ -314,7 +314,7 @@ 0 0 - D:/dev/QT/AutoCalHainan/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Debug + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Debug true @@ -362,7 +362,7 @@ 2 - D:/dev/QT/AutoCalHainan/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Release + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Release true @@ -410,7 +410,7 @@ 0 - D:/dev/QT/AutoCalHainan/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Profile + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Profile true @@ -530,14 +530,15 @@ 2 - - ProjectExplorer.CustomExecutableRunConfiguration - + AutoVerScheme2 + 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 diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user.c08df58 b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user.c08df58 deleted file mode 100644 index 495f95c..0000000 --- a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user.c08df58 +++ /dev/null @@ -1,563 +0,0 @@ - - - - - - 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 32-bit - Desktop Qt 5.14.2 MinGW 32-bit - qt.qt5.5142.win32_mingw73_kit - 0 - 0 - 0 - - D:/Auto_verification_scheme/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 - - - D:/Auto_verification_scheme/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 - - - D:/Auto_verification_scheme/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 - - D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug - - 1 - - - - ProjectExplorer.Project.Target.1 - - 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 - - D:/Auto_verification_scheme/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 - - - D:/Auto_verification_scheme/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 - - - D:/Auto_verification_scheme/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 - - AutoVerScheme2 - 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/InfoBase.h b/softwareDirectory/AutoVerScheme/InfoBase.h index 7fec63e..084cf3f 100644 --- a/softwareDirectory/AutoVerScheme/InfoBase.h +++ b/softwareDirectory/AutoVerScheme/InfoBase.h @@ -2,6 +2,7 @@ #define INFOBASE_H #include +#include "QStandardItemModel" ///信号管理页面的基类 所有信息管理页面都继承于InfoBase /// 便于统一管理 所有子类必须实现Load方法 /// 每次按钮点击切换都会调用Load方法 用于每次页面的数据刷新 @@ -11,6 +12,8 @@ InfoBase(QWidget *parent = nullptr): QWidget(parent){}; // 纯虚函数 virtual void Load()=0; + //QStandardItemModel 的实例。这个模型将用于存储和管理数据。 + QStandardItemModel *model; }; #endif // INFOBASE_H diff --git a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.cpp b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.cpp index 7ac1e87..ffb2bbc 100644 --- a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.cpp +++ b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.cpp @@ -1,14 +1,64 @@ #include "beexamined_deviceitem.h" #include "ui_beexamined_deviceitem.h" +#include "QMessageBox.h" BeExamined_DeviceItem::BeExamined_DeviceItem(QWidget *parent) : - QWidget(parent), + InfoBase(parent), ui(new Ui::BeExamined_DeviceItem) { ui->setupUi(this); + this->initForm(); } BeExamined_DeviceItem::~BeExamined_DeviceItem() { delete ui; } + +void BeExamined_DeviceItem::initForm() +{ + + //tableWidget设置 + //设置控件的边框显示 + ui->tableWidget->setStyleSheet("QHeaderView::section {" + "border: 1px solid rgba(197, 196, 196, 1);" + "border-left:none;" + "border-top:none;" + "background-color:white;" + "}"); + + ui->tableWidget->setRowCount(10); // 设置10行 + ui->tableWidget->setColumnCount(12); // 设置11列 + ui->tableWidget->setColumnWidth(0, 80); // 设置第一列的宽度为100像素 + ui->tableWidget->verticalHeader()->setParent(nullptr); //隐藏行头 + QTableWidgetItem *item = new QTableWidgetItem("测试数据"); + item->setTextAlignment(Qt::AlignCenter); + ui->tableWidget->setItem(0, 0, item); //设置数据 + + //初始化TableWidget 设置列 + QStringList headers; + headers << "序号" << "设备名称" << "型号规则" << "辅助字段" << "出厂编号" + << "生产厂家"<<"所在单位" <<"使用部门"<<"计量标识"<<"检定周期"<<"证书有效期"<<"操作"; + ui->tableWidget->setHorizontalHeaderLabels(headers); + +} +void BeExamined_DeviceItem::ShowMessageBox(QString title,QString value) { + // 创建一个QMessageBox对象 + QMessageBox msgBox; + + // 设置消息框的标题 + msgBox.setWindowTitle(title); + + // 设置消息框的文本内容 + msgBox.setText(value); + + // 设置消息框的标准按钮,这里是“确定”按钮 + msgBox.setStandardButtons(QMessageBox::Ok); + + // 显示消息框 + msgBox.exec(); +} +void BeExamined_DeviceItem::Load() +{ + //ShowMessageBox("被检设备","被检设备初始化完成"); +} diff --git a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.h b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.h index 76b061d..ae46979 100644 --- a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.h +++ b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.h @@ -2,12 +2,13 @@ #define BEEXAMINED_DEVICEITEM_H #include +#include "InfoBase.h" namespace Ui { class BeExamined_DeviceItem; } -class BeExamined_DeviceItem : public QWidget +class BeExamined_DeviceItem : public InfoBase { Q_OBJECT @@ -15,6 +16,11 @@ explicit BeExamined_DeviceItem(QWidget *parent = nullptr); ~BeExamined_DeviceItem(); +private slots: + void initForm(); //初始化界面数据 + void ShowMessageBox(QString title,QString value); + //继承父类的Load方法 + void Load() override; private: Ui::BeExamined_DeviceItem *ui; }; diff --git a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.ui b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.ui index af9f7bf..5a0a3c9 100644 --- a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.ui +++ b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.ui @@ -6,26 +6,236 @@ 0 0 - 400 - 300 + 1291 + 575 Form - - - - 130 - 140 - 89 - 24 - - - - 被检设备管理 - - + + + + + + 0 + 0 + + + + background-color:white; + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 设备名称: + + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 型号规则: + + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 出厂编号: + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 生产厂家: + + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 使用部门: + + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 使用单位: + + + + + + + + + + Qt::Horizontal + + + QSizePolicy::Expanding + + + + 40 + 20 + + + + + + + + Qt::RightToLeft + + + 查询 + + + + + + + Qt::RightToLeft + + + 重置 + + + + + + + + + + background-color:white; + + + + + + + + + + + + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/create_task.cpp b/softwareDirectory/AutoVerScheme/create_task.cpp index 4193efc..9b49a1a 100644 --- a/softwareDirectory/AutoVerScheme/create_task.cpp +++ b/softwareDirectory/AutoVerScheme/create_task.cpp @@ -1,14 +1,61 @@ #include "create_task.h" #include "ui_create_task.h" +#include "QMessageBox" Create_Task::Create_Task(QWidget *parent) : - QWidget(parent), + InfoBase(parent), ui(new Ui::Create_Task) { ui->setupUi(this); + this->initForm(); } Create_Task::~Create_Task() { delete ui; } +void Create_Task::initForm() +{ + //tableWidget设置 + //设置控件的边框显示 + ui->tableWidget->setStyleSheet("QHeaderView::section {" + "border: 1px solid rgba(197, 196, 196, 1);" + "border-left:none;" + "border-top:none;" + "background-color:white;" + "}"); + + ui->tableWidget->setRowCount(10); // 设置10行 + ui->tableWidget->setColumnCount(8); // 设置11列 + ui->tableWidget->setColumnWidth(0, 80); // 设置第一列的宽度为100像素 + ui->tableWidget->verticalHeader()->setParent(nullptr); //隐藏行头 + QTableWidgetItem *item = new QTableWidgetItem("测试数据"); + item->setTextAlignment(Qt::AlignCenter); + ui->tableWidget->setItem(0, 0, item); //设置数据 + + //初始化TableWidget 设置列 + QStringList headers; + headers << "序号" << "任务单编号" << "委托方"<< "使用部门" << "要求检完时间" << "送检人"<<"是否加急"<<"操作"; + ui->tableWidget->setHorizontalHeaderLabels(headers); + //ShowMessageBox("标题","初始化完成"); +} +void Create_Task::ShowMessageBox(QString title,QString value) { + // 创建一个QMessageBox对象 + QMessageBox msgBox; + + // 设置消息框的标题 + msgBox.setWindowTitle(title); + + // 设置消息框的文本内容 + msgBox.setText(value); + + // 设置消息框的标准按钮,这里是“确定”按钮 + msgBox.setStandardButtons(QMessageBox::Ok); + + // 显示消息框 + msgBox.exec(); +} +void Create_Task::Load() +{ + //ShowMessageBox("创建任务界面","创建任务界面初始化完成"); +} diff --git a/softwareDirectory/AutoVerScheme/create_task.h b/softwareDirectory/AutoVerScheme/create_task.h index e2264de..7cf383f 100644 --- a/softwareDirectory/AutoVerScheme/create_task.h +++ b/softwareDirectory/AutoVerScheme/create_task.h @@ -1,13 +1,14 @@ #ifndef CREATE_TASK_H #define CREATE_TASK_H +#include "InfoBase.h" #include namespace Ui { class Create_Task; } -class Create_Task : public QWidget +class Create_Task : public InfoBase { Q_OBJECT @@ -15,6 +16,11 @@ explicit Create_Task(QWidget *parent = nullptr); ~Create_Task(); +private slots: + void initForm(); //初始化界面数据 + void ShowMessageBox(QString title,QString value); + //继承父类的Load方法 + void Load() override; private: Ui::Create_Task *ui; }; diff --git a/softwareDirectory/AutoVerScheme/create_task.ui b/softwareDirectory/AutoVerScheme/create_task.ui index b79c6a1..d9d88ed 100644 --- a/softwareDirectory/AutoVerScheme/create_task.ui +++ b/softwareDirectory/AutoVerScheme/create_task.ui @@ -6,29 +6,294 @@ 0 0 - 400 - 300 + 1184 + 580 Form - - background-color:red; + + Qt::LeftToRight - - - - 140 - 120 - 89 - 24 - - - - 创建任务单 - - + + + + + + + + + 0 + 0 + + + + background-color:white; + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 任务单编号: + + + + + + + + 0 + 0 + + + + + + + + + 0 + 0 + + + + + 50 + 0 + + + + 委托方: + + + + + + + + 0 + 0 + + + + + 0 + 0 + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 使用部门: + + + + + + + + 0 + 0 + + + + + 0 + 0 + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 要求完成时间: + + + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + 0 + 30 + + + + Qt::RightToLeft + + + background-color:rgb(3, 58, 132); +color:white; + + + + 查询 + + + + + + + + 0 + 30 + + + + Qt::RightToLeft + + + background-color:rgb(207, 132, 33); +color:white; + + + + 重置 + + + + + + + + + + background-color:white; + + + + + + + 6 + + + 9 + + + 9 + + + 9 + + + + + + 0 + 0 + + + + + 120 + 40 + + + + OpenHandCursor + + + Qt::DefaultContextMenu + + + Qt::RightToLeft + + + false + + + background-color:rgb(9, 89, 179); +color:white; + + + 创建任务单 + + + true + + + + + + + + + + + + + + SizeVerCursor + + + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/datasyncview.cpp b/softwareDirectory/AutoVerScheme/datasyncview.cpp new file mode 100644 index 0000000..74cd41d --- /dev/null +++ b/softwareDirectory/AutoVerScheme/datasyncview.cpp @@ -0,0 +1,44 @@ +#include "datasyncview.h" +#include "ui_datasyncview.h" + +DataSyncView::DataSyncView(QWidget *parent) : + QWidget(parent), + ui(new Ui::DataSyncView) +{ + ui->setupUi(this); + this->initForm(); +} + +DataSyncView::~DataSyncView() +{ + delete ui; +} +void DataSyncView::initForm() +{ + //tableWidget设置 + //设置控件的边框显示 + ui->tableWidget->setStyleSheet("QHeaderView::section {" + "border: 1px solid grey;" + "border-left:none;" + "border-top:none;" + "background-color:white;" + " color:black;" + "font: bold 18px Arial, sans-serif;" + "}"); + + ui->tableWidget->setRowCount(10); // 设置10行 + ui->tableWidget->setColumnCount(4); // 设置11列 + ui->tableWidget->setColumnWidth(0, 80); // 设置第一列的宽度为100像素 + ui->tableWidget->verticalHeader()->setParent(nullptr); //隐藏行头 + QTableWidgetItem *item = new QTableWidgetItem("测试数据"); + item->setTextAlignment(Qt::AlignCenter); + ui->tableWidget->setItem(0, 0, item); //设置数据 + + //初始化TableWidget 设置列 + QStringList headers; + headers << "序号" << "同步时间" << "是否同步成功" << "备注" ; + ui->tableWidget->setHorizontalHeaderLabels(headers); + + + +} diff --git a/softwareDirectory/AutoVerScheme/datasyncview.h b/softwareDirectory/AutoVerScheme/datasyncview.h new file mode 100644 index 0000000..9a73de9 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/datasyncview.h @@ -0,0 +1,24 @@ +#ifndef DATASYNCVIEW_H +#define DATASYNCVIEW_H + +#include + +namespace Ui { +class DataSyncView; +} + +class DataSyncView : public QWidget +{ + Q_OBJECT + +public: + explicit DataSyncView(QWidget *parent = nullptr); + ~DataSyncView(); +private slots: + void initForm(); //初始化界面数据 + +private: + Ui::DataSyncView *ui; +}; + +#endif // DATASYNCVIEW_H diff --git a/softwareDirectory/AutoVerScheme/datasyncview.ui b/softwareDirectory/AutoVerScheme/datasyncview.ui new file mode 100644 index 0000000..c45bf56 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/datasyncview.ui @@ -0,0 +1,133 @@ + + + DataSyncView + + + + 0 + 0 + 874 + 531 + + + + 数据同步 + + + background-color:rgba(240, 240, 240, 1); + + + + + + background-color:white; + + + + + + + + + + 0 + 0 + + + + background-color:white; +border:0; + + + + + + + + + + 0 + 0 + + + + font:bold 20px Arial, sans-serif; +color:#334582; + + + 同步记录 + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + background-color:#334582; + font: bold 18px Arial, sans-serif; +color:white; +padding:10px; + + + 下载数据 + + + + + + + + 200 + 0 + + + + + 100 + 40 + + + + Qt::RightToLeft + + + background-color:#334582; + font: bold 18px Arial, sans-serif; +color:white; +padding:10px; + + + 发送同步请求 + + + + + + + + + + + + + + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/depar_task.cpp b/softwareDirectory/AutoVerScheme/depar_task.cpp index de39775..5f0f93a 100644 --- a/softwareDirectory/AutoVerScheme/depar_task.cpp +++ b/softwareDirectory/AutoVerScheme/depar_task.cpp @@ -2,13 +2,19 @@ #include "ui_depar_task.h" #include "QMessageBox" #include "InfoBase.h" +#include "QStandardItemModel" Depar_Task::Depar_Task(QWidget *parent) : InfoBase(parent), ui(new Ui::Depar_Task) { ui->setupUi(this); + //初始化列表 this->initForm(); + + + + } Depar_Task::~Depar_Task() @@ -17,8 +23,31 @@ } void Depar_Task::initForm() { + //tableWidget设置 + //设置控件的边框显示 + ui->tableWidget->setStyleSheet("QHeaderView::section {" + "border: 1px solid rgba(197, 196, 196, 1);" + "border-left:none;" + "border-top:none;" + "background-color:white;" + "}"); - //ShowMessageBox("标题","初始化完成"); + ui->tableWidget->setRowCount(10); // 设置10行 + ui->tableWidget->setColumnCount(10); // 设置11列 + ui->tableWidget->setColumnWidth(0, 80); // 设置第一列的宽度为100像素 + ui->tableWidget->verticalHeader()->setParent(nullptr); //隐藏行头 + QTableWidgetItem *item = new QTableWidgetItem("测试数据"); + item->setTextAlignment(Qt::AlignCenter); //文件居中 + ui->tableWidget->setItem(0, 0, item); //设置数据 + + //初始化TableWidget 设置列 + QStringList headers; + headers << "序号" << "设备名称" << "型号规则" << "辅助字段" << "辅助字段"<< "出厂编号" + << "生产厂家" <<"委托方"<<"使用部门"<<"要求检完时间"<<"是否加急"; + ui->tableWidget->setHorizontalHeaderLabels(headers); + + + } void Depar_Task::ShowMessageBox(QString title,QString value) { // 创建一个QMessageBox对象 @@ -38,5 +67,5 @@ } void Depar_Task::Load() { - ShowMessageBox("部门任务页面","部门任务初始化完成"); + //ShowMessageBox("部门任务页面","部门任务初始化完成"); } diff --git a/softwareDirectory/AutoVerScheme/depar_task.h b/softwareDirectory/AutoVerScheme/depar_task.h index 8716faf..110008d 100644 --- a/softwareDirectory/AutoVerScheme/depar_task.h +++ b/softwareDirectory/AutoVerScheme/depar_task.h @@ -3,6 +3,7 @@ #include "InfoBase.h" +#include "QStandardItemModel" namespace Ui { class Depar_Task; @@ -20,9 +21,12 @@ private slots: void initForm(); //初始化界面数据 void ShowMessageBox(QString title,QString value); + //继承父类的Load方法 void Load() override; + private: Ui::Depar_Task *ui; + // QStandardItemModel *model; }; #endif // DEPAR_TASK_H diff --git a/softwareDirectory/AutoVerScheme/depar_task.ui b/softwareDirectory/AutoVerScheme/depar_task.ui index ff3d44f..1a95cc4 100644 --- a/softwareDirectory/AutoVerScheme/depar_task.ui +++ b/softwareDirectory/AutoVerScheme/depar_task.ui @@ -6,7 +6,7 @@ 0 0 - 1184 + 1190 456 @@ -143,7 +143,34 @@ + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + 0 + 30 + + + + Qt::RightToLeft + + + background-color:rgb(3, 58, 152); +color:white; + + 查询 @@ -151,6 +178,20 @@ + + + 0 + 30 + + + + Qt::RightToLeft + + + background-color:rgb(207, 132, 33); +color:white; + + 重置 @@ -168,8 +209,15 @@ + + + - + + + + + diff --git a/softwareDirectory/AutoVerScheme/indexwindow.cpp b/softwareDirectory/AutoVerScheme/indexwindow.cpp index fca900a..cbba812 100644 --- a/softwareDirectory/AutoVerScheme/indexwindow.cpp +++ b/softwareDirectory/AutoVerScheme/indexwindow.cpp @@ -13,11 +13,37 @@ { ui->setupUi(this); this->initForm(); +/* + //主要作用 当页面关闭后 回到indexwindow页面 并 通过~IndexWindow 释放此页面指针所占用内存 + // 假设 ShowDataSyncView 是一个指向 DataSyncView 实例的指针 + // 当 ShowDataSyncView 关闭时,它的 closed() 信号会被发出 + // 连接这个信号到 IndexWindow 的 onNewWindowClosed() 槽函数 + if(ShowDataSyncView) { + //数据同步页面 信号槽 + connect(ShowDataSyncView, &DataSyncView::close, this, &IndexWindow::onNewWindowClosed); + } + if(ShowInfoManageView) { + //信息管理 信号槽 + connect(ShowInfoManageView, &InfoManageView::close, this, &IndexWindow::onNewWindowClosed); + } + */ } IndexWindow::~IndexWindow() { delete ui; + //释放页面内存 + /* + if (ShowDataSyncView) { + ShowDataSyncView->close(); + delete ShowDataSyncView; + } + else if(ShowInfoManageView) + { + ShowInfoManageView->close(); + delete ShowInfoManageView; + } + */ } void IndexWindow::initForm() { @@ -57,6 +83,15 @@ } + +void IndexWindow::onNewWindowClosed() +{ + // 新窗体关闭后,设置 IndexWindow 为活动窗口 + this->activateWindow(); + // 也可以设置焦点到 MainWindow 中的某个控件 + // ui->someWidget->setFocus(); +} + void IndexWindow::showCheckWindow() { CheckWindow *checkWindow = new CheckWindow; @@ -65,6 +100,26 @@ checkWindow->show(); } +//信息管理按钮 +void IndexWindow::on_tb3_clicked() +{ + InfoManageView *ShowInfoManageView = new InfoManageView(); + ShowInfoManageView->setWindowState(Qt::WindowMaximized); + ShowInfoManageView->setWindowModality(Qt::ApplicationModal); + ShowInfoManageView->show(); +} +//数据同步按钮 +void IndexWindow::on_tb6_clicked() +{ + + // 创建新窗体实例并显示 + DataSyncView *ShowDataSyncView = new DataSyncView(); + ShowDataSyncView->setWindowState(Qt::WindowMaximized); + ShowDataSyncView->setWindowModality(Qt::ApplicationModal); + ShowDataSyncView->show(); +} + + void IndexWindow::showCheckMethod() { CheckMethodManage *checkWindow = new CheckMethodManage; diff --git a/softwareDirectory/AutoVerScheme/indexwindow.h b/softwareDirectory/AutoVerScheme/indexwindow.h index a05d802..190b0f1 100644 --- a/softwareDirectory/AutoVerScheme/indexwindow.h +++ b/softwareDirectory/AutoVerScheme/indexwindow.h @@ -2,6 +2,8 @@ #define INDEXWINDOW_H #include +#include "datasyncView.h" +#include "infomanageview.h" namespace Ui { class IndexWindow; @@ -23,8 +25,21 @@ void showVerifyMethod(); + void on_tb3_clicked(); + + void on_tb6_clicked(); + + //页面关闭响应函数 + void onNewWindowClosed(); + + void on_tb1_clicked(); + private: Ui::IndexWindow *ui; + + //数据同步页面 指针 + //DataSyncView *ShowDataSyncView; + //InfoManageView *ShowInfoManageView; }; #endif // INDEXWINDOW_H diff --git a/softwareDirectory/AutoVerScheme/indexwindow.ui b/softwareDirectory/AutoVerScheme/indexwindow.ui index d69a54d..dec7207 100644 --- a/softwareDirectory/AutoVerScheme/indexwindow.ui +++ b/softwareDirectory/AutoVerScheme/indexwindow.ui @@ -189,7 +189,7 @@ - + 0 @@ -236,7 +236,7 @@ - + 0 @@ -270,7 +270,7 @@ - + 0 @@ -310,7 +310,7 @@ - + 0 @@ -357,7 +357,7 @@ - + 0 @@ -423,7 +423,7 @@ - + 0 @@ -521,66 +521,34 @@ - toolButton_4 + tb1 clicked() IndexWindow showCheckWindow() - 214 - 250 + 260 + 276 - 351 - 107 + 666 + 394 - toolButton_6 + tb4 clicked() IndexWindow showCheckMethod() - 249 - 606 + 260 + 598 - 331 - 452 - - - - - toolButton_5 - clicked() - IndexWindow - showVerifyMethod() - - - 706 - 589 - - - 692 - 442 - - - - - toolButton_2 - clicked() - IndexWindow - showVerifyWindow() - - - 758 - 249 - - - 862 - 114 + 666 + 394 diff --git a/softwareDirectory/AutoVerScheme/infomanageview.cpp b/softwareDirectory/AutoVerScheme/infomanageview.cpp index a206c6f..d045c60 100644 --- a/softwareDirectory/AutoVerScheme/infomanageview.cpp +++ b/softwareDirectory/AutoVerScheme/infomanageview.cpp @@ -2,6 +2,7 @@ #include "ui_infomanageview.h" #include #include +#include //子窗体 #include "depar_task.h" #include "my_task.h" @@ -19,6 +20,7 @@ { ui->setupUi(this); this->setWindowTitle("信息管理"); + //初始化调用所有函数 this->initForm(); this->initWidget(); @@ -115,7 +117,8 @@ //底部加个弹簧 QSpacerItem *verticalSpacer = new QSpacerItem(20, 40, QSizePolicy::Minimum, QSizePolicy::Expanding); ui->widgetLeft->layout()->addItem(verticalSpacer); - btns.at(names.count() - 1)->click(); + + btns.at(0)->click();//选择启动页面 第一个 } //按钮点击切换UI事件 void InfoManageView::buttonClicked() diff --git a/softwareDirectory/AutoVerScheme/infomanageview.h b/softwareDirectory/AutoVerScheme/infomanageview.h index 3c1463f..5e44bba 100644 --- a/softwareDirectory/AutoVerScheme/infomanageview.h +++ b/softwareDirectory/AutoVerScheme/infomanageview.h @@ -2,6 +2,7 @@ #define INFOMANAGEVIEW_H #include +#include class QAbstractButton; diff --git a/softwareDirectory/AutoVerScheme/infomanageview.ui b/softwareDirectory/AutoVerScheme/infomanageview.ui index 4b39e7d..ef0b87b 100644 --- a/softwareDirectory/AutoVerScheme/infomanageview.ui +++ b/softwareDirectory/AutoVerScheme/infomanageview.ui @@ -10,8 +10,15 @@ 644 + + Qt::DefaultContextMenu + - Form + 信息管理 + + + color:black; +background-color:rgba(240, 240, 240, 1); @@ -68,8 +75,8 @@ - - 170 + + 0 0 diff --git a/softwareDirectory/AutoVerScheme/inspectdataitem.cpp b/softwareDirectory/AutoVerScheme/inspectdataitem.cpp index e9c2adc..efc00ba 100644 --- a/softwareDirectory/AutoVerScheme/inspectdataitem.cpp +++ b/softwareDirectory/AutoVerScheme/inspectdataitem.cpp @@ -1,14 +1,62 @@ #include "inspectdataitem.h" #include "ui_inspectdataitem.h" +#include "QMessageBox.h" InspectDataItem::InspectDataItem(QWidget *parent) : - QWidget(parent), + InfoBase(parent), ui(new Ui::InspectDataItem) { ui->setupUi(this); + this->initForm(); } InspectDataItem::~InspectDataItem() { delete ui; } +void InspectDataItem::initForm() +{ + //tableWidget设置 + //设置控件的边框显示 + ui->tableWidget->setStyleSheet("QHeaderView::section {" + "border: 1px solid rgba(197, 196, 196, 1);" + "border-left:none;" + "border-top:none;" + "background-color:white;" + "}"); + + ui->tableWidget->setRowCount(10); // 设置10行 + ui->tableWidget->setColumnCount(12); // 设置11列 + ui->tableWidget->setColumnWidth(0, 80); // 设置第一列的宽度为100像素 + ui->tableWidget->verticalHeader()->setParent(nullptr); //隐藏行头 + QTableWidgetItem *item = new QTableWidgetItem("测试数据"); + item->setTextAlignment(Qt::AlignCenter); + ui->tableWidget->setItem(0, 0, item); //设置数据 + + //初始化TableWidget 设置列 + QStringList headers; + headers << "序号" << "设备名称" << "型号规则" << "出厂编号" + <<"核查件名称"<<"核查件型号"<<"核查件编号" <<"核查员" + << "核查日期" <<"实验室"<<"部门"<<"操作"; + ui->tableWidget->setHorizontalHeaderLabels(headers); +} +void InspectDataItem::ShowMessageBox(QString title,QString value) { + // 创建一个QMessageBox对象 + QMessageBox msgBox; + + // 设置消息框的标题 + msgBox.setWindowTitle(title); + + // 设置消息框的文本内容 + msgBox.setText(value); + + // 设置消息框的标准按钮,这里是“确定”按钮 + msgBox.setStandardButtons(QMessageBox::Ok); + + // 显示消息框 + msgBox.exec(); +} +void InspectDataItem::Load() +{ + //ShowMessageBox("核查数据","核查数据"); +} diff --git a/softwareDirectory/AutoVerScheme/inspectdataitem.h b/softwareDirectory/AutoVerScheme/inspectdataitem.h index 57551bb..bdf7066 100644 --- a/softwareDirectory/AutoVerScheme/inspectdataitem.h +++ b/softwareDirectory/AutoVerScheme/inspectdataitem.h @@ -2,19 +2,24 @@ #define INSPECTDATAITEM_H #include +#include "InfoBase.h" namespace Ui { class InspectDataItem; } -class InspectDataItem : public QWidget +class InspectDataItem : public InfoBase { Q_OBJECT public: explicit InspectDataItem(QWidget *parent = nullptr); ~InspectDataItem(); - +private slots: + void initForm(); //初始化界面数据 + void ShowMessageBox(QString title,QString value); + //继承父类的Load方法 + void Load() override; private: Ui::InspectDataItem *ui; }; diff --git a/softwareDirectory/AutoVerScheme/inspectdataitem.ui b/softwareDirectory/AutoVerScheme/inspectdataitem.ui index 45f04e0..86786c9 100644 --- a/softwareDirectory/AutoVerScheme/inspectdataitem.ui +++ b/softwareDirectory/AutoVerScheme/inspectdataitem.ui @@ -6,26 +6,236 @@ 0 0 - 400 - 300 + 1362 + 543 Form - - - - 120 - 130 - 89 - 24 - - - - 核查数据管理 - - + + + + + + 0 + 0 + + + + background-color:white; + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 设备名称: + + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 型号规则: + + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 出厂编号: + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 核查员: + + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 核查日期: + + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 实验室: + + + + + + + + + + Qt::Horizontal + + + QSizePolicy::Expanding + + + + 40 + 20 + + + + + + + + Qt::RightToLeft + + + 查询 + + + + + + + Qt::RightToLeft + + + 重置 + + + + + + + + + + background-color:white; + + + + + + + + + + + + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/my_task.cpp b/softwareDirectory/AutoVerScheme/my_task.cpp index 40aceb2..559a73b 100644 --- a/softwareDirectory/AutoVerScheme/my_task.cpp +++ b/softwareDirectory/AutoVerScheme/my_task.cpp @@ -7,7 +7,8 @@ ui(new Ui::My_Task) { ui->setupUi(this); - + //初始化QStandardItemModel + model=new QStandardItemModel(parent); this->initForm(); } @@ -17,7 +18,28 @@ } void My_Task::initForm() { + //tableWidget设置 + //设置控件的边框显示 + ui->tableWidget->setStyleSheet("QHeaderView::section {" + "border: 1px solid rgba(197, 196, 196, 1);" + "border-left:none;" + "border-top:none;" + "background-color:white;" + "}"); + ui->tableWidget->setRowCount(10); // 设置10行 + ui->tableWidget->setColumnCount(10); // 设置11列 + ui->tableWidget->setColumnWidth(0, 80); // 设置第一列的宽度为100像素 + ui->tableWidget->verticalHeader()->setParent(nullptr); //隐藏行头 + QTableWidgetItem *item = new QTableWidgetItem("测试数据"); + item->setTextAlignment(Qt::AlignCenter); + ui->tableWidget->setItem(0, 0, item); //设置数据 + + //初始化TableWidget 设置列 + QStringList headers; + headers << "序号" << "设备名称" << "型号规则" << "辅助字段" << "辅助字段"<< "出厂编号" + << "生产厂家" <<"委托方"<<"使用部门"<<"要求检完时间"<<"是否加急"; + ui->tableWidget->setHorizontalHeaderLabels(headers); } void My_Task::ShowMessageBox(QString title,QString value) { @@ -38,5 +60,5 @@ } void My_Task::Load() { - ShowMessageBox("我的任务页面","我的任务初始化完成"); + //ShowMessageBox("我的任务页面","我的任务初始化完成"); } diff --git a/softwareDirectory/AutoVerScheme/my_task.ui b/softwareDirectory/AutoVerScheme/my_task.ui index 89245b8..a078840 100644 --- a/softwareDirectory/AutoVerScheme/my_task.ui +++ b/softwareDirectory/AutoVerScheme/my_task.ui @@ -6,8 +6,8 @@ 0 0 - 857 - 511 + 1190 + 577 @@ -140,7 +140,23 @@ + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + Qt::RightToLeft + 查询 @@ -148,6 +164,9 @@ + + Qt::RightToLeft + 重置 @@ -166,7 +185,14 @@ - + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/res/qss/Index.css b/softwareDirectory/AutoVerScheme/res/qss/Index.css index 8fad195..d2ba43e 100644 --- a/softwareDirectory/AutoVerScheme/res/qss/Index.css +++ b/softwareDirectory/AutoVerScheme/res/qss/Index.css @@ -1,18 +1,25 @@ -*{ - -color:black; -font: 18pt 微软雅黑; - -} -QMainWindow +QMainWindow#IndexWindow { background-image: url(:/image/Index/u15.png); background-color:white; } -QToolButton:hover{ +QToolButton#tb1:hover{ background-image: url(:/image/Index/u26_mouseOver.svg); } -QToolButton{ +QToolButton#tb2:hover{ + background-image: url(:/image/Index/u26_mouseOver.svg); +} +QToolButton#tb3:hover{ + background-image: url(:/image/Index/u26_mouseOver.svg); +}QToolButton#tb4:hover{ +background-image: url(:/image/Index/u26_mouseOver.svg); +}QToolButton#tb5:hover{ +background-image: url(:/image/Index/u26_mouseOver.svg); +} +QToolButton#tb6:hover{ + background-image: url(:/image/Index/u26_mouseOver.svg); +} +QToolButton#tb1{ color: white; background-image: url(:/image/Index/u26.svg); font-weight: bold; @@ -20,4 +27,52 @@ text-align: center; margin:10; margin-right: 180px; +font: 18pt 微软雅黑; +} +QToolButton#tb2{ +color: white; +background-image: url(:/image/Index/u26.svg); +font-weight: bold; +border-radius: 5px; +text-align: center; +margin:10; +margin-right: 180px; +font: 18pt 微软雅黑; +} +QToolButton#tb3{ +color: white; +background-image: url(:/image/Index/u26.svg); +font-weight: bold; +border-radius: 5px; +text-align: center; +margin:10; +margin-right: 180px; +font: 18pt 微软雅黑; +}QToolButton#tb4{ +color: white; +background-image: url(:/image/Index/u26.svg); +font-weight: bold; +border-radius: 5px; +text-align: center; +margin:10; +margin-right: 180px; +font: 18pt 微软雅黑; +}QToolButton#tb5{ +color: white; +background-image: url(:/image/Index/u26.svg); +font-weight: bold; +border-radius: 5px; +text-align: center; +margin:10; +margin-right: 180px; +font: 18pt 微软雅黑; +}QToolButton#tb6{ +color: white; +background-image: url(:/image/Index/u26.svg); +font-weight: bold; +border-radius: 5px; +text-align: center; +margin:10; +margin-right: 180px; +font: 18pt 微软雅黑; } diff --git a/softwareDirectory/AutoVerScheme/rulefileitem.cpp b/softwareDirectory/AutoVerScheme/rulefileitem.cpp index 6f9ddd3..095165e 100644 --- a/softwareDirectory/AutoVerScheme/rulefileitem.cpp +++ b/softwareDirectory/AutoVerScheme/rulefileitem.cpp @@ -1,14 +1,63 @@ #include "rulefileitem.h" #include "ui_rulefileitem.h" +#include "QMessageBox" + RuleFileItem::RuleFileItem(QWidget *parent) : - QWidget(parent), + InfoBase(parent), ui(new Ui::RuleFileItem) { ui->setupUi(this); + this->initForm(); } RuleFileItem::~RuleFileItem() { delete ui; } +void RuleFileItem::initForm() +{ + + //tableWidget设置 + //设置控件的边框显示 + ui->tableWidget->setStyleSheet("QHeaderView::section {" + "border: 1px solid rgba(197, 196, 196, 1);" + "border-left:none;" + "border-top:none;" + "background-color:white;" + "}"); + + ui->tableWidget->setRowCount(10); // 设置10行 + ui->tableWidget->setColumnCount(9); // 设置11列 + ui->tableWidget->setColumnWidth(0, 80); // 设置第一列的宽度为100像素 + ui->tableWidget->verticalHeader()->setParent(nullptr); //隐藏行头 + QTableWidgetItem *item = new QTableWidgetItem("测试数据"); + item->setTextAlignment(Qt::AlignCenter); + ui->tableWidget->setItem(0, 0, item); //设置数据 + + //初始化TableWidget 设置列 + QStringList headers; + headers << "序号" << "文件号" << "文件名称" << "版本号" << "文件类型"<< "颁布时间" + << "实施时间" <<"备注"<<"操作"; + ui->tableWidget->setHorizontalHeaderLabels(headers); +} +void RuleFileItem::ShowMessageBox(QString title,QString value) { + // 创建一个QMessageBox对象 + QMessageBox msgBox; + + // 设置消息框的标题 + msgBox.setWindowTitle(title); + + // 设置消息框的文本内容 + msgBox.setText(value); + + // 设置消息框的标准按钮,这里是“确定”按钮 + msgBox.setStandardButtons(QMessageBox::Ok); + + // 显示消息框 + msgBox.exec(); +} +void RuleFileItem::Load() +{ + //ShowMessageBox("技术文件","技术文件初始化完成"); +} diff --git a/softwareDirectory/AutoVerScheme/rulefileitem.h b/softwareDirectory/AutoVerScheme/rulefileitem.h index 1fc81a1..d892a71 100644 --- a/softwareDirectory/AutoVerScheme/rulefileitem.h +++ b/softwareDirectory/AutoVerScheme/rulefileitem.h @@ -2,19 +2,24 @@ #define RULEFILEITEM_H #include +#include "InfoBase.h" namespace Ui { class RuleFileItem; } -class RuleFileItem : public QWidget +class RuleFileItem : public InfoBase { Q_OBJECT public: explicit RuleFileItem(QWidget *parent = nullptr); ~RuleFileItem(); - +private slots: + void initForm(); //初始化界面数据 + void ShowMessageBox(QString title,QString value); + //继承父类的Load方法 + void Load() override; private: Ui::RuleFileItem *ui; }; diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro index 1280b70..dfb0418 100644 --- a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro @@ -22,6 +22,7 @@ checkmethodmanage.cpp \ checkwindow.cpp \ create_task.cpp \ + datasyncview.cpp \ depar_task.cpp \ indexwindow.cpp \ infomanageview.cpp \ @@ -43,6 +44,7 @@ checkmethodmanage.h \ checkwindow.h \ create_task.h \ + datasyncview.h \ depar_task.h \ indexwindow.h \ infomanageview.h \ @@ -62,6 +64,7 @@ checkmethodmanage.ui \ checkwindow.ui \ create_task.ui \ + datasyncview.ui \ depar_task.ui \ indexwindow.ui \ infomanageview.ui \ diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user index 6ea03c5..93c39cb 100644 --- a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user @@ -1,10 +1,10 @@ - + EnvironmentId - {2746248a-b112-4e0f-9ae0-9e61f2a42309} + {c08df58c-84a7-4965-bca6-e98789474efa} ProjectExplorer.Project.ActiveTarget @@ -71,7 +71,7 @@ 0 0 - D:/dev/QT/AutoCalHainan/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug true @@ -119,7 +119,7 @@ 2 - D:/dev/QT/AutoCalHainan/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Release + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Release true @@ -167,7 +167,7 @@ 0 - D:/dev/QT/AutoCalHainan/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Profile + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Profile true @@ -287,8 +287,8 @@ 2 - Qt4ProjectManager.Qt4RunConfiguration:D:/dev/QT/AutoCalHainan/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro - D:/dev/QT/AutoCalHainan/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro + Qt4ProjectManager.Qt4RunConfiguration:C:/Users/admin/Desktop/SVN/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro + C:/Users/admin/Desktop/SVN/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro false @@ -299,7 +299,7 @@ false true - D:/dev/QT/AutoCalHainan/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug 1 @@ -314,7 +314,7 @@ 0 0 - D:/dev/QT/AutoCalHainan/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Debug + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Debug true @@ -362,7 +362,7 @@ 2 - D:/dev/QT/AutoCalHainan/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Release + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Release true @@ -410,7 +410,7 @@ 0 - D:/dev/QT/AutoCalHainan/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Profile + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Profile true @@ -530,14 +530,15 @@ 2 - - ProjectExplorer.CustomExecutableRunConfiguration - + AutoVerScheme2 + 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 diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user.c08df58 b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user.c08df58 deleted file mode 100644 index 495f95c..0000000 --- a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user.c08df58 +++ /dev/null @@ -1,563 +0,0 @@ - - - - - - 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 32-bit - Desktop Qt 5.14.2 MinGW 32-bit - qt.qt5.5142.win32_mingw73_kit - 0 - 0 - 0 - - D:/Auto_verification_scheme/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 - - - D:/Auto_verification_scheme/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 - - - D:/Auto_verification_scheme/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 - - D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug - - 1 - - - - ProjectExplorer.Project.Target.1 - - 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 - - D:/Auto_verification_scheme/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 - - - D:/Auto_verification_scheme/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 - - - D:/Auto_verification_scheme/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 - - AutoVerScheme2 - 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/InfoBase.h b/softwareDirectory/AutoVerScheme/InfoBase.h index 7fec63e..084cf3f 100644 --- a/softwareDirectory/AutoVerScheme/InfoBase.h +++ b/softwareDirectory/AutoVerScheme/InfoBase.h @@ -2,6 +2,7 @@ #define INFOBASE_H #include +#include "QStandardItemModel" ///信号管理页面的基类 所有信息管理页面都继承于InfoBase /// 便于统一管理 所有子类必须实现Load方法 /// 每次按钮点击切换都会调用Load方法 用于每次页面的数据刷新 @@ -11,6 +12,8 @@ InfoBase(QWidget *parent = nullptr): QWidget(parent){}; // 纯虚函数 virtual void Load()=0; + //QStandardItemModel 的实例。这个模型将用于存储和管理数据。 + QStandardItemModel *model; }; #endif // INFOBASE_H diff --git a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.cpp b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.cpp index 7ac1e87..ffb2bbc 100644 --- a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.cpp +++ b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.cpp @@ -1,14 +1,64 @@ #include "beexamined_deviceitem.h" #include "ui_beexamined_deviceitem.h" +#include "QMessageBox.h" BeExamined_DeviceItem::BeExamined_DeviceItem(QWidget *parent) : - QWidget(parent), + InfoBase(parent), ui(new Ui::BeExamined_DeviceItem) { ui->setupUi(this); + this->initForm(); } BeExamined_DeviceItem::~BeExamined_DeviceItem() { delete ui; } + +void BeExamined_DeviceItem::initForm() +{ + + //tableWidget设置 + //设置控件的边框显示 + ui->tableWidget->setStyleSheet("QHeaderView::section {" + "border: 1px solid rgba(197, 196, 196, 1);" + "border-left:none;" + "border-top:none;" + "background-color:white;" + "}"); + + ui->tableWidget->setRowCount(10); // 设置10行 + ui->tableWidget->setColumnCount(12); // 设置11列 + ui->tableWidget->setColumnWidth(0, 80); // 设置第一列的宽度为100像素 + ui->tableWidget->verticalHeader()->setParent(nullptr); //隐藏行头 + QTableWidgetItem *item = new QTableWidgetItem("测试数据"); + item->setTextAlignment(Qt::AlignCenter); + ui->tableWidget->setItem(0, 0, item); //设置数据 + + //初始化TableWidget 设置列 + QStringList headers; + headers << "序号" << "设备名称" << "型号规则" << "辅助字段" << "出厂编号" + << "生产厂家"<<"所在单位" <<"使用部门"<<"计量标识"<<"检定周期"<<"证书有效期"<<"操作"; + ui->tableWidget->setHorizontalHeaderLabels(headers); + +} +void BeExamined_DeviceItem::ShowMessageBox(QString title,QString value) { + // 创建一个QMessageBox对象 + QMessageBox msgBox; + + // 设置消息框的标题 + msgBox.setWindowTitle(title); + + // 设置消息框的文本内容 + msgBox.setText(value); + + // 设置消息框的标准按钮,这里是“确定”按钮 + msgBox.setStandardButtons(QMessageBox::Ok); + + // 显示消息框 + msgBox.exec(); +} +void BeExamined_DeviceItem::Load() +{ + //ShowMessageBox("被检设备","被检设备初始化完成"); +} diff --git a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.h b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.h index 76b061d..ae46979 100644 --- a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.h +++ b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.h @@ -2,12 +2,13 @@ #define BEEXAMINED_DEVICEITEM_H #include +#include "InfoBase.h" namespace Ui { class BeExamined_DeviceItem; } -class BeExamined_DeviceItem : public QWidget +class BeExamined_DeviceItem : public InfoBase { Q_OBJECT @@ -15,6 +16,11 @@ explicit BeExamined_DeviceItem(QWidget *parent = nullptr); ~BeExamined_DeviceItem(); +private slots: + void initForm(); //初始化界面数据 + void ShowMessageBox(QString title,QString value); + //继承父类的Load方法 + void Load() override; private: Ui::BeExamined_DeviceItem *ui; }; diff --git a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.ui b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.ui index af9f7bf..5a0a3c9 100644 --- a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.ui +++ b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.ui @@ -6,26 +6,236 @@ 0 0 - 400 - 300 + 1291 + 575 Form - - - - 130 - 140 - 89 - 24 - - - - 被检设备管理 - - + + + + + + 0 + 0 + + + + background-color:white; + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 设备名称: + + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 型号规则: + + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 出厂编号: + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 生产厂家: + + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 使用部门: + + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 使用单位: + + + + + + + + + + Qt::Horizontal + + + QSizePolicy::Expanding + + + + 40 + 20 + + + + + + + + Qt::RightToLeft + + + 查询 + + + + + + + Qt::RightToLeft + + + 重置 + + + + + + + + + + background-color:white; + + + + + + + + + + + + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/create_task.cpp b/softwareDirectory/AutoVerScheme/create_task.cpp index 4193efc..9b49a1a 100644 --- a/softwareDirectory/AutoVerScheme/create_task.cpp +++ b/softwareDirectory/AutoVerScheme/create_task.cpp @@ -1,14 +1,61 @@ #include "create_task.h" #include "ui_create_task.h" +#include "QMessageBox" Create_Task::Create_Task(QWidget *parent) : - QWidget(parent), + InfoBase(parent), ui(new Ui::Create_Task) { ui->setupUi(this); + this->initForm(); } Create_Task::~Create_Task() { delete ui; } +void Create_Task::initForm() +{ + //tableWidget设置 + //设置控件的边框显示 + ui->tableWidget->setStyleSheet("QHeaderView::section {" + "border: 1px solid rgba(197, 196, 196, 1);" + "border-left:none;" + "border-top:none;" + "background-color:white;" + "}"); + + ui->tableWidget->setRowCount(10); // 设置10行 + ui->tableWidget->setColumnCount(8); // 设置11列 + ui->tableWidget->setColumnWidth(0, 80); // 设置第一列的宽度为100像素 + ui->tableWidget->verticalHeader()->setParent(nullptr); //隐藏行头 + QTableWidgetItem *item = new QTableWidgetItem("测试数据"); + item->setTextAlignment(Qt::AlignCenter); + ui->tableWidget->setItem(0, 0, item); //设置数据 + + //初始化TableWidget 设置列 + QStringList headers; + headers << "序号" << "任务单编号" << "委托方"<< "使用部门" << "要求检完时间" << "送检人"<<"是否加急"<<"操作"; + ui->tableWidget->setHorizontalHeaderLabels(headers); + //ShowMessageBox("标题","初始化完成"); +} +void Create_Task::ShowMessageBox(QString title,QString value) { + // 创建一个QMessageBox对象 + QMessageBox msgBox; + + // 设置消息框的标题 + msgBox.setWindowTitle(title); + + // 设置消息框的文本内容 + msgBox.setText(value); + + // 设置消息框的标准按钮,这里是“确定”按钮 + msgBox.setStandardButtons(QMessageBox::Ok); + + // 显示消息框 + msgBox.exec(); +} +void Create_Task::Load() +{ + //ShowMessageBox("创建任务界面","创建任务界面初始化完成"); +} diff --git a/softwareDirectory/AutoVerScheme/create_task.h b/softwareDirectory/AutoVerScheme/create_task.h index e2264de..7cf383f 100644 --- a/softwareDirectory/AutoVerScheme/create_task.h +++ b/softwareDirectory/AutoVerScheme/create_task.h @@ -1,13 +1,14 @@ #ifndef CREATE_TASK_H #define CREATE_TASK_H +#include "InfoBase.h" #include namespace Ui { class Create_Task; } -class Create_Task : public QWidget +class Create_Task : public InfoBase { Q_OBJECT @@ -15,6 +16,11 @@ explicit Create_Task(QWidget *parent = nullptr); ~Create_Task(); +private slots: + void initForm(); //初始化界面数据 + void ShowMessageBox(QString title,QString value); + //继承父类的Load方法 + void Load() override; private: Ui::Create_Task *ui; }; diff --git a/softwareDirectory/AutoVerScheme/create_task.ui b/softwareDirectory/AutoVerScheme/create_task.ui index b79c6a1..d9d88ed 100644 --- a/softwareDirectory/AutoVerScheme/create_task.ui +++ b/softwareDirectory/AutoVerScheme/create_task.ui @@ -6,29 +6,294 @@ 0 0 - 400 - 300 + 1184 + 580 Form - - background-color:red; + + Qt::LeftToRight - - - - 140 - 120 - 89 - 24 - - - - 创建任务单 - - + + + + + + + + + 0 + 0 + + + + background-color:white; + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 任务单编号: + + + + + + + + 0 + 0 + + + + + + + + + 0 + 0 + + + + + 50 + 0 + + + + 委托方: + + + + + + + + 0 + 0 + + + + + 0 + 0 + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 使用部门: + + + + + + + + 0 + 0 + + + + + 0 + 0 + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 要求完成时间: + + + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + 0 + 30 + + + + Qt::RightToLeft + + + background-color:rgb(3, 58, 132); +color:white; + + + + 查询 + + + + + + + + 0 + 30 + + + + Qt::RightToLeft + + + background-color:rgb(207, 132, 33); +color:white; + + + + 重置 + + + + + + + + + + background-color:white; + + + + + + + 6 + + + 9 + + + 9 + + + 9 + + + + + + 0 + 0 + + + + + 120 + 40 + + + + OpenHandCursor + + + Qt::DefaultContextMenu + + + Qt::RightToLeft + + + false + + + background-color:rgb(9, 89, 179); +color:white; + + + 创建任务单 + + + true + + + + + + + + + + + + + + SizeVerCursor + + + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/datasyncview.cpp b/softwareDirectory/AutoVerScheme/datasyncview.cpp new file mode 100644 index 0000000..74cd41d --- /dev/null +++ b/softwareDirectory/AutoVerScheme/datasyncview.cpp @@ -0,0 +1,44 @@ +#include "datasyncview.h" +#include "ui_datasyncview.h" + +DataSyncView::DataSyncView(QWidget *parent) : + QWidget(parent), + ui(new Ui::DataSyncView) +{ + ui->setupUi(this); + this->initForm(); +} + +DataSyncView::~DataSyncView() +{ + delete ui; +} +void DataSyncView::initForm() +{ + //tableWidget设置 + //设置控件的边框显示 + ui->tableWidget->setStyleSheet("QHeaderView::section {" + "border: 1px solid grey;" + "border-left:none;" + "border-top:none;" + "background-color:white;" + " color:black;" + "font: bold 18px Arial, sans-serif;" + "}"); + + ui->tableWidget->setRowCount(10); // 设置10行 + ui->tableWidget->setColumnCount(4); // 设置11列 + ui->tableWidget->setColumnWidth(0, 80); // 设置第一列的宽度为100像素 + ui->tableWidget->verticalHeader()->setParent(nullptr); //隐藏行头 + QTableWidgetItem *item = new QTableWidgetItem("测试数据"); + item->setTextAlignment(Qt::AlignCenter); + ui->tableWidget->setItem(0, 0, item); //设置数据 + + //初始化TableWidget 设置列 + QStringList headers; + headers << "序号" << "同步时间" << "是否同步成功" << "备注" ; + ui->tableWidget->setHorizontalHeaderLabels(headers); + + + +} diff --git a/softwareDirectory/AutoVerScheme/datasyncview.h b/softwareDirectory/AutoVerScheme/datasyncview.h new file mode 100644 index 0000000..9a73de9 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/datasyncview.h @@ -0,0 +1,24 @@ +#ifndef DATASYNCVIEW_H +#define DATASYNCVIEW_H + +#include + +namespace Ui { +class DataSyncView; +} + +class DataSyncView : public QWidget +{ + Q_OBJECT + +public: + explicit DataSyncView(QWidget *parent = nullptr); + ~DataSyncView(); +private slots: + void initForm(); //初始化界面数据 + +private: + Ui::DataSyncView *ui; +}; + +#endif // DATASYNCVIEW_H diff --git a/softwareDirectory/AutoVerScheme/datasyncview.ui b/softwareDirectory/AutoVerScheme/datasyncview.ui new file mode 100644 index 0000000..c45bf56 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/datasyncview.ui @@ -0,0 +1,133 @@ + + + DataSyncView + + + + 0 + 0 + 874 + 531 + + + + 数据同步 + + + background-color:rgba(240, 240, 240, 1); + + + + + + background-color:white; + + + + + + + + + + 0 + 0 + + + + background-color:white; +border:0; + + + + + + + + + + 0 + 0 + + + + font:bold 20px Arial, sans-serif; +color:#334582; + + + 同步记录 + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + background-color:#334582; + font: bold 18px Arial, sans-serif; +color:white; +padding:10px; + + + 下载数据 + + + + + + + + 200 + 0 + + + + + 100 + 40 + + + + Qt::RightToLeft + + + background-color:#334582; + font: bold 18px Arial, sans-serif; +color:white; +padding:10px; + + + 发送同步请求 + + + + + + + + + + + + + + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/depar_task.cpp b/softwareDirectory/AutoVerScheme/depar_task.cpp index de39775..5f0f93a 100644 --- a/softwareDirectory/AutoVerScheme/depar_task.cpp +++ b/softwareDirectory/AutoVerScheme/depar_task.cpp @@ -2,13 +2,19 @@ #include "ui_depar_task.h" #include "QMessageBox" #include "InfoBase.h" +#include "QStandardItemModel" Depar_Task::Depar_Task(QWidget *parent) : InfoBase(parent), ui(new Ui::Depar_Task) { ui->setupUi(this); + //初始化列表 this->initForm(); + + + + } Depar_Task::~Depar_Task() @@ -17,8 +23,31 @@ } void Depar_Task::initForm() { + //tableWidget设置 + //设置控件的边框显示 + ui->tableWidget->setStyleSheet("QHeaderView::section {" + "border: 1px solid rgba(197, 196, 196, 1);" + "border-left:none;" + "border-top:none;" + "background-color:white;" + "}"); - //ShowMessageBox("标题","初始化完成"); + ui->tableWidget->setRowCount(10); // 设置10行 + ui->tableWidget->setColumnCount(10); // 设置11列 + ui->tableWidget->setColumnWidth(0, 80); // 设置第一列的宽度为100像素 + ui->tableWidget->verticalHeader()->setParent(nullptr); //隐藏行头 + QTableWidgetItem *item = new QTableWidgetItem("测试数据"); + item->setTextAlignment(Qt::AlignCenter); //文件居中 + ui->tableWidget->setItem(0, 0, item); //设置数据 + + //初始化TableWidget 设置列 + QStringList headers; + headers << "序号" << "设备名称" << "型号规则" << "辅助字段" << "辅助字段"<< "出厂编号" + << "生产厂家" <<"委托方"<<"使用部门"<<"要求检完时间"<<"是否加急"; + ui->tableWidget->setHorizontalHeaderLabels(headers); + + + } void Depar_Task::ShowMessageBox(QString title,QString value) { // 创建一个QMessageBox对象 @@ -38,5 +67,5 @@ } void Depar_Task::Load() { - ShowMessageBox("部门任务页面","部门任务初始化完成"); + //ShowMessageBox("部门任务页面","部门任务初始化完成"); } diff --git a/softwareDirectory/AutoVerScheme/depar_task.h b/softwareDirectory/AutoVerScheme/depar_task.h index 8716faf..110008d 100644 --- a/softwareDirectory/AutoVerScheme/depar_task.h +++ b/softwareDirectory/AutoVerScheme/depar_task.h @@ -3,6 +3,7 @@ #include "InfoBase.h" +#include "QStandardItemModel" namespace Ui { class Depar_Task; @@ -20,9 +21,12 @@ private slots: void initForm(); //初始化界面数据 void ShowMessageBox(QString title,QString value); + //继承父类的Load方法 void Load() override; + private: Ui::Depar_Task *ui; + // QStandardItemModel *model; }; #endif // DEPAR_TASK_H diff --git a/softwareDirectory/AutoVerScheme/depar_task.ui b/softwareDirectory/AutoVerScheme/depar_task.ui index ff3d44f..1a95cc4 100644 --- a/softwareDirectory/AutoVerScheme/depar_task.ui +++ b/softwareDirectory/AutoVerScheme/depar_task.ui @@ -6,7 +6,7 @@ 0 0 - 1184 + 1190 456 @@ -143,7 +143,34 @@ + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + 0 + 30 + + + + Qt::RightToLeft + + + background-color:rgb(3, 58, 152); +color:white; + + 查询 @@ -151,6 +178,20 @@ + + + 0 + 30 + + + + Qt::RightToLeft + + + background-color:rgb(207, 132, 33); +color:white; + + 重置 @@ -168,8 +209,15 @@ + + + - + + + + + diff --git a/softwareDirectory/AutoVerScheme/indexwindow.cpp b/softwareDirectory/AutoVerScheme/indexwindow.cpp index fca900a..cbba812 100644 --- a/softwareDirectory/AutoVerScheme/indexwindow.cpp +++ b/softwareDirectory/AutoVerScheme/indexwindow.cpp @@ -13,11 +13,37 @@ { ui->setupUi(this); this->initForm(); +/* + //主要作用 当页面关闭后 回到indexwindow页面 并 通过~IndexWindow 释放此页面指针所占用内存 + // 假设 ShowDataSyncView 是一个指向 DataSyncView 实例的指针 + // 当 ShowDataSyncView 关闭时,它的 closed() 信号会被发出 + // 连接这个信号到 IndexWindow 的 onNewWindowClosed() 槽函数 + if(ShowDataSyncView) { + //数据同步页面 信号槽 + connect(ShowDataSyncView, &DataSyncView::close, this, &IndexWindow::onNewWindowClosed); + } + if(ShowInfoManageView) { + //信息管理 信号槽 + connect(ShowInfoManageView, &InfoManageView::close, this, &IndexWindow::onNewWindowClosed); + } + */ } IndexWindow::~IndexWindow() { delete ui; + //释放页面内存 + /* + if (ShowDataSyncView) { + ShowDataSyncView->close(); + delete ShowDataSyncView; + } + else if(ShowInfoManageView) + { + ShowInfoManageView->close(); + delete ShowInfoManageView; + } + */ } void IndexWindow::initForm() { @@ -57,6 +83,15 @@ } + +void IndexWindow::onNewWindowClosed() +{ + // 新窗体关闭后,设置 IndexWindow 为活动窗口 + this->activateWindow(); + // 也可以设置焦点到 MainWindow 中的某个控件 + // ui->someWidget->setFocus(); +} + void IndexWindow::showCheckWindow() { CheckWindow *checkWindow = new CheckWindow; @@ -65,6 +100,26 @@ checkWindow->show(); } +//信息管理按钮 +void IndexWindow::on_tb3_clicked() +{ + InfoManageView *ShowInfoManageView = new InfoManageView(); + ShowInfoManageView->setWindowState(Qt::WindowMaximized); + ShowInfoManageView->setWindowModality(Qt::ApplicationModal); + ShowInfoManageView->show(); +} +//数据同步按钮 +void IndexWindow::on_tb6_clicked() +{ + + // 创建新窗体实例并显示 + DataSyncView *ShowDataSyncView = new DataSyncView(); + ShowDataSyncView->setWindowState(Qt::WindowMaximized); + ShowDataSyncView->setWindowModality(Qt::ApplicationModal); + ShowDataSyncView->show(); +} + + void IndexWindow::showCheckMethod() { CheckMethodManage *checkWindow = new CheckMethodManage; diff --git a/softwareDirectory/AutoVerScheme/indexwindow.h b/softwareDirectory/AutoVerScheme/indexwindow.h index a05d802..190b0f1 100644 --- a/softwareDirectory/AutoVerScheme/indexwindow.h +++ b/softwareDirectory/AutoVerScheme/indexwindow.h @@ -2,6 +2,8 @@ #define INDEXWINDOW_H #include +#include "datasyncView.h" +#include "infomanageview.h" namespace Ui { class IndexWindow; @@ -23,8 +25,21 @@ void showVerifyMethod(); + void on_tb3_clicked(); + + void on_tb6_clicked(); + + //页面关闭响应函数 + void onNewWindowClosed(); + + void on_tb1_clicked(); + private: Ui::IndexWindow *ui; + + //数据同步页面 指针 + //DataSyncView *ShowDataSyncView; + //InfoManageView *ShowInfoManageView; }; #endif // INDEXWINDOW_H diff --git a/softwareDirectory/AutoVerScheme/indexwindow.ui b/softwareDirectory/AutoVerScheme/indexwindow.ui index d69a54d..dec7207 100644 --- a/softwareDirectory/AutoVerScheme/indexwindow.ui +++ b/softwareDirectory/AutoVerScheme/indexwindow.ui @@ -189,7 +189,7 @@ - + 0 @@ -236,7 +236,7 @@ - + 0 @@ -270,7 +270,7 @@ - + 0 @@ -310,7 +310,7 @@ - + 0 @@ -357,7 +357,7 @@ - + 0 @@ -423,7 +423,7 @@ - + 0 @@ -521,66 +521,34 @@ - toolButton_4 + tb1 clicked() IndexWindow showCheckWindow() - 214 - 250 + 260 + 276 - 351 - 107 + 666 + 394 - toolButton_6 + tb4 clicked() IndexWindow showCheckMethod() - 249 - 606 + 260 + 598 - 331 - 452 - - - - - toolButton_5 - clicked() - IndexWindow - showVerifyMethod() - - - 706 - 589 - - - 692 - 442 - - - - - toolButton_2 - clicked() - IndexWindow - showVerifyWindow() - - - 758 - 249 - - - 862 - 114 + 666 + 394 diff --git a/softwareDirectory/AutoVerScheme/infomanageview.cpp b/softwareDirectory/AutoVerScheme/infomanageview.cpp index a206c6f..d045c60 100644 --- a/softwareDirectory/AutoVerScheme/infomanageview.cpp +++ b/softwareDirectory/AutoVerScheme/infomanageview.cpp @@ -2,6 +2,7 @@ #include "ui_infomanageview.h" #include #include +#include //子窗体 #include "depar_task.h" #include "my_task.h" @@ -19,6 +20,7 @@ { ui->setupUi(this); this->setWindowTitle("信息管理"); + //初始化调用所有函数 this->initForm(); this->initWidget(); @@ -115,7 +117,8 @@ //底部加个弹簧 QSpacerItem *verticalSpacer = new QSpacerItem(20, 40, QSizePolicy::Minimum, QSizePolicy::Expanding); ui->widgetLeft->layout()->addItem(verticalSpacer); - btns.at(names.count() - 1)->click(); + + btns.at(0)->click();//选择启动页面 第一个 } //按钮点击切换UI事件 void InfoManageView::buttonClicked() diff --git a/softwareDirectory/AutoVerScheme/infomanageview.h b/softwareDirectory/AutoVerScheme/infomanageview.h index 3c1463f..5e44bba 100644 --- a/softwareDirectory/AutoVerScheme/infomanageview.h +++ b/softwareDirectory/AutoVerScheme/infomanageview.h @@ -2,6 +2,7 @@ #define INFOMANAGEVIEW_H #include +#include class QAbstractButton; diff --git a/softwareDirectory/AutoVerScheme/infomanageview.ui b/softwareDirectory/AutoVerScheme/infomanageview.ui index 4b39e7d..ef0b87b 100644 --- a/softwareDirectory/AutoVerScheme/infomanageview.ui +++ b/softwareDirectory/AutoVerScheme/infomanageview.ui @@ -10,8 +10,15 @@ 644 + + Qt::DefaultContextMenu + - Form + 信息管理 + + + color:black; +background-color:rgba(240, 240, 240, 1); @@ -68,8 +75,8 @@ - - 170 + + 0 0 diff --git a/softwareDirectory/AutoVerScheme/inspectdataitem.cpp b/softwareDirectory/AutoVerScheme/inspectdataitem.cpp index e9c2adc..efc00ba 100644 --- a/softwareDirectory/AutoVerScheme/inspectdataitem.cpp +++ b/softwareDirectory/AutoVerScheme/inspectdataitem.cpp @@ -1,14 +1,62 @@ #include "inspectdataitem.h" #include "ui_inspectdataitem.h" +#include "QMessageBox.h" InspectDataItem::InspectDataItem(QWidget *parent) : - QWidget(parent), + InfoBase(parent), ui(new Ui::InspectDataItem) { ui->setupUi(this); + this->initForm(); } InspectDataItem::~InspectDataItem() { delete ui; } +void InspectDataItem::initForm() +{ + //tableWidget设置 + //设置控件的边框显示 + ui->tableWidget->setStyleSheet("QHeaderView::section {" + "border: 1px solid rgba(197, 196, 196, 1);" + "border-left:none;" + "border-top:none;" + "background-color:white;" + "}"); + + ui->tableWidget->setRowCount(10); // 设置10行 + ui->tableWidget->setColumnCount(12); // 设置11列 + ui->tableWidget->setColumnWidth(0, 80); // 设置第一列的宽度为100像素 + ui->tableWidget->verticalHeader()->setParent(nullptr); //隐藏行头 + QTableWidgetItem *item = new QTableWidgetItem("测试数据"); + item->setTextAlignment(Qt::AlignCenter); + ui->tableWidget->setItem(0, 0, item); //设置数据 + + //初始化TableWidget 设置列 + QStringList headers; + headers << "序号" << "设备名称" << "型号规则" << "出厂编号" + <<"核查件名称"<<"核查件型号"<<"核查件编号" <<"核查员" + << "核查日期" <<"实验室"<<"部门"<<"操作"; + ui->tableWidget->setHorizontalHeaderLabels(headers); +} +void InspectDataItem::ShowMessageBox(QString title,QString value) { + // 创建一个QMessageBox对象 + QMessageBox msgBox; + + // 设置消息框的标题 + msgBox.setWindowTitle(title); + + // 设置消息框的文本内容 + msgBox.setText(value); + + // 设置消息框的标准按钮,这里是“确定”按钮 + msgBox.setStandardButtons(QMessageBox::Ok); + + // 显示消息框 + msgBox.exec(); +} +void InspectDataItem::Load() +{ + //ShowMessageBox("核查数据","核查数据"); +} diff --git a/softwareDirectory/AutoVerScheme/inspectdataitem.h b/softwareDirectory/AutoVerScheme/inspectdataitem.h index 57551bb..bdf7066 100644 --- a/softwareDirectory/AutoVerScheme/inspectdataitem.h +++ b/softwareDirectory/AutoVerScheme/inspectdataitem.h @@ -2,19 +2,24 @@ #define INSPECTDATAITEM_H #include +#include "InfoBase.h" namespace Ui { class InspectDataItem; } -class InspectDataItem : public QWidget +class InspectDataItem : public InfoBase { Q_OBJECT public: explicit InspectDataItem(QWidget *parent = nullptr); ~InspectDataItem(); - +private slots: + void initForm(); //初始化界面数据 + void ShowMessageBox(QString title,QString value); + //继承父类的Load方法 + void Load() override; private: Ui::InspectDataItem *ui; }; diff --git a/softwareDirectory/AutoVerScheme/inspectdataitem.ui b/softwareDirectory/AutoVerScheme/inspectdataitem.ui index 45f04e0..86786c9 100644 --- a/softwareDirectory/AutoVerScheme/inspectdataitem.ui +++ b/softwareDirectory/AutoVerScheme/inspectdataitem.ui @@ -6,26 +6,236 @@ 0 0 - 400 - 300 + 1362 + 543 Form - - - - 120 - 130 - 89 - 24 - - - - 核查数据管理 - - + + + + + + 0 + 0 + + + + background-color:white; + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 设备名称: + + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 型号规则: + + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 出厂编号: + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 核查员: + + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 核查日期: + + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 实验室: + + + + + + + + + + Qt::Horizontal + + + QSizePolicy::Expanding + + + + 40 + 20 + + + + + + + + Qt::RightToLeft + + + 查询 + + + + + + + Qt::RightToLeft + + + 重置 + + + + + + + + + + background-color:white; + + + + + + + + + + + + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/my_task.cpp b/softwareDirectory/AutoVerScheme/my_task.cpp index 40aceb2..559a73b 100644 --- a/softwareDirectory/AutoVerScheme/my_task.cpp +++ b/softwareDirectory/AutoVerScheme/my_task.cpp @@ -7,7 +7,8 @@ ui(new Ui::My_Task) { ui->setupUi(this); - + //初始化QStandardItemModel + model=new QStandardItemModel(parent); this->initForm(); } @@ -17,7 +18,28 @@ } void My_Task::initForm() { + //tableWidget设置 + //设置控件的边框显示 + ui->tableWidget->setStyleSheet("QHeaderView::section {" + "border: 1px solid rgba(197, 196, 196, 1);" + "border-left:none;" + "border-top:none;" + "background-color:white;" + "}"); + ui->tableWidget->setRowCount(10); // 设置10行 + ui->tableWidget->setColumnCount(10); // 设置11列 + ui->tableWidget->setColumnWidth(0, 80); // 设置第一列的宽度为100像素 + ui->tableWidget->verticalHeader()->setParent(nullptr); //隐藏行头 + QTableWidgetItem *item = new QTableWidgetItem("测试数据"); + item->setTextAlignment(Qt::AlignCenter); + ui->tableWidget->setItem(0, 0, item); //设置数据 + + //初始化TableWidget 设置列 + QStringList headers; + headers << "序号" << "设备名称" << "型号规则" << "辅助字段" << "辅助字段"<< "出厂编号" + << "生产厂家" <<"委托方"<<"使用部门"<<"要求检完时间"<<"是否加急"; + ui->tableWidget->setHorizontalHeaderLabels(headers); } void My_Task::ShowMessageBox(QString title,QString value) { @@ -38,5 +60,5 @@ } void My_Task::Load() { - ShowMessageBox("我的任务页面","我的任务初始化完成"); + //ShowMessageBox("我的任务页面","我的任务初始化完成"); } diff --git a/softwareDirectory/AutoVerScheme/my_task.ui b/softwareDirectory/AutoVerScheme/my_task.ui index 89245b8..a078840 100644 --- a/softwareDirectory/AutoVerScheme/my_task.ui +++ b/softwareDirectory/AutoVerScheme/my_task.ui @@ -6,8 +6,8 @@ 0 0 - 857 - 511 + 1190 + 577 @@ -140,7 +140,23 @@ + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + Qt::RightToLeft + 查询 @@ -148,6 +164,9 @@ + + Qt::RightToLeft + 重置 @@ -166,7 +185,14 @@ - + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/res/qss/Index.css b/softwareDirectory/AutoVerScheme/res/qss/Index.css index 8fad195..d2ba43e 100644 --- a/softwareDirectory/AutoVerScheme/res/qss/Index.css +++ b/softwareDirectory/AutoVerScheme/res/qss/Index.css @@ -1,18 +1,25 @@ -*{ - -color:black; -font: 18pt 微软雅黑; - -} -QMainWindow +QMainWindow#IndexWindow { background-image: url(:/image/Index/u15.png); background-color:white; } -QToolButton:hover{ +QToolButton#tb1:hover{ background-image: url(:/image/Index/u26_mouseOver.svg); } -QToolButton{ +QToolButton#tb2:hover{ + background-image: url(:/image/Index/u26_mouseOver.svg); +} +QToolButton#tb3:hover{ + background-image: url(:/image/Index/u26_mouseOver.svg); +}QToolButton#tb4:hover{ +background-image: url(:/image/Index/u26_mouseOver.svg); +}QToolButton#tb5:hover{ +background-image: url(:/image/Index/u26_mouseOver.svg); +} +QToolButton#tb6:hover{ + background-image: url(:/image/Index/u26_mouseOver.svg); +} +QToolButton#tb1{ color: white; background-image: url(:/image/Index/u26.svg); font-weight: bold; @@ -20,4 +27,52 @@ text-align: center; margin:10; margin-right: 180px; +font: 18pt 微软雅黑; +} +QToolButton#tb2{ +color: white; +background-image: url(:/image/Index/u26.svg); +font-weight: bold; +border-radius: 5px; +text-align: center; +margin:10; +margin-right: 180px; +font: 18pt 微软雅黑; +} +QToolButton#tb3{ +color: white; +background-image: url(:/image/Index/u26.svg); +font-weight: bold; +border-radius: 5px; +text-align: center; +margin:10; +margin-right: 180px; +font: 18pt 微软雅黑; +}QToolButton#tb4{ +color: white; +background-image: url(:/image/Index/u26.svg); +font-weight: bold; +border-radius: 5px; +text-align: center; +margin:10; +margin-right: 180px; +font: 18pt 微软雅黑; +}QToolButton#tb5{ +color: white; +background-image: url(:/image/Index/u26.svg); +font-weight: bold; +border-radius: 5px; +text-align: center; +margin:10; +margin-right: 180px; +font: 18pt 微软雅黑; +}QToolButton#tb6{ +color: white; +background-image: url(:/image/Index/u26.svg); +font-weight: bold; +border-radius: 5px; +text-align: center; +margin:10; +margin-right: 180px; +font: 18pt 微软雅黑; } diff --git a/softwareDirectory/AutoVerScheme/rulefileitem.cpp b/softwareDirectory/AutoVerScheme/rulefileitem.cpp index 6f9ddd3..095165e 100644 --- a/softwareDirectory/AutoVerScheme/rulefileitem.cpp +++ b/softwareDirectory/AutoVerScheme/rulefileitem.cpp @@ -1,14 +1,63 @@ #include "rulefileitem.h" #include "ui_rulefileitem.h" +#include "QMessageBox" + RuleFileItem::RuleFileItem(QWidget *parent) : - QWidget(parent), + InfoBase(parent), ui(new Ui::RuleFileItem) { ui->setupUi(this); + this->initForm(); } RuleFileItem::~RuleFileItem() { delete ui; } +void RuleFileItem::initForm() +{ + + //tableWidget设置 + //设置控件的边框显示 + ui->tableWidget->setStyleSheet("QHeaderView::section {" + "border: 1px solid rgba(197, 196, 196, 1);" + "border-left:none;" + "border-top:none;" + "background-color:white;" + "}"); + + ui->tableWidget->setRowCount(10); // 设置10行 + ui->tableWidget->setColumnCount(9); // 设置11列 + ui->tableWidget->setColumnWidth(0, 80); // 设置第一列的宽度为100像素 + ui->tableWidget->verticalHeader()->setParent(nullptr); //隐藏行头 + QTableWidgetItem *item = new QTableWidgetItem("测试数据"); + item->setTextAlignment(Qt::AlignCenter); + ui->tableWidget->setItem(0, 0, item); //设置数据 + + //初始化TableWidget 设置列 + QStringList headers; + headers << "序号" << "文件号" << "文件名称" << "版本号" << "文件类型"<< "颁布时间" + << "实施时间" <<"备注"<<"操作"; + ui->tableWidget->setHorizontalHeaderLabels(headers); +} +void RuleFileItem::ShowMessageBox(QString title,QString value) { + // 创建一个QMessageBox对象 + QMessageBox msgBox; + + // 设置消息框的标题 + msgBox.setWindowTitle(title); + + // 设置消息框的文本内容 + msgBox.setText(value); + + // 设置消息框的标准按钮,这里是“确定”按钮 + msgBox.setStandardButtons(QMessageBox::Ok); + + // 显示消息框 + msgBox.exec(); +} +void RuleFileItem::Load() +{ + //ShowMessageBox("技术文件","技术文件初始化完成"); +} diff --git a/softwareDirectory/AutoVerScheme/rulefileitem.h b/softwareDirectory/AutoVerScheme/rulefileitem.h index 1fc81a1..d892a71 100644 --- a/softwareDirectory/AutoVerScheme/rulefileitem.h +++ b/softwareDirectory/AutoVerScheme/rulefileitem.h @@ -2,19 +2,24 @@ #define RULEFILEITEM_H #include +#include "InfoBase.h" namespace Ui { class RuleFileItem; } -class RuleFileItem : public QWidget +class RuleFileItem : public InfoBase { Q_OBJECT public: explicit RuleFileItem(QWidget *parent = nullptr); ~RuleFileItem(); - +private slots: + void initForm(); //初始化界面数据 + void ShowMessageBox(QString title,QString value); + //继承父类的Load方法 + void Load() override; private: Ui::RuleFileItem *ui; }; diff --git a/softwareDirectory/AutoVerScheme/rulefileitem.ui b/softwareDirectory/AutoVerScheme/rulefileitem.ui index 599e025..9144b96 100644 --- a/softwareDirectory/AutoVerScheme/rulefileitem.ui +++ b/softwareDirectory/AutoVerScheme/rulefileitem.ui @@ -6,26 +6,149 @@ 0 0 - 400 - 300 + 918 + 582 Form - - - - 140 - 130 - 121 - 24 - - - - 规程文件管理 - - + + + + + + 0 + 0 + + + + background-color:white; + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 文件号: + + + + + + + + 0 + 0 + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 文件名称: + + + + + + + + 0 + 0 + + + + + + + + Qt::Horizontal + + + QSizePolicy::Expanding + + + + 40 + 20 + + + + + + + + Qt::RightToLeft + + + 查询 + + + + + + + Qt::RightToLeft + + + 重置 + + + + + + + + + + background-color:white; + + + + + + + + + + + + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro index 1280b70..dfb0418 100644 --- a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro @@ -22,6 +22,7 @@ checkmethodmanage.cpp \ checkwindow.cpp \ create_task.cpp \ + datasyncview.cpp \ depar_task.cpp \ indexwindow.cpp \ infomanageview.cpp \ @@ -43,6 +44,7 @@ checkmethodmanage.h \ checkwindow.h \ create_task.h \ + datasyncview.h \ depar_task.h \ indexwindow.h \ infomanageview.h \ @@ -62,6 +64,7 @@ checkmethodmanage.ui \ checkwindow.ui \ create_task.ui \ + datasyncview.ui \ depar_task.ui \ indexwindow.ui \ infomanageview.ui \ diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user index 6ea03c5..93c39cb 100644 --- a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user @@ -1,10 +1,10 @@ - + EnvironmentId - {2746248a-b112-4e0f-9ae0-9e61f2a42309} + {c08df58c-84a7-4965-bca6-e98789474efa} ProjectExplorer.Project.ActiveTarget @@ -71,7 +71,7 @@ 0 0 - D:/dev/QT/AutoCalHainan/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug true @@ -119,7 +119,7 @@ 2 - D:/dev/QT/AutoCalHainan/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Release + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Release true @@ -167,7 +167,7 @@ 0 - D:/dev/QT/AutoCalHainan/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Profile + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Profile true @@ -287,8 +287,8 @@ 2 - Qt4ProjectManager.Qt4RunConfiguration:D:/dev/QT/AutoCalHainan/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro - D:/dev/QT/AutoCalHainan/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro + Qt4ProjectManager.Qt4RunConfiguration:C:/Users/admin/Desktop/SVN/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro + C:/Users/admin/Desktop/SVN/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro false @@ -299,7 +299,7 @@ false true - D:/dev/QT/AutoCalHainan/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug 1 @@ -314,7 +314,7 @@ 0 0 - D:/dev/QT/AutoCalHainan/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Debug + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Debug true @@ -362,7 +362,7 @@ 2 - D:/dev/QT/AutoCalHainan/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Release + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Release true @@ -410,7 +410,7 @@ 0 - D:/dev/QT/AutoCalHainan/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Profile + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Profile true @@ -530,14 +530,15 @@ 2 - - ProjectExplorer.CustomExecutableRunConfiguration - + AutoVerScheme2 + 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 diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user.c08df58 b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user.c08df58 deleted file mode 100644 index 495f95c..0000000 --- a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user.c08df58 +++ /dev/null @@ -1,563 +0,0 @@ - - - - - - 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 32-bit - Desktop Qt 5.14.2 MinGW 32-bit - qt.qt5.5142.win32_mingw73_kit - 0 - 0 - 0 - - D:/Auto_verification_scheme/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 - - - D:/Auto_verification_scheme/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 - - - D:/Auto_verification_scheme/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 - - D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug - - 1 - - - - ProjectExplorer.Project.Target.1 - - 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 - - D:/Auto_verification_scheme/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 - - - D:/Auto_verification_scheme/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 - - - D:/Auto_verification_scheme/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 - - AutoVerScheme2 - 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/InfoBase.h b/softwareDirectory/AutoVerScheme/InfoBase.h index 7fec63e..084cf3f 100644 --- a/softwareDirectory/AutoVerScheme/InfoBase.h +++ b/softwareDirectory/AutoVerScheme/InfoBase.h @@ -2,6 +2,7 @@ #define INFOBASE_H #include +#include "QStandardItemModel" ///信号管理页面的基类 所有信息管理页面都继承于InfoBase /// 便于统一管理 所有子类必须实现Load方法 /// 每次按钮点击切换都会调用Load方法 用于每次页面的数据刷新 @@ -11,6 +12,8 @@ InfoBase(QWidget *parent = nullptr): QWidget(parent){}; // 纯虚函数 virtual void Load()=0; + //QStandardItemModel 的实例。这个模型将用于存储和管理数据。 + QStandardItemModel *model; }; #endif // INFOBASE_H diff --git a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.cpp b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.cpp index 7ac1e87..ffb2bbc 100644 --- a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.cpp +++ b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.cpp @@ -1,14 +1,64 @@ #include "beexamined_deviceitem.h" #include "ui_beexamined_deviceitem.h" +#include "QMessageBox.h" BeExamined_DeviceItem::BeExamined_DeviceItem(QWidget *parent) : - QWidget(parent), + InfoBase(parent), ui(new Ui::BeExamined_DeviceItem) { ui->setupUi(this); + this->initForm(); } BeExamined_DeviceItem::~BeExamined_DeviceItem() { delete ui; } + +void BeExamined_DeviceItem::initForm() +{ + + //tableWidget设置 + //设置控件的边框显示 + ui->tableWidget->setStyleSheet("QHeaderView::section {" + "border: 1px solid rgba(197, 196, 196, 1);" + "border-left:none;" + "border-top:none;" + "background-color:white;" + "}"); + + ui->tableWidget->setRowCount(10); // 设置10行 + ui->tableWidget->setColumnCount(12); // 设置11列 + ui->tableWidget->setColumnWidth(0, 80); // 设置第一列的宽度为100像素 + ui->tableWidget->verticalHeader()->setParent(nullptr); //隐藏行头 + QTableWidgetItem *item = new QTableWidgetItem("测试数据"); + item->setTextAlignment(Qt::AlignCenter); + ui->tableWidget->setItem(0, 0, item); //设置数据 + + //初始化TableWidget 设置列 + QStringList headers; + headers << "序号" << "设备名称" << "型号规则" << "辅助字段" << "出厂编号" + << "生产厂家"<<"所在单位" <<"使用部门"<<"计量标识"<<"检定周期"<<"证书有效期"<<"操作"; + ui->tableWidget->setHorizontalHeaderLabels(headers); + +} +void BeExamined_DeviceItem::ShowMessageBox(QString title,QString value) { + // 创建一个QMessageBox对象 + QMessageBox msgBox; + + // 设置消息框的标题 + msgBox.setWindowTitle(title); + + // 设置消息框的文本内容 + msgBox.setText(value); + + // 设置消息框的标准按钮,这里是“确定”按钮 + msgBox.setStandardButtons(QMessageBox::Ok); + + // 显示消息框 + msgBox.exec(); +} +void BeExamined_DeviceItem::Load() +{ + //ShowMessageBox("被检设备","被检设备初始化完成"); +} diff --git a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.h b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.h index 76b061d..ae46979 100644 --- a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.h +++ b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.h @@ -2,12 +2,13 @@ #define BEEXAMINED_DEVICEITEM_H #include +#include "InfoBase.h" namespace Ui { class BeExamined_DeviceItem; } -class BeExamined_DeviceItem : public QWidget +class BeExamined_DeviceItem : public InfoBase { Q_OBJECT @@ -15,6 +16,11 @@ explicit BeExamined_DeviceItem(QWidget *parent = nullptr); ~BeExamined_DeviceItem(); +private slots: + void initForm(); //初始化界面数据 + void ShowMessageBox(QString title,QString value); + //继承父类的Load方法 + void Load() override; private: Ui::BeExamined_DeviceItem *ui; }; diff --git a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.ui b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.ui index af9f7bf..5a0a3c9 100644 --- a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.ui +++ b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.ui @@ -6,26 +6,236 @@ 0 0 - 400 - 300 + 1291 + 575 Form - - - - 130 - 140 - 89 - 24 - - - - 被检设备管理 - - + + + + + + 0 + 0 + + + + background-color:white; + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 设备名称: + + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 型号规则: + + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 出厂编号: + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 生产厂家: + + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 使用部门: + + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 使用单位: + + + + + + + + + + Qt::Horizontal + + + QSizePolicy::Expanding + + + + 40 + 20 + + + + + + + + Qt::RightToLeft + + + 查询 + + + + + + + Qt::RightToLeft + + + 重置 + + + + + + + + + + background-color:white; + + + + + + + + + + + + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/create_task.cpp b/softwareDirectory/AutoVerScheme/create_task.cpp index 4193efc..9b49a1a 100644 --- a/softwareDirectory/AutoVerScheme/create_task.cpp +++ b/softwareDirectory/AutoVerScheme/create_task.cpp @@ -1,14 +1,61 @@ #include "create_task.h" #include "ui_create_task.h" +#include "QMessageBox" Create_Task::Create_Task(QWidget *parent) : - QWidget(parent), + InfoBase(parent), ui(new Ui::Create_Task) { ui->setupUi(this); + this->initForm(); } Create_Task::~Create_Task() { delete ui; } +void Create_Task::initForm() +{ + //tableWidget设置 + //设置控件的边框显示 + ui->tableWidget->setStyleSheet("QHeaderView::section {" + "border: 1px solid rgba(197, 196, 196, 1);" + "border-left:none;" + "border-top:none;" + "background-color:white;" + "}"); + + ui->tableWidget->setRowCount(10); // 设置10行 + ui->tableWidget->setColumnCount(8); // 设置11列 + ui->tableWidget->setColumnWidth(0, 80); // 设置第一列的宽度为100像素 + ui->tableWidget->verticalHeader()->setParent(nullptr); //隐藏行头 + QTableWidgetItem *item = new QTableWidgetItem("测试数据"); + item->setTextAlignment(Qt::AlignCenter); + ui->tableWidget->setItem(0, 0, item); //设置数据 + + //初始化TableWidget 设置列 + QStringList headers; + headers << "序号" << "任务单编号" << "委托方"<< "使用部门" << "要求检完时间" << "送检人"<<"是否加急"<<"操作"; + ui->tableWidget->setHorizontalHeaderLabels(headers); + //ShowMessageBox("标题","初始化完成"); +} +void Create_Task::ShowMessageBox(QString title,QString value) { + // 创建一个QMessageBox对象 + QMessageBox msgBox; + + // 设置消息框的标题 + msgBox.setWindowTitle(title); + + // 设置消息框的文本内容 + msgBox.setText(value); + + // 设置消息框的标准按钮,这里是“确定”按钮 + msgBox.setStandardButtons(QMessageBox::Ok); + + // 显示消息框 + msgBox.exec(); +} +void Create_Task::Load() +{ + //ShowMessageBox("创建任务界面","创建任务界面初始化完成"); +} diff --git a/softwareDirectory/AutoVerScheme/create_task.h b/softwareDirectory/AutoVerScheme/create_task.h index e2264de..7cf383f 100644 --- a/softwareDirectory/AutoVerScheme/create_task.h +++ b/softwareDirectory/AutoVerScheme/create_task.h @@ -1,13 +1,14 @@ #ifndef CREATE_TASK_H #define CREATE_TASK_H +#include "InfoBase.h" #include namespace Ui { class Create_Task; } -class Create_Task : public QWidget +class Create_Task : public InfoBase { Q_OBJECT @@ -15,6 +16,11 @@ explicit Create_Task(QWidget *parent = nullptr); ~Create_Task(); +private slots: + void initForm(); //初始化界面数据 + void ShowMessageBox(QString title,QString value); + //继承父类的Load方法 + void Load() override; private: Ui::Create_Task *ui; }; diff --git a/softwareDirectory/AutoVerScheme/create_task.ui b/softwareDirectory/AutoVerScheme/create_task.ui index b79c6a1..d9d88ed 100644 --- a/softwareDirectory/AutoVerScheme/create_task.ui +++ b/softwareDirectory/AutoVerScheme/create_task.ui @@ -6,29 +6,294 @@ 0 0 - 400 - 300 + 1184 + 580 Form - - background-color:red; + + Qt::LeftToRight - - - - 140 - 120 - 89 - 24 - - - - 创建任务单 - - + + + + + + + + + 0 + 0 + + + + background-color:white; + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 任务单编号: + + + + + + + + 0 + 0 + + + + + + + + + 0 + 0 + + + + + 50 + 0 + + + + 委托方: + + + + + + + + 0 + 0 + + + + + 0 + 0 + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 使用部门: + + + + + + + + 0 + 0 + + + + + 0 + 0 + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 要求完成时间: + + + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + 0 + 30 + + + + Qt::RightToLeft + + + background-color:rgb(3, 58, 132); +color:white; + + + + 查询 + + + + + + + + 0 + 30 + + + + Qt::RightToLeft + + + background-color:rgb(207, 132, 33); +color:white; + + + + 重置 + + + + + + + + + + background-color:white; + + + + + + + 6 + + + 9 + + + 9 + + + 9 + + + + + + 0 + 0 + + + + + 120 + 40 + + + + OpenHandCursor + + + Qt::DefaultContextMenu + + + Qt::RightToLeft + + + false + + + background-color:rgb(9, 89, 179); +color:white; + + + 创建任务单 + + + true + + + + + + + + + + + + + + SizeVerCursor + + + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/datasyncview.cpp b/softwareDirectory/AutoVerScheme/datasyncview.cpp new file mode 100644 index 0000000..74cd41d --- /dev/null +++ b/softwareDirectory/AutoVerScheme/datasyncview.cpp @@ -0,0 +1,44 @@ +#include "datasyncview.h" +#include "ui_datasyncview.h" + +DataSyncView::DataSyncView(QWidget *parent) : + QWidget(parent), + ui(new Ui::DataSyncView) +{ + ui->setupUi(this); + this->initForm(); +} + +DataSyncView::~DataSyncView() +{ + delete ui; +} +void DataSyncView::initForm() +{ + //tableWidget设置 + //设置控件的边框显示 + ui->tableWidget->setStyleSheet("QHeaderView::section {" + "border: 1px solid grey;" + "border-left:none;" + "border-top:none;" + "background-color:white;" + " color:black;" + "font: bold 18px Arial, sans-serif;" + "}"); + + ui->tableWidget->setRowCount(10); // 设置10行 + ui->tableWidget->setColumnCount(4); // 设置11列 + ui->tableWidget->setColumnWidth(0, 80); // 设置第一列的宽度为100像素 + ui->tableWidget->verticalHeader()->setParent(nullptr); //隐藏行头 + QTableWidgetItem *item = new QTableWidgetItem("测试数据"); + item->setTextAlignment(Qt::AlignCenter); + ui->tableWidget->setItem(0, 0, item); //设置数据 + + //初始化TableWidget 设置列 + QStringList headers; + headers << "序号" << "同步时间" << "是否同步成功" << "备注" ; + ui->tableWidget->setHorizontalHeaderLabels(headers); + + + +} diff --git a/softwareDirectory/AutoVerScheme/datasyncview.h b/softwareDirectory/AutoVerScheme/datasyncview.h new file mode 100644 index 0000000..9a73de9 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/datasyncview.h @@ -0,0 +1,24 @@ +#ifndef DATASYNCVIEW_H +#define DATASYNCVIEW_H + +#include + +namespace Ui { +class DataSyncView; +} + +class DataSyncView : public QWidget +{ + Q_OBJECT + +public: + explicit DataSyncView(QWidget *parent = nullptr); + ~DataSyncView(); +private slots: + void initForm(); //初始化界面数据 + +private: + Ui::DataSyncView *ui; +}; + +#endif // DATASYNCVIEW_H diff --git a/softwareDirectory/AutoVerScheme/datasyncview.ui b/softwareDirectory/AutoVerScheme/datasyncview.ui new file mode 100644 index 0000000..c45bf56 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/datasyncview.ui @@ -0,0 +1,133 @@ + + + DataSyncView + + + + 0 + 0 + 874 + 531 + + + + 数据同步 + + + background-color:rgba(240, 240, 240, 1); + + + + + + background-color:white; + + + + + + + + + + 0 + 0 + + + + background-color:white; +border:0; + + + + + + + + + + 0 + 0 + + + + font:bold 20px Arial, sans-serif; +color:#334582; + + + 同步记录 + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + background-color:#334582; + font: bold 18px Arial, sans-serif; +color:white; +padding:10px; + + + 下载数据 + + + + + + + + 200 + 0 + + + + + 100 + 40 + + + + Qt::RightToLeft + + + background-color:#334582; + font: bold 18px Arial, sans-serif; +color:white; +padding:10px; + + + 发送同步请求 + + + + + + + + + + + + + + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/depar_task.cpp b/softwareDirectory/AutoVerScheme/depar_task.cpp index de39775..5f0f93a 100644 --- a/softwareDirectory/AutoVerScheme/depar_task.cpp +++ b/softwareDirectory/AutoVerScheme/depar_task.cpp @@ -2,13 +2,19 @@ #include "ui_depar_task.h" #include "QMessageBox" #include "InfoBase.h" +#include "QStandardItemModel" Depar_Task::Depar_Task(QWidget *parent) : InfoBase(parent), ui(new Ui::Depar_Task) { ui->setupUi(this); + //初始化列表 this->initForm(); + + + + } Depar_Task::~Depar_Task() @@ -17,8 +23,31 @@ } void Depar_Task::initForm() { + //tableWidget设置 + //设置控件的边框显示 + ui->tableWidget->setStyleSheet("QHeaderView::section {" + "border: 1px solid rgba(197, 196, 196, 1);" + "border-left:none;" + "border-top:none;" + "background-color:white;" + "}"); - //ShowMessageBox("标题","初始化完成"); + ui->tableWidget->setRowCount(10); // 设置10行 + ui->tableWidget->setColumnCount(10); // 设置11列 + ui->tableWidget->setColumnWidth(0, 80); // 设置第一列的宽度为100像素 + ui->tableWidget->verticalHeader()->setParent(nullptr); //隐藏行头 + QTableWidgetItem *item = new QTableWidgetItem("测试数据"); + item->setTextAlignment(Qt::AlignCenter); //文件居中 + ui->tableWidget->setItem(0, 0, item); //设置数据 + + //初始化TableWidget 设置列 + QStringList headers; + headers << "序号" << "设备名称" << "型号规则" << "辅助字段" << "辅助字段"<< "出厂编号" + << "生产厂家" <<"委托方"<<"使用部门"<<"要求检完时间"<<"是否加急"; + ui->tableWidget->setHorizontalHeaderLabels(headers); + + + } void Depar_Task::ShowMessageBox(QString title,QString value) { // 创建一个QMessageBox对象 @@ -38,5 +67,5 @@ } void Depar_Task::Load() { - ShowMessageBox("部门任务页面","部门任务初始化完成"); + //ShowMessageBox("部门任务页面","部门任务初始化完成"); } diff --git a/softwareDirectory/AutoVerScheme/depar_task.h b/softwareDirectory/AutoVerScheme/depar_task.h index 8716faf..110008d 100644 --- a/softwareDirectory/AutoVerScheme/depar_task.h +++ b/softwareDirectory/AutoVerScheme/depar_task.h @@ -3,6 +3,7 @@ #include "InfoBase.h" +#include "QStandardItemModel" namespace Ui { class Depar_Task; @@ -20,9 +21,12 @@ private slots: void initForm(); //初始化界面数据 void ShowMessageBox(QString title,QString value); + //继承父类的Load方法 void Load() override; + private: Ui::Depar_Task *ui; + // QStandardItemModel *model; }; #endif // DEPAR_TASK_H diff --git a/softwareDirectory/AutoVerScheme/depar_task.ui b/softwareDirectory/AutoVerScheme/depar_task.ui index ff3d44f..1a95cc4 100644 --- a/softwareDirectory/AutoVerScheme/depar_task.ui +++ b/softwareDirectory/AutoVerScheme/depar_task.ui @@ -6,7 +6,7 @@ 0 0 - 1184 + 1190 456 @@ -143,7 +143,34 @@ + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + 0 + 30 + + + + Qt::RightToLeft + + + background-color:rgb(3, 58, 152); +color:white; + + 查询 @@ -151,6 +178,20 @@ + + + 0 + 30 + + + + Qt::RightToLeft + + + background-color:rgb(207, 132, 33); +color:white; + + 重置 @@ -168,8 +209,15 @@ + + + - + + + + + diff --git a/softwareDirectory/AutoVerScheme/indexwindow.cpp b/softwareDirectory/AutoVerScheme/indexwindow.cpp index fca900a..cbba812 100644 --- a/softwareDirectory/AutoVerScheme/indexwindow.cpp +++ b/softwareDirectory/AutoVerScheme/indexwindow.cpp @@ -13,11 +13,37 @@ { ui->setupUi(this); this->initForm(); +/* + //主要作用 当页面关闭后 回到indexwindow页面 并 通过~IndexWindow 释放此页面指针所占用内存 + // 假设 ShowDataSyncView 是一个指向 DataSyncView 实例的指针 + // 当 ShowDataSyncView 关闭时,它的 closed() 信号会被发出 + // 连接这个信号到 IndexWindow 的 onNewWindowClosed() 槽函数 + if(ShowDataSyncView) { + //数据同步页面 信号槽 + connect(ShowDataSyncView, &DataSyncView::close, this, &IndexWindow::onNewWindowClosed); + } + if(ShowInfoManageView) { + //信息管理 信号槽 + connect(ShowInfoManageView, &InfoManageView::close, this, &IndexWindow::onNewWindowClosed); + } + */ } IndexWindow::~IndexWindow() { delete ui; + //释放页面内存 + /* + if (ShowDataSyncView) { + ShowDataSyncView->close(); + delete ShowDataSyncView; + } + else if(ShowInfoManageView) + { + ShowInfoManageView->close(); + delete ShowInfoManageView; + } + */ } void IndexWindow::initForm() { @@ -57,6 +83,15 @@ } + +void IndexWindow::onNewWindowClosed() +{ + // 新窗体关闭后,设置 IndexWindow 为活动窗口 + this->activateWindow(); + // 也可以设置焦点到 MainWindow 中的某个控件 + // ui->someWidget->setFocus(); +} + void IndexWindow::showCheckWindow() { CheckWindow *checkWindow = new CheckWindow; @@ -65,6 +100,26 @@ checkWindow->show(); } +//信息管理按钮 +void IndexWindow::on_tb3_clicked() +{ + InfoManageView *ShowInfoManageView = new InfoManageView(); + ShowInfoManageView->setWindowState(Qt::WindowMaximized); + ShowInfoManageView->setWindowModality(Qt::ApplicationModal); + ShowInfoManageView->show(); +} +//数据同步按钮 +void IndexWindow::on_tb6_clicked() +{ + + // 创建新窗体实例并显示 + DataSyncView *ShowDataSyncView = new DataSyncView(); + ShowDataSyncView->setWindowState(Qt::WindowMaximized); + ShowDataSyncView->setWindowModality(Qt::ApplicationModal); + ShowDataSyncView->show(); +} + + void IndexWindow::showCheckMethod() { CheckMethodManage *checkWindow = new CheckMethodManage; diff --git a/softwareDirectory/AutoVerScheme/indexwindow.h b/softwareDirectory/AutoVerScheme/indexwindow.h index a05d802..190b0f1 100644 --- a/softwareDirectory/AutoVerScheme/indexwindow.h +++ b/softwareDirectory/AutoVerScheme/indexwindow.h @@ -2,6 +2,8 @@ #define INDEXWINDOW_H #include +#include "datasyncView.h" +#include "infomanageview.h" namespace Ui { class IndexWindow; @@ -23,8 +25,21 @@ void showVerifyMethod(); + void on_tb3_clicked(); + + void on_tb6_clicked(); + + //页面关闭响应函数 + void onNewWindowClosed(); + + void on_tb1_clicked(); + private: Ui::IndexWindow *ui; + + //数据同步页面 指针 + //DataSyncView *ShowDataSyncView; + //InfoManageView *ShowInfoManageView; }; #endif // INDEXWINDOW_H diff --git a/softwareDirectory/AutoVerScheme/indexwindow.ui b/softwareDirectory/AutoVerScheme/indexwindow.ui index d69a54d..dec7207 100644 --- a/softwareDirectory/AutoVerScheme/indexwindow.ui +++ b/softwareDirectory/AutoVerScheme/indexwindow.ui @@ -189,7 +189,7 @@ - + 0 @@ -236,7 +236,7 @@ - + 0 @@ -270,7 +270,7 @@ - + 0 @@ -310,7 +310,7 @@ - + 0 @@ -357,7 +357,7 @@ - + 0 @@ -423,7 +423,7 @@ - + 0 @@ -521,66 +521,34 @@ - toolButton_4 + tb1 clicked() IndexWindow showCheckWindow() - 214 - 250 + 260 + 276 - 351 - 107 + 666 + 394 - toolButton_6 + tb4 clicked() IndexWindow showCheckMethod() - 249 - 606 + 260 + 598 - 331 - 452 - - - - - toolButton_5 - clicked() - IndexWindow - showVerifyMethod() - - - 706 - 589 - - - 692 - 442 - - - - - toolButton_2 - clicked() - IndexWindow - showVerifyWindow() - - - 758 - 249 - - - 862 - 114 + 666 + 394 diff --git a/softwareDirectory/AutoVerScheme/infomanageview.cpp b/softwareDirectory/AutoVerScheme/infomanageview.cpp index a206c6f..d045c60 100644 --- a/softwareDirectory/AutoVerScheme/infomanageview.cpp +++ b/softwareDirectory/AutoVerScheme/infomanageview.cpp @@ -2,6 +2,7 @@ #include "ui_infomanageview.h" #include #include +#include //子窗体 #include "depar_task.h" #include "my_task.h" @@ -19,6 +20,7 @@ { ui->setupUi(this); this->setWindowTitle("信息管理"); + //初始化调用所有函数 this->initForm(); this->initWidget(); @@ -115,7 +117,8 @@ //底部加个弹簧 QSpacerItem *verticalSpacer = new QSpacerItem(20, 40, QSizePolicy::Minimum, QSizePolicy::Expanding); ui->widgetLeft->layout()->addItem(verticalSpacer); - btns.at(names.count() - 1)->click(); + + btns.at(0)->click();//选择启动页面 第一个 } //按钮点击切换UI事件 void InfoManageView::buttonClicked() diff --git a/softwareDirectory/AutoVerScheme/infomanageview.h b/softwareDirectory/AutoVerScheme/infomanageview.h index 3c1463f..5e44bba 100644 --- a/softwareDirectory/AutoVerScheme/infomanageview.h +++ b/softwareDirectory/AutoVerScheme/infomanageview.h @@ -2,6 +2,7 @@ #define INFOMANAGEVIEW_H #include +#include class QAbstractButton; diff --git a/softwareDirectory/AutoVerScheme/infomanageview.ui b/softwareDirectory/AutoVerScheme/infomanageview.ui index 4b39e7d..ef0b87b 100644 --- a/softwareDirectory/AutoVerScheme/infomanageview.ui +++ b/softwareDirectory/AutoVerScheme/infomanageview.ui @@ -10,8 +10,15 @@ 644 + + Qt::DefaultContextMenu + - Form + 信息管理 + + + color:black; +background-color:rgba(240, 240, 240, 1); @@ -68,8 +75,8 @@ - - 170 + + 0 0 diff --git a/softwareDirectory/AutoVerScheme/inspectdataitem.cpp b/softwareDirectory/AutoVerScheme/inspectdataitem.cpp index e9c2adc..efc00ba 100644 --- a/softwareDirectory/AutoVerScheme/inspectdataitem.cpp +++ b/softwareDirectory/AutoVerScheme/inspectdataitem.cpp @@ -1,14 +1,62 @@ #include "inspectdataitem.h" #include "ui_inspectdataitem.h" +#include "QMessageBox.h" InspectDataItem::InspectDataItem(QWidget *parent) : - QWidget(parent), + InfoBase(parent), ui(new Ui::InspectDataItem) { ui->setupUi(this); + this->initForm(); } InspectDataItem::~InspectDataItem() { delete ui; } +void InspectDataItem::initForm() +{ + //tableWidget设置 + //设置控件的边框显示 + ui->tableWidget->setStyleSheet("QHeaderView::section {" + "border: 1px solid rgba(197, 196, 196, 1);" + "border-left:none;" + "border-top:none;" + "background-color:white;" + "}"); + + ui->tableWidget->setRowCount(10); // 设置10行 + ui->tableWidget->setColumnCount(12); // 设置11列 + ui->tableWidget->setColumnWidth(0, 80); // 设置第一列的宽度为100像素 + ui->tableWidget->verticalHeader()->setParent(nullptr); //隐藏行头 + QTableWidgetItem *item = new QTableWidgetItem("测试数据"); + item->setTextAlignment(Qt::AlignCenter); + ui->tableWidget->setItem(0, 0, item); //设置数据 + + //初始化TableWidget 设置列 + QStringList headers; + headers << "序号" << "设备名称" << "型号规则" << "出厂编号" + <<"核查件名称"<<"核查件型号"<<"核查件编号" <<"核查员" + << "核查日期" <<"实验室"<<"部门"<<"操作"; + ui->tableWidget->setHorizontalHeaderLabels(headers); +} +void InspectDataItem::ShowMessageBox(QString title,QString value) { + // 创建一个QMessageBox对象 + QMessageBox msgBox; + + // 设置消息框的标题 + msgBox.setWindowTitle(title); + + // 设置消息框的文本内容 + msgBox.setText(value); + + // 设置消息框的标准按钮,这里是“确定”按钮 + msgBox.setStandardButtons(QMessageBox::Ok); + + // 显示消息框 + msgBox.exec(); +} +void InspectDataItem::Load() +{ + //ShowMessageBox("核查数据","核查数据"); +} diff --git a/softwareDirectory/AutoVerScheme/inspectdataitem.h b/softwareDirectory/AutoVerScheme/inspectdataitem.h index 57551bb..bdf7066 100644 --- a/softwareDirectory/AutoVerScheme/inspectdataitem.h +++ b/softwareDirectory/AutoVerScheme/inspectdataitem.h @@ -2,19 +2,24 @@ #define INSPECTDATAITEM_H #include +#include "InfoBase.h" namespace Ui { class InspectDataItem; } -class InspectDataItem : public QWidget +class InspectDataItem : public InfoBase { Q_OBJECT public: explicit InspectDataItem(QWidget *parent = nullptr); ~InspectDataItem(); - +private slots: + void initForm(); //初始化界面数据 + void ShowMessageBox(QString title,QString value); + //继承父类的Load方法 + void Load() override; private: Ui::InspectDataItem *ui; }; diff --git a/softwareDirectory/AutoVerScheme/inspectdataitem.ui b/softwareDirectory/AutoVerScheme/inspectdataitem.ui index 45f04e0..86786c9 100644 --- a/softwareDirectory/AutoVerScheme/inspectdataitem.ui +++ b/softwareDirectory/AutoVerScheme/inspectdataitem.ui @@ -6,26 +6,236 @@ 0 0 - 400 - 300 + 1362 + 543 Form - - - - 120 - 130 - 89 - 24 - - - - 核查数据管理 - - + + + + + + 0 + 0 + + + + background-color:white; + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 设备名称: + + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 型号规则: + + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 出厂编号: + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 核查员: + + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 核查日期: + + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 实验室: + + + + + + + + + + Qt::Horizontal + + + QSizePolicy::Expanding + + + + 40 + 20 + + + + + + + + Qt::RightToLeft + + + 查询 + + + + + + + Qt::RightToLeft + + + 重置 + + + + + + + + + + background-color:white; + + + + + + + + + + + + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/my_task.cpp b/softwareDirectory/AutoVerScheme/my_task.cpp index 40aceb2..559a73b 100644 --- a/softwareDirectory/AutoVerScheme/my_task.cpp +++ b/softwareDirectory/AutoVerScheme/my_task.cpp @@ -7,7 +7,8 @@ ui(new Ui::My_Task) { ui->setupUi(this); - + //初始化QStandardItemModel + model=new QStandardItemModel(parent); this->initForm(); } @@ -17,7 +18,28 @@ } void My_Task::initForm() { + //tableWidget设置 + //设置控件的边框显示 + ui->tableWidget->setStyleSheet("QHeaderView::section {" + "border: 1px solid rgba(197, 196, 196, 1);" + "border-left:none;" + "border-top:none;" + "background-color:white;" + "}"); + ui->tableWidget->setRowCount(10); // 设置10行 + ui->tableWidget->setColumnCount(10); // 设置11列 + ui->tableWidget->setColumnWidth(0, 80); // 设置第一列的宽度为100像素 + ui->tableWidget->verticalHeader()->setParent(nullptr); //隐藏行头 + QTableWidgetItem *item = new QTableWidgetItem("测试数据"); + item->setTextAlignment(Qt::AlignCenter); + ui->tableWidget->setItem(0, 0, item); //设置数据 + + //初始化TableWidget 设置列 + QStringList headers; + headers << "序号" << "设备名称" << "型号规则" << "辅助字段" << "辅助字段"<< "出厂编号" + << "生产厂家" <<"委托方"<<"使用部门"<<"要求检完时间"<<"是否加急"; + ui->tableWidget->setHorizontalHeaderLabels(headers); } void My_Task::ShowMessageBox(QString title,QString value) { @@ -38,5 +60,5 @@ } void My_Task::Load() { - ShowMessageBox("我的任务页面","我的任务初始化完成"); + //ShowMessageBox("我的任务页面","我的任务初始化完成"); } diff --git a/softwareDirectory/AutoVerScheme/my_task.ui b/softwareDirectory/AutoVerScheme/my_task.ui index 89245b8..a078840 100644 --- a/softwareDirectory/AutoVerScheme/my_task.ui +++ b/softwareDirectory/AutoVerScheme/my_task.ui @@ -6,8 +6,8 @@ 0 0 - 857 - 511 + 1190 + 577 @@ -140,7 +140,23 @@ + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + Qt::RightToLeft + 查询 @@ -148,6 +164,9 @@ + + Qt::RightToLeft + 重置 @@ -166,7 +185,14 @@ - + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/res/qss/Index.css b/softwareDirectory/AutoVerScheme/res/qss/Index.css index 8fad195..d2ba43e 100644 --- a/softwareDirectory/AutoVerScheme/res/qss/Index.css +++ b/softwareDirectory/AutoVerScheme/res/qss/Index.css @@ -1,18 +1,25 @@ -*{ - -color:black; -font: 18pt 微软雅黑; - -} -QMainWindow +QMainWindow#IndexWindow { background-image: url(:/image/Index/u15.png); background-color:white; } -QToolButton:hover{ +QToolButton#tb1:hover{ background-image: url(:/image/Index/u26_mouseOver.svg); } -QToolButton{ +QToolButton#tb2:hover{ + background-image: url(:/image/Index/u26_mouseOver.svg); +} +QToolButton#tb3:hover{ + background-image: url(:/image/Index/u26_mouseOver.svg); +}QToolButton#tb4:hover{ +background-image: url(:/image/Index/u26_mouseOver.svg); +}QToolButton#tb5:hover{ +background-image: url(:/image/Index/u26_mouseOver.svg); +} +QToolButton#tb6:hover{ + background-image: url(:/image/Index/u26_mouseOver.svg); +} +QToolButton#tb1{ color: white; background-image: url(:/image/Index/u26.svg); font-weight: bold; @@ -20,4 +27,52 @@ text-align: center; margin:10; margin-right: 180px; +font: 18pt 微软雅黑; +} +QToolButton#tb2{ +color: white; +background-image: url(:/image/Index/u26.svg); +font-weight: bold; +border-radius: 5px; +text-align: center; +margin:10; +margin-right: 180px; +font: 18pt 微软雅黑; +} +QToolButton#tb3{ +color: white; +background-image: url(:/image/Index/u26.svg); +font-weight: bold; +border-radius: 5px; +text-align: center; +margin:10; +margin-right: 180px; +font: 18pt 微软雅黑; +}QToolButton#tb4{ +color: white; +background-image: url(:/image/Index/u26.svg); +font-weight: bold; +border-radius: 5px; +text-align: center; +margin:10; +margin-right: 180px; +font: 18pt 微软雅黑; +}QToolButton#tb5{ +color: white; +background-image: url(:/image/Index/u26.svg); +font-weight: bold; +border-radius: 5px; +text-align: center; +margin:10; +margin-right: 180px; +font: 18pt 微软雅黑; +}QToolButton#tb6{ +color: white; +background-image: url(:/image/Index/u26.svg); +font-weight: bold; +border-radius: 5px; +text-align: center; +margin:10; +margin-right: 180px; +font: 18pt 微软雅黑; } diff --git a/softwareDirectory/AutoVerScheme/rulefileitem.cpp b/softwareDirectory/AutoVerScheme/rulefileitem.cpp index 6f9ddd3..095165e 100644 --- a/softwareDirectory/AutoVerScheme/rulefileitem.cpp +++ b/softwareDirectory/AutoVerScheme/rulefileitem.cpp @@ -1,14 +1,63 @@ #include "rulefileitem.h" #include "ui_rulefileitem.h" +#include "QMessageBox" + RuleFileItem::RuleFileItem(QWidget *parent) : - QWidget(parent), + InfoBase(parent), ui(new Ui::RuleFileItem) { ui->setupUi(this); + this->initForm(); } RuleFileItem::~RuleFileItem() { delete ui; } +void RuleFileItem::initForm() +{ + + //tableWidget设置 + //设置控件的边框显示 + ui->tableWidget->setStyleSheet("QHeaderView::section {" + "border: 1px solid rgba(197, 196, 196, 1);" + "border-left:none;" + "border-top:none;" + "background-color:white;" + "}"); + + ui->tableWidget->setRowCount(10); // 设置10行 + ui->tableWidget->setColumnCount(9); // 设置11列 + ui->tableWidget->setColumnWidth(0, 80); // 设置第一列的宽度为100像素 + ui->tableWidget->verticalHeader()->setParent(nullptr); //隐藏行头 + QTableWidgetItem *item = new QTableWidgetItem("测试数据"); + item->setTextAlignment(Qt::AlignCenter); + ui->tableWidget->setItem(0, 0, item); //设置数据 + + //初始化TableWidget 设置列 + QStringList headers; + headers << "序号" << "文件号" << "文件名称" << "版本号" << "文件类型"<< "颁布时间" + << "实施时间" <<"备注"<<"操作"; + ui->tableWidget->setHorizontalHeaderLabels(headers); +} +void RuleFileItem::ShowMessageBox(QString title,QString value) { + // 创建一个QMessageBox对象 + QMessageBox msgBox; + + // 设置消息框的标题 + msgBox.setWindowTitle(title); + + // 设置消息框的文本内容 + msgBox.setText(value); + + // 设置消息框的标准按钮,这里是“确定”按钮 + msgBox.setStandardButtons(QMessageBox::Ok); + + // 显示消息框 + msgBox.exec(); +} +void RuleFileItem::Load() +{ + //ShowMessageBox("技术文件","技术文件初始化完成"); +} diff --git a/softwareDirectory/AutoVerScheme/rulefileitem.h b/softwareDirectory/AutoVerScheme/rulefileitem.h index 1fc81a1..d892a71 100644 --- a/softwareDirectory/AutoVerScheme/rulefileitem.h +++ b/softwareDirectory/AutoVerScheme/rulefileitem.h @@ -2,19 +2,24 @@ #define RULEFILEITEM_H #include +#include "InfoBase.h" namespace Ui { class RuleFileItem; } -class RuleFileItem : public QWidget +class RuleFileItem : public InfoBase { Q_OBJECT public: explicit RuleFileItem(QWidget *parent = nullptr); ~RuleFileItem(); - +private slots: + void initForm(); //初始化界面数据 + void ShowMessageBox(QString title,QString value); + //继承父类的Load方法 + void Load() override; private: Ui::RuleFileItem *ui; }; diff --git a/softwareDirectory/AutoVerScheme/rulefileitem.ui b/softwareDirectory/AutoVerScheme/rulefileitem.ui index 599e025..9144b96 100644 --- a/softwareDirectory/AutoVerScheme/rulefileitem.ui +++ b/softwareDirectory/AutoVerScheme/rulefileitem.ui @@ -6,26 +6,149 @@ 0 0 - 400 - 300 + 918 + 582 Form - - - - 140 - 130 - 121 - 24 - - - - 规程文件管理 - - + + + + + + 0 + 0 + + + + background-color:white; + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 文件号: + + + + + + + + 0 + 0 + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 文件名称: + + + + + + + + 0 + 0 + + + + + + + + Qt::Horizontal + + + QSizePolicy::Expanding + + + + 40 + 20 + + + + + + + + Qt::RightToLeft + + + 查询 + + + + + + + Qt::RightToLeft + + + 重置 + + + + + + + + + + background-color:white; + + + + + + + + + + + + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/standard_deviceitem.cpp b/softwareDirectory/AutoVerScheme/standard_deviceitem.cpp index ed15b0a..d1a6a80 100644 --- a/softwareDirectory/AutoVerScheme/standard_deviceitem.cpp +++ b/softwareDirectory/AutoVerScheme/standard_deviceitem.cpp @@ -1,14 +1,62 @@ #include "standard_deviceitem.h" #include "ui_standard_deviceitem.h" +#include "InfoBase.h" +#include "QMessageBox" Standard_DeviceItem::Standard_DeviceItem(QWidget *parent) : - QWidget(parent), + InfoBase(parent), ui(new Ui::Standard_DeviceItem) { ui->setupUi(this); + this->initForm(); } Standard_DeviceItem::~Standard_DeviceItem() { delete ui; } +void Standard_DeviceItem::initForm() +{ + //tableWidget设置 + //设置控件的边框显示 + ui->tableWidget->setStyleSheet("QHeaderView::section {" + "border: 1px solid rgba(197, 196, 196, 1);" + "border-left:none;" + "border-top:none;" + "background-color:white;" + "}"); + + ui->tableWidget->setRowCount(10); // 设置10行 + ui->tableWidget->setColumnCount(6); // 设置11列 + ui->tableWidget->setColumnWidth(0, 80); // 设置第一列的宽度为100像素 + ui->tableWidget->verticalHeader()->setParent(nullptr); //隐藏行头 + QTableWidgetItem *item = new QTableWidgetItem("测试数据"); + item->setTextAlignment(Qt::AlignCenter); + ui->tableWidget->setItem(0, 0, item); //设置数据 + + //初始化TableWidget 设置列 + QStringList headers; + headers << "序号" << "设备名称" << "型号规则" << "出厂编号" + << "生产厂家" <<"操作"; + ui->tableWidget->setHorizontalHeaderLabels(headers); +} +void Standard_DeviceItem::ShowMessageBox(QString title,QString value) { + // 创建一个QMessageBox对象 + QMessageBox msgBox; + + // 设置消息框的标题 + msgBox.setWindowTitle(title); + + // 设置消息框的文本内容 + msgBox.setText(value); + + // 设置消息框的标准按钮,这里是“确定”按钮 + msgBox.setStandardButtons(QMessageBox::Ok); + + // 显示消息框 + msgBox.exec(); +} +void Standard_DeviceItem::Load() +{ + //ShowMessageBox("标准管理","标准管理初始化完成"); +} diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro index 1280b70..dfb0418 100644 --- a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro @@ -22,6 +22,7 @@ checkmethodmanage.cpp \ checkwindow.cpp \ create_task.cpp \ + datasyncview.cpp \ depar_task.cpp \ indexwindow.cpp \ infomanageview.cpp \ @@ -43,6 +44,7 @@ checkmethodmanage.h \ checkwindow.h \ create_task.h \ + datasyncview.h \ depar_task.h \ indexwindow.h \ infomanageview.h \ @@ -62,6 +64,7 @@ checkmethodmanage.ui \ checkwindow.ui \ create_task.ui \ + datasyncview.ui \ depar_task.ui \ indexwindow.ui \ infomanageview.ui \ diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user index 6ea03c5..93c39cb 100644 --- a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user @@ -1,10 +1,10 @@ - + EnvironmentId - {2746248a-b112-4e0f-9ae0-9e61f2a42309} + {c08df58c-84a7-4965-bca6-e98789474efa} ProjectExplorer.Project.ActiveTarget @@ -71,7 +71,7 @@ 0 0 - D:/dev/QT/AutoCalHainan/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug true @@ -119,7 +119,7 @@ 2 - D:/dev/QT/AutoCalHainan/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Release + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Release true @@ -167,7 +167,7 @@ 0 - D:/dev/QT/AutoCalHainan/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Profile + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Profile true @@ -287,8 +287,8 @@ 2 - Qt4ProjectManager.Qt4RunConfiguration:D:/dev/QT/AutoCalHainan/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro - D:/dev/QT/AutoCalHainan/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro + Qt4ProjectManager.Qt4RunConfiguration:C:/Users/admin/Desktop/SVN/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro + C:/Users/admin/Desktop/SVN/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro false @@ -299,7 +299,7 @@ false true - D:/dev/QT/AutoCalHainan/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug 1 @@ -314,7 +314,7 @@ 0 0 - D:/dev/QT/AutoCalHainan/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Debug + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Debug true @@ -362,7 +362,7 @@ 2 - D:/dev/QT/AutoCalHainan/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Release + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Release true @@ -410,7 +410,7 @@ 0 - D:/dev/QT/AutoCalHainan/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Profile + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Profile true @@ -530,14 +530,15 @@ 2 - - ProjectExplorer.CustomExecutableRunConfiguration - + AutoVerScheme2 + 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 diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user.c08df58 b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user.c08df58 deleted file mode 100644 index 495f95c..0000000 --- a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user.c08df58 +++ /dev/null @@ -1,563 +0,0 @@ - - - - - - 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 32-bit - Desktop Qt 5.14.2 MinGW 32-bit - qt.qt5.5142.win32_mingw73_kit - 0 - 0 - 0 - - D:/Auto_verification_scheme/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 - - - D:/Auto_verification_scheme/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 - - - D:/Auto_verification_scheme/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 - - D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug - - 1 - - - - ProjectExplorer.Project.Target.1 - - 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 - - D:/Auto_verification_scheme/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 - - - D:/Auto_verification_scheme/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 - - - D:/Auto_verification_scheme/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 - - AutoVerScheme2 - 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/InfoBase.h b/softwareDirectory/AutoVerScheme/InfoBase.h index 7fec63e..084cf3f 100644 --- a/softwareDirectory/AutoVerScheme/InfoBase.h +++ b/softwareDirectory/AutoVerScheme/InfoBase.h @@ -2,6 +2,7 @@ #define INFOBASE_H #include +#include "QStandardItemModel" ///信号管理页面的基类 所有信息管理页面都继承于InfoBase /// 便于统一管理 所有子类必须实现Load方法 /// 每次按钮点击切换都会调用Load方法 用于每次页面的数据刷新 @@ -11,6 +12,8 @@ InfoBase(QWidget *parent = nullptr): QWidget(parent){}; // 纯虚函数 virtual void Load()=0; + //QStandardItemModel 的实例。这个模型将用于存储和管理数据。 + QStandardItemModel *model; }; #endif // INFOBASE_H diff --git a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.cpp b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.cpp index 7ac1e87..ffb2bbc 100644 --- a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.cpp +++ b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.cpp @@ -1,14 +1,64 @@ #include "beexamined_deviceitem.h" #include "ui_beexamined_deviceitem.h" +#include "QMessageBox.h" BeExamined_DeviceItem::BeExamined_DeviceItem(QWidget *parent) : - QWidget(parent), + InfoBase(parent), ui(new Ui::BeExamined_DeviceItem) { ui->setupUi(this); + this->initForm(); } BeExamined_DeviceItem::~BeExamined_DeviceItem() { delete ui; } + +void BeExamined_DeviceItem::initForm() +{ + + //tableWidget设置 + //设置控件的边框显示 + ui->tableWidget->setStyleSheet("QHeaderView::section {" + "border: 1px solid rgba(197, 196, 196, 1);" + "border-left:none;" + "border-top:none;" + "background-color:white;" + "}"); + + ui->tableWidget->setRowCount(10); // 设置10行 + ui->tableWidget->setColumnCount(12); // 设置11列 + ui->tableWidget->setColumnWidth(0, 80); // 设置第一列的宽度为100像素 + ui->tableWidget->verticalHeader()->setParent(nullptr); //隐藏行头 + QTableWidgetItem *item = new QTableWidgetItem("测试数据"); + item->setTextAlignment(Qt::AlignCenter); + ui->tableWidget->setItem(0, 0, item); //设置数据 + + //初始化TableWidget 设置列 + QStringList headers; + headers << "序号" << "设备名称" << "型号规则" << "辅助字段" << "出厂编号" + << "生产厂家"<<"所在单位" <<"使用部门"<<"计量标识"<<"检定周期"<<"证书有效期"<<"操作"; + ui->tableWidget->setHorizontalHeaderLabels(headers); + +} +void BeExamined_DeviceItem::ShowMessageBox(QString title,QString value) { + // 创建一个QMessageBox对象 + QMessageBox msgBox; + + // 设置消息框的标题 + msgBox.setWindowTitle(title); + + // 设置消息框的文本内容 + msgBox.setText(value); + + // 设置消息框的标准按钮,这里是“确定”按钮 + msgBox.setStandardButtons(QMessageBox::Ok); + + // 显示消息框 + msgBox.exec(); +} +void BeExamined_DeviceItem::Load() +{ + //ShowMessageBox("被检设备","被检设备初始化完成"); +} diff --git a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.h b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.h index 76b061d..ae46979 100644 --- a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.h +++ b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.h @@ -2,12 +2,13 @@ #define BEEXAMINED_DEVICEITEM_H #include +#include "InfoBase.h" namespace Ui { class BeExamined_DeviceItem; } -class BeExamined_DeviceItem : public QWidget +class BeExamined_DeviceItem : public InfoBase { Q_OBJECT @@ -15,6 +16,11 @@ explicit BeExamined_DeviceItem(QWidget *parent = nullptr); ~BeExamined_DeviceItem(); +private slots: + void initForm(); //初始化界面数据 + void ShowMessageBox(QString title,QString value); + //继承父类的Load方法 + void Load() override; private: Ui::BeExamined_DeviceItem *ui; }; diff --git a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.ui b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.ui index af9f7bf..5a0a3c9 100644 --- a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.ui +++ b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.ui @@ -6,26 +6,236 @@ 0 0 - 400 - 300 + 1291 + 575 Form - - - - 130 - 140 - 89 - 24 - - - - 被检设备管理 - - + + + + + + 0 + 0 + + + + background-color:white; + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 设备名称: + + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 型号规则: + + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 出厂编号: + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 生产厂家: + + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 使用部门: + + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 使用单位: + + + + + + + + + + Qt::Horizontal + + + QSizePolicy::Expanding + + + + 40 + 20 + + + + + + + + Qt::RightToLeft + + + 查询 + + + + + + + Qt::RightToLeft + + + 重置 + + + + + + + + + + background-color:white; + + + + + + + + + + + + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/create_task.cpp b/softwareDirectory/AutoVerScheme/create_task.cpp index 4193efc..9b49a1a 100644 --- a/softwareDirectory/AutoVerScheme/create_task.cpp +++ b/softwareDirectory/AutoVerScheme/create_task.cpp @@ -1,14 +1,61 @@ #include "create_task.h" #include "ui_create_task.h" +#include "QMessageBox" Create_Task::Create_Task(QWidget *parent) : - QWidget(parent), + InfoBase(parent), ui(new Ui::Create_Task) { ui->setupUi(this); + this->initForm(); } Create_Task::~Create_Task() { delete ui; } +void Create_Task::initForm() +{ + //tableWidget设置 + //设置控件的边框显示 + ui->tableWidget->setStyleSheet("QHeaderView::section {" + "border: 1px solid rgba(197, 196, 196, 1);" + "border-left:none;" + "border-top:none;" + "background-color:white;" + "}"); + + ui->tableWidget->setRowCount(10); // 设置10行 + ui->tableWidget->setColumnCount(8); // 设置11列 + ui->tableWidget->setColumnWidth(0, 80); // 设置第一列的宽度为100像素 + ui->tableWidget->verticalHeader()->setParent(nullptr); //隐藏行头 + QTableWidgetItem *item = new QTableWidgetItem("测试数据"); + item->setTextAlignment(Qt::AlignCenter); + ui->tableWidget->setItem(0, 0, item); //设置数据 + + //初始化TableWidget 设置列 + QStringList headers; + headers << "序号" << "任务单编号" << "委托方"<< "使用部门" << "要求检完时间" << "送检人"<<"是否加急"<<"操作"; + ui->tableWidget->setHorizontalHeaderLabels(headers); + //ShowMessageBox("标题","初始化完成"); +} +void Create_Task::ShowMessageBox(QString title,QString value) { + // 创建一个QMessageBox对象 + QMessageBox msgBox; + + // 设置消息框的标题 + msgBox.setWindowTitle(title); + + // 设置消息框的文本内容 + msgBox.setText(value); + + // 设置消息框的标准按钮,这里是“确定”按钮 + msgBox.setStandardButtons(QMessageBox::Ok); + + // 显示消息框 + msgBox.exec(); +} +void Create_Task::Load() +{ + //ShowMessageBox("创建任务界面","创建任务界面初始化完成"); +} diff --git a/softwareDirectory/AutoVerScheme/create_task.h b/softwareDirectory/AutoVerScheme/create_task.h index e2264de..7cf383f 100644 --- a/softwareDirectory/AutoVerScheme/create_task.h +++ b/softwareDirectory/AutoVerScheme/create_task.h @@ -1,13 +1,14 @@ #ifndef CREATE_TASK_H #define CREATE_TASK_H +#include "InfoBase.h" #include namespace Ui { class Create_Task; } -class Create_Task : public QWidget +class Create_Task : public InfoBase { Q_OBJECT @@ -15,6 +16,11 @@ explicit Create_Task(QWidget *parent = nullptr); ~Create_Task(); +private slots: + void initForm(); //初始化界面数据 + void ShowMessageBox(QString title,QString value); + //继承父类的Load方法 + void Load() override; private: Ui::Create_Task *ui; }; diff --git a/softwareDirectory/AutoVerScheme/create_task.ui b/softwareDirectory/AutoVerScheme/create_task.ui index b79c6a1..d9d88ed 100644 --- a/softwareDirectory/AutoVerScheme/create_task.ui +++ b/softwareDirectory/AutoVerScheme/create_task.ui @@ -6,29 +6,294 @@ 0 0 - 400 - 300 + 1184 + 580 Form - - background-color:red; + + Qt::LeftToRight - - - - 140 - 120 - 89 - 24 - - - - 创建任务单 - - + + + + + + + + + 0 + 0 + + + + background-color:white; + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 任务单编号: + + + + + + + + 0 + 0 + + + + + + + + + 0 + 0 + + + + + 50 + 0 + + + + 委托方: + + + + + + + + 0 + 0 + + + + + 0 + 0 + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 使用部门: + + + + + + + + 0 + 0 + + + + + 0 + 0 + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 要求完成时间: + + + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + 0 + 30 + + + + Qt::RightToLeft + + + background-color:rgb(3, 58, 132); +color:white; + + + + 查询 + + + + + + + + 0 + 30 + + + + Qt::RightToLeft + + + background-color:rgb(207, 132, 33); +color:white; + + + + 重置 + + + + + + + + + + background-color:white; + + + + + + + 6 + + + 9 + + + 9 + + + 9 + + + + + + 0 + 0 + + + + + 120 + 40 + + + + OpenHandCursor + + + Qt::DefaultContextMenu + + + Qt::RightToLeft + + + false + + + background-color:rgb(9, 89, 179); +color:white; + + + 创建任务单 + + + true + + + + + + + + + + + + + + SizeVerCursor + + + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/datasyncview.cpp b/softwareDirectory/AutoVerScheme/datasyncview.cpp new file mode 100644 index 0000000..74cd41d --- /dev/null +++ b/softwareDirectory/AutoVerScheme/datasyncview.cpp @@ -0,0 +1,44 @@ +#include "datasyncview.h" +#include "ui_datasyncview.h" + +DataSyncView::DataSyncView(QWidget *parent) : + QWidget(parent), + ui(new Ui::DataSyncView) +{ + ui->setupUi(this); + this->initForm(); +} + +DataSyncView::~DataSyncView() +{ + delete ui; +} +void DataSyncView::initForm() +{ + //tableWidget设置 + //设置控件的边框显示 + ui->tableWidget->setStyleSheet("QHeaderView::section {" + "border: 1px solid grey;" + "border-left:none;" + "border-top:none;" + "background-color:white;" + " color:black;" + "font: bold 18px Arial, sans-serif;" + "}"); + + ui->tableWidget->setRowCount(10); // 设置10行 + ui->tableWidget->setColumnCount(4); // 设置11列 + ui->tableWidget->setColumnWidth(0, 80); // 设置第一列的宽度为100像素 + ui->tableWidget->verticalHeader()->setParent(nullptr); //隐藏行头 + QTableWidgetItem *item = new QTableWidgetItem("测试数据"); + item->setTextAlignment(Qt::AlignCenter); + ui->tableWidget->setItem(0, 0, item); //设置数据 + + //初始化TableWidget 设置列 + QStringList headers; + headers << "序号" << "同步时间" << "是否同步成功" << "备注" ; + ui->tableWidget->setHorizontalHeaderLabels(headers); + + + +} diff --git a/softwareDirectory/AutoVerScheme/datasyncview.h b/softwareDirectory/AutoVerScheme/datasyncview.h new file mode 100644 index 0000000..9a73de9 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/datasyncview.h @@ -0,0 +1,24 @@ +#ifndef DATASYNCVIEW_H +#define DATASYNCVIEW_H + +#include + +namespace Ui { +class DataSyncView; +} + +class DataSyncView : public QWidget +{ + Q_OBJECT + +public: + explicit DataSyncView(QWidget *parent = nullptr); + ~DataSyncView(); +private slots: + void initForm(); //初始化界面数据 + +private: + Ui::DataSyncView *ui; +}; + +#endif // DATASYNCVIEW_H diff --git a/softwareDirectory/AutoVerScheme/datasyncview.ui b/softwareDirectory/AutoVerScheme/datasyncview.ui new file mode 100644 index 0000000..c45bf56 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/datasyncview.ui @@ -0,0 +1,133 @@ + + + DataSyncView + + + + 0 + 0 + 874 + 531 + + + + 数据同步 + + + background-color:rgba(240, 240, 240, 1); + + + + + + background-color:white; + + + + + + + + + + 0 + 0 + + + + background-color:white; +border:0; + + + + + + + + + + 0 + 0 + + + + font:bold 20px Arial, sans-serif; +color:#334582; + + + 同步记录 + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + background-color:#334582; + font: bold 18px Arial, sans-serif; +color:white; +padding:10px; + + + 下载数据 + + + + + + + + 200 + 0 + + + + + 100 + 40 + + + + Qt::RightToLeft + + + background-color:#334582; + font: bold 18px Arial, sans-serif; +color:white; +padding:10px; + + + 发送同步请求 + + + + + + + + + + + + + + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/depar_task.cpp b/softwareDirectory/AutoVerScheme/depar_task.cpp index de39775..5f0f93a 100644 --- a/softwareDirectory/AutoVerScheme/depar_task.cpp +++ b/softwareDirectory/AutoVerScheme/depar_task.cpp @@ -2,13 +2,19 @@ #include "ui_depar_task.h" #include "QMessageBox" #include "InfoBase.h" +#include "QStandardItemModel" Depar_Task::Depar_Task(QWidget *parent) : InfoBase(parent), ui(new Ui::Depar_Task) { ui->setupUi(this); + //初始化列表 this->initForm(); + + + + } Depar_Task::~Depar_Task() @@ -17,8 +23,31 @@ } void Depar_Task::initForm() { + //tableWidget设置 + //设置控件的边框显示 + ui->tableWidget->setStyleSheet("QHeaderView::section {" + "border: 1px solid rgba(197, 196, 196, 1);" + "border-left:none;" + "border-top:none;" + "background-color:white;" + "}"); - //ShowMessageBox("标题","初始化完成"); + ui->tableWidget->setRowCount(10); // 设置10行 + ui->tableWidget->setColumnCount(10); // 设置11列 + ui->tableWidget->setColumnWidth(0, 80); // 设置第一列的宽度为100像素 + ui->tableWidget->verticalHeader()->setParent(nullptr); //隐藏行头 + QTableWidgetItem *item = new QTableWidgetItem("测试数据"); + item->setTextAlignment(Qt::AlignCenter); //文件居中 + ui->tableWidget->setItem(0, 0, item); //设置数据 + + //初始化TableWidget 设置列 + QStringList headers; + headers << "序号" << "设备名称" << "型号规则" << "辅助字段" << "辅助字段"<< "出厂编号" + << "生产厂家" <<"委托方"<<"使用部门"<<"要求检完时间"<<"是否加急"; + ui->tableWidget->setHorizontalHeaderLabels(headers); + + + } void Depar_Task::ShowMessageBox(QString title,QString value) { // 创建一个QMessageBox对象 @@ -38,5 +67,5 @@ } void Depar_Task::Load() { - ShowMessageBox("部门任务页面","部门任务初始化完成"); + //ShowMessageBox("部门任务页面","部门任务初始化完成"); } diff --git a/softwareDirectory/AutoVerScheme/depar_task.h b/softwareDirectory/AutoVerScheme/depar_task.h index 8716faf..110008d 100644 --- a/softwareDirectory/AutoVerScheme/depar_task.h +++ b/softwareDirectory/AutoVerScheme/depar_task.h @@ -3,6 +3,7 @@ #include "InfoBase.h" +#include "QStandardItemModel" namespace Ui { class Depar_Task; @@ -20,9 +21,12 @@ private slots: void initForm(); //初始化界面数据 void ShowMessageBox(QString title,QString value); + //继承父类的Load方法 void Load() override; + private: Ui::Depar_Task *ui; + // QStandardItemModel *model; }; #endif // DEPAR_TASK_H diff --git a/softwareDirectory/AutoVerScheme/depar_task.ui b/softwareDirectory/AutoVerScheme/depar_task.ui index ff3d44f..1a95cc4 100644 --- a/softwareDirectory/AutoVerScheme/depar_task.ui +++ b/softwareDirectory/AutoVerScheme/depar_task.ui @@ -6,7 +6,7 @@ 0 0 - 1184 + 1190 456 @@ -143,7 +143,34 @@ + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + 0 + 30 + + + + Qt::RightToLeft + + + background-color:rgb(3, 58, 152); +color:white; + + 查询 @@ -151,6 +178,20 @@ + + + 0 + 30 + + + + Qt::RightToLeft + + + background-color:rgb(207, 132, 33); +color:white; + + 重置 @@ -168,8 +209,15 @@ + + + - + + + + + diff --git a/softwareDirectory/AutoVerScheme/indexwindow.cpp b/softwareDirectory/AutoVerScheme/indexwindow.cpp index fca900a..cbba812 100644 --- a/softwareDirectory/AutoVerScheme/indexwindow.cpp +++ b/softwareDirectory/AutoVerScheme/indexwindow.cpp @@ -13,11 +13,37 @@ { ui->setupUi(this); this->initForm(); +/* + //主要作用 当页面关闭后 回到indexwindow页面 并 通过~IndexWindow 释放此页面指针所占用内存 + // 假设 ShowDataSyncView 是一个指向 DataSyncView 实例的指针 + // 当 ShowDataSyncView 关闭时,它的 closed() 信号会被发出 + // 连接这个信号到 IndexWindow 的 onNewWindowClosed() 槽函数 + if(ShowDataSyncView) { + //数据同步页面 信号槽 + connect(ShowDataSyncView, &DataSyncView::close, this, &IndexWindow::onNewWindowClosed); + } + if(ShowInfoManageView) { + //信息管理 信号槽 + connect(ShowInfoManageView, &InfoManageView::close, this, &IndexWindow::onNewWindowClosed); + } + */ } IndexWindow::~IndexWindow() { delete ui; + //释放页面内存 + /* + if (ShowDataSyncView) { + ShowDataSyncView->close(); + delete ShowDataSyncView; + } + else if(ShowInfoManageView) + { + ShowInfoManageView->close(); + delete ShowInfoManageView; + } + */ } void IndexWindow::initForm() { @@ -57,6 +83,15 @@ } + +void IndexWindow::onNewWindowClosed() +{ + // 新窗体关闭后,设置 IndexWindow 为活动窗口 + this->activateWindow(); + // 也可以设置焦点到 MainWindow 中的某个控件 + // ui->someWidget->setFocus(); +} + void IndexWindow::showCheckWindow() { CheckWindow *checkWindow = new CheckWindow; @@ -65,6 +100,26 @@ checkWindow->show(); } +//信息管理按钮 +void IndexWindow::on_tb3_clicked() +{ + InfoManageView *ShowInfoManageView = new InfoManageView(); + ShowInfoManageView->setWindowState(Qt::WindowMaximized); + ShowInfoManageView->setWindowModality(Qt::ApplicationModal); + ShowInfoManageView->show(); +} +//数据同步按钮 +void IndexWindow::on_tb6_clicked() +{ + + // 创建新窗体实例并显示 + DataSyncView *ShowDataSyncView = new DataSyncView(); + ShowDataSyncView->setWindowState(Qt::WindowMaximized); + ShowDataSyncView->setWindowModality(Qt::ApplicationModal); + ShowDataSyncView->show(); +} + + void IndexWindow::showCheckMethod() { CheckMethodManage *checkWindow = new CheckMethodManage; diff --git a/softwareDirectory/AutoVerScheme/indexwindow.h b/softwareDirectory/AutoVerScheme/indexwindow.h index a05d802..190b0f1 100644 --- a/softwareDirectory/AutoVerScheme/indexwindow.h +++ b/softwareDirectory/AutoVerScheme/indexwindow.h @@ -2,6 +2,8 @@ #define INDEXWINDOW_H #include +#include "datasyncView.h" +#include "infomanageview.h" namespace Ui { class IndexWindow; @@ -23,8 +25,21 @@ void showVerifyMethod(); + void on_tb3_clicked(); + + void on_tb6_clicked(); + + //页面关闭响应函数 + void onNewWindowClosed(); + + void on_tb1_clicked(); + private: Ui::IndexWindow *ui; + + //数据同步页面 指针 + //DataSyncView *ShowDataSyncView; + //InfoManageView *ShowInfoManageView; }; #endif // INDEXWINDOW_H diff --git a/softwareDirectory/AutoVerScheme/indexwindow.ui b/softwareDirectory/AutoVerScheme/indexwindow.ui index d69a54d..dec7207 100644 --- a/softwareDirectory/AutoVerScheme/indexwindow.ui +++ b/softwareDirectory/AutoVerScheme/indexwindow.ui @@ -189,7 +189,7 @@ - + 0 @@ -236,7 +236,7 @@ - + 0 @@ -270,7 +270,7 @@ - + 0 @@ -310,7 +310,7 @@ - + 0 @@ -357,7 +357,7 @@ - + 0 @@ -423,7 +423,7 @@ - + 0 @@ -521,66 +521,34 @@ - toolButton_4 + tb1 clicked() IndexWindow showCheckWindow() - 214 - 250 + 260 + 276 - 351 - 107 + 666 + 394 - toolButton_6 + tb4 clicked() IndexWindow showCheckMethod() - 249 - 606 + 260 + 598 - 331 - 452 - - - - - toolButton_5 - clicked() - IndexWindow - showVerifyMethod() - - - 706 - 589 - - - 692 - 442 - - - - - toolButton_2 - clicked() - IndexWindow - showVerifyWindow() - - - 758 - 249 - - - 862 - 114 + 666 + 394 diff --git a/softwareDirectory/AutoVerScheme/infomanageview.cpp b/softwareDirectory/AutoVerScheme/infomanageview.cpp index a206c6f..d045c60 100644 --- a/softwareDirectory/AutoVerScheme/infomanageview.cpp +++ b/softwareDirectory/AutoVerScheme/infomanageview.cpp @@ -2,6 +2,7 @@ #include "ui_infomanageview.h" #include #include +#include //子窗体 #include "depar_task.h" #include "my_task.h" @@ -19,6 +20,7 @@ { ui->setupUi(this); this->setWindowTitle("信息管理"); + //初始化调用所有函数 this->initForm(); this->initWidget(); @@ -115,7 +117,8 @@ //底部加个弹簧 QSpacerItem *verticalSpacer = new QSpacerItem(20, 40, QSizePolicy::Minimum, QSizePolicy::Expanding); ui->widgetLeft->layout()->addItem(verticalSpacer); - btns.at(names.count() - 1)->click(); + + btns.at(0)->click();//选择启动页面 第一个 } //按钮点击切换UI事件 void InfoManageView::buttonClicked() diff --git a/softwareDirectory/AutoVerScheme/infomanageview.h b/softwareDirectory/AutoVerScheme/infomanageview.h index 3c1463f..5e44bba 100644 --- a/softwareDirectory/AutoVerScheme/infomanageview.h +++ b/softwareDirectory/AutoVerScheme/infomanageview.h @@ -2,6 +2,7 @@ #define INFOMANAGEVIEW_H #include +#include class QAbstractButton; diff --git a/softwareDirectory/AutoVerScheme/infomanageview.ui b/softwareDirectory/AutoVerScheme/infomanageview.ui index 4b39e7d..ef0b87b 100644 --- a/softwareDirectory/AutoVerScheme/infomanageview.ui +++ b/softwareDirectory/AutoVerScheme/infomanageview.ui @@ -10,8 +10,15 @@ 644 + + Qt::DefaultContextMenu + - Form + 信息管理 + + + color:black; +background-color:rgba(240, 240, 240, 1); @@ -68,8 +75,8 @@ - - 170 + + 0 0 diff --git a/softwareDirectory/AutoVerScheme/inspectdataitem.cpp b/softwareDirectory/AutoVerScheme/inspectdataitem.cpp index e9c2adc..efc00ba 100644 --- a/softwareDirectory/AutoVerScheme/inspectdataitem.cpp +++ b/softwareDirectory/AutoVerScheme/inspectdataitem.cpp @@ -1,14 +1,62 @@ #include "inspectdataitem.h" #include "ui_inspectdataitem.h" +#include "QMessageBox.h" InspectDataItem::InspectDataItem(QWidget *parent) : - QWidget(parent), + InfoBase(parent), ui(new Ui::InspectDataItem) { ui->setupUi(this); + this->initForm(); } InspectDataItem::~InspectDataItem() { delete ui; } +void InspectDataItem::initForm() +{ + //tableWidget设置 + //设置控件的边框显示 + ui->tableWidget->setStyleSheet("QHeaderView::section {" + "border: 1px solid rgba(197, 196, 196, 1);" + "border-left:none;" + "border-top:none;" + "background-color:white;" + "}"); + + ui->tableWidget->setRowCount(10); // 设置10行 + ui->tableWidget->setColumnCount(12); // 设置11列 + ui->tableWidget->setColumnWidth(0, 80); // 设置第一列的宽度为100像素 + ui->tableWidget->verticalHeader()->setParent(nullptr); //隐藏行头 + QTableWidgetItem *item = new QTableWidgetItem("测试数据"); + item->setTextAlignment(Qt::AlignCenter); + ui->tableWidget->setItem(0, 0, item); //设置数据 + + //初始化TableWidget 设置列 + QStringList headers; + headers << "序号" << "设备名称" << "型号规则" << "出厂编号" + <<"核查件名称"<<"核查件型号"<<"核查件编号" <<"核查员" + << "核查日期" <<"实验室"<<"部门"<<"操作"; + ui->tableWidget->setHorizontalHeaderLabels(headers); +} +void InspectDataItem::ShowMessageBox(QString title,QString value) { + // 创建一个QMessageBox对象 + QMessageBox msgBox; + + // 设置消息框的标题 + msgBox.setWindowTitle(title); + + // 设置消息框的文本内容 + msgBox.setText(value); + + // 设置消息框的标准按钮,这里是“确定”按钮 + msgBox.setStandardButtons(QMessageBox::Ok); + + // 显示消息框 + msgBox.exec(); +} +void InspectDataItem::Load() +{ + //ShowMessageBox("核查数据","核查数据"); +} diff --git a/softwareDirectory/AutoVerScheme/inspectdataitem.h b/softwareDirectory/AutoVerScheme/inspectdataitem.h index 57551bb..bdf7066 100644 --- a/softwareDirectory/AutoVerScheme/inspectdataitem.h +++ b/softwareDirectory/AutoVerScheme/inspectdataitem.h @@ -2,19 +2,24 @@ #define INSPECTDATAITEM_H #include +#include "InfoBase.h" namespace Ui { class InspectDataItem; } -class InspectDataItem : public QWidget +class InspectDataItem : public InfoBase { Q_OBJECT public: explicit InspectDataItem(QWidget *parent = nullptr); ~InspectDataItem(); - +private slots: + void initForm(); //初始化界面数据 + void ShowMessageBox(QString title,QString value); + //继承父类的Load方法 + void Load() override; private: Ui::InspectDataItem *ui; }; diff --git a/softwareDirectory/AutoVerScheme/inspectdataitem.ui b/softwareDirectory/AutoVerScheme/inspectdataitem.ui index 45f04e0..86786c9 100644 --- a/softwareDirectory/AutoVerScheme/inspectdataitem.ui +++ b/softwareDirectory/AutoVerScheme/inspectdataitem.ui @@ -6,26 +6,236 @@ 0 0 - 400 - 300 + 1362 + 543 Form - - - - 120 - 130 - 89 - 24 - - - - 核查数据管理 - - + + + + + + 0 + 0 + + + + background-color:white; + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 设备名称: + + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 型号规则: + + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 出厂编号: + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 核查员: + + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 核查日期: + + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 实验室: + + + + + + + + + + Qt::Horizontal + + + QSizePolicy::Expanding + + + + 40 + 20 + + + + + + + + Qt::RightToLeft + + + 查询 + + + + + + + Qt::RightToLeft + + + 重置 + + + + + + + + + + background-color:white; + + + + + + + + + + + + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/my_task.cpp b/softwareDirectory/AutoVerScheme/my_task.cpp index 40aceb2..559a73b 100644 --- a/softwareDirectory/AutoVerScheme/my_task.cpp +++ b/softwareDirectory/AutoVerScheme/my_task.cpp @@ -7,7 +7,8 @@ ui(new Ui::My_Task) { ui->setupUi(this); - + //初始化QStandardItemModel + model=new QStandardItemModel(parent); this->initForm(); } @@ -17,7 +18,28 @@ } void My_Task::initForm() { + //tableWidget设置 + //设置控件的边框显示 + ui->tableWidget->setStyleSheet("QHeaderView::section {" + "border: 1px solid rgba(197, 196, 196, 1);" + "border-left:none;" + "border-top:none;" + "background-color:white;" + "}"); + ui->tableWidget->setRowCount(10); // 设置10行 + ui->tableWidget->setColumnCount(10); // 设置11列 + ui->tableWidget->setColumnWidth(0, 80); // 设置第一列的宽度为100像素 + ui->tableWidget->verticalHeader()->setParent(nullptr); //隐藏行头 + QTableWidgetItem *item = new QTableWidgetItem("测试数据"); + item->setTextAlignment(Qt::AlignCenter); + ui->tableWidget->setItem(0, 0, item); //设置数据 + + //初始化TableWidget 设置列 + QStringList headers; + headers << "序号" << "设备名称" << "型号规则" << "辅助字段" << "辅助字段"<< "出厂编号" + << "生产厂家" <<"委托方"<<"使用部门"<<"要求检完时间"<<"是否加急"; + ui->tableWidget->setHorizontalHeaderLabels(headers); } void My_Task::ShowMessageBox(QString title,QString value) { @@ -38,5 +60,5 @@ } void My_Task::Load() { - ShowMessageBox("我的任务页面","我的任务初始化完成"); + //ShowMessageBox("我的任务页面","我的任务初始化完成"); } diff --git a/softwareDirectory/AutoVerScheme/my_task.ui b/softwareDirectory/AutoVerScheme/my_task.ui index 89245b8..a078840 100644 --- a/softwareDirectory/AutoVerScheme/my_task.ui +++ b/softwareDirectory/AutoVerScheme/my_task.ui @@ -6,8 +6,8 @@ 0 0 - 857 - 511 + 1190 + 577 @@ -140,7 +140,23 @@ + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + Qt::RightToLeft + 查询 @@ -148,6 +164,9 @@ + + Qt::RightToLeft + 重置 @@ -166,7 +185,14 @@ - + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/res/qss/Index.css b/softwareDirectory/AutoVerScheme/res/qss/Index.css index 8fad195..d2ba43e 100644 --- a/softwareDirectory/AutoVerScheme/res/qss/Index.css +++ b/softwareDirectory/AutoVerScheme/res/qss/Index.css @@ -1,18 +1,25 @@ -*{ - -color:black; -font: 18pt 微软雅黑; - -} -QMainWindow +QMainWindow#IndexWindow { background-image: url(:/image/Index/u15.png); background-color:white; } -QToolButton:hover{ +QToolButton#tb1:hover{ background-image: url(:/image/Index/u26_mouseOver.svg); } -QToolButton{ +QToolButton#tb2:hover{ + background-image: url(:/image/Index/u26_mouseOver.svg); +} +QToolButton#tb3:hover{ + background-image: url(:/image/Index/u26_mouseOver.svg); +}QToolButton#tb4:hover{ +background-image: url(:/image/Index/u26_mouseOver.svg); +}QToolButton#tb5:hover{ +background-image: url(:/image/Index/u26_mouseOver.svg); +} +QToolButton#tb6:hover{ + background-image: url(:/image/Index/u26_mouseOver.svg); +} +QToolButton#tb1{ color: white; background-image: url(:/image/Index/u26.svg); font-weight: bold; @@ -20,4 +27,52 @@ text-align: center; margin:10; margin-right: 180px; +font: 18pt 微软雅黑; +} +QToolButton#tb2{ +color: white; +background-image: url(:/image/Index/u26.svg); +font-weight: bold; +border-radius: 5px; +text-align: center; +margin:10; +margin-right: 180px; +font: 18pt 微软雅黑; +} +QToolButton#tb3{ +color: white; +background-image: url(:/image/Index/u26.svg); +font-weight: bold; +border-radius: 5px; +text-align: center; +margin:10; +margin-right: 180px; +font: 18pt 微软雅黑; +}QToolButton#tb4{ +color: white; +background-image: url(:/image/Index/u26.svg); +font-weight: bold; +border-radius: 5px; +text-align: center; +margin:10; +margin-right: 180px; +font: 18pt 微软雅黑; +}QToolButton#tb5{ +color: white; +background-image: url(:/image/Index/u26.svg); +font-weight: bold; +border-radius: 5px; +text-align: center; +margin:10; +margin-right: 180px; +font: 18pt 微软雅黑; +}QToolButton#tb6{ +color: white; +background-image: url(:/image/Index/u26.svg); +font-weight: bold; +border-radius: 5px; +text-align: center; +margin:10; +margin-right: 180px; +font: 18pt 微软雅黑; } diff --git a/softwareDirectory/AutoVerScheme/rulefileitem.cpp b/softwareDirectory/AutoVerScheme/rulefileitem.cpp index 6f9ddd3..095165e 100644 --- a/softwareDirectory/AutoVerScheme/rulefileitem.cpp +++ b/softwareDirectory/AutoVerScheme/rulefileitem.cpp @@ -1,14 +1,63 @@ #include "rulefileitem.h" #include "ui_rulefileitem.h" +#include "QMessageBox" + RuleFileItem::RuleFileItem(QWidget *parent) : - QWidget(parent), + InfoBase(parent), ui(new Ui::RuleFileItem) { ui->setupUi(this); + this->initForm(); } RuleFileItem::~RuleFileItem() { delete ui; } +void RuleFileItem::initForm() +{ + + //tableWidget设置 + //设置控件的边框显示 + ui->tableWidget->setStyleSheet("QHeaderView::section {" + "border: 1px solid rgba(197, 196, 196, 1);" + "border-left:none;" + "border-top:none;" + "background-color:white;" + "}"); + + ui->tableWidget->setRowCount(10); // 设置10行 + ui->tableWidget->setColumnCount(9); // 设置11列 + ui->tableWidget->setColumnWidth(0, 80); // 设置第一列的宽度为100像素 + ui->tableWidget->verticalHeader()->setParent(nullptr); //隐藏行头 + QTableWidgetItem *item = new QTableWidgetItem("测试数据"); + item->setTextAlignment(Qt::AlignCenter); + ui->tableWidget->setItem(0, 0, item); //设置数据 + + //初始化TableWidget 设置列 + QStringList headers; + headers << "序号" << "文件号" << "文件名称" << "版本号" << "文件类型"<< "颁布时间" + << "实施时间" <<"备注"<<"操作"; + ui->tableWidget->setHorizontalHeaderLabels(headers); +} +void RuleFileItem::ShowMessageBox(QString title,QString value) { + // 创建一个QMessageBox对象 + QMessageBox msgBox; + + // 设置消息框的标题 + msgBox.setWindowTitle(title); + + // 设置消息框的文本内容 + msgBox.setText(value); + + // 设置消息框的标准按钮,这里是“确定”按钮 + msgBox.setStandardButtons(QMessageBox::Ok); + + // 显示消息框 + msgBox.exec(); +} +void RuleFileItem::Load() +{ + //ShowMessageBox("技术文件","技术文件初始化完成"); +} diff --git a/softwareDirectory/AutoVerScheme/rulefileitem.h b/softwareDirectory/AutoVerScheme/rulefileitem.h index 1fc81a1..d892a71 100644 --- a/softwareDirectory/AutoVerScheme/rulefileitem.h +++ b/softwareDirectory/AutoVerScheme/rulefileitem.h @@ -2,19 +2,24 @@ #define RULEFILEITEM_H #include +#include "InfoBase.h" namespace Ui { class RuleFileItem; } -class RuleFileItem : public QWidget +class RuleFileItem : public InfoBase { Q_OBJECT public: explicit RuleFileItem(QWidget *parent = nullptr); ~RuleFileItem(); - +private slots: + void initForm(); //初始化界面数据 + void ShowMessageBox(QString title,QString value); + //继承父类的Load方法 + void Load() override; private: Ui::RuleFileItem *ui; }; diff --git a/softwareDirectory/AutoVerScheme/rulefileitem.ui b/softwareDirectory/AutoVerScheme/rulefileitem.ui index 599e025..9144b96 100644 --- a/softwareDirectory/AutoVerScheme/rulefileitem.ui +++ b/softwareDirectory/AutoVerScheme/rulefileitem.ui @@ -6,26 +6,149 @@ 0 0 - 400 - 300 + 918 + 582 Form - - - - 140 - 130 - 121 - 24 - - - - 规程文件管理 - - + + + + + + 0 + 0 + + + + background-color:white; + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 文件号: + + + + + + + + 0 + 0 + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 文件名称: + + + + + + + + 0 + 0 + + + + + + + + Qt::Horizontal + + + QSizePolicy::Expanding + + + + 40 + 20 + + + + + + + + Qt::RightToLeft + + + 查询 + + + + + + + Qt::RightToLeft + + + 重置 + + + + + + + + + + background-color:white; + + + + + + + + + + + + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/standard_deviceitem.cpp b/softwareDirectory/AutoVerScheme/standard_deviceitem.cpp index ed15b0a..d1a6a80 100644 --- a/softwareDirectory/AutoVerScheme/standard_deviceitem.cpp +++ b/softwareDirectory/AutoVerScheme/standard_deviceitem.cpp @@ -1,14 +1,62 @@ #include "standard_deviceitem.h" #include "ui_standard_deviceitem.h" +#include "InfoBase.h" +#include "QMessageBox" Standard_DeviceItem::Standard_DeviceItem(QWidget *parent) : - QWidget(parent), + InfoBase(parent), ui(new Ui::Standard_DeviceItem) { ui->setupUi(this); + this->initForm(); } Standard_DeviceItem::~Standard_DeviceItem() { delete ui; } +void Standard_DeviceItem::initForm() +{ + //tableWidget设置 + //设置控件的边框显示 + ui->tableWidget->setStyleSheet("QHeaderView::section {" + "border: 1px solid rgba(197, 196, 196, 1);" + "border-left:none;" + "border-top:none;" + "background-color:white;" + "}"); + + ui->tableWidget->setRowCount(10); // 设置10行 + ui->tableWidget->setColumnCount(6); // 设置11列 + ui->tableWidget->setColumnWidth(0, 80); // 设置第一列的宽度为100像素 + ui->tableWidget->verticalHeader()->setParent(nullptr); //隐藏行头 + QTableWidgetItem *item = new QTableWidgetItem("测试数据"); + item->setTextAlignment(Qt::AlignCenter); + ui->tableWidget->setItem(0, 0, item); //设置数据 + + //初始化TableWidget 设置列 + QStringList headers; + headers << "序号" << "设备名称" << "型号规则" << "出厂编号" + << "生产厂家" <<"操作"; + ui->tableWidget->setHorizontalHeaderLabels(headers); +} +void Standard_DeviceItem::ShowMessageBox(QString title,QString value) { + // 创建一个QMessageBox对象 + QMessageBox msgBox; + + // 设置消息框的标题 + msgBox.setWindowTitle(title); + + // 设置消息框的文本内容 + msgBox.setText(value); + + // 设置消息框的标准按钮,这里是“确定”按钮 + msgBox.setStandardButtons(QMessageBox::Ok); + + // 显示消息框 + msgBox.exec(); +} +void Standard_DeviceItem::Load() +{ + //ShowMessageBox("标准管理","标准管理初始化完成"); +} diff --git a/softwareDirectory/AutoVerScheme/standard_deviceitem.h b/softwareDirectory/AutoVerScheme/standard_deviceitem.h index 198c362..97f5d2b 100644 --- a/softwareDirectory/AutoVerScheme/standard_deviceitem.h +++ b/softwareDirectory/AutoVerScheme/standard_deviceitem.h @@ -2,19 +2,24 @@ #define STANDARD_DEVICEITEM_H #include +#include "InfoBase.h" namespace Ui { class Standard_DeviceItem; } -class Standard_DeviceItem : public QWidget +class Standard_DeviceItem : public InfoBase { Q_OBJECT public: explicit Standard_DeviceItem(QWidget *parent = nullptr); ~Standard_DeviceItem(); - +private slots: + void initForm(); //初始化界面数据 + void ShowMessageBox(QString title,QString value); + //继承父类的Load方法 + void Load() override; private: Ui::Standard_DeviceItem *ui; }; diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro index 1280b70..dfb0418 100644 --- a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro @@ -22,6 +22,7 @@ checkmethodmanage.cpp \ checkwindow.cpp \ create_task.cpp \ + datasyncview.cpp \ depar_task.cpp \ indexwindow.cpp \ infomanageview.cpp \ @@ -43,6 +44,7 @@ checkmethodmanage.h \ checkwindow.h \ create_task.h \ + datasyncview.h \ depar_task.h \ indexwindow.h \ infomanageview.h \ @@ -62,6 +64,7 @@ checkmethodmanage.ui \ checkwindow.ui \ create_task.ui \ + datasyncview.ui \ depar_task.ui \ indexwindow.ui \ infomanageview.ui \ diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user index 6ea03c5..93c39cb 100644 --- a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user @@ -1,10 +1,10 @@ - + EnvironmentId - {2746248a-b112-4e0f-9ae0-9e61f2a42309} + {c08df58c-84a7-4965-bca6-e98789474efa} ProjectExplorer.Project.ActiveTarget @@ -71,7 +71,7 @@ 0 0 - D:/dev/QT/AutoCalHainan/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug true @@ -119,7 +119,7 @@ 2 - D:/dev/QT/AutoCalHainan/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Release + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Release true @@ -167,7 +167,7 @@ 0 - D:/dev/QT/AutoCalHainan/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Profile + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Profile true @@ -287,8 +287,8 @@ 2 - Qt4ProjectManager.Qt4RunConfiguration:D:/dev/QT/AutoCalHainan/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro - D:/dev/QT/AutoCalHainan/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro + Qt4ProjectManager.Qt4RunConfiguration:C:/Users/admin/Desktop/SVN/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro + C:/Users/admin/Desktop/SVN/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro false @@ -299,7 +299,7 @@ false true - D:/dev/QT/AutoCalHainan/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug 1 @@ -314,7 +314,7 @@ 0 0 - D:/dev/QT/AutoCalHainan/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Debug + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Debug true @@ -362,7 +362,7 @@ 2 - D:/dev/QT/AutoCalHainan/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Release + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Release true @@ -410,7 +410,7 @@ 0 - D:/dev/QT/AutoCalHainan/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Profile + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Profile true @@ -530,14 +530,15 @@ 2 - - ProjectExplorer.CustomExecutableRunConfiguration - + AutoVerScheme2 + 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 diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user.c08df58 b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user.c08df58 deleted file mode 100644 index 495f95c..0000000 --- a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user.c08df58 +++ /dev/null @@ -1,563 +0,0 @@ - - - - - - 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 32-bit - Desktop Qt 5.14.2 MinGW 32-bit - qt.qt5.5142.win32_mingw73_kit - 0 - 0 - 0 - - D:/Auto_verification_scheme/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 - - - D:/Auto_verification_scheme/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 - - - D:/Auto_verification_scheme/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 - - D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug - - 1 - - - - ProjectExplorer.Project.Target.1 - - 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 - - D:/Auto_verification_scheme/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 - - - D:/Auto_verification_scheme/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 - - - D:/Auto_verification_scheme/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 - - AutoVerScheme2 - 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/InfoBase.h b/softwareDirectory/AutoVerScheme/InfoBase.h index 7fec63e..084cf3f 100644 --- a/softwareDirectory/AutoVerScheme/InfoBase.h +++ b/softwareDirectory/AutoVerScheme/InfoBase.h @@ -2,6 +2,7 @@ #define INFOBASE_H #include +#include "QStandardItemModel" ///信号管理页面的基类 所有信息管理页面都继承于InfoBase /// 便于统一管理 所有子类必须实现Load方法 /// 每次按钮点击切换都会调用Load方法 用于每次页面的数据刷新 @@ -11,6 +12,8 @@ InfoBase(QWidget *parent = nullptr): QWidget(parent){}; // 纯虚函数 virtual void Load()=0; + //QStandardItemModel 的实例。这个模型将用于存储和管理数据。 + QStandardItemModel *model; }; #endif // INFOBASE_H diff --git a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.cpp b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.cpp index 7ac1e87..ffb2bbc 100644 --- a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.cpp +++ b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.cpp @@ -1,14 +1,64 @@ #include "beexamined_deviceitem.h" #include "ui_beexamined_deviceitem.h" +#include "QMessageBox.h" BeExamined_DeviceItem::BeExamined_DeviceItem(QWidget *parent) : - QWidget(parent), + InfoBase(parent), ui(new Ui::BeExamined_DeviceItem) { ui->setupUi(this); + this->initForm(); } BeExamined_DeviceItem::~BeExamined_DeviceItem() { delete ui; } + +void BeExamined_DeviceItem::initForm() +{ + + //tableWidget设置 + //设置控件的边框显示 + ui->tableWidget->setStyleSheet("QHeaderView::section {" + "border: 1px solid rgba(197, 196, 196, 1);" + "border-left:none;" + "border-top:none;" + "background-color:white;" + "}"); + + ui->tableWidget->setRowCount(10); // 设置10行 + ui->tableWidget->setColumnCount(12); // 设置11列 + ui->tableWidget->setColumnWidth(0, 80); // 设置第一列的宽度为100像素 + ui->tableWidget->verticalHeader()->setParent(nullptr); //隐藏行头 + QTableWidgetItem *item = new QTableWidgetItem("测试数据"); + item->setTextAlignment(Qt::AlignCenter); + ui->tableWidget->setItem(0, 0, item); //设置数据 + + //初始化TableWidget 设置列 + QStringList headers; + headers << "序号" << "设备名称" << "型号规则" << "辅助字段" << "出厂编号" + << "生产厂家"<<"所在单位" <<"使用部门"<<"计量标识"<<"检定周期"<<"证书有效期"<<"操作"; + ui->tableWidget->setHorizontalHeaderLabels(headers); + +} +void BeExamined_DeviceItem::ShowMessageBox(QString title,QString value) { + // 创建一个QMessageBox对象 + QMessageBox msgBox; + + // 设置消息框的标题 + msgBox.setWindowTitle(title); + + // 设置消息框的文本内容 + msgBox.setText(value); + + // 设置消息框的标准按钮,这里是“确定”按钮 + msgBox.setStandardButtons(QMessageBox::Ok); + + // 显示消息框 + msgBox.exec(); +} +void BeExamined_DeviceItem::Load() +{ + //ShowMessageBox("被检设备","被检设备初始化完成"); +} diff --git a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.h b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.h index 76b061d..ae46979 100644 --- a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.h +++ b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.h @@ -2,12 +2,13 @@ #define BEEXAMINED_DEVICEITEM_H #include +#include "InfoBase.h" namespace Ui { class BeExamined_DeviceItem; } -class BeExamined_DeviceItem : public QWidget +class BeExamined_DeviceItem : public InfoBase { Q_OBJECT @@ -15,6 +16,11 @@ explicit BeExamined_DeviceItem(QWidget *parent = nullptr); ~BeExamined_DeviceItem(); +private slots: + void initForm(); //初始化界面数据 + void ShowMessageBox(QString title,QString value); + //继承父类的Load方法 + void Load() override; private: Ui::BeExamined_DeviceItem *ui; }; diff --git a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.ui b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.ui index af9f7bf..5a0a3c9 100644 --- a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.ui +++ b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.ui @@ -6,26 +6,236 @@ 0 0 - 400 - 300 + 1291 + 575 Form - - - - 130 - 140 - 89 - 24 - - - - 被检设备管理 - - + + + + + + 0 + 0 + + + + background-color:white; + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 设备名称: + + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 型号规则: + + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 出厂编号: + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 生产厂家: + + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 使用部门: + + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 使用单位: + + + + + + + + + + Qt::Horizontal + + + QSizePolicy::Expanding + + + + 40 + 20 + + + + + + + + Qt::RightToLeft + + + 查询 + + + + + + + Qt::RightToLeft + + + 重置 + + + + + + + + + + background-color:white; + + + + + + + + + + + + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/create_task.cpp b/softwareDirectory/AutoVerScheme/create_task.cpp index 4193efc..9b49a1a 100644 --- a/softwareDirectory/AutoVerScheme/create_task.cpp +++ b/softwareDirectory/AutoVerScheme/create_task.cpp @@ -1,14 +1,61 @@ #include "create_task.h" #include "ui_create_task.h" +#include "QMessageBox" Create_Task::Create_Task(QWidget *parent) : - QWidget(parent), + InfoBase(parent), ui(new Ui::Create_Task) { ui->setupUi(this); + this->initForm(); } Create_Task::~Create_Task() { delete ui; } +void Create_Task::initForm() +{ + //tableWidget设置 + //设置控件的边框显示 + ui->tableWidget->setStyleSheet("QHeaderView::section {" + "border: 1px solid rgba(197, 196, 196, 1);" + "border-left:none;" + "border-top:none;" + "background-color:white;" + "}"); + + ui->tableWidget->setRowCount(10); // 设置10行 + ui->tableWidget->setColumnCount(8); // 设置11列 + ui->tableWidget->setColumnWidth(0, 80); // 设置第一列的宽度为100像素 + ui->tableWidget->verticalHeader()->setParent(nullptr); //隐藏行头 + QTableWidgetItem *item = new QTableWidgetItem("测试数据"); + item->setTextAlignment(Qt::AlignCenter); + ui->tableWidget->setItem(0, 0, item); //设置数据 + + //初始化TableWidget 设置列 + QStringList headers; + headers << "序号" << "任务单编号" << "委托方"<< "使用部门" << "要求检完时间" << "送检人"<<"是否加急"<<"操作"; + ui->tableWidget->setHorizontalHeaderLabels(headers); + //ShowMessageBox("标题","初始化完成"); +} +void Create_Task::ShowMessageBox(QString title,QString value) { + // 创建一个QMessageBox对象 + QMessageBox msgBox; + + // 设置消息框的标题 + msgBox.setWindowTitle(title); + + // 设置消息框的文本内容 + msgBox.setText(value); + + // 设置消息框的标准按钮,这里是“确定”按钮 + msgBox.setStandardButtons(QMessageBox::Ok); + + // 显示消息框 + msgBox.exec(); +} +void Create_Task::Load() +{ + //ShowMessageBox("创建任务界面","创建任务界面初始化完成"); +} diff --git a/softwareDirectory/AutoVerScheme/create_task.h b/softwareDirectory/AutoVerScheme/create_task.h index e2264de..7cf383f 100644 --- a/softwareDirectory/AutoVerScheme/create_task.h +++ b/softwareDirectory/AutoVerScheme/create_task.h @@ -1,13 +1,14 @@ #ifndef CREATE_TASK_H #define CREATE_TASK_H +#include "InfoBase.h" #include namespace Ui { class Create_Task; } -class Create_Task : public QWidget +class Create_Task : public InfoBase { Q_OBJECT @@ -15,6 +16,11 @@ explicit Create_Task(QWidget *parent = nullptr); ~Create_Task(); +private slots: + void initForm(); //初始化界面数据 + void ShowMessageBox(QString title,QString value); + //继承父类的Load方法 + void Load() override; private: Ui::Create_Task *ui; }; diff --git a/softwareDirectory/AutoVerScheme/create_task.ui b/softwareDirectory/AutoVerScheme/create_task.ui index b79c6a1..d9d88ed 100644 --- a/softwareDirectory/AutoVerScheme/create_task.ui +++ b/softwareDirectory/AutoVerScheme/create_task.ui @@ -6,29 +6,294 @@ 0 0 - 400 - 300 + 1184 + 580 Form - - background-color:red; + + Qt::LeftToRight - - - - 140 - 120 - 89 - 24 - - - - 创建任务单 - - + + + + + + + + + 0 + 0 + + + + background-color:white; + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 任务单编号: + + + + + + + + 0 + 0 + + + + + + + + + 0 + 0 + + + + + 50 + 0 + + + + 委托方: + + + + + + + + 0 + 0 + + + + + 0 + 0 + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 使用部门: + + + + + + + + 0 + 0 + + + + + 0 + 0 + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 要求完成时间: + + + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + 0 + 30 + + + + Qt::RightToLeft + + + background-color:rgb(3, 58, 132); +color:white; + + + + 查询 + + + + + + + + 0 + 30 + + + + Qt::RightToLeft + + + background-color:rgb(207, 132, 33); +color:white; + + + + 重置 + + + + + + + + + + background-color:white; + + + + + + + 6 + + + 9 + + + 9 + + + 9 + + + + + + 0 + 0 + + + + + 120 + 40 + + + + OpenHandCursor + + + Qt::DefaultContextMenu + + + Qt::RightToLeft + + + false + + + background-color:rgb(9, 89, 179); +color:white; + + + 创建任务单 + + + true + + + + + + + + + + + + + + SizeVerCursor + + + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/datasyncview.cpp b/softwareDirectory/AutoVerScheme/datasyncview.cpp new file mode 100644 index 0000000..74cd41d --- /dev/null +++ b/softwareDirectory/AutoVerScheme/datasyncview.cpp @@ -0,0 +1,44 @@ +#include "datasyncview.h" +#include "ui_datasyncview.h" + +DataSyncView::DataSyncView(QWidget *parent) : + QWidget(parent), + ui(new Ui::DataSyncView) +{ + ui->setupUi(this); + this->initForm(); +} + +DataSyncView::~DataSyncView() +{ + delete ui; +} +void DataSyncView::initForm() +{ + //tableWidget设置 + //设置控件的边框显示 + ui->tableWidget->setStyleSheet("QHeaderView::section {" + "border: 1px solid grey;" + "border-left:none;" + "border-top:none;" + "background-color:white;" + " color:black;" + "font: bold 18px Arial, sans-serif;" + "}"); + + ui->tableWidget->setRowCount(10); // 设置10行 + ui->tableWidget->setColumnCount(4); // 设置11列 + ui->tableWidget->setColumnWidth(0, 80); // 设置第一列的宽度为100像素 + ui->tableWidget->verticalHeader()->setParent(nullptr); //隐藏行头 + QTableWidgetItem *item = new QTableWidgetItem("测试数据"); + item->setTextAlignment(Qt::AlignCenter); + ui->tableWidget->setItem(0, 0, item); //设置数据 + + //初始化TableWidget 设置列 + QStringList headers; + headers << "序号" << "同步时间" << "是否同步成功" << "备注" ; + ui->tableWidget->setHorizontalHeaderLabels(headers); + + + +} diff --git a/softwareDirectory/AutoVerScheme/datasyncview.h b/softwareDirectory/AutoVerScheme/datasyncview.h new file mode 100644 index 0000000..9a73de9 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/datasyncview.h @@ -0,0 +1,24 @@ +#ifndef DATASYNCVIEW_H +#define DATASYNCVIEW_H + +#include + +namespace Ui { +class DataSyncView; +} + +class DataSyncView : public QWidget +{ + Q_OBJECT + +public: + explicit DataSyncView(QWidget *parent = nullptr); + ~DataSyncView(); +private slots: + void initForm(); //初始化界面数据 + +private: + Ui::DataSyncView *ui; +}; + +#endif // DATASYNCVIEW_H diff --git a/softwareDirectory/AutoVerScheme/datasyncview.ui b/softwareDirectory/AutoVerScheme/datasyncview.ui new file mode 100644 index 0000000..c45bf56 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/datasyncview.ui @@ -0,0 +1,133 @@ + + + DataSyncView + + + + 0 + 0 + 874 + 531 + + + + 数据同步 + + + background-color:rgba(240, 240, 240, 1); + + + + + + background-color:white; + + + + + + + + + + 0 + 0 + + + + background-color:white; +border:0; + + + + + + + + + + 0 + 0 + + + + font:bold 20px Arial, sans-serif; +color:#334582; + + + 同步记录 + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + background-color:#334582; + font: bold 18px Arial, sans-serif; +color:white; +padding:10px; + + + 下载数据 + + + + + + + + 200 + 0 + + + + + 100 + 40 + + + + Qt::RightToLeft + + + background-color:#334582; + font: bold 18px Arial, sans-serif; +color:white; +padding:10px; + + + 发送同步请求 + + + + + + + + + + + + + + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/depar_task.cpp b/softwareDirectory/AutoVerScheme/depar_task.cpp index de39775..5f0f93a 100644 --- a/softwareDirectory/AutoVerScheme/depar_task.cpp +++ b/softwareDirectory/AutoVerScheme/depar_task.cpp @@ -2,13 +2,19 @@ #include "ui_depar_task.h" #include "QMessageBox" #include "InfoBase.h" +#include "QStandardItemModel" Depar_Task::Depar_Task(QWidget *parent) : InfoBase(parent), ui(new Ui::Depar_Task) { ui->setupUi(this); + //初始化列表 this->initForm(); + + + + } Depar_Task::~Depar_Task() @@ -17,8 +23,31 @@ } void Depar_Task::initForm() { + //tableWidget设置 + //设置控件的边框显示 + ui->tableWidget->setStyleSheet("QHeaderView::section {" + "border: 1px solid rgba(197, 196, 196, 1);" + "border-left:none;" + "border-top:none;" + "background-color:white;" + "}"); - //ShowMessageBox("标题","初始化完成"); + ui->tableWidget->setRowCount(10); // 设置10行 + ui->tableWidget->setColumnCount(10); // 设置11列 + ui->tableWidget->setColumnWidth(0, 80); // 设置第一列的宽度为100像素 + ui->tableWidget->verticalHeader()->setParent(nullptr); //隐藏行头 + QTableWidgetItem *item = new QTableWidgetItem("测试数据"); + item->setTextAlignment(Qt::AlignCenter); //文件居中 + ui->tableWidget->setItem(0, 0, item); //设置数据 + + //初始化TableWidget 设置列 + QStringList headers; + headers << "序号" << "设备名称" << "型号规则" << "辅助字段" << "辅助字段"<< "出厂编号" + << "生产厂家" <<"委托方"<<"使用部门"<<"要求检完时间"<<"是否加急"; + ui->tableWidget->setHorizontalHeaderLabels(headers); + + + } void Depar_Task::ShowMessageBox(QString title,QString value) { // 创建一个QMessageBox对象 @@ -38,5 +67,5 @@ } void Depar_Task::Load() { - ShowMessageBox("部门任务页面","部门任务初始化完成"); + //ShowMessageBox("部门任务页面","部门任务初始化完成"); } diff --git a/softwareDirectory/AutoVerScheme/depar_task.h b/softwareDirectory/AutoVerScheme/depar_task.h index 8716faf..110008d 100644 --- a/softwareDirectory/AutoVerScheme/depar_task.h +++ b/softwareDirectory/AutoVerScheme/depar_task.h @@ -3,6 +3,7 @@ #include "InfoBase.h" +#include "QStandardItemModel" namespace Ui { class Depar_Task; @@ -20,9 +21,12 @@ private slots: void initForm(); //初始化界面数据 void ShowMessageBox(QString title,QString value); + //继承父类的Load方法 void Load() override; + private: Ui::Depar_Task *ui; + // QStandardItemModel *model; }; #endif // DEPAR_TASK_H diff --git a/softwareDirectory/AutoVerScheme/depar_task.ui b/softwareDirectory/AutoVerScheme/depar_task.ui index ff3d44f..1a95cc4 100644 --- a/softwareDirectory/AutoVerScheme/depar_task.ui +++ b/softwareDirectory/AutoVerScheme/depar_task.ui @@ -6,7 +6,7 @@ 0 0 - 1184 + 1190 456 @@ -143,7 +143,34 @@ + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + 0 + 30 + + + + Qt::RightToLeft + + + background-color:rgb(3, 58, 152); +color:white; + + 查询 @@ -151,6 +178,20 @@ + + + 0 + 30 + + + + Qt::RightToLeft + + + background-color:rgb(207, 132, 33); +color:white; + + 重置 @@ -168,8 +209,15 @@ + + + - + + + + + diff --git a/softwareDirectory/AutoVerScheme/indexwindow.cpp b/softwareDirectory/AutoVerScheme/indexwindow.cpp index fca900a..cbba812 100644 --- a/softwareDirectory/AutoVerScheme/indexwindow.cpp +++ b/softwareDirectory/AutoVerScheme/indexwindow.cpp @@ -13,11 +13,37 @@ { ui->setupUi(this); this->initForm(); +/* + //主要作用 当页面关闭后 回到indexwindow页面 并 通过~IndexWindow 释放此页面指针所占用内存 + // 假设 ShowDataSyncView 是一个指向 DataSyncView 实例的指针 + // 当 ShowDataSyncView 关闭时,它的 closed() 信号会被发出 + // 连接这个信号到 IndexWindow 的 onNewWindowClosed() 槽函数 + if(ShowDataSyncView) { + //数据同步页面 信号槽 + connect(ShowDataSyncView, &DataSyncView::close, this, &IndexWindow::onNewWindowClosed); + } + if(ShowInfoManageView) { + //信息管理 信号槽 + connect(ShowInfoManageView, &InfoManageView::close, this, &IndexWindow::onNewWindowClosed); + } + */ } IndexWindow::~IndexWindow() { delete ui; + //释放页面内存 + /* + if (ShowDataSyncView) { + ShowDataSyncView->close(); + delete ShowDataSyncView; + } + else if(ShowInfoManageView) + { + ShowInfoManageView->close(); + delete ShowInfoManageView; + } + */ } void IndexWindow::initForm() { @@ -57,6 +83,15 @@ } + +void IndexWindow::onNewWindowClosed() +{ + // 新窗体关闭后,设置 IndexWindow 为活动窗口 + this->activateWindow(); + // 也可以设置焦点到 MainWindow 中的某个控件 + // ui->someWidget->setFocus(); +} + void IndexWindow::showCheckWindow() { CheckWindow *checkWindow = new CheckWindow; @@ -65,6 +100,26 @@ checkWindow->show(); } +//信息管理按钮 +void IndexWindow::on_tb3_clicked() +{ + InfoManageView *ShowInfoManageView = new InfoManageView(); + ShowInfoManageView->setWindowState(Qt::WindowMaximized); + ShowInfoManageView->setWindowModality(Qt::ApplicationModal); + ShowInfoManageView->show(); +} +//数据同步按钮 +void IndexWindow::on_tb6_clicked() +{ + + // 创建新窗体实例并显示 + DataSyncView *ShowDataSyncView = new DataSyncView(); + ShowDataSyncView->setWindowState(Qt::WindowMaximized); + ShowDataSyncView->setWindowModality(Qt::ApplicationModal); + ShowDataSyncView->show(); +} + + void IndexWindow::showCheckMethod() { CheckMethodManage *checkWindow = new CheckMethodManage; diff --git a/softwareDirectory/AutoVerScheme/indexwindow.h b/softwareDirectory/AutoVerScheme/indexwindow.h index a05d802..190b0f1 100644 --- a/softwareDirectory/AutoVerScheme/indexwindow.h +++ b/softwareDirectory/AutoVerScheme/indexwindow.h @@ -2,6 +2,8 @@ #define INDEXWINDOW_H #include +#include "datasyncView.h" +#include "infomanageview.h" namespace Ui { class IndexWindow; @@ -23,8 +25,21 @@ void showVerifyMethod(); + void on_tb3_clicked(); + + void on_tb6_clicked(); + + //页面关闭响应函数 + void onNewWindowClosed(); + + void on_tb1_clicked(); + private: Ui::IndexWindow *ui; + + //数据同步页面 指针 + //DataSyncView *ShowDataSyncView; + //InfoManageView *ShowInfoManageView; }; #endif // INDEXWINDOW_H diff --git a/softwareDirectory/AutoVerScheme/indexwindow.ui b/softwareDirectory/AutoVerScheme/indexwindow.ui index d69a54d..dec7207 100644 --- a/softwareDirectory/AutoVerScheme/indexwindow.ui +++ b/softwareDirectory/AutoVerScheme/indexwindow.ui @@ -189,7 +189,7 @@ - + 0 @@ -236,7 +236,7 @@ - + 0 @@ -270,7 +270,7 @@ - + 0 @@ -310,7 +310,7 @@ - + 0 @@ -357,7 +357,7 @@ - + 0 @@ -423,7 +423,7 @@ - + 0 @@ -521,66 +521,34 @@ - toolButton_4 + tb1 clicked() IndexWindow showCheckWindow() - 214 - 250 + 260 + 276 - 351 - 107 + 666 + 394 - toolButton_6 + tb4 clicked() IndexWindow showCheckMethod() - 249 - 606 + 260 + 598 - 331 - 452 - - - - - toolButton_5 - clicked() - IndexWindow - showVerifyMethod() - - - 706 - 589 - - - 692 - 442 - - - - - toolButton_2 - clicked() - IndexWindow - showVerifyWindow() - - - 758 - 249 - - - 862 - 114 + 666 + 394 diff --git a/softwareDirectory/AutoVerScheme/infomanageview.cpp b/softwareDirectory/AutoVerScheme/infomanageview.cpp index a206c6f..d045c60 100644 --- a/softwareDirectory/AutoVerScheme/infomanageview.cpp +++ b/softwareDirectory/AutoVerScheme/infomanageview.cpp @@ -2,6 +2,7 @@ #include "ui_infomanageview.h" #include #include +#include //子窗体 #include "depar_task.h" #include "my_task.h" @@ -19,6 +20,7 @@ { ui->setupUi(this); this->setWindowTitle("信息管理"); + //初始化调用所有函数 this->initForm(); this->initWidget(); @@ -115,7 +117,8 @@ //底部加个弹簧 QSpacerItem *verticalSpacer = new QSpacerItem(20, 40, QSizePolicy::Minimum, QSizePolicy::Expanding); ui->widgetLeft->layout()->addItem(verticalSpacer); - btns.at(names.count() - 1)->click(); + + btns.at(0)->click();//选择启动页面 第一个 } //按钮点击切换UI事件 void InfoManageView::buttonClicked() diff --git a/softwareDirectory/AutoVerScheme/infomanageview.h b/softwareDirectory/AutoVerScheme/infomanageview.h index 3c1463f..5e44bba 100644 --- a/softwareDirectory/AutoVerScheme/infomanageview.h +++ b/softwareDirectory/AutoVerScheme/infomanageview.h @@ -2,6 +2,7 @@ #define INFOMANAGEVIEW_H #include +#include class QAbstractButton; diff --git a/softwareDirectory/AutoVerScheme/infomanageview.ui b/softwareDirectory/AutoVerScheme/infomanageview.ui index 4b39e7d..ef0b87b 100644 --- a/softwareDirectory/AutoVerScheme/infomanageview.ui +++ b/softwareDirectory/AutoVerScheme/infomanageview.ui @@ -10,8 +10,15 @@ 644 + + Qt::DefaultContextMenu + - Form + 信息管理 + + + color:black; +background-color:rgba(240, 240, 240, 1); @@ -68,8 +75,8 @@ - - 170 + + 0 0 diff --git a/softwareDirectory/AutoVerScheme/inspectdataitem.cpp b/softwareDirectory/AutoVerScheme/inspectdataitem.cpp index e9c2adc..efc00ba 100644 --- a/softwareDirectory/AutoVerScheme/inspectdataitem.cpp +++ b/softwareDirectory/AutoVerScheme/inspectdataitem.cpp @@ -1,14 +1,62 @@ #include "inspectdataitem.h" #include "ui_inspectdataitem.h" +#include "QMessageBox.h" InspectDataItem::InspectDataItem(QWidget *parent) : - QWidget(parent), + InfoBase(parent), ui(new Ui::InspectDataItem) { ui->setupUi(this); + this->initForm(); } InspectDataItem::~InspectDataItem() { delete ui; } +void InspectDataItem::initForm() +{ + //tableWidget设置 + //设置控件的边框显示 + ui->tableWidget->setStyleSheet("QHeaderView::section {" + "border: 1px solid rgba(197, 196, 196, 1);" + "border-left:none;" + "border-top:none;" + "background-color:white;" + "}"); + + ui->tableWidget->setRowCount(10); // 设置10行 + ui->tableWidget->setColumnCount(12); // 设置11列 + ui->tableWidget->setColumnWidth(0, 80); // 设置第一列的宽度为100像素 + ui->tableWidget->verticalHeader()->setParent(nullptr); //隐藏行头 + QTableWidgetItem *item = new QTableWidgetItem("测试数据"); + item->setTextAlignment(Qt::AlignCenter); + ui->tableWidget->setItem(0, 0, item); //设置数据 + + //初始化TableWidget 设置列 + QStringList headers; + headers << "序号" << "设备名称" << "型号规则" << "出厂编号" + <<"核查件名称"<<"核查件型号"<<"核查件编号" <<"核查员" + << "核查日期" <<"实验室"<<"部门"<<"操作"; + ui->tableWidget->setHorizontalHeaderLabels(headers); +} +void InspectDataItem::ShowMessageBox(QString title,QString value) { + // 创建一个QMessageBox对象 + QMessageBox msgBox; + + // 设置消息框的标题 + msgBox.setWindowTitle(title); + + // 设置消息框的文本内容 + msgBox.setText(value); + + // 设置消息框的标准按钮,这里是“确定”按钮 + msgBox.setStandardButtons(QMessageBox::Ok); + + // 显示消息框 + msgBox.exec(); +} +void InspectDataItem::Load() +{ + //ShowMessageBox("核查数据","核查数据"); +} diff --git a/softwareDirectory/AutoVerScheme/inspectdataitem.h b/softwareDirectory/AutoVerScheme/inspectdataitem.h index 57551bb..bdf7066 100644 --- a/softwareDirectory/AutoVerScheme/inspectdataitem.h +++ b/softwareDirectory/AutoVerScheme/inspectdataitem.h @@ -2,19 +2,24 @@ #define INSPECTDATAITEM_H #include +#include "InfoBase.h" namespace Ui { class InspectDataItem; } -class InspectDataItem : public QWidget +class InspectDataItem : public InfoBase { Q_OBJECT public: explicit InspectDataItem(QWidget *parent = nullptr); ~InspectDataItem(); - +private slots: + void initForm(); //初始化界面数据 + void ShowMessageBox(QString title,QString value); + //继承父类的Load方法 + void Load() override; private: Ui::InspectDataItem *ui; }; diff --git a/softwareDirectory/AutoVerScheme/inspectdataitem.ui b/softwareDirectory/AutoVerScheme/inspectdataitem.ui index 45f04e0..86786c9 100644 --- a/softwareDirectory/AutoVerScheme/inspectdataitem.ui +++ b/softwareDirectory/AutoVerScheme/inspectdataitem.ui @@ -6,26 +6,236 @@ 0 0 - 400 - 300 + 1362 + 543 Form - - - - 120 - 130 - 89 - 24 - - - - 核查数据管理 - - + + + + + + 0 + 0 + + + + background-color:white; + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 设备名称: + + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 型号规则: + + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 出厂编号: + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 核查员: + + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 核查日期: + + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 实验室: + + + + + + + + + + Qt::Horizontal + + + QSizePolicy::Expanding + + + + 40 + 20 + + + + + + + + Qt::RightToLeft + + + 查询 + + + + + + + Qt::RightToLeft + + + 重置 + + + + + + + + + + background-color:white; + + + + + + + + + + + + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/my_task.cpp b/softwareDirectory/AutoVerScheme/my_task.cpp index 40aceb2..559a73b 100644 --- a/softwareDirectory/AutoVerScheme/my_task.cpp +++ b/softwareDirectory/AutoVerScheme/my_task.cpp @@ -7,7 +7,8 @@ ui(new Ui::My_Task) { ui->setupUi(this); - + //初始化QStandardItemModel + model=new QStandardItemModel(parent); this->initForm(); } @@ -17,7 +18,28 @@ } void My_Task::initForm() { + //tableWidget设置 + //设置控件的边框显示 + ui->tableWidget->setStyleSheet("QHeaderView::section {" + "border: 1px solid rgba(197, 196, 196, 1);" + "border-left:none;" + "border-top:none;" + "background-color:white;" + "}"); + ui->tableWidget->setRowCount(10); // 设置10行 + ui->tableWidget->setColumnCount(10); // 设置11列 + ui->tableWidget->setColumnWidth(0, 80); // 设置第一列的宽度为100像素 + ui->tableWidget->verticalHeader()->setParent(nullptr); //隐藏行头 + QTableWidgetItem *item = new QTableWidgetItem("测试数据"); + item->setTextAlignment(Qt::AlignCenter); + ui->tableWidget->setItem(0, 0, item); //设置数据 + + //初始化TableWidget 设置列 + QStringList headers; + headers << "序号" << "设备名称" << "型号规则" << "辅助字段" << "辅助字段"<< "出厂编号" + << "生产厂家" <<"委托方"<<"使用部门"<<"要求检完时间"<<"是否加急"; + ui->tableWidget->setHorizontalHeaderLabels(headers); } void My_Task::ShowMessageBox(QString title,QString value) { @@ -38,5 +60,5 @@ } void My_Task::Load() { - ShowMessageBox("我的任务页面","我的任务初始化完成"); + //ShowMessageBox("我的任务页面","我的任务初始化完成"); } diff --git a/softwareDirectory/AutoVerScheme/my_task.ui b/softwareDirectory/AutoVerScheme/my_task.ui index 89245b8..a078840 100644 --- a/softwareDirectory/AutoVerScheme/my_task.ui +++ b/softwareDirectory/AutoVerScheme/my_task.ui @@ -6,8 +6,8 @@ 0 0 - 857 - 511 + 1190 + 577 @@ -140,7 +140,23 @@ + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + Qt::RightToLeft + 查询 @@ -148,6 +164,9 @@ + + Qt::RightToLeft + 重置 @@ -166,7 +185,14 @@ - + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/res/qss/Index.css b/softwareDirectory/AutoVerScheme/res/qss/Index.css index 8fad195..d2ba43e 100644 --- a/softwareDirectory/AutoVerScheme/res/qss/Index.css +++ b/softwareDirectory/AutoVerScheme/res/qss/Index.css @@ -1,18 +1,25 @@ -*{ - -color:black; -font: 18pt 微软雅黑; - -} -QMainWindow +QMainWindow#IndexWindow { background-image: url(:/image/Index/u15.png); background-color:white; } -QToolButton:hover{ +QToolButton#tb1:hover{ background-image: url(:/image/Index/u26_mouseOver.svg); } -QToolButton{ +QToolButton#tb2:hover{ + background-image: url(:/image/Index/u26_mouseOver.svg); +} +QToolButton#tb3:hover{ + background-image: url(:/image/Index/u26_mouseOver.svg); +}QToolButton#tb4:hover{ +background-image: url(:/image/Index/u26_mouseOver.svg); +}QToolButton#tb5:hover{ +background-image: url(:/image/Index/u26_mouseOver.svg); +} +QToolButton#tb6:hover{ + background-image: url(:/image/Index/u26_mouseOver.svg); +} +QToolButton#tb1{ color: white; background-image: url(:/image/Index/u26.svg); font-weight: bold; @@ -20,4 +27,52 @@ text-align: center; margin:10; margin-right: 180px; +font: 18pt 微软雅黑; +} +QToolButton#tb2{ +color: white; +background-image: url(:/image/Index/u26.svg); +font-weight: bold; +border-radius: 5px; +text-align: center; +margin:10; +margin-right: 180px; +font: 18pt 微软雅黑; +} +QToolButton#tb3{ +color: white; +background-image: url(:/image/Index/u26.svg); +font-weight: bold; +border-radius: 5px; +text-align: center; +margin:10; +margin-right: 180px; +font: 18pt 微软雅黑; +}QToolButton#tb4{ +color: white; +background-image: url(:/image/Index/u26.svg); +font-weight: bold; +border-radius: 5px; +text-align: center; +margin:10; +margin-right: 180px; +font: 18pt 微软雅黑; +}QToolButton#tb5{ +color: white; +background-image: url(:/image/Index/u26.svg); +font-weight: bold; +border-radius: 5px; +text-align: center; +margin:10; +margin-right: 180px; +font: 18pt 微软雅黑; +}QToolButton#tb6{ +color: white; +background-image: url(:/image/Index/u26.svg); +font-weight: bold; +border-radius: 5px; +text-align: center; +margin:10; +margin-right: 180px; +font: 18pt 微软雅黑; } diff --git a/softwareDirectory/AutoVerScheme/rulefileitem.cpp b/softwareDirectory/AutoVerScheme/rulefileitem.cpp index 6f9ddd3..095165e 100644 --- a/softwareDirectory/AutoVerScheme/rulefileitem.cpp +++ b/softwareDirectory/AutoVerScheme/rulefileitem.cpp @@ -1,14 +1,63 @@ #include "rulefileitem.h" #include "ui_rulefileitem.h" +#include "QMessageBox" + RuleFileItem::RuleFileItem(QWidget *parent) : - QWidget(parent), + InfoBase(parent), ui(new Ui::RuleFileItem) { ui->setupUi(this); + this->initForm(); } RuleFileItem::~RuleFileItem() { delete ui; } +void RuleFileItem::initForm() +{ + + //tableWidget设置 + //设置控件的边框显示 + ui->tableWidget->setStyleSheet("QHeaderView::section {" + "border: 1px solid rgba(197, 196, 196, 1);" + "border-left:none;" + "border-top:none;" + "background-color:white;" + "}"); + + ui->tableWidget->setRowCount(10); // 设置10行 + ui->tableWidget->setColumnCount(9); // 设置11列 + ui->tableWidget->setColumnWidth(0, 80); // 设置第一列的宽度为100像素 + ui->tableWidget->verticalHeader()->setParent(nullptr); //隐藏行头 + QTableWidgetItem *item = new QTableWidgetItem("测试数据"); + item->setTextAlignment(Qt::AlignCenter); + ui->tableWidget->setItem(0, 0, item); //设置数据 + + //初始化TableWidget 设置列 + QStringList headers; + headers << "序号" << "文件号" << "文件名称" << "版本号" << "文件类型"<< "颁布时间" + << "实施时间" <<"备注"<<"操作"; + ui->tableWidget->setHorizontalHeaderLabels(headers); +} +void RuleFileItem::ShowMessageBox(QString title,QString value) { + // 创建一个QMessageBox对象 + QMessageBox msgBox; + + // 设置消息框的标题 + msgBox.setWindowTitle(title); + + // 设置消息框的文本内容 + msgBox.setText(value); + + // 设置消息框的标准按钮,这里是“确定”按钮 + msgBox.setStandardButtons(QMessageBox::Ok); + + // 显示消息框 + msgBox.exec(); +} +void RuleFileItem::Load() +{ + //ShowMessageBox("技术文件","技术文件初始化完成"); +} diff --git a/softwareDirectory/AutoVerScheme/rulefileitem.h b/softwareDirectory/AutoVerScheme/rulefileitem.h index 1fc81a1..d892a71 100644 --- a/softwareDirectory/AutoVerScheme/rulefileitem.h +++ b/softwareDirectory/AutoVerScheme/rulefileitem.h @@ -2,19 +2,24 @@ #define RULEFILEITEM_H #include +#include "InfoBase.h" namespace Ui { class RuleFileItem; } -class RuleFileItem : public QWidget +class RuleFileItem : public InfoBase { Q_OBJECT public: explicit RuleFileItem(QWidget *parent = nullptr); ~RuleFileItem(); - +private slots: + void initForm(); //初始化界面数据 + void ShowMessageBox(QString title,QString value); + //继承父类的Load方法 + void Load() override; private: Ui::RuleFileItem *ui; }; diff --git a/softwareDirectory/AutoVerScheme/rulefileitem.ui b/softwareDirectory/AutoVerScheme/rulefileitem.ui index 599e025..9144b96 100644 --- a/softwareDirectory/AutoVerScheme/rulefileitem.ui +++ b/softwareDirectory/AutoVerScheme/rulefileitem.ui @@ -6,26 +6,149 @@ 0 0 - 400 - 300 + 918 + 582 Form - - - - 140 - 130 - 121 - 24 - - - - 规程文件管理 - - + + + + + + 0 + 0 + + + + background-color:white; + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 文件号: + + + + + + + + 0 + 0 + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 文件名称: + + + + + + + + 0 + 0 + + + + + + + + Qt::Horizontal + + + QSizePolicy::Expanding + + + + 40 + 20 + + + + + + + + Qt::RightToLeft + + + 查询 + + + + + + + Qt::RightToLeft + + + 重置 + + + + + + + + + + background-color:white; + + + + + + + + + + + + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/standard_deviceitem.cpp b/softwareDirectory/AutoVerScheme/standard_deviceitem.cpp index ed15b0a..d1a6a80 100644 --- a/softwareDirectory/AutoVerScheme/standard_deviceitem.cpp +++ b/softwareDirectory/AutoVerScheme/standard_deviceitem.cpp @@ -1,14 +1,62 @@ #include "standard_deviceitem.h" #include "ui_standard_deviceitem.h" +#include "InfoBase.h" +#include "QMessageBox" Standard_DeviceItem::Standard_DeviceItem(QWidget *parent) : - QWidget(parent), + InfoBase(parent), ui(new Ui::Standard_DeviceItem) { ui->setupUi(this); + this->initForm(); } Standard_DeviceItem::~Standard_DeviceItem() { delete ui; } +void Standard_DeviceItem::initForm() +{ + //tableWidget设置 + //设置控件的边框显示 + ui->tableWidget->setStyleSheet("QHeaderView::section {" + "border: 1px solid rgba(197, 196, 196, 1);" + "border-left:none;" + "border-top:none;" + "background-color:white;" + "}"); + + ui->tableWidget->setRowCount(10); // 设置10行 + ui->tableWidget->setColumnCount(6); // 设置11列 + ui->tableWidget->setColumnWidth(0, 80); // 设置第一列的宽度为100像素 + ui->tableWidget->verticalHeader()->setParent(nullptr); //隐藏行头 + QTableWidgetItem *item = new QTableWidgetItem("测试数据"); + item->setTextAlignment(Qt::AlignCenter); + ui->tableWidget->setItem(0, 0, item); //设置数据 + + //初始化TableWidget 设置列 + QStringList headers; + headers << "序号" << "设备名称" << "型号规则" << "出厂编号" + << "生产厂家" <<"操作"; + ui->tableWidget->setHorizontalHeaderLabels(headers); +} +void Standard_DeviceItem::ShowMessageBox(QString title,QString value) { + // 创建一个QMessageBox对象 + QMessageBox msgBox; + + // 设置消息框的标题 + msgBox.setWindowTitle(title); + + // 设置消息框的文本内容 + msgBox.setText(value); + + // 设置消息框的标准按钮,这里是“确定”按钮 + msgBox.setStandardButtons(QMessageBox::Ok); + + // 显示消息框 + msgBox.exec(); +} +void Standard_DeviceItem::Load() +{ + //ShowMessageBox("标准管理","标准管理初始化完成"); +} diff --git a/softwareDirectory/AutoVerScheme/standard_deviceitem.h b/softwareDirectory/AutoVerScheme/standard_deviceitem.h index 198c362..97f5d2b 100644 --- a/softwareDirectory/AutoVerScheme/standard_deviceitem.h +++ b/softwareDirectory/AutoVerScheme/standard_deviceitem.h @@ -2,19 +2,24 @@ #define STANDARD_DEVICEITEM_H #include +#include "InfoBase.h" namespace Ui { class Standard_DeviceItem; } -class Standard_DeviceItem : public QWidget +class Standard_DeviceItem : public InfoBase { Q_OBJECT public: explicit Standard_DeviceItem(QWidget *parent = nullptr); ~Standard_DeviceItem(); - +private slots: + void initForm(); //初始化界面数据 + void ShowMessageBox(QString title,QString value); + //继承父类的Load方法 + void Load() override; private: Ui::Standard_DeviceItem *ui; }; diff --git a/softwareDirectory/AutoVerScheme/standard_deviceitem.ui b/softwareDirectory/AutoVerScheme/standard_deviceitem.ui index 00070b7..7421175 100644 --- a/softwareDirectory/AutoVerScheme/standard_deviceitem.ui +++ b/softwareDirectory/AutoVerScheme/standard_deviceitem.ui @@ -6,26 +6,196 @@ 0 0 - 400 - 300 + 1184 + 624 Form - - - - 150 - 140 - 89 - 24 - - - - 标准设备管理 - - + + + + + + 0 + 0 + + + + background-color:white; + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 设备名称: + + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 型号规则: + + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 出厂编号: + + + + + + + + 0 + 0 + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 生产厂家: + + + + + + + + 180 + 0 + + + + + 200 + 0 + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + Qt::RightToLeft + + + 查询 + + + + + + + Qt::RightToLeft + + + 重置 + + + + + + + + + + background-color:white; + + + + + + + + + + + + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro index 1280b70..dfb0418 100644 --- a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro @@ -22,6 +22,7 @@ checkmethodmanage.cpp \ checkwindow.cpp \ create_task.cpp \ + datasyncview.cpp \ depar_task.cpp \ indexwindow.cpp \ infomanageview.cpp \ @@ -43,6 +44,7 @@ checkmethodmanage.h \ checkwindow.h \ create_task.h \ + datasyncview.h \ depar_task.h \ indexwindow.h \ infomanageview.h \ @@ -62,6 +64,7 @@ checkmethodmanage.ui \ checkwindow.ui \ create_task.ui \ + datasyncview.ui \ depar_task.ui \ indexwindow.ui \ infomanageview.ui \ diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user index 6ea03c5..93c39cb 100644 --- a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user @@ -1,10 +1,10 @@ - + EnvironmentId - {2746248a-b112-4e0f-9ae0-9e61f2a42309} + {c08df58c-84a7-4965-bca6-e98789474efa} ProjectExplorer.Project.ActiveTarget @@ -71,7 +71,7 @@ 0 0 - D:/dev/QT/AutoCalHainan/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug true @@ -119,7 +119,7 @@ 2 - D:/dev/QT/AutoCalHainan/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Release + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Release true @@ -167,7 +167,7 @@ 0 - D:/dev/QT/AutoCalHainan/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Profile + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Profile true @@ -287,8 +287,8 @@ 2 - Qt4ProjectManager.Qt4RunConfiguration:D:/dev/QT/AutoCalHainan/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro - D:/dev/QT/AutoCalHainan/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro + Qt4ProjectManager.Qt4RunConfiguration:C:/Users/admin/Desktop/SVN/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro + C:/Users/admin/Desktop/SVN/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro false @@ -299,7 +299,7 @@ false true - D:/dev/QT/AutoCalHainan/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug 1 @@ -314,7 +314,7 @@ 0 0 - D:/dev/QT/AutoCalHainan/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Debug + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Debug true @@ -362,7 +362,7 @@ 2 - D:/dev/QT/AutoCalHainan/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Release + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Release true @@ -410,7 +410,7 @@ 0 - D:/dev/QT/AutoCalHainan/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Profile + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Profile true @@ -530,14 +530,15 @@ 2 - - ProjectExplorer.CustomExecutableRunConfiguration - + AutoVerScheme2 + 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 diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user.c08df58 b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user.c08df58 deleted file mode 100644 index 495f95c..0000000 --- a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user.c08df58 +++ /dev/null @@ -1,563 +0,0 @@ - - - - - - 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 32-bit - Desktop Qt 5.14.2 MinGW 32-bit - qt.qt5.5142.win32_mingw73_kit - 0 - 0 - 0 - - D:/Auto_verification_scheme/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 - - - D:/Auto_verification_scheme/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 - - - D:/Auto_verification_scheme/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 - - D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug - - 1 - - - - ProjectExplorer.Project.Target.1 - - 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 - - D:/Auto_verification_scheme/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 - - - D:/Auto_verification_scheme/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 - - - D:/Auto_verification_scheme/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 - - AutoVerScheme2 - 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/InfoBase.h b/softwareDirectory/AutoVerScheme/InfoBase.h index 7fec63e..084cf3f 100644 --- a/softwareDirectory/AutoVerScheme/InfoBase.h +++ b/softwareDirectory/AutoVerScheme/InfoBase.h @@ -2,6 +2,7 @@ #define INFOBASE_H #include +#include "QStandardItemModel" ///信号管理页面的基类 所有信息管理页面都继承于InfoBase /// 便于统一管理 所有子类必须实现Load方法 /// 每次按钮点击切换都会调用Load方法 用于每次页面的数据刷新 @@ -11,6 +12,8 @@ InfoBase(QWidget *parent = nullptr): QWidget(parent){}; // 纯虚函数 virtual void Load()=0; + //QStandardItemModel 的实例。这个模型将用于存储和管理数据。 + QStandardItemModel *model; }; #endif // INFOBASE_H diff --git a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.cpp b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.cpp index 7ac1e87..ffb2bbc 100644 --- a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.cpp +++ b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.cpp @@ -1,14 +1,64 @@ #include "beexamined_deviceitem.h" #include "ui_beexamined_deviceitem.h" +#include "QMessageBox.h" BeExamined_DeviceItem::BeExamined_DeviceItem(QWidget *parent) : - QWidget(parent), + InfoBase(parent), ui(new Ui::BeExamined_DeviceItem) { ui->setupUi(this); + this->initForm(); } BeExamined_DeviceItem::~BeExamined_DeviceItem() { delete ui; } + +void BeExamined_DeviceItem::initForm() +{ + + //tableWidget设置 + //设置控件的边框显示 + ui->tableWidget->setStyleSheet("QHeaderView::section {" + "border: 1px solid rgba(197, 196, 196, 1);" + "border-left:none;" + "border-top:none;" + "background-color:white;" + "}"); + + ui->tableWidget->setRowCount(10); // 设置10行 + ui->tableWidget->setColumnCount(12); // 设置11列 + ui->tableWidget->setColumnWidth(0, 80); // 设置第一列的宽度为100像素 + ui->tableWidget->verticalHeader()->setParent(nullptr); //隐藏行头 + QTableWidgetItem *item = new QTableWidgetItem("测试数据"); + item->setTextAlignment(Qt::AlignCenter); + ui->tableWidget->setItem(0, 0, item); //设置数据 + + //初始化TableWidget 设置列 + QStringList headers; + headers << "序号" << "设备名称" << "型号规则" << "辅助字段" << "出厂编号" + << "生产厂家"<<"所在单位" <<"使用部门"<<"计量标识"<<"检定周期"<<"证书有效期"<<"操作"; + ui->tableWidget->setHorizontalHeaderLabels(headers); + +} +void BeExamined_DeviceItem::ShowMessageBox(QString title,QString value) { + // 创建一个QMessageBox对象 + QMessageBox msgBox; + + // 设置消息框的标题 + msgBox.setWindowTitle(title); + + // 设置消息框的文本内容 + msgBox.setText(value); + + // 设置消息框的标准按钮,这里是“确定”按钮 + msgBox.setStandardButtons(QMessageBox::Ok); + + // 显示消息框 + msgBox.exec(); +} +void BeExamined_DeviceItem::Load() +{ + //ShowMessageBox("被检设备","被检设备初始化完成"); +} diff --git a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.h b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.h index 76b061d..ae46979 100644 --- a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.h +++ b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.h @@ -2,12 +2,13 @@ #define BEEXAMINED_DEVICEITEM_H #include +#include "InfoBase.h" namespace Ui { class BeExamined_DeviceItem; } -class BeExamined_DeviceItem : public QWidget +class BeExamined_DeviceItem : public InfoBase { Q_OBJECT @@ -15,6 +16,11 @@ explicit BeExamined_DeviceItem(QWidget *parent = nullptr); ~BeExamined_DeviceItem(); +private slots: + void initForm(); //初始化界面数据 + void ShowMessageBox(QString title,QString value); + //继承父类的Load方法 + void Load() override; private: Ui::BeExamined_DeviceItem *ui; }; diff --git a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.ui b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.ui index af9f7bf..5a0a3c9 100644 --- a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.ui +++ b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.ui @@ -6,26 +6,236 @@ 0 0 - 400 - 300 + 1291 + 575 Form - - - - 130 - 140 - 89 - 24 - - - - 被检设备管理 - - + + + + + + 0 + 0 + + + + background-color:white; + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 设备名称: + + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 型号规则: + + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 出厂编号: + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 生产厂家: + + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 使用部门: + + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 使用单位: + + + + + + + + + + Qt::Horizontal + + + QSizePolicy::Expanding + + + + 40 + 20 + + + + + + + + Qt::RightToLeft + + + 查询 + + + + + + + Qt::RightToLeft + + + 重置 + + + + + + + + + + background-color:white; + + + + + + + + + + + + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/create_task.cpp b/softwareDirectory/AutoVerScheme/create_task.cpp index 4193efc..9b49a1a 100644 --- a/softwareDirectory/AutoVerScheme/create_task.cpp +++ b/softwareDirectory/AutoVerScheme/create_task.cpp @@ -1,14 +1,61 @@ #include "create_task.h" #include "ui_create_task.h" +#include "QMessageBox" Create_Task::Create_Task(QWidget *parent) : - QWidget(parent), + InfoBase(parent), ui(new Ui::Create_Task) { ui->setupUi(this); + this->initForm(); } Create_Task::~Create_Task() { delete ui; } +void Create_Task::initForm() +{ + //tableWidget设置 + //设置控件的边框显示 + ui->tableWidget->setStyleSheet("QHeaderView::section {" + "border: 1px solid rgba(197, 196, 196, 1);" + "border-left:none;" + "border-top:none;" + "background-color:white;" + "}"); + + ui->tableWidget->setRowCount(10); // 设置10行 + ui->tableWidget->setColumnCount(8); // 设置11列 + ui->tableWidget->setColumnWidth(0, 80); // 设置第一列的宽度为100像素 + ui->tableWidget->verticalHeader()->setParent(nullptr); //隐藏行头 + QTableWidgetItem *item = new QTableWidgetItem("测试数据"); + item->setTextAlignment(Qt::AlignCenter); + ui->tableWidget->setItem(0, 0, item); //设置数据 + + //初始化TableWidget 设置列 + QStringList headers; + headers << "序号" << "任务单编号" << "委托方"<< "使用部门" << "要求检完时间" << "送检人"<<"是否加急"<<"操作"; + ui->tableWidget->setHorizontalHeaderLabels(headers); + //ShowMessageBox("标题","初始化完成"); +} +void Create_Task::ShowMessageBox(QString title,QString value) { + // 创建一个QMessageBox对象 + QMessageBox msgBox; + + // 设置消息框的标题 + msgBox.setWindowTitle(title); + + // 设置消息框的文本内容 + msgBox.setText(value); + + // 设置消息框的标准按钮,这里是“确定”按钮 + msgBox.setStandardButtons(QMessageBox::Ok); + + // 显示消息框 + msgBox.exec(); +} +void Create_Task::Load() +{ + //ShowMessageBox("创建任务界面","创建任务界面初始化完成"); +} diff --git a/softwareDirectory/AutoVerScheme/create_task.h b/softwareDirectory/AutoVerScheme/create_task.h index e2264de..7cf383f 100644 --- a/softwareDirectory/AutoVerScheme/create_task.h +++ b/softwareDirectory/AutoVerScheme/create_task.h @@ -1,13 +1,14 @@ #ifndef CREATE_TASK_H #define CREATE_TASK_H +#include "InfoBase.h" #include namespace Ui { class Create_Task; } -class Create_Task : public QWidget +class Create_Task : public InfoBase { Q_OBJECT @@ -15,6 +16,11 @@ explicit Create_Task(QWidget *parent = nullptr); ~Create_Task(); +private slots: + void initForm(); //初始化界面数据 + void ShowMessageBox(QString title,QString value); + //继承父类的Load方法 + void Load() override; private: Ui::Create_Task *ui; }; diff --git a/softwareDirectory/AutoVerScheme/create_task.ui b/softwareDirectory/AutoVerScheme/create_task.ui index b79c6a1..d9d88ed 100644 --- a/softwareDirectory/AutoVerScheme/create_task.ui +++ b/softwareDirectory/AutoVerScheme/create_task.ui @@ -6,29 +6,294 @@ 0 0 - 400 - 300 + 1184 + 580 Form - - background-color:red; + + Qt::LeftToRight - - - - 140 - 120 - 89 - 24 - - - - 创建任务单 - - + + + + + + + + + 0 + 0 + + + + background-color:white; + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 任务单编号: + + + + + + + + 0 + 0 + + + + + + + + + 0 + 0 + + + + + 50 + 0 + + + + 委托方: + + + + + + + + 0 + 0 + + + + + 0 + 0 + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 使用部门: + + + + + + + + 0 + 0 + + + + + 0 + 0 + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 要求完成时间: + + + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + 0 + 30 + + + + Qt::RightToLeft + + + background-color:rgb(3, 58, 132); +color:white; + + + + 查询 + + + + + + + + 0 + 30 + + + + Qt::RightToLeft + + + background-color:rgb(207, 132, 33); +color:white; + + + + 重置 + + + + + + + + + + background-color:white; + + + + + + + 6 + + + 9 + + + 9 + + + 9 + + + + + + 0 + 0 + + + + + 120 + 40 + + + + OpenHandCursor + + + Qt::DefaultContextMenu + + + Qt::RightToLeft + + + false + + + background-color:rgb(9, 89, 179); +color:white; + + + 创建任务单 + + + true + + + + + + + + + + + + + + SizeVerCursor + + + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/datasyncview.cpp b/softwareDirectory/AutoVerScheme/datasyncview.cpp new file mode 100644 index 0000000..74cd41d --- /dev/null +++ b/softwareDirectory/AutoVerScheme/datasyncview.cpp @@ -0,0 +1,44 @@ +#include "datasyncview.h" +#include "ui_datasyncview.h" + +DataSyncView::DataSyncView(QWidget *parent) : + QWidget(parent), + ui(new Ui::DataSyncView) +{ + ui->setupUi(this); + this->initForm(); +} + +DataSyncView::~DataSyncView() +{ + delete ui; +} +void DataSyncView::initForm() +{ + //tableWidget设置 + //设置控件的边框显示 + ui->tableWidget->setStyleSheet("QHeaderView::section {" + "border: 1px solid grey;" + "border-left:none;" + "border-top:none;" + "background-color:white;" + " color:black;" + "font: bold 18px Arial, sans-serif;" + "}"); + + ui->tableWidget->setRowCount(10); // 设置10行 + ui->tableWidget->setColumnCount(4); // 设置11列 + ui->tableWidget->setColumnWidth(0, 80); // 设置第一列的宽度为100像素 + ui->tableWidget->verticalHeader()->setParent(nullptr); //隐藏行头 + QTableWidgetItem *item = new QTableWidgetItem("测试数据"); + item->setTextAlignment(Qt::AlignCenter); + ui->tableWidget->setItem(0, 0, item); //设置数据 + + //初始化TableWidget 设置列 + QStringList headers; + headers << "序号" << "同步时间" << "是否同步成功" << "备注" ; + ui->tableWidget->setHorizontalHeaderLabels(headers); + + + +} diff --git a/softwareDirectory/AutoVerScheme/datasyncview.h b/softwareDirectory/AutoVerScheme/datasyncview.h new file mode 100644 index 0000000..9a73de9 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/datasyncview.h @@ -0,0 +1,24 @@ +#ifndef DATASYNCVIEW_H +#define DATASYNCVIEW_H + +#include + +namespace Ui { +class DataSyncView; +} + +class DataSyncView : public QWidget +{ + Q_OBJECT + +public: + explicit DataSyncView(QWidget *parent = nullptr); + ~DataSyncView(); +private slots: + void initForm(); //初始化界面数据 + +private: + Ui::DataSyncView *ui; +}; + +#endif // DATASYNCVIEW_H diff --git a/softwareDirectory/AutoVerScheme/datasyncview.ui b/softwareDirectory/AutoVerScheme/datasyncview.ui new file mode 100644 index 0000000..c45bf56 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/datasyncview.ui @@ -0,0 +1,133 @@ + + + DataSyncView + + + + 0 + 0 + 874 + 531 + + + + 数据同步 + + + background-color:rgba(240, 240, 240, 1); + + + + + + background-color:white; + + + + + + + + + + 0 + 0 + + + + background-color:white; +border:0; + + + + + + + + + + 0 + 0 + + + + font:bold 20px Arial, sans-serif; +color:#334582; + + + 同步记录 + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + background-color:#334582; + font: bold 18px Arial, sans-serif; +color:white; +padding:10px; + + + 下载数据 + + + + + + + + 200 + 0 + + + + + 100 + 40 + + + + Qt::RightToLeft + + + background-color:#334582; + font: bold 18px Arial, sans-serif; +color:white; +padding:10px; + + + 发送同步请求 + + + + + + + + + + + + + + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/depar_task.cpp b/softwareDirectory/AutoVerScheme/depar_task.cpp index de39775..5f0f93a 100644 --- a/softwareDirectory/AutoVerScheme/depar_task.cpp +++ b/softwareDirectory/AutoVerScheme/depar_task.cpp @@ -2,13 +2,19 @@ #include "ui_depar_task.h" #include "QMessageBox" #include "InfoBase.h" +#include "QStandardItemModel" Depar_Task::Depar_Task(QWidget *parent) : InfoBase(parent), ui(new Ui::Depar_Task) { ui->setupUi(this); + //初始化列表 this->initForm(); + + + + } Depar_Task::~Depar_Task() @@ -17,8 +23,31 @@ } void Depar_Task::initForm() { + //tableWidget设置 + //设置控件的边框显示 + ui->tableWidget->setStyleSheet("QHeaderView::section {" + "border: 1px solid rgba(197, 196, 196, 1);" + "border-left:none;" + "border-top:none;" + "background-color:white;" + "}"); - //ShowMessageBox("标题","初始化完成"); + ui->tableWidget->setRowCount(10); // 设置10行 + ui->tableWidget->setColumnCount(10); // 设置11列 + ui->tableWidget->setColumnWidth(0, 80); // 设置第一列的宽度为100像素 + ui->tableWidget->verticalHeader()->setParent(nullptr); //隐藏行头 + QTableWidgetItem *item = new QTableWidgetItem("测试数据"); + item->setTextAlignment(Qt::AlignCenter); //文件居中 + ui->tableWidget->setItem(0, 0, item); //设置数据 + + //初始化TableWidget 设置列 + QStringList headers; + headers << "序号" << "设备名称" << "型号规则" << "辅助字段" << "辅助字段"<< "出厂编号" + << "生产厂家" <<"委托方"<<"使用部门"<<"要求检完时间"<<"是否加急"; + ui->tableWidget->setHorizontalHeaderLabels(headers); + + + } void Depar_Task::ShowMessageBox(QString title,QString value) { // 创建一个QMessageBox对象 @@ -38,5 +67,5 @@ } void Depar_Task::Load() { - ShowMessageBox("部门任务页面","部门任务初始化完成"); + //ShowMessageBox("部门任务页面","部门任务初始化完成"); } diff --git a/softwareDirectory/AutoVerScheme/depar_task.h b/softwareDirectory/AutoVerScheme/depar_task.h index 8716faf..110008d 100644 --- a/softwareDirectory/AutoVerScheme/depar_task.h +++ b/softwareDirectory/AutoVerScheme/depar_task.h @@ -3,6 +3,7 @@ #include "InfoBase.h" +#include "QStandardItemModel" namespace Ui { class Depar_Task; @@ -20,9 +21,12 @@ private slots: void initForm(); //初始化界面数据 void ShowMessageBox(QString title,QString value); + //继承父类的Load方法 void Load() override; + private: Ui::Depar_Task *ui; + // QStandardItemModel *model; }; #endif // DEPAR_TASK_H diff --git a/softwareDirectory/AutoVerScheme/depar_task.ui b/softwareDirectory/AutoVerScheme/depar_task.ui index ff3d44f..1a95cc4 100644 --- a/softwareDirectory/AutoVerScheme/depar_task.ui +++ b/softwareDirectory/AutoVerScheme/depar_task.ui @@ -6,7 +6,7 @@ 0 0 - 1184 + 1190 456 @@ -143,7 +143,34 @@ + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + 0 + 30 + + + + Qt::RightToLeft + + + background-color:rgb(3, 58, 152); +color:white; + + 查询 @@ -151,6 +178,20 @@ + + + 0 + 30 + + + + Qt::RightToLeft + + + background-color:rgb(207, 132, 33); +color:white; + + 重置 @@ -168,8 +209,15 @@ + + + - + + + + + diff --git a/softwareDirectory/AutoVerScheme/indexwindow.cpp b/softwareDirectory/AutoVerScheme/indexwindow.cpp index fca900a..cbba812 100644 --- a/softwareDirectory/AutoVerScheme/indexwindow.cpp +++ b/softwareDirectory/AutoVerScheme/indexwindow.cpp @@ -13,11 +13,37 @@ { ui->setupUi(this); this->initForm(); +/* + //主要作用 当页面关闭后 回到indexwindow页面 并 通过~IndexWindow 释放此页面指针所占用内存 + // 假设 ShowDataSyncView 是一个指向 DataSyncView 实例的指针 + // 当 ShowDataSyncView 关闭时,它的 closed() 信号会被发出 + // 连接这个信号到 IndexWindow 的 onNewWindowClosed() 槽函数 + if(ShowDataSyncView) { + //数据同步页面 信号槽 + connect(ShowDataSyncView, &DataSyncView::close, this, &IndexWindow::onNewWindowClosed); + } + if(ShowInfoManageView) { + //信息管理 信号槽 + connect(ShowInfoManageView, &InfoManageView::close, this, &IndexWindow::onNewWindowClosed); + } + */ } IndexWindow::~IndexWindow() { delete ui; + //释放页面内存 + /* + if (ShowDataSyncView) { + ShowDataSyncView->close(); + delete ShowDataSyncView; + } + else if(ShowInfoManageView) + { + ShowInfoManageView->close(); + delete ShowInfoManageView; + } + */ } void IndexWindow::initForm() { @@ -57,6 +83,15 @@ } + +void IndexWindow::onNewWindowClosed() +{ + // 新窗体关闭后,设置 IndexWindow 为活动窗口 + this->activateWindow(); + // 也可以设置焦点到 MainWindow 中的某个控件 + // ui->someWidget->setFocus(); +} + void IndexWindow::showCheckWindow() { CheckWindow *checkWindow = new CheckWindow; @@ -65,6 +100,26 @@ checkWindow->show(); } +//信息管理按钮 +void IndexWindow::on_tb3_clicked() +{ + InfoManageView *ShowInfoManageView = new InfoManageView(); + ShowInfoManageView->setWindowState(Qt::WindowMaximized); + ShowInfoManageView->setWindowModality(Qt::ApplicationModal); + ShowInfoManageView->show(); +} +//数据同步按钮 +void IndexWindow::on_tb6_clicked() +{ + + // 创建新窗体实例并显示 + DataSyncView *ShowDataSyncView = new DataSyncView(); + ShowDataSyncView->setWindowState(Qt::WindowMaximized); + ShowDataSyncView->setWindowModality(Qt::ApplicationModal); + ShowDataSyncView->show(); +} + + void IndexWindow::showCheckMethod() { CheckMethodManage *checkWindow = new CheckMethodManage; diff --git a/softwareDirectory/AutoVerScheme/indexwindow.h b/softwareDirectory/AutoVerScheme/indexwindow.h index a05d802..190b0f1 100644 --- a/softwareDirectory/AutoVerScheme/indexwindow.h +++ b/softwareDirectory/AutoVerScheme/indexwindow.h @@ -2,6 +2,8 @@ #define INDEXWINDOW_H #include +#include "datasyncView.h" +#include "infomanageview.h" namespace Ui { class IndexWindow; @@ -23,8 +25,21 @@ void showVerifyMethod(); + void on_tb3_clicked(); + + void on_tb6_clicked(); + + //页面关闭响应函数 + void onNewWindowClosed(); + + void on_tb1_clicked(); + private: Ui::IndexWindow *ui; + + //数据同步页面 指针 + //DataSyncView *ShowDataSyncView; + //InfoManageView *ShowInfoManageView; }; #endif // INDEXWINDOW_H diff --git a/softwareDirectory/AutoVerScheme/indexwindow.ui b/softwareDirectory/AutoVerScheme/indexwindow.ui index d69a54d..dec7207 100644 --- a/softwareDirectory/AutoVerScheme/indexwindow.ui +++ b/softwareDirectory/AutoVerScheme/indexwindow.ui @@ -189,7 +189,7 @@ - + 0 @@ -236,7 +236,7 @@ - + 0 @@ -270,7 +270,7 @@ - + 0 @@ -310,7 +310,7 @@ - + 0 @@ -357,7 +357,7 @@ - + 0 @@ -423,7 +423,7 @@ - + 0 @@ -521,66 +521,34 @@ - toolButton_4 + tb1 clicked() IndexWindow showCheckWindow() - 214 - 250 + 260 + 276 - 351 - 107 + 666 + 394 - toolButton_6 + tb4 clicked() IndexWindow showCheckMethod() - 249 - 606 + 260 + 598 - 331 - 452 - - - - - toolButton_5 - clicked() - IndexWindow - showVerifyMethod() - - - 706 - 589 - - - 692 - 442 - - - - - toolButton_2 - clicked() - IndexWindow - showVerifyWindow() - - - 758 - 249 - - - 862 - 114 + 666 + 394 diff --git a/softwareDirectory/AutoVerScheme/infomanageview.cpp b/softwareDirectory/AutoVerScheme/infomanageview.cpp index a206c6f..d045c60 100644 --- a/softwareDirectory/AutoVerScheme/infomanageview.cpp +++ b/softwareDirectory/AutoVerScheme/infomanageview.cpp @@ -2,6 +2,7 @@ #include "ui_infomanageview.h" #include #include +#include //子窗体 #include "depar_task.h" #include "my_task.h" @@ -19,6 +20,7 @@ { ui->setupUi(this); this->setWindowTitle("信息管理"); + //初始化调用所有函数 this->initForm(); this->initWidget(); @@ -115,7 +117,8 @@ //底部加个弹簧 QSpacerItem *verticalSpacer = new QSpacerItem(20, 40, QSizePolicy::Minimum, QSizePolicy::Expanding); ui->widgetLeft->layout()->addItem(verticalSpacer); - btns.at(names.count() - 1)->click(); + + btns.at(0)->click();//选择启动页面 第一个 } //按钮点击切换UI事件 void InfoManageView::buttonClicked() diff --git a/softwareDirectory/AutoVerScheme/infomanageview.h b/softwareDirectory/AutoVerScheme/infomanageview.h index 3c1463f..5e44bba 100644 --- a/softwareDirectory/AutoVerScheme/infomanageview.h +++ b/softwareDirectory/AutoVerScheme/infomanageview.h @@ -2,6 +2,7 @@ #define INFOMANAGEVIEW_H #include +#include class QAbstractButton; diff --git a/softwareDirectory/AutoVerScheme/infomanageview.ui b/softwareDirectory/AutoVerScheme/infomanageview.ui index 4b39e7d..ef0b87b 100644 --- a/softwareDirectory/AutoVerScheme/infomanageview.ui +++ b/softwareDirectory/AutoVerScheme/infomanageview.ui @@ -10,8 +10,15 @@ 644 + + Qt::DefaultContextMenu + - Form + 信息管理 + + + color:black; +background-color:rgba(240, 240, 240, 1); @@ -68,8 +75,8 @@ - - 170 + + 0 0 diff --git a/softwareDirectory/AutoVerScheme/inspectdataitem.cpp b/softwareDirectory/AutoVerScheme/inspectdataitem.cpp index e9c2adc..efc00ba 100644 --- a/softwareDirectory/AutoVerScheme/inspectdataitem.cpp +++ b/softwareDirectory/AutoVerScheme/inspectdataitem.cpp @@ -1,14 +1,62 @@ #include "inspectdataitem.h" #include "ui_inspectdataitem.h" +#include "QMessageBox.h" InspectDataItem::InspectDataItem(QWidget *parent) : - QWidget(parent), + InfoBase(parent), ui(new Ui::InspectDataItem) { ui->setupUi(this); + this->initForm(); } InspectDataItem::~InspectDataItem() { delete ui; } +void InspectDataItem::initForm() +{ + //tableWidget设置 + //设置控件的边框显示 + ui->tableWidget->setStyleSheet("QHeaderView::section {" + "border: 1px solid rgba(197, 196, 196, 1);" + "border-left:none;" + "border-top:none;" + "background-color:white;" + "}"); + + ui->tableWidget->setRowCount(10); // 设置10行 + ui->tableWidget->setColumnCount(12); // 设置11列 + ui->tableWidget->setColumnWidth(0, 80); // 设置第一列的宽度为100像素 + ui->tableWidget->verticalHeader()->setParent(nullptr); //隐藏行头 + QTableWidgetItem *item = new QTableWidgetItem("测试数据"); + item->setTextAlignment(Qt::AlignCenter); + ui->tableWidget->setItem(0, 0, item); //设置数据 + + //初始化TableWidget 设置列 + QStringList headers; + headers << "序号" << "设备名称" << "型号规则" << "出厂编号" + <<"核查件名称"<<"核查件型号"<<"核查件编号" <<"核查员" + << "核查日期" <<"实验室"<<"部门"<<"操作"; + ui->tableWidget->setHorizontalHeaderLabels(headers); +} +void InspectDataItem::ShowMessageBox(QString title,QString value) { + // 创建一个QMessageBox对象 + QMessageBox msgBox; + + // 设置消息框的标题 + msgBox.setWindowTitle(title); + + // 设置消息框的文本内容 + msgBox.setText(value); + + // 设置消息框的标准按钮,这里是“确定”按钮 + msgBox.setStandardButtons(QMessageBox::Ok); + + // 显示消息框 + msgBox.exec(); +} +void InspectDataItem::Load() +{ + //ShowMessageBox("核查数据","核查数据"); +} diff --git a/softwareDirectory/AutoVerScheme/inspectdataitem.h b/softwareDirectory/AutoVerScheme/inspectdataitem.h index 57551bb..bdf7066 100644 --- a/softwareDirectory/AutoVerScheme/inspectdataitem.h +++ b/softwareDirectory/AutoVerScheme/inspectdataitem.h @@ -2,19 +2,24 @@ #define INSPECTDATAITEM_H #include +#include "InfoBase.h" namespace Ui { class InspectDataItem; } -class InspectDataItem : public QWidget +class InspectDataItem : public InfoBase { Q_OBJECT public: explicit InspectDataItem(QWidget *parent = nullptr); ~InspectDataItem(); - +private slots: + void initForm(); //初始化界面数据 + void ShowMessageBox(QString title,QString value); + //继承父类的Load方法 + void Load() override; private: Ui::InspectDataItem *ui; }; diff --git a/softwareDirectory/AutoVerScheme/inspectdataitem.ui b/softwareDirectory/AutoVerScheme/inspectdataitem.ui index 45f04e0..86786c9 100644 --- a/softwareDirectory/AutoVerScheme/inspectdataitem.ui +++ b/softwareDirectory/AutoVerScheme/inspectdataitem.ui @@ -6,26 +6,236 @@ 0 0 - 400 - 300 + 1362 + 543 Form - - - - 120 - 130 - 89 - 24 - - - - 核查数据管理 - - + + + + + + 0 + 0 + + + + background-color:white; + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 设备名称: + + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 型号规则: + + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 出厂编号: + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 核查员: + + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 核查日期: + + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 实验室: + + + + + + + + + + Qt::Horizontal + + + QSizePolicy::Expanding + + + + 40 + 20 + + + + + + + + Qt::RightToLeft + + + 查询 + + + + + + + Qt::RightToLeft + + + 重置 + + + + + + + + + + background-color:white; + + + + + + + + + + + + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/my_task.cpp b/softwareDirectory/AutoVerScheme/my_task.cpp index 40aceb2..559a73b 100644 --- a/softwareDirectory/AutoVerScheme/my_task.cpp +++ b/softwareDirectory/AutoVerScheme/my_task.cpp @@ -7,7 +7,8 @@ ui(new Ui::My_Task) { ui->setupUi(this); - + //初始化QStandardItemModel + model=new QStandardItemModel(parent); this->initForm(); } @@ -17,7 +18,28 @@ } void My_Task::initForm() { + //tableWidget设置 + //设置控件的边框显示 + ui->tableWidget->setStyleSheet("QHeaderView::section {" + "border: 1px solid rgba(197, 196, 196, 1);" + "border-left:none;" + "border-top:none;" + "background-color:white;" + "}"); + ui->tableWidget->setRowCount(10); // 设置10行 + ui->tableWidget->setColumnCount(10); // 设置11列 + ui->tableWidget->setColumnWidth(0, 80); // 设置第一列的宽度为100像素 + ui->tableWidget->verticalHeader()->setParent(nullptr); //隐藏行头 + QTableWidgetItem *item = new QTableWidgetItem("测试数据"); + item->setTextAlignment(Qt::AlignCenter); + ui->tableWidget->setItem(0, 0, item); //设置数据 + + //初始化TableWidget 设置列 + QStringList headers; + headers << "序号" << "设备名称" << "型号规则" << "辅助字段" << "辅助字段"<< "出厂编号" + << "生产厂家" <<"委托方"<<"使用部门"<<"要求检完时间"<<"是否加急"; + ui->tableWidget->setHorizontalHeaderLabels(headers); } void My_Task::ShowMessageBox(QString title,QString value) { @@ -38,5 +60,5 @@ } void My_Task::Load() { - ShowMessageBox("我的任务页面","我的任务初始化完成"); + //ShowMessageBox("我的任务页面","我的任务初始化完成"); } diff --git a/softwareDirectory/AutoVerScheme/my_task.ui b/softwareDirectory/AutoVerScheme/my_task.ui index 89245b8..a078840 100644 --- a/softwareDirectory/AutoVerScheme/my_task.ui +++ b/softwareDirectory/AutoVerScheme/my_task.ui @@ -6,8 +6,8 @@ 0 0 - 857 - 511 + 1190 + 577 @@ -140,7 +140,23 @@ + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + Qt::RightToLeft + 查询 @@ -148,6 +164,9 @@ + + Qt::RightToLeft + 重置 @@ -166,7 +185,14 @@ - + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/res/qss/Index.css b/softwareDirectory/AutoVerScheme/res/qss/Index.css index 8fad195..d2ba43e 100644 --- a/softwareDirectory/AutoVerScheme/res/qss/Index.css +++ b/softwareDirectory/AutoVerScheme/res/qss/Index.css @@ -1,18 +1,25 @@ -*{ - -color:black; -font: 18pt 微软雅黑; - -} -QMainWindow +QMainWindow#IndexWindow { background-image: url(:/image/Index/u15.png); background-color:white; } -QToolButton:hover{ +QToolButton#tb1:hover{ background-image: url(:/image/Index/u26_mouseOver.svg); } -QToolButton{ +QToolButton#tb2:hover{ + background-image: url(:/image/Index/u26_mouseOver.svg); +} +QToolButton#tb3:hover{ + background-image: url(:/image/Index/u26_mouseOver.svg); +}QToolButton#tb4:hover{ +background-image: url(:/image/Index/u26_mouseOver.svg); +}QToolButton#tb5:hover{ +background-image: url(:/image/Index/u26_mouseOver.svg); +} +QToolButton#tb6:hover{ + background-image: url(:/image/Index/u26_mouseOver.svg); +} +QToolButton#tb1{ color: white; background-image: url(:/image/Index/u26.svg); font-weight: bold; @@ -20,4 +27,52 @@ text-align: center; margin:10; margin-right: 180px; +font: 18pt 微软雅黑; +} +QToolButton#tb2{ +color: white; +background-image: url(:/image/Index/u26.svg); +font-weight: bold; +border-radius: 5px; +text-align: center; +margin:10; +margin-right: 180px; +font: 18pt 微软雅黑; +} +QToolButton#tb3{ +color: white; +background-image: url(:/image/Index/u26.svg); +font-weight: bold; +border-radius: 5px; +text-align: center; +margin:10; +margin-right: 180px; +font: 18pt 微软雅黑; +}QToolButton#tb4{ +color: white; +background-image: url(:/image/Index/u26.svg); +font-weight: bold; +border-radius: 5px; +text-align: center; +margin:10; +margin-right: 180px; +font: 18pt 微软雅黑; +}QToolButton#tb5{ +color: white; +background-image: url(:/image/Index/u26.svg); +font-weight: bold; +border-radius: 5px; +text-align: center; +margin:10; +margin-right: 180px; +font: 18pt 微软雅黑; +}QToolButton#tb6{ +color: white; +background-image: url(:/image/Index/u26.svg); +font-weight: bold; +border-radius: 5px; +text-align: center; +margin:10; +margin-right: 180px; +font: 18pt 微软雅黑; } diff --git a/softwareDirectory/AutoVerScheme/rulefileitem.cpp b/softwareDirectory/AutoVerScheme/rulefileitem.cpp index 6f9ddd3..095165e 100644 --- a/softwareDirectory/AutoVerScheme/rulefileitem.cpp +++ b/softwareDirectory/AutoVerScheme/rulefileitem.cpp @@ -1,14 +1,63 @@ #include "rulefileitem.h" #include "ui_rulefileitem.h" +#include "QMessageBox" + RuleFileItem::RuleFileItem(QWidget *parent) : - QWidget(parent), + InfoBase(parent), ui(new Ui::RuleFileItem) { ui->setupUi(this); + this->initForm(); } RuleFileItem::~RuleFileItem() { delete ui; } +void RuleFileItem::initForm() +{ + + //tableWidget设置 + //设置控件的边框显示 + ui->tableWidget->setStyleSheet("QHeaderView::section {" + "border: 1px solid rgba(197, 196, 196, 1);" + "border-left:none;" + "border-top:none;" + "background-color:white;" + "}"); + + ui->tableWidget->setRowCount(10); // 设置10行 + ui->tableWidget->setColumnCount(9); // 设置11列 + ui->tableWidget->setColumnWidth(0, 80); // 设置第一列的宽度为100像素 + ui->tableWidget->verticalHeader()->setParent(nullptr); //隐藏行头 + QTableWidgetItem *item = new QTableWidgetItem("测试数据"); + item->setTextAlignment(Qt::AlignCenter); + ui->tableWidget->setItem(0, 0, item); //设置数据 + + //初始化TableWidget 设置列 + QStringList headers; + headers << "序号" << "文件号" << "文件名称" << "版本号" << "文件类型"<< "颁布时间" + << "实施时间" <<"备注"<<"操作"; + ui->tableWidget->setHorizontalHeaderLabels(headers); +} +void RuleFileItem::ShowMessageBox(QString title,QString value) { + // 创建一个QMessageBox对象 + QMessageBox msgBox; + + // 设置消息框的标题 + msgBox.setWindowTitle(title); + + // 设置消息框的文本内容 + msgBox.setText(value); + + // 设置消息框的标准按钮,这里是“确定”按钮 + msgBox.setStandardButtons(QMessageBox::Ok); + + // 显示消息框 + msgBox.exec(); +} +void RuleFileItem::Load() +{ + //ShowMessageBox("技术文件","技术文件初始化完成"); +} diff --git a/softwareDirectory/AutoVerScheme/rulefileitem.h b/softwareDirectory/AutoVerScheme/rulefileitem.h index 1fc81a1..d892a71 100644 --- a/softwareDirectory/AutoVerScheme/rulefileitem.h +++ b/softwareDirectory/AutoVerScheme/rulefileitem.h @@ -2,19 +2,24 @@ #define RULEFILEITEM_H #include +#include "InfoBase.h" namespace Ui { class RuleFileItem; } -class RuleFileItem : public QWidget +class RuleFileItem : public InfoBase { Q_OBJECT public: explicit RuleFileItem(QWidget *parent = nullptr); ~RuleFileItem(); - +private slots: + void initForm(); //初始化界面数据 + void ShowMessageBox(QString title,QString value); + //继承父类的Load方法 + void Load() override; private: Ui::RuleFileItem *ui; }; diff --git a/softwareDirectory/AutoVerScheme/rulefileitem.ui b/softwareDirectory/AutoVerScheme/rulefileitem.ui index 599e025..9144b96 100644 --- a/softwareDirectory/AutoVerScheme/rulefileitem.ui +++ b/softwareDirectory/AutoVerScheme/rulefileitem.ui @@ -6,26 +6,149 @@ 0 0 - 400 - 300 + 918 + 582 Form - - - - 140 - 130 - 121 - 24 - - - - 规程文件管理 - - + + + + + + 0 + 0 + + + + background-color:white; + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 文件号: + + + + + + + + 0 + 0 + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 文件名称: + + + + + + + + 0 + 0 + + + + + + + + Qt::Horizontal + + + QSizePolicy::Expanding + + + + 40 + 20 + + + + + + + + Qt::RightToLeft + + + 查询 + + + + + + + Qt::RightToLeft + + + 重置 + + + + + + + + + + background-color:white; + + + + + + + + + + + + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/standard_deviceitem.cpp b/softwareDirectory/AutoVerScheme/standard_deviceitem.cpp index ed15b0a..d1a6a80 100644 --- a/softwareDirectory/AutoVerScheme/standard_deviceitem.cpp +++ b/softwareDirectory/AutoVerScheme/standard_deviceitem.cpp @@ -1,14 +1,62 @@ #include "standard_deviceitem.h" #include "ui_standard_deviceitem.h" +#include "InfoBase.h" +#include "QMessageBox" Standard_DeviceItem::Standard_DeviceItem(QWidget *parent) : - QWidget(parent), + InfoBase(parent), ui(new Ui::Standard_DeviceItem) { ui->setupUi(this); + this->initForm(); } Standard_DeviceItem::~Standard_DeviceItem() { delete ui; } +void Standard_DeviceItem::initForm() +{ + //tableWidget设置 + //设置控件的边框显示 + ui->tableWidget->setStyleSheet("QHeaderView::section {" + "border: 1px solid rgba(197, 196, 196, 1);" + "border-left:none;" + "border-top:none;" + "background-color:white;" + "}"); + + ui->tableWidget->setRowCount(10); // 设置10行 + ui->tableWidget->setColumnCount(6); // 设置11列 + ui->tableWidget->setColumnWidth(0, 80); // 设置第一列的宽度为100像素 + ui->tableWidget->verticalHeader()->setParent(nullptr); //隐藏行头 + QTableWidgetItem *item = new QTableWidgetItem("测试数据"); + item->setTextAlignment(Qt::AlignCenter); + ui->tableWidget->setItem(0, 0, item); //设置数据 + + //初始化TableWidget 设置列 + QStringList headers; + headers << "序号" << "设备名称" << "型号规则" << "出厂编号" + << "生产厂家" <<"操作"; + ui->tableWidget->setHorizontalHeaderLabels(headers); +} +void Standard_DeviceItem::ShowMessageBox(QString title,QString value) { + // 创建一个QMessageBox对象 + QMessageBox msgBox; + + // 设置消息框的标题 + msgBox.setWindowTitle(title); + + // 设置消息框的文本内容 + msgBox.setText(value); + + // 设置消息框的标准按钮,这里是“确定”按钮 + msgBox.setStandardButtons(QMessageBox::Ok); + + // 显示消息框 + msgBox.exec(); +} +void Standard_DeviceItem::Load() +{ + //ShowMessageBox("标准管理","标准管理初始化完成"); +} diff --git a/softwareDirectory/AutoVerScheme/standard_deviceitem.h b/softwareDirectory/AutoVerScheme/standard_deviceitem.h index 198c362..97f5d2b 100644 --- a/softwareDirectory/AutoVerScheme/standard_deviceitem.h +++ b/softwareDirectory/AutoVerScheme/standard_deviceitem.h @@ -2,19 +2,24 @@ #define STANDARD_DEVICEITEM_H #include +#include "InfoBase.h" namespace Ui { class Standard_DeviceItem; } -class Standard_DeviceItem : public QWidget +class Standard_DeviceItem : public InfoBase { Q_OBJECT public: explicit Standard_DeviceItem(QWidget *parent = nullptr); ~Standard_DeviceItem(); - +private slots: + void initForm(); //初始化界面数据 + void ShowMessageBox(QString title,QString value); + //继承父类的Load方法 + void Load() override; private: Ui::Standard_DeviceItem *ui; }; diff --git a/softwareDirectory/AutoVerScheme/standard_deviceitem.ui b/softwareDirectory/AutoVerScheme/standard_deviceitem.ui index 00070b7..7421175 100644 --- a/softwareDirectory/AutoVerScheme/standard_deviceitem.ui +++ b/softwareDirectory/AutoVerScheme/standard_deviceitem.ui @@ -6,26 +6,196 @@ 0 0 - 400 - 300 + 1184 + 624 Form - - - - 150 - 140 - 89 - 24 - - - - 标准设备管理 - - + + + + + + 0 + 0 + + + + background-color:white; + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 设备名称: + + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 型号规则: + + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 出厂编号: + + + + + + + + 0 + 0 + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 生产厂家: + + + + + + + + 180 + 0 + + + + + 200 + 0 + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + Qt::RightToLeft + + + 查询 + + + + + + + Qt::RightToLeft + + + 重置 + + + + + + + + + + background-color:white; + + + + + + + + + + + + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/testdataitem.cpp b/softwareDirectory/AutoVerScheme/testdataitem.cpp index 4fde9cf..5666404 100644 --- a/softwareDirectory/AutoVerScheme/testdataitem.cpp +++ b/softwareDirectory/AutoVerScheme/testdataitem.cpp @@ -1,14 +1,63 @@ #include "testdataitem.h" #include "ui_testdataitem.h" +#include "QMessageBox.h" TestDataItem::TestDataItem(QWidget *parent) : - QWidget(parent), + InfoBase(parent), ui(new Ui::TestDataItem) { ui->setupUi(this); + this->initForm(); } TestDataItem::~TestDataItem() { delete ui; } +void TestDataItem::initForm() +{ + + //tableWidget设置 + //设置控件的边框显示 + ui->tableWidget->setStyleSheet("QHeaderView::section {" + "border: 1px solid rgba(197, 196, 196, 1);" + "border-left:none;" + "border-top:none;" + "background-color:white;" + "}"); + + ui->tableWidget->setRowCount(10); // 设置10行 + ui->tableWidget->setColumnCount(14); // 设置11列 + ui->tableWidget->setColumnWidth(0, 80); // 设置第一列的宽度为100像素 + ui->tableWidget->verticalHeader()->setParent(nullptr); //隐藏行头 + QTableWidgetItem *item = new QTableWidgetItem("测试数据"); + item->setTextAlignment(Qt::AlignCenter); + ui->tableWidget->setItem(0, 0, item); //设置数据 + + //初始化TableWidget 设置列 + QStringList headers; + headers << "序号" << "设备名称" << "型号规则" << "辅助字段" << "出厂编号" + << "生产厂家"<<"委托单位" <<"使用部门"<< "检定员"<< "检定时间" + <<"检定有效期"<<"计量标识"<<"限用说明"<<"操作"; + ui->tableWidget->setHorizontalHeaderLabels(headers); +} +void TestDataItem::ShowMessageBox(QString title,QString value) { + // 创建一个QMessageBox对象 + QMessageBox msgBox; + + // 设置消息框的标题 + msgBox.setWindowTitle(title); + + // 设置消息框的文本内容 + msgBox.setText(value); + + // 设置消息框的标准按钮,这里是“确定”按钮 + msgBox.setStandardButtons(QMessageBox::Ok); + + // 显示消息框 + msgBox.exec(); +} +void TestDataItem::Load() +{ + //ShowMessageBox("检定","检定管理初始化完成"); +} diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro index 1280b70..dfb0418 100644 --- a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro @@ -22,6 +22,7 @@ checkmethodmanage.cpp \ checkwindow.cpp \ create_task.cpp \ + datasyncview.cpp \ depar_task.cpp \ indexwindow.cpp \ infomanageview.cpp \ @@ -43,6 +44,7 @@ checkmethodmanage.h \ checkwindow.h \ create_task.h \ + datasyncview.h \ depar_task.h \ indexwindow.h \ infomanageview.h \ @@ -62,6 +64,7 @@ checkmethodmanage.ui \ checkwindow.ui \ create_task.ui \ + datasyncview.ui \ depar_task.ui \ indexwindow.ui \ infomanageview.ui \ diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user index 6ea03c5..93c39cb 100644 --- a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user @@ -1,10 +1,10 @@ - + EnvironmentId - {2746248a-b112-4e0f-9ae0-9e61f2a42309} + {c08df58c-84a7-4965-bca6-e98789474efa} ProjectExplorer.Project.ActiveTarget @@ -71,7 +71,7 @@ 0 0 - D:/dev/QT/AutoCalHainan/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug true @@ -119,7 +119,7 @@ 2 - D:/dev/QT/AutoCalHainan/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Release + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Release true @@ -167,7 +167,7 @@ 0 - D:/dev/QT/AutoCalHainan/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Profile + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Profile true @@ -287,8 +287,8 @@ 2 - Qt4ProjectManager.Qt4RunConfiguration:D:/dev/QT/AutoCalHainan/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro - D:/dev/QT/AutoCalHainan/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro + Qt4ProjectManager.Qt4RunConfiguration:C:/Users/admin/Desktop/SVN/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro + C:/Users/admin/Desktop/SVN/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro false @@ -299,7 +299,7 @@ false true - D:/dev/QT/AutoCalHainan/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug 1 @@ -314,7 +314,7 @@ 0 0 - D:/dev/QT/AutoCalHainan/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Debug + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Debug true @@ -362,7 +362,7 @@ 2 - D:/dev/QT/AutoCalHainan/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Release + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Release true @@ -410,7 +410,7 @@ 0 - D:/dev/QT/AutoCalHainan/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Profile + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Profile true @@ -530,14 +530,15 @@ 2 - - ProjectExplorer.CustomExecutableRunConfiguration - + AutoVerScheme2 + 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 diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user.c08df58 b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user.c08df58 deleted file mode 100644 index 495f95c..0000000 --- a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user.c08df58 +++ /dev/null @@ -1,563 +0,0 @@ - - - - - - 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 32-bit - Desktop Qt 5.14.2 MinGW 32-bit - qt.qt5.5142.win32_mingw73_kit - 0 - 0 - 0 - - D:/Auto_verification_scheme/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 - - - D:/Auto_verification_scheme/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 - - - D:/Auto_verification_scheme/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 - - D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug - - 1 - - - - ProjectExplorer.Project.Target.1 - - 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 - - D:/Auto_verification_scheme/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 - - - D:/Auto_verification_scheme/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 - - - D:/Auto_verification_scheme/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 - - AutoVerScheme2 - 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/InfoBase.h b/softwareDirectory/AutoVerScheme/InfoBase.h index 7fec63e..084cf3f 100644 --- a/softwareDirectory/AutoVerScheme/InfoBase.h +++ b/softwareDirectory/AutoVerScheme/InfoBase.h @@ -2,6 +2,7 @@ #define INFOBASE_H #include +#include "QStandardItemModel" ///信号管理页面的基类 所有信息管理页面都继承于InfoBase /// 便于统一管理 所有子类必须实现Load方法 /// 每次按钮点击切换都会调用Load方法 用于每次页面的数据刷新 @@ -11,6 +12,8 @@ InfoBase(QWidget *parent = nullptr): QWidget(parent){}; // 纯虚函数 virtual void Load()=0; + //QStandardItemModel 的实例。这个模型将用于存储和管理数据。 + QStandardItemModel *model; }; #endif // INFOBASE_H diff --git a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.cpp b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.cpp index 7ac1e87..ffb2bbc 100644 --- a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.cpp +++ b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.cpp @@ -1,14 +1,64 @@ #include "beexamined_deviceitem.h" #include "ui_beexamined_deviceitem.h" +#include "QMessageBox.h" BeExamined_DeviceItem::BeExamined_DeviceItem(QWidget *parent) : - QWidget(parent), + InfoBase(parent), ui(new Ui::BeExamined_DeviceItem) { ui->setupUi(this); + this->initForm(); } BeExamined_DeviceItem::~BeExamined_DeviceItem() { delete ui; } + +void BeExamined_DeviceItem::initForm() +{ + + //tableWidget设置 + //设置控件的边框显示 + ui->tableWidget->setStyleSheet("QHeaderView::section {" + "border: 1px solid rgba(197, 196, 196, 1);" + "border-left:none;" + "border-top:none;" + "background-color:white;" + "}"); + + ui->tableWidget->setRowCount(10); // 设置10行 + ui->tableWidget->setColumnCount(12); // 设置11列 + ui->tableWidget->setColumnWidth(0, 80); // 设置第一列的宽度为100像素 + ui->tableWidget->verticalHeader()->setParent(nullptr); //隐藏行头 + QTableWidgetItem *item = new QTableWidgetItem("测试数据"); + item->setTextAlignment(Qt::AlignCenter); + ui->tableWidget->setItem(0, 0, item); //设置数据 + + //初始化TableWidget 设置列 + QStringList headers; + headers << "序号" << "设备名称" << "型号规则" << "辅助字段" << "出厂编号" + << "生产厂家"<<"所在单位" <<"使用部门"<<"计量标识"<<"检定周期"<<"证书有效期"<<"操作"; + ui->tableWidget->setHorizontalHeaderLabels(headers); + +} +void BeExamined_DeviceItem::ShowMessageBox(QString title,QString value) { + // 创建一个QMessageBox对象 + QMessageBox msgBox; + + // 设置消息框的标题 + msgBox.setWindowTitle(title); + + // 设置消息框的文本内容 + msgBox.setText(value); + + // 设置消息框的标准按钮,这里是“确定”按钮 + msgBox.setStandardButtons(QMessageBox::Ok); + + // 显示消息框 + msgBox.exec(); +} +void BeExamined_DeviceItem::Load() +{ + //ShowMessageBox("被检设备","被检设备初始化完成"); +} diff --git a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.h b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.h index 76b061d..ae46979 100644 --- a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.h +++ b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.h @@ -2,12 +2,13 @@ #define BEEXAMINED_DEVICEITEM_H #include +#include "InfoBase.h" namespace Ui { class BeExamined_DeviceItem; } -class BeExamined_DeviceItem : public QWidget +class BeExamined_DeviceItem : public InfoBase { Q_OBJECT @@ -15,6 +16,11 @@ explicit BeExamined_DeviceItem(QWidget *parent = nullptr); ~BeExamined_DeviceItem(); +private slots: + void initForm(); //初始化界面数据 + void ShowMessageBox(QString title,QString value); + //继承父类的Load方法 + void Load() override; private: Ui::BeExamined_DeviceItem *ui; }; diff --git a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.ui b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.ui index af9f7bf..5a0a3c9 100644 --- a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.ui +++ b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.ui @@ -6,26 +6,236 @@ 0 0 - 400 - 300 + 1291 + 575 Form - - - - 130 - 140 - 89 - 24 - - - - 被检设备管理 - - + + + + + + 0 + 0 + + + + background-color:white; + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 设备名称: + + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 型号规则: + + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 出厂编号: + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 生产厂家: + + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 使用部门: + + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 使用单位: + + + + + + + + + + Qt::Horizontal + + + QSizePolicy::Expanding + + + + 40 + 20 + + + + + + + + Qt::RightToLeft + + + 查询 + + + + + + + Qt::RightToLeft + + + 重置 + + + + + + + + + + background-color:white; + + + + + + + + + + + + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/create_task.cpp b/softwareDirectory/AutoVerScheme/create_task.cpp index 4193efc..9b49a1a 100644 --- a/softwareDirectory/AutoVerScheme/create_task.cpp +++ b/softwareDirectory/AutoVerScheme/create_task.cpp @@ -1,14 +1,61 @@ #include "create_task.h" #include "ui_create_task.h" +#include "QMessageBox" Create_Task::Create_Task(QWidget *parent) : - QWidget(parent), + InfoBase(parent), ui(new Ui::Create_Task) { ui->setupUi(this); + this->initForm(); } Create_Task::~Create_Task() { delete ui; } +void Create_Task::initForm() +{ + //tableWidget设置 + //设置控件的边框显示 + ui->tableWidget->setStyleSheet("QHeaderView::section {" + "border: 1px solid rgba(197, 196, 196, 1);" + "border-left:none;" + "border-top:none;" + "background-color:white;" + "}"); + + ui->tableWidget->setRowCount(10); // 设置10行 + ui->tableWidget->setColumnCount(8); // 设置11列 + ui->tableWidget->setColumnWidth(0, 80); // 设置第一列的宽度为100像素 + ui->tableWidget->verticalHeader()->setParent(nullptr); //隐藏行头 + QTableWidgetItem *item = new QTableWidgetItem("测试数据"); + item->setTextAlignment(Qt::AlignCenter); + ui->tableWidget->setItem(0, 0, item); //设置数据 + + //初始化TableWidget 设置列 + QStringList headers; + headers << "序号" << "任务单编号" << "委托方"<< "使用部门" << "要求检完时间" << "送检人"<<"是否加急"<<"操作"; + ui->tableWidget->setHorizontalHeaderLabels(headers); + //ShowMessageBox("标题","初始化完成"); +} +void Create_Task::ShowMessageBox(QString title,QString value) { + // 创建一个QMessageBox对象 + QMessageBox msgBox; + + // 设置消息框的标题 + msgBox.setWindowTitle(title); + + // 设置消息框的文本内容 + msgBox.setText(value); + + // 设置消息框的标准按钮,这里是“确定”按钮 + msgBox.setStandardButtons(QMessageBox::Ok); + + // 显示消息框 + msgBox.exec(); +} +void Create_Task::Load() +{ + //ShowMessageBox("创建任务界面","创建任务界面初始化完成"); +} diff --git a/softwareDirectory/AutoVerScheme/create_task.h b/softwareDirectory/AutoVerScheme/create_task.h index e2264de..7cf383f 100644 --- a/softwareDirectory/AutoVerScheme/create_task.h +++ b/softwareDirectory/AutoVerScheme/create_task.h @@ -1,13 +1,14 @@ #ifndef CREATE_TASK_H #define CREATE_TASK_H +#include "InfoBase.h" #include namespace Ui { class Create_Task; } -class Create_Task : public QWidget +class Create_Task : public InfoBase { Q_OBJECT @@ -15,6 +16,11 @@ explicit Create_Task(QWidget *parent = nullptr); ~Create_Task(); +private slots: + void initForm(); //初始化界面数据 + void ShowMessageBox(QString title,QString value); + //继承父类的Load方法 + void Load() override; private: Ui::Create_Task *ui; }; diff --git a/softwareDirectory/AutoVerScheme/create_task.ui b/softwareDirectory/AutoVerScheme/create_task.ui index b79c6a1..d9d88ed 100644 --- a/softwareDirectory/AutoVerScheme/create_task.ui +++ b/softwareDirectory/AutoVerScheme/create_task.ui @@ -6,29 +6,294 @@ 0 0 - 400 - 300 + 1184 + 580 Form - - background-color:red; + + Qt::LeftToRight - - - - 140 - 120 - 89 - 24 - - - - 创建任务单 - - + + + + + + + + + 0 + 0 + + + + background-color:white; + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 任务单编号: + + + + + + + + 0 + 0 + + + + + + + + + 0 + 0 + + + + + 50 + 0 + + + + 委托方: + + + + + + + + 0 + 0 + + + + + 0 + 0 + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 使用部门: + + + + + + + + 0 + 0 + + + + + 0 + 0 + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 要求完成时间: + + + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + 0 + 30 + + + + Qt::RightToLeft + + + background-color:rgb(3, 58, 132); +color:white; + + + + 查询 + + + + + + + + 0 + 30 + + + + Qt::RightToLeft + + + background-color:rgb(207, 132, 33); +color:white; + + + + 重置 + + + + + + + + + + background-color:white; + + + + + + + 6 + + + 9 + + + 9 + + + 9 + + + + + + 0 + 0 + + + + + 120 + 40 + + + + OpenHandCursor + + + Qt::DefaultContextMenu + + + Qt::RightToLeft + + + false + + + background-color:rgb(9, 89, 179); +color:white; + + + 创建任务单 + + + true + + + + + + + + + + + + + + SizeVerCursor + + + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/datasyncview.cpp b/softwareDirectory/AutoVerScheme/datasyncview.cpp new file mode 100644 index 0000000..74cd41d --- /dev/null +++ b/softwareDirectory/AutoVerScheme/datasyncview.cpp @@ -0,0 +1,44 @@ +#include "datasyncview.h" +#include "ui_datasyncview.h" + +DataSyncView::DataSyncView(QWidget *parent) : + QWidget(parent), + ui(new Ui::DataSyncView) +{ + ui->setupUi(this); + this->initForm(); +} + +DataSyncView::~DataSyncView() +{ + delete ui; +} +void DataSyncView::initForm() +{ + //tableWidget设置 + //设置控件的边框显示 + ui->tableWidget->setStyleSheet("QHeaderView::section {" + "border: 1px solid grey;" + "border-left:none;" + "border-top:none;" + "background-color:white;" + " color:black;" + "font: bold 18px Arial, sans-serif;" + "}"); + + ui->tableWidget->setRowCount(10); // 设置10行 + ui->tableWidget->setColumnCount(4); // 设置11列 + ui->tableWidget->setColumnWidth(0, 80); // 设置第一列的宽度为100像素 + ui->tableWidget->verticalHeader()->setParent(nullptr); //隐藏行头 + QTableWidgetItem *item = new QTableWidgetItem("测试数据"); + item->setTextAlignment(Qt::AlignCenter); + ui->tableWidget->setItem(0, 0, item); //设置数据 + + //初始化TableWidget 设置列 + QStringList headers; + headers << "序号" << "同步时间" << "是否同步成功" << "备注" ; + ui->tableWidget->setHorizontalHeaderLabels(headers); + + + +} diff --git a/softwareDirectory/AutoVerScheme/datasyncview.h b/softwareDirectory/AutoVerScheme/datasyncview.h new file mode 100644 index 0000000..9a73de9 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/datasyncview.h @@ -0,0 +1,24 @@ +#ifndef DATASYNCVIEW_H +#define DATASYNCVIEW_H + +#include + +namespace Ui { +class DataSyncView; +} + +class DataSyncView : public QWidget +{ + Q_OBJECT + +public: + explicit DataSyncView(QWidget *parent = nullptr); + ~DataSyncView(); +private slots: + void initForm(); //初始化界面数据 + +private: + Ui::DataSyncView *ui; +}; + +#endif // DATASYNCVIEW_H diff --git a/softwareDirectory/AutoVerScheme/datasyncview.ui b/softwareDirectory/AutoVerScheme/datasyncview.ui new file mode 100644 index 0000000..c45bf56 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/datasyncview.ui @@ -0,0 +1,133 @@ + + + DataSyncView + + + + 0 + 0 + 874 + 531 + + + + 数据同步 + + + background-color:rgba(240, 240, 240, 1); + + + + + + background-color:white; + + + + + + + + + + 0 + 0 + + + + background-color:white; +border:0; + + + + + + + + + + 0 + 0 + + + + font:bold 20px Arial, sans-serif; +color:#334582; + + + 同步记录 + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + background-color:#334582; + font: bold 18px Arial, sans-serif; +color:white; +padding:10px; + + + 下载数据 + + + + + + + + 200 + 0 + + + + + 100 + 40 + + + + Qt::RightToLeft + + + background-color:#334582; + font: bold 18px Arial, sans-serif; +color:white; +padding:10px; + + + 发送同步请求 + + + + + + + + + + + + + + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/depar_task.cpp b/softwareDirectory/AutoVerScheme/depar_task.cpp index de39775..5f0f93a 100644 --- a/softwareDirectory/AutoVerScheme/depar_task.cpp +++ b/softwareDirectory/AutoVerScheme/depar_task.cpp @@ -2,13 +2,19 @@ #include "ui_depar_task.h" #include "QMessageBox" #include "InfoBase.h" +#include "QStandardItemModel" Depar_Task::Depar_Task(QWidget *parent) : InfoBase(parent), ui(new Ui::Depar_Task) { ui->setupUi(this); + //初始化列表 this->initForm(); + + + + } Depar_Task::~Depar_Task() @@ -17,8 +23,31 @@ } void Depar_Task::initForm() { + //tableWidget设置 + //设置控件的边框显示 + ui->tableWidget->setStyleSheet("QHeaderView::section {" + "border: 1px solid rgba(197, 196, 196, 1);" + "border-left:none;" + "border-top:none;" + "background-color:white;" + "}"); - //ShowMessageBox("标题","初始化完成"); + ui->tableWidget->setRowCount(10); // 设置10行 + ui->tableWidget->setColumnCount(10); // 设置11列 + ui->tableWidget->setColumnWidth(0, 80); // 设置第一列的宽度为100像素 + ui->tableWidget->verticalHeader()->setParent(nullptr); //隐藏行头 + QTableWidgetItem *item = new QTableWidgetItem("测试数据"); + item->setTextAlignment(Qt::AlignCenter); //文件居中 + ui->tableWidget->setItem(0, 0, item); //设置数据 + + //初始化TableWidget 设置列 + QStringList headers; + headers << "序号" << "设备名称" << "型号规则" << "辅助字段" << "辅助字段"<< "出厂编号" + << "生产厂家" <<"委托方"<<"使用部门"<<"要求检完时间"<<"是否加急"; + ui->tableWidget->setHorizontalHeaderLabels(headers); + + + } void Depar_Task::ShowMessageBox(QString title,QString value) { // 创建一个QMessageBox对象 @@ -38,5 +67,5 @@ } void Depar_Task::Load() { - ShowMessageBox("部门任务页面","部门任务初始化完成"); + //ShowMessageBox("部门任务页面","部门任务初始化完成"); } diff --git a/softwareDirectory/AutoVerScheme/depar_task.h b/softwareDirectory/AutoVerScheme/depar_task.h index 8716faf..110008d 100644 --- a/softwareDirectory/AutoVerScheme/depar_task.h +++ b/softwareDirectory/AutoVerScheme/depar_task.h @@ -3,6 +3,7 @@ #include "InfoBase.h" +#include "QStandardItemModel" namespace Ui { class Depar_Task; @@ -20,9 +21,12 @@ private slots: void initForm(); //初始化界面数据 void ShowMessageBox(QString title,QString value); + //继承父类的Load方法 void Load() override; + private: Ui::Depar_Task *ui; + // QStandardItemModel *model; }; #endif // DEPAR_TASK_H diff --git a/softwareDirectory/AutoVerScheme/depar_task.ui b/softwareDirectory/AutoVerScheme/depar_task.ui index ff3d44f..1a95cc4 100644 --- a/softwareDirectory/AutoVerScheme/depar_task.ui +++ b/softwareDirectory/AutoVerScheme/depar_task.ui @@ -6,7 +6,7 @@ 0 0 - 1184 + 1190 456 @@ -143,7 +143,34 @@ + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + 0 + 30 + + + + Qt::RightToLeft + + + background-color:rgb(3, 58, 152); +color:white; + + 查询 @@ -151,6 +178,20 @@ + + + 0 + 30 + + + + Qt::RightToLeft + + + background-color:rgb(207, 132, 33); +color:white; + + 重置 @@ -168,8 +209,15 @@ + + + - + + + + + diff --git a/softwareDirectory/AutoVerScheme/indexwindow.cpp b/softwareDirectory/AutoVerScheme/indexwindow.cpp index fca900a..cbba812 100644 --- a/softwareDirectory/AutoVerScheme/indexwindow.cpp +++ b/softwareDirectory/AutoVerScheme/indexwindow.cpp @@ -13,11 +13,37 @@ { ui->setupUi(this); this->initForm(); +/* + //主要作用 当页面关闭后 回到indexwindow页面 并 通过~IndexWindow 释放此页面指针所占用内存 + // 假设 ShowDataSyncView 是一个指向 DataSyncView 实例的指针 + // 当 ShowDataSyncView 关闭时,它的 closed() 信号会被发出 + // 连接这个信号到 IndexWindow 的 onNewWindowClosed() 槽函数 + if(ShowDataSyncView) { + //数据同步页面 信号槽 + connect(ShowDataSyncView, &DataSyncView::close, this, &IndexWindow::onNewWindowClosed); + } + if(ShowInfoManageView) { + //信息管理 信号槽 + connect(ShowInfoManageView, &InfoManageView::close, this, &IndexWindow::onNewWindowClosed); + } + */ } IndexWindow::~IndexWindow() { delete ui; + //释放页面内存 + /* + if (ShowDataSyncView) { + ShowDataSyncView->close(); + delete ShowDataSyncView; + } + else if(ShowInfoManageView) + { + ShowInfoManageView->close(); + delete ShowInfoManageView; + } + */ } void IndexWindow::initForm() { @@ -57,6 +83,15 @@ } + +void IndexWindow::onNewWindowClosed() +{ + // 新窗体关闭后,设置 IndexWindow 为活动窗口 + this->activateWindow(); + // 也可以设置焦点到 MainWindow 中的某个控件 + // ui->someWidget->setFocus(); +} + void IndexWindow::showCheckWindow() { CheckWindow *checkWindow = new CheckWindow; @@ -65,6 +100,26 @@ checkWindow->show(); } +//信息管理按钮 +void IndexWindow::on_tb3_clicked() +{ + InfoManageView *ShowInfoManageView = new InfoManageView(); + ShowInfoManageView->setWindowState(Qt::WindowMaximized); + ShowInfoManageView->setWindowModality(Qt::ApplicationModal); + ShowInfoManageView->show(); +} +//数据同步按钮 +void IndexWindow::on_tb6_clicked() +{ + + // 创建新窗体实例并显示 + DataSyncView *ShowDataSyncView = new DataSyncView(); + ShowDataSyncView->setWindowState(Qt::WindowMaximized); + ShowDataSyncView->setWindowModality(Qt::ApplicationModal); + ShowDataSyncView->show(); +} + + void IndexWindow::showCheckMethod() { CheckMethodManage *checkWindow = new CheckMethodManage; diff --git a/softwareDirectory/AutoVerScheme/indexwindow.h b/softwareDirectory/AutoVerScheme/indexwindow.h index a05d802..190b0f1 100644 --- a/softwareDirectory/AutoVerScheme/indexwindow.h +++ b/softwareDirectory/AutoVerScheme/indexwindow.h @@ -2,6 +2,8 @@ #define INDEXWINDOW_H #include +#include "datasyncView.h" +#include "infomanageview.h" namespace Ui { class IndexWindow; @@ -23,8 +25,21 @@ void showVerifyMethod(); + void on_tb3_clicked(); + + void on_tb6_clicked(); + + //页面关闭响应函数 + void onNewWindowClosed(); + + void on_tb1_clicked(); + private: Ui::IndexWindow *ui; + + //数据同步页面 指针 + //DataSyncView *ShowDataSyncView; + //InfoManageView *ShowInfoManageView; }; #endif // INDEXWINDOW_H diff --git a/softwareDirectory/AutoVerScheme/indexwindow.ui b/softwareDirectory/AutoVerScheme/indexwindow.ui index d69a54d..dec7207 100644 --- a/softwareDirectory/AutoVerScheme/indexwindow.ui +++ b/softwareDirectory/AutoVerScheme/indexwindow.ui @@ -189,7 +189,7 @@ - + 0 @@ -236,7 +236,7 @@ - + 0 @@ -270,7 +270,7 @@ - + 0 @@ -310,7 +310,7 @@ - + 0 @@ -357,7 +357,7 @@ - + 0 @@ -423,7 +423,7 @@ - + 0 @@ -521,66 +521,34 @@ - toolButton_4 + tb1 clicked() IndexWindow showCheckWindow() - 214 - 250 + 260 + 276 - 351 - 107 + 666 + 394 - toolButton_6 + tb4 clicked() IndexWindow showCheckMethod() - 249 - 606 + 260 + 598 - 331 - 452 - - - - - toolButton_5 - clicked() - IndexWindow - showVerifyMethod() - - - 706 - 589 - - - 692 - 442 - - - - - toolButton_2 - clicked() - IndexWindow - showVerifyWindow() - - - 758 - 249 - - - 862 - 114 + 666 + 394 diff --git a/softwareDirectory/AutoVerScheme/infomanageview.cpp b/softwareDirectory/AutoVerScheme/infomanageview.cpp index a206c6f..d045c60 100644 --- a/softwareDirectory/AutoVerScheme/infomanageview.cpp +++ b/softwareDirectory/AutoVerScheme/infomanageview.cpp @@ -2,6 +2,7 @@ #include "ui_infomanageview.h" #include #include +#include //子窗体 #include "depar_task.h" #include "my_task.h" @@ -19,6 +20,7 @@ { ui->setupUi(this); this->setWindowTitle("信息管理"); + //初始化调用所有函数 this->initForm(); this->initWidget(); @@ -115,7 +117,8 @@ //底部加个弹簧 QSpacerItem *verticalSpacer = new QSpacerItem(20, 40, QSizePolicy::Minimum, QSizePolicy::Expanding); ui->widgetLeft->layout()->addItem(verticalSpacer); - btns.at(names.count() - 1)->click(); + + btns.at(0)->click();//选择启动页面 第一个 } //按钮点击切换UI事件 void InfoManageView::buttonClicked() diff --git a/softwareDirectory/AutoVerScheme/infomanageview.h b/softwareDirectory/AutoVerScheme/infomanageview.h index 3c1463f..5e44bba 100644 --- a/softwareDirectory/AutoVerScheme/infomanageview.h +++ b/softwareDirectory/AutoVerScheme/infomanageview.h @@ -2,6 +2,7 @@ #define INFOMANAGEVIEW_H #include +#include class QAbstractButton; diff --git a/softwareDirectory/AutoVerScheme/infomanageview.ui b/softwareDirectory/AutoVerScheme/infomanageview.ui index 4b39e7d..ef0b87b 100644 --- a/softwareDirectory/AutoVerScheme/infomanageview.ui +++ b/softwareDirectory/AutoVerScheme/infomanageview.ui @@ -10,8 +10,15 @@ 644 + + Qt::DefaultContextMenu + - Form + 信息管理 + + + color:black; +background-color:rgba(240, 240, 240, 1); @@ -68,8 +75,8 @@ - - 170 + + 0 0 diff --git a/softwareDirectory/AutoVerScheme/inspectdataitem.cpp b/softwareDirectory/AutoVerScheme/inspectdataitem.cpp index e9c2adc..efc00ba 100644 --- a/softwareDirectory/AutoVerScheme/inspectdataitem.cpp +++ b/softwareDirectory/AutoVerScheme/inspectdataitem.cpp @@ -1,14 +1,62 @@ #include "inspectdataitem.h" #include "ui_inspectdataitem.h" +#include "QMessageBox.h" InspectDataItem::InspectDataItem(QWidget *parent) : - QWidget(parent), + InfoBase(parent), ui(new Ui::InspectDataItem) { ui->setupUi(this); + this->initForm(); } InspectDataItem::~InspectDataItem() { delete ui; } +void InspectDataItem::initForm() +{ + //tableWidget设置 + //设置控件的边框显示 + ui->tableWidget->setStyleSheet("QHeaderView::section {" + "border: 1px solid rgba(197, 196, 196, 1);" + "border-left:none;" + "border-top:none;" + "background-color:white;" + "}"); + + ui->tableWidget->setRowCount(10); // 设置10行 + ui->tableWidget->setColumnCount(12); // 设置11列 + ui->tableWidget->setColumnWidth(0, 80); // 设置第一列的宽度为100像素 + ui->tableWidget->verticalHeader()->setParent(nullptr); //隐藏行头 + QTableWidgetItem *item = new QTableWidgetItem("测试数据"); + item->setTextAlignment(Qt::AlignCenter); + ui->tableWidget->setItem(0, 0, item); //设置数据 + + //初始化TableWidget 设置列 + QStringList headers; + headers << "序号" << "设备名称" << "型号规则" << "出厂编号" + <<"核查件名称"<<"核查件型号"<<"核查件编号" <<"核查员" + << "核查日期" <<"实验室"<<"部门"<<"操作"; + ui->tableWidget->setHorizontalHeaderLabels(headers); +} +void InspectDataItem::ShowMessageBox(QString title,QString value) { + // 创建一个QMessageBox对象 + QMessageBox msgBox; + + // 设置消息框的标题 + msgBox.setWindowTitle(title); + + // 设置消息框的文本内容 + msgBox.setText(value); + + // 设置消息框的标准按钮,这里是“确定”按钮 + msgBox.setStandardButtons(QMessageBox::Ok); + + // 显示消息框 + msgBox.exec(); +} +void InspectDataItem::Load() +{ + //ShowMessageBox("核查数据","核查数据"); +} diff --git a/softwareDirectory/AutoVerScheme/inspectdataitem.h b/softwareDirectory/AutoVerScheme/inspectdataitem.h index 57551bb..bdf7066 100644 --- a/softwareDirectory/AutoVerScheme/inspectdataitem.h +++ b/softwareDirectory/AutoVerScheme/inspectdataitem.h @@ -2,19 +2,24 @@ #define INSPECTDATAITEM_H #include +#include "InfoBase.h" namespace Ui { class InspectDataItem; } -class InspectDataItem : public QWidget +class InspectDataItem : public InfoBase { Q_OBJECT public: explicit InspectDataItem(QWidget *parent = nullptr); ~InspectDataItem(); - +private slots: + void initForm(); //初始化界面数据 + void ShowMessageBox(QString title,QString value); + //继承父类的Load方法 + void Load() override; private: Ui::InspectDataItem *ui; }; diff --git a/softwareDirectory/AutoVerScheme/inspectdataitem.ui b/softwareDirectory/AutoVerScheme/inspectdataitem.ui index 45f04e0..86786c9 100644 --- a/softwareDirectory/AutoVerScheme/inspectdataitem.ui +++ b/softwareDirectory/AutoVerScheme/inspectdataitem.ui @@ -6,26 +6,236 @@ 0 0 - 400 - 300 + 1362 + 543 Form - - - - 120 - 130 - 89 - 24 - - - - 核查数据管理 - - + + + + + + 0 + 0 + + + + background-color:white; + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 设备名称: + + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 型号规则: + + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 出厂编号: + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 核查员: + + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 核查日期: + + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 实验室: + + + + + + + + + + Qt::Horizontal + + + QSizePolicy::Expanding + + + + 40 + 20 + + + + + + + + Qt::RightToLeft + + + 查询 + + + + + + + Qt::RightToLeft + + + 重置 + + + + + + + + + + background-color:white; + + + + + + + + + + + + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/my_task.cpp b/softwareDirectory/AutoVerScheme/my_task.cpp index 40aceb2..559a73b 100644 --- a/softwareDirectory/AutoVerScheme/my_task.cpp +++ b/softwareDirectory/AutoVerScheme/my_task.cpp @@ -7,7 +7,8 @@ ui(new Ui::My_Task) { ui->setupUi(this); - + //初始化QStandardItemModel + model=new QStandardItemModel(parent); this->initForm(); } @@ -17,7 +18,28 @@ } void My_Task::initForm() { + //tableWidget设置 + //设置控件的边框显示 + ui->tableWidget->setStyleSheet("QHeaderView::section {" + "border: 1px solid rgba(197, 196, 196, 1);" + "border-left:none;" + "border-top:none;" + "background-color:white;" + "}"); + ui->tableWidget->setRowCount(10); // 设置10行 + ui->tableWidget->setColumnCount(10); // 设置11列 + ui->tableWidget->setColumnWidth(0, 80); // 设置第一列的宽度为100像素 + ui->tableWidget->verticalHeader()->setParent(nullptr); //隐藏行头 + QTableWidgetItem *item = new QTableWidgetItem("测试数据"); + item->setTextAlignment(Qt::AlignCenter); + ui->tableWidget->setItem(0, 0, item); //设置数据 + + //初始化TableWidget 设置列 + QStringList headers; + headers << "序号" << "设备名称" << "型号规则" << "辅助字段" << "辅助字段"<< "出厂编号" + << "生产厂家" <<"委托方"<<"使用部门"<<"要求检完时间"<<"是否加急"; + ui->tableWidget->setHorizontalHeaderLabels(headers); } void My_Task::ShowMessageBox(QString title,QString value) { @@ -38,5 +60,5 @@ } void My_Task::Load() { - ShowMessageBox("我的任务页面","我的任务初始化完成"); + //ShowMessageBox("我的任务页面","我的任务初始化完成"); } diff --git a/softwareDirectory/AutoVerScheme/my_task.ui b/softwareDirectory/AutoVerScheme/my_task.ui index 89245b8..a078840 100644 --- a/softwareDirectory/AutoVerScheme/my_task.ui +++ b/softwareDirectory/AutoVerScheme/my_task.ui @@ -6,8 +6,8 @@ 0 0 - 857 - 511 + 1190 + 577 @@ -140,7 +140,23 @@ + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + Qt::RightToLeft + 查询 @@ -148,6 +164,9 @@ + + Qt::RightToLeft + 重置 @@ -166,7 +185,14 @@ - + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/res/qss/Index.css b/softwareDirectory/AutoVerScheme/res/qss/Index.css index 8fad195..d2ba43e 100644 --- a/softwareDirectory/AutoVerScheme/res/qss/Index.css +++ b/softwareDirectory/AutoVerScheme/res/qss/Index.css @@ -1,18 +1,25 @@ -*{ - -color:black; -font: 18pt 微软雅黑; - -} -QMainWindow +QMainWindow#IndexWindow { background-image: url(:/image/Index/u15.png); background-color:white; } -QToolButton:hover{ +QToolButton#tb1:hover{ background-image: url(:/image/Index/u26_mouseOver.svg); } -QToolButton{ +QToolButton#tb2:hover{ + background-image: url(:/image/Index/u26_mouseOver.svg); +} +QToolButton#tb3:hover{ + background-image: url(:/image/Index/u26_mouseOver.svg); +}QToolButton#tb4:hover{ +background-image: url(:/image/Index/u26_mouseOver.svg); +}QToolButton#tb5:hover{ +background-image: url(:/image/Index/u26_mouseOver.svg); +} +QToolButton#tb6:hover{ + background-image: url(:/image/Index/u26_mouseOver.svg); +} +QToolButton#tb1{ color: white; background-image: url(:/image/Index/u26.svg); font-weight: bold; @@ -20,4 +27,52 @@ text-align: center; margin:10; margin-right: 180px; +font: 18pt 微软雅黑; +} +QToolButton#tb2{ +color: white; +background-image: url(:/image/Index/u26.svg); +font-weight: bold; +border-radius: 5px; +text-align: center; +margin:10; +margin-right: 180px; +font: 18pt 微软雅黑; +} +QToolButton#tb3{ +color: white; +background-image: url(:/image/Index/u26.svg); +font-weight: bold; +border-radius: 5px; +text-align: center; +margin:10; +margin-right: 180px; +font: 18pt 微软雅黑; +}QToolButton#tb4{ +color: white; +background-image: url(:/image/Index/u26.svg); +font-weight: bold; +border-radius: 5px; +text-align: center; +margin:10; +margin-right: 180px; +font: 18pt 微软雅黑; +}QToolButton#tb5{ +color: white; +background-image: url(:/image/Index/u26.svg); +font-weight: bold; +border-radius: 5px; +text-align: center; +margin:10; +margin-right: 180px; +font: 18pt 微软雅黑; +}QToolButton#tb6{ +color: white; +background-image: url(:/image/Index/u26.svg); +font-weight: bold; +border-radius: 5px; +text-align: center; +margin:10; +margin-right: 180px; +font: 18pt 微软雅黑; } diff --git a/softwareDirectory/AutoVerScheme/rulefileitem.cpp b/softwareDirectory/AutoVerScheme/rulefileitem.cpp index 6f9ddd3..095165e 100644 --- a/softwareDirectory/AutoVerScheme/rulefileitem.cpp +++ b/softwareDirectory/AutoVerScheme/rulefileitem.cpp @@ -1,14 +1,63 @@ #include "rulefileitem.h" #include "ui_rulefileitem.h" +#include "QMessageBox" + RuleFileItem::RuleFileItem(QWidget *parent) : - QWidget(parent), + InfoBase(parent), ui(new Ui::RuleFileItem) { ui->setupUi(this); + this->initForm(); } RuleFileItem::~RuleFileItem() { delete ui; } +void RuleFileItem::initForm() +{ + + //tableWidget设置 + //设置控件的边框显示 + ui->tableWidget->setStyleSheet("QHeaderView::section {" + "border: 1px solid rgba(197, 196, 196, 1);" + "border-left:none;" + "border-top:none;" + "background-color:white;" + "}"); + + ui->tableWidget->setRowCount(10); // 设置10行 + ui->tableWidget->setColumnCount(9); // 设置11列 + ui->tableWidget->setColumnWidth(0, 80); // 设置第一列的宽度为100像素 + ui->tableWidget->verticalHeader()->setParent(nullptr); //隐藏行头 + QTableWidgetItem *item = new QTableWidgetItem("测试数据"); + item->setTextAlignment(Qt::AlignCenter); + ui->tableWidget->setItem(0, 0, item); //设置数据 + + //初始化TableWidget 设置列 + QStringList headers; + headers << "序号" << "文件号" << "文件名称" << "版本号" << "文件类型"<< "颁布时间" + << "实施时间" <<"备注"<<"操作"; + ui->tableWidget->setHorizontalHeaderLabels(headers); +} +void RuleFileItem::ShowMessageBox(QString title,QString value) { + // 创建一个QMessageBox对象 + QMessageBox msgBox; + + // 设置消息框的标题 + msgBox.setWindowTitle(title); + + // 设置消息框的文本内容 + msgBox.setText(value); + + // 设置消息框的标准按钮,这里是“确定”按钮 + msgBox.setStandardButtons(QMessageBox::Ok); + + // 显示消息框 + msgBox.exec(); +} +void RuleFileItem::Load() +{ + //ShowMessageBox("技术文件","技术文件初始化完成"); +} diff --git a/softwareDirectory/AutoVerScheme/rulefileitem.h b/softwareDirectory/AutoVerScheme/rulefileitem.h index 1fc81a1..d892a71 100644 --- a/softwareDirectory/AutoVerScheme/rulefileitem.h +++ b/softwareDirectory/AutoVerScheme/rulefileitem.h @@ -2,19 +2,24 @@ #define RULEFILEITEM_H #include +#include "InfoBase.h" namespace Ui { class RuleFileItem; } -class RuleFileItem : public QWidget +class RuleFileItem : public InfoBase { Q_OBJECT public: explicit RuleFileItem(QWidget *parent = nullptr); ~RuleFileItem(); - +private slots: + void initForm(); //初始化界面数据 + void ShowMessageBox(QString title,QString value); + //继承父类的Load方法 + void Load() override; private: Ui::RuleFileItem *ui; }; diff --git a/softwareDirectory/AutoVerScheme/rulefileitem.ui b/softwareDirectory/AutoVerScheme/rulefileitem.ui index 599e025..9144b96 100644 --- a/softwareDirectory/AutoVerScheme/rulefileitem.ui +++ b/softwareDirectory/AutoVerScheme/rulefileitem.ui @@ -6,26 +6,149 @@ 0 0 - 400 - 300 + 918 + 582 Form - - - - 140 - 130 - 121 - 24 - - - - 规程文件管理 - - + + + + + + 0 + 0 + + + + background-color:white; + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 文件号: + + + + + + + + 0 + 0 + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 文件名称: + + + + + + + + 0 + 0 + + + + + + + + Qt::Horizontal + + + QSizePolicy::Expanding + + + + 40 + 20 + + + + + + + + Qt::RightToLeft + + + 查询 + + + + + + + Qt::RightToLeft + + + 重置 + + + + + + + + + + background-color:white; + + + + + + + + + + + + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/standard_deviceitem.cpp b/softwareDirectory/AutoVerScheme/standard_deviceitem.cpp index ed15b0a..d1a6a80 100644 --- a/softwareDirectory/AutoVerScheme/standard_deviceitem.cpp +++ b/softwareDirectory/AutoVerScheme/standard_deviceitem.cpp @@ -1,14 +1,62 @@ #include "standard_deviceitem.h" #include "ui_standard_deviceitem.h" +#include "InfoBase.h" +#include "QMessageBox" Standard_DeviceItem::Standard_DeviceItem(QWidget *parent) : - QWidget(parent), + InfoBase(parent), ui(new Ui::Standard_DeviceItem) { ui->setupUi(this); + this->initForm(); } Standard_DeviceItem::~Standard_DeviceItem() { delete ui; } +void Standard_DeviceItem::initForm() +{ + //tableWidget设置 + //设置控件的边框显示 + ui->tableWidget->setStyleSheet("QHeaderView::section {" + "border: 1px solid rgba(197, 196, 196, 1);" + "border-left:none;" + "border-top:none;" + "background-color:white;" + "}"); + + ui->tableWidget->setRowCount(10); // 设置10行 + ui->tableWidget->setColumnCount(6); // 设置11列 + ui->tableWidget->setColumnWidth(0, 80); // 设置第一列的宽度为100像素 + ui->tableWidget->verticalHeader()->setParent(nullptr); //隐藏行头 + QTableWidgetItem *item = new QTableWidgetItem("测试数据"); + item->setTextAlignment(Qt::AlignCenter); + ui->tableWidget->setItem(0, 0, item); //设置数据 + + //初始化TableWidget 设置列 + QStringList headers; + headers << "序号" << "设备名称" << "型号规则" << "出厂编号" + << "生产厂家" <<"操作"; + ui->tableWidget->setHorizontalHeaderLabels(headers); +} +void Standard_DeviceItem::ShowMessageBox(QString title,QString value) { + // 创建一个QMessageBox对象 + QMessageBox msgBox; + + // 设置消息框的标题 + msgBox.setWindowTitle(title); + + // 设置消息框的文本内容 + msgBox.setText(value); + + // 设置消息框的标准按钮,这里是“确定”按钮 + msgBox.setStandardButtons(QMessageBox::Ok); + + // 显示消息框 + msgBox.exec(); +} +void Standard_DeviceItem::Load() +{ + //ShowMessageBox("标准管理","标准管理初始化完成"); +} diff --git a/softwareDirectory/AutoVerScheme/standard_deviceitem.h b/softwareDirectory/AutoVerScheme/standard_deviceitem.h index 198c362..97f5d2b 100644 --- a/softwareDirectory/AutoVerScheme/standard_deviceitem.h +++ b/softwareDirectory/AutoVerScheme/standard_deviceitem.h @@ -2,19 +2,24 @@ #define STANDARD_DEVICEITEM_H #include +#include "InfoBase.h" namespace Ui { class Standard_DeviceItem; } -class Standard_DeviceItem : public QWidget +class Standard_DeviceItem : public InfoBase { Q_OBJECT public: explicit Standard_DeviceItem(QWidget *parent = nullptr); ~Standard_DeviceItem(); - +private slots: + void initForm(); //初始化界面数据 + void ShowMessageBox(QString title,QString value); + //继承父类的Load方法 + void Load() override; private: Ui::Standard_DeviceItem *ui; }; diff --git a/softwareDirectory/AutoVerScheme/standard_deviceitem.ui b/softwareDirectory/AutoVerScheme/standard_deviceitem.ui index 00070b7..7421175 100644 --- a/softwareDirectory/AutoVerScheme/standard_deviceitem.ui +++ b/softwareDirectory/AutoVerScheme/standard_deviceitem.ui @@ -6,26 +6,196 @@ 0 0 - 400 - 300 + 1184 + 624 Form - - - - 150 - 140 - 89 - 24 - - - - 标准设备管理 - - + + + + + + 0 + 0 + + + + background-color:white; + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 设备名称: + + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 型号规则: + + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 出厂编号: + + + + + + + + 0 + 0 + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 生产厂家: + + + + + + + + 180 + 0 + + + + + 200 + 0 + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + Qt::RightToLeft + + + 查询 + + + + + + + Qt::RightToLeft + + + 重置 + + + + + + + + + + background-color:white; + + + + + + + + + + + + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/testdataitem.cpp b/softwareDirectory/AutoVerScheme/testdataitem.cpp index 4fde9cf..5666404 100644 --- a/softwareDirectory/AutoVerScheme/testdataitem.cpp +++ b/softwareDirectory/AutoVerScheme/testdataitem.cpp @@ -1,14 +1,63 @@ #include "testdataitem.h" #include "ui_testdataitem.h" +#include "QMessageBox.h" TestDataItem::TestDataItem(QWidget *parent) : - QWidget(parent), + InfoBase(parent), ui(new Ui::TestDataItem) { ui->setupUi(this); + this->initForm(); } TestDataItem::~TestDataItem() { delete ui; } +void TestDataItem::initForm() +{ + + //tableWidget设置 + //设置控件的边框显示 + ui->tableWidget->setStyleSheet("QHeaderView::section {" + "border: 1px solid rgba(197, 196, 196, 1);" + "border-left:none;" + "border-top:none;" + "background-color:white;" + "}"); + + ui->tableWidget->setRowCount(10); // 设置10行 + ui->tableWidget->setColumnCount(14); // 设置11列 + ui->tableWidget->setColumnWidth(0, 80); // 设置第一列的宽度为100像素 + ui->tableWidget->verticalHeader()->setParent(nullptr); //隐藏行头 + QTableWidgetItem *item = new QTableWidgetItem("测试数据"); + item->setTextAlignment(Qt::AlignCenter); + ui->tableWidget->setItem(0, 0, item); //设置数据 + + //初始化TableWidget 设置列 + QStringList headers; + headers << "序号" << "设备名称" << "型号规则" << "辅助字段" << "出厂编号" + << "生产厂家"<<"委托单位" <<"使用部门"<< "检定员"<< "检定时间" + <<"检定有效期"<<"计量标识"<<"限用说明"<<"操作"; + ui->tableWidget->setHorizontalHeaderLabels(headers); +} +void TestDataItem::ShowMessageBox(QString title,QString value) { + // 创建一个QMessageBox对象 + QMessageBox msgBox; + + // 设置消息框的标题 + msgBox.setWindowTitle(title); + + // 设置消息框的文本内容 + msgBox.setText(value); + + // 设置消息框的标准按钮,这里是“确定”按钮 + msgBox.setStandardButtons(QMessageBox::Ok); + + // 显示消息框 + msgBox.exec(); +} +void TestDataItem::Load() +{ + //ShowMessageBox("检定","检定管理初始化完成"); +} diff --git a/softwareDirectory/AutoVerScheme/testdataitem.h b/softwareDirectory/AutoVerScheme/testdataitem.h index 81ca7fa..2e0563c 100644 --- a/softwareDirectory/AutoVerScheme/testdataitem.h +++ b/softwareDirectory/AutoVerScheme/testdataitem.h @@ -2,19 +2,24 @@ #define TESTDATAITEM_H #include +#include "InfoBase.h" namespace Ui { class TestDataItem; } -class TestDataItem : public QWidget +class TestDataItem : public InfoBase { Q_OBJECT public: explicit TestDataItem(QWidget *parent = nullptr); ~TestDataItem(); - +private slots: + void initForm(); //初始化界面数据 + void ShowMessageBox(QString title,QString value); + //继承父类的Load方法 + void Load() override; private: Ui::TestDataItem *ui; }; diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro index 1280b70..dfb0418 100644 --- a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro @@ -22,6 +22,7 @@ checkmethodmanage.cpp \ checkwindow.cpp \ create_task.cpp \ + datasyncview.cpp \ depar_task.cpp \ indexwindow.cpp \ infomanageview.cpp \ @@ -43,6 +44,7 @@ checkmethodmanage.h \ checkwindow.h \ create_task.h \ + datasyncview.h \ depar_task.h \ indexwindow.h \ infomanageview.h \ @@ -62,6 +64,7 @@ checkmethodmanage.ui \ checkwindow.ui \ create_task.ui \ + datasyncview.ui \ depar_task.ui \ indexwindow.ui \ infomanageview.ui \ diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user index 6ea03c5..93c39cb 100644 --- a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user @@ -1,10 +1,10 @@ - + EnvironmentId - {2746248a-b112-4e0f-9ae0-9e61f2a42309} + {c08df58c-84a7-4965-bca6-e98789474efa} ProjectExplorer.Project.ActiveTarget @@ -71,7 +71,7 @@ 0 0 - D:/dev/QT/AutoCalHainan/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug true @@ -119,7 +119,7 @@ 2 - D:/dev/QT/AutoCalHainan/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Release + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Release true @@ -167,7 +167,7 @@ 0 - D:/dev/QT/AutoCalHainan/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Profile + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Profile true @@ -287,8 +287,8 @@ 2 - Qt4ProjectManager.Qt4RunConfiguration:D:/dev/QT/AutoCalHainan/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro - D:/dev/QT/AutoCalHainan/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro + Qt4ProjectManager.Qt4RunConfiguration:C:/Users/admin/Desktop/SVN/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro + C:/Users/admin/Desktop/SVN/software/softwareDirectory/AutoVerScheme/AutoVerScheme.pro false @@ -299,7 +299,7 @@ false true - D:/dev/QT/AutoCalHainan/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug 1 @@ -314,7 +314,7 @@ 0 0 - D:/dev/QT/AutoCalHainan/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Debug + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Debug true @@ -362,7 +362,7 @@ 2 - D:/dev/QT/AutoCalHainan/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Release + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Release true @@ -410,7 +410,7 @@ 0 - D:/dev/QT/AutoCalHainan/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Profile + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Profile true @@ -530,14 +530,15 @@ 2 - - ProjectExplorer.CustomExecutableRunConfiguration - + AutoVerScheme2 + 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 diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user.c08df58 b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user.c08df58 deleted file mode 100644 index 495f95c..0000000 --- a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user.c08df58 +++ /dev/null @@ -1,563 +0,0 @@ - - - - - - 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 32-bit - Desktop Qt 5.14.2 MinGW 32-bit - qt.qt5.5142.win32_mingw73_kit - 0 - 0 - 0 - - D:/Auto_verification_scheme/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 - - - D:/Auto_verification_scheme/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 - - - D:/Auto_verification_scheme/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 - - D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug - - 1 - - - - ProjectExplorer.Project.Target.1 - - 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 - - D:/Auto_verification_scheme/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 - - - D:/Auto_verification_scheme/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 - - - D:/Auto_verification_scheme/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 - - AutoVerScheme2 - 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/InfoBase.h b/softwareDirectory/AutoVerScheme/InfoBase.h index 7fec63e..084cf3f 100644 --- a/softwareDirectory/AutoVerScheme/InfoBase.h +++ b/softwareDirectory/AutoVerScheme/InfoBase.h @@ -2,6 +2,7 @@ #define INFOBASE_H #include +#include "QStandardItemModel" ///信号管理页面的基类 所有信息管理页面都继承于InfoBase /// 便于统一管理 所有子类必须实现Load方法 /// 每次按钮点击切换都会调用Load方法 用于每次页面的数据刷新 @@ -11,6 +12,8 @@ InfoBase(QWidget *parent = nullptr): QWidget(parent){}; // 纯虚函数 virtual void Load()=0; + //QStandardItemModel 的实例。这个模型将用于存储和管理数据。 + QStandardItemModel *model; }; #endif // INFOBASE_H diff --git a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.cpp b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.cpp index 7ac1e87..ffb2bbc 100644 --- a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.cpp +++ b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.cpp @@ -1,14 +1,64 @@ #include "beexamined_deviceitem.h" #include "ui_beexamined_deviceitem.h" +#include "QMessageBox.h" BeExamined_DeviceItem::BeExamined_DeviceItem(QWidget *parent) : - QWidget(parent), + InfoBase(parent), ui(new Ui::BeExamined_DeviceItem) { ui->setupUi(this); + this->initForm(); } BeExamined_DeviceItem::~BeExamined_DeviceItem() { delete ui; } + +void BeExamined_DeviceItem::initForm() +{ + + //tableWidget设置 + //设置控件的边框显示 + ui->tableWidget->setStyleSheet("QHeaderView::section {" + "border: 1px solid rgba(197, 196, 196, 1);" + "border-left:none;" + "border-top:none;" + "background-color:white;" + "}"); + + ui->tableWidget->setRowCount(10); // 设置10行 + ui->tableWidget->setColumnCount(12); // 设置11列 + ui->tableWidget->setColumnWidth(0, 80); // 设置第一列的宽度为100像素 + ui->tableWidget->verticalHeader()->setParent(nullptr); //隐藏行头 + QTableWidgetItem *item = new QTableWidgetItem("测试数据"); + item->setTextAlignment(Qt::AlignCenter); + ui->tableWidget->setItem(0, 0, item); //设置数据 + + //初始化TableWidget 设置列 + QStringList headers; + headers << "序号" << "设备名称" << "型号规则" << "辅助字段" << "出厂编号" + << "生产厂家"<<"所在单位" <<"使用部门"<<"计量标识"<<"检定周期"<<"证书有效期"<<"操作"; + ui->tableWidget->setHorizontalHeaderLabels(headers); + +} +void BeExamined_DeviceItem::ShowMessageBox(QString title,QString value) { + // 创建一个QMessageBox对象 + QMessageBox msgBox; + + // 设置消息框的标题 + msgBox.setWindowTitle(title); + + // 设置消息框的文本内容 + msgBox.setText(value); + + // 设置消息框的标准按钮,这里是“确定”按钮 + msgBox.setStandardButtons(QMessageBox::Ok); + + // 显示消息框 + msgBox.exec(); +} +void BeExamined_DeviceItem::Load() +{ + //ShowMessageBox("被检设备","被检设备初始化完成"); +} diff --git a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.h b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.h index 76b061d..ae46979 100644 --- a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.h +++ b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.h @@ -2,12 +2,13 @@ #define BEEXAMINED_DEVICEITEM_H #include +#include "InfoBase.h" namespace Ui { class BeExamined_DeviceItem; } -class BeExamined_DeviceItem : public QWidget +class BeExamined_DeviceItem : public InfoBase { Q_OBJECT @@ -15,6 +16,11 @@ explicit BeExamined_DeviceItem(QWidget *parent = nullptr); ~BeExamined_DeviceItem(); +private slots: + void initForm(); //初始化界面数据 + void ShowMessageBox(QString title,QString value); + //继承父类的Load方法 + void Load() override; private: Ui::BeExamined_DeviceItem *ui; }; diff --git a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.ui b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.ui index af9f7bf..5a0a3c9 100644 --- a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.ui +++ b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.ui @@ -6,26 +6,236 @@ 0 0 - 400 - 300 + 1291 + 575 Form - - - - 130 - 140 - 89 - 24 - - - - 被检设备管理 - - + + + + + + 0 + 0 + + + + background-color:white; + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 设备名称: + + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 型号规则: + + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 出厂编号: + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 生产厂家: + + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 使用部门: + + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 使用单位: + + + + + + + + + + Qt::Horizontal + + + QSizePolicy::Expanding + + + + 40 + 20 + + + + + + + + Qt::RightToLeft + + + 查询 + + + + + + + Qt::RightToLeft + + + 重置 + + + + + + + + + + background-color:white; + + + + + + + + + + + + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/create_task.cpp b/softwareDirectory/AutoVerScheme/create_task.cpp index 4193efc..9b49a1a 100644 --- a/softwareDirectory/AutoVerScheme/create_task.cpp +++ b/softwareDirectory/AutoVerScheme/create_task.cpp @@ -1,14 +1,61 @@ #include "create_task.h" #include "ui_create_task.h" +#include "QMessageBox" Create_Task::Create_Task(QWidget *parent) : - QWidget(parent), + InfoBase(parent), ui(new Ui::Create_Task) { ui->setupUi(this); + this->initForm(); } Create_Task::~Create_Task() { delete ui; } +void Create_Task::initForm() +{ + //tableWidget设置 + //设置控件的边框显示 + ui->tableWidget->setStyleSheet("QHeaderView::section {" + "border: 1px solid rgba(197, 196, 196, 1);" + "border-left:none;" + "border-top:none;" + "background-color:white;" + "}"); + + ui->tableWidget->setRowCount(10); // 设置10行 + ui->tableWidget->setColumnCount(8); // 设置11列 + ui->tableWidget->setColumnWidth(0, 80); // 设置第一列的宽度为100像素 + ui->tableWidget->verticalHeader()->setParent(nullptr); //隐藏行头 + QTableWidgetItem *item = new QTableWidgetItem("测试数据"); + item->setTextAlignment(Qt::AlignCenter); + ui->tableWidget->setItem(0, 0, item); //设置数据 + + //初始化TableWidget 设置列 + QStringList headers; + headers << "序号" << "任务单编号" << "委托方"<< "使用部门" << "要求检完时间" << "送检人"<<"是否加急"<<"操作"; + ui->tableWidget->setHorizontalHeaderLabels(headers); + //ShowMessageBox("标题","初始化完成"); +} +void Create_Task::ShowMessageBox(QString title,QString value) { + // 创建一个QMessageBox对象 + QMessageBox msgBox; + + // 设置消息框的标题 + msgBox.setWindowTitle(title); + + // 设置消息框的文本内容 + msgBox.setText(value); + + // 设置消息框的标准按钮,这里是“确定”按钮 + msgBox.setStandardButtons(QMessageBox::Ok); + + // 显示消息框 + msgBox.exec(); +} +void Create_Task::Load() +{ + //ShowMessageBox("创建任务界面","创建任务界面初始化完成"); +} diff --git a/softwareDirectory/AutoVerScheme/create_task.h b/softwareDirectory/AutoVerScheme/create_task.h index e2264de..7cf383f 100644 --- a/softwareDirectory/AutoVerScheme/create_task.h +++ b/softwareDirectory/AutoVerScheme/create_task.h @@ -1,13 +1,14 @@ #ifndef CREATE_TASK_H #define CREATE_TASK_H +#include "InfoBase.h" #include namespace Ui { class Create_Task; } -class Create_Task : public QWidget +class Create_Task : public InfoBase { Q_OBJECT @@ -15,6 +16,11 @@ explicit Create_Task(QWidget *parent = nullptr); ~Create_Task(); +private slots: + void initForm(); //初始化界面数据 + void ShowMessageBox(QString title,QString value); + //继承父类的Load方法 + void Load() override; private: Ui::Create_Task *ui; }; diff --git a/softwareDirectory/AutoVerScheme/create_task.ui b/softwareDirectory/AutoVerScheme/create_task.ui index b79c6a1..d9d88ed 100644 --- a/softwareDirectory/AutoVerScheme/create_task.ui +++ b/softwareDirectory/AutoVerScheme/create_task.ui @@ -6,29 +6,294 @@ 0 0 - 400 - 300 + 1184 + 580 Form - - background-color:red; + + Qt::LeftToRight - - - - 140 - 120 - 89 - 24 - - - - 创建任务单 - - + + + + + + + + + 0 + 0 + + + + background-color:white; + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 任务单编号: + + + + + + + + 0 + 0 + + + + + + + + + 0 + 0 + + + + + 50 + 0 + + + + 委托方: + + + + + + + + 0 + 0 + + + + + 0 + 0 + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 使用部门: + + + + + + + + 0 + 0 + + + + + 0 + 0 + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 要求完成时间: + + + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + 0 + 30 + + + + Qt::RightToLeft + + + background-color:rgb(3, 58, 132); +color:white; + + + + 查询 + + + + + + + + 0 + 30 + + + + Qt::RightToLeft + + + background-color:rgb(207, 132, 33); +color:white; + + + + 重置 + + + + + + + + + + background-color:white; + + + + + + + 6 + + + 9 + + + 9 + + + 9 + + + + + + 0 + 0 + + + + + 120 + 40 + + + + OpenHandCursor + + + Qt::DefaultContextMenu + + + Qt::RightToLeft + + + false + + + background-color:rgb(9, 89, 179); +color:white; + + + 创建任务单 + + + true + + + + + + + + + + + + + + SizeVerCursor + + + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/datasyncview.cpp b/softwareDirectory/AutoVerScheme/datasyncview.cpp new file mode 100644 index 0000000..74cd41d --- /dev/null +++ b/softwareDirectory/AutoVerScheme/datasyncview.cpp @@ -0,0 +1,44 @@ +#include "datasyncview.h" +#include "ui_datasyncview.h" + +DataSyncView::DataSyncView(QWidget *parent) : + QWidget(parent), + ui(new Ui::DataSyncView) +{ + ui->setupUi(this); + this->initForm(); +} + +DataSyncView::~DataSyncView() +{ + delete ui; +} +void DataSyncView::initForm() +{ + //tableWidget设置 + //设置控件的边框显示 + ui->tableWidget->setStyleSheet("QHeaderView::section {" + "border: 1px solid grey;" + "border-left:none;" + "border-top:none;" + "background-color:white;" + " color:black;" + "font: bold 18px Arial, sans-serif;" + "}"); + + ui->tableWidget->setRowCount(10); // 设置10行 + ui->tableWidget->setColumnCount(4); // 设置11列 + ui->tableWidget->setColumnWidth(0, 80); // 设置第一列的宽度为100像素 + ui->tableWidget->verticalHeader()->setParent(nullptr); //隐藏行头 + QTableWidgetItem *item = new QTableWidgetItem("测试数据"); + item->setTextAlignment(Qt::AlignCenter); + ui->tableWidget->setItem(0, 0, item); //设置数据 + + //初始化TableWidget 设置列 + QStringList headers; + headers << "序号" << "同步时间" << "是否同步成功" << "备注" ; + ui->tableWidget->setHorizontalHeaderLabels(headers); + + + +} diff --git a/softwareDirectory/AutoVerScheme/datasyncview.h b/softwareDirectory/AutoVerScheme/datasyncview.h new file mode 100644 index 0000000..9a73de9 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/datasyncview.h @@ -0,0 +1,24 @@ +#ifndef DATASYNCVIEW_H +#define DATASYNCVIEW_H + +#include + +namespace Ui { +class DataSyncView; +} + +class DataSyncView : public QWidget +{ + Q_OBJECT + +public: + explicit DataSyncView(QWidget *parent = nullptr); + ~DataSyncView(); +private slots: + void initForm(); //初始化界面数据 + +private: + Ui::DataSyncView *ui; +}; + +#endif // DATASYNCVIEW_H diff --git a/softwareDirectory/AutoVerScheme/datasyncview.ui b/softwareDirectory/AutoVerScheme/datasyncview.ui new file mode 100644 index 0000000..c45bf56 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/datasyncview.ui @@ -0,0 +1,133 @@ + + + DataSyncView + + + + 0 + 0 + 874 + 531 + + + + 数据同步 + + + background-color:rgba(240, 240, 240, 1); + + + + + + background-color:white; + + + + + + + + + + 0 + 0 + + + + background-color:white; +border:0; + + + + + + + + + + 0 + 0 + + + + font:bold 20px Arial, sans-serif; +color:#334582; + + + 同步记录 + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + background-color:#334582; + font: bold 18px Arial, sans-serif; +color:white; +padding:10px; + + + 下载数据 + + + + + + + + 200 + 0 + + + + + 100 + 40 + + + + Qt::RightToLeft + + + background-color:#334582; + font: bold 18px Arial, sans-serif; +color:white; +padding:10px; + + + 发送同步请求 + + + + + + + + + + + + + + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/depar_task.cpp b/softwareDirectory/AutoVerScheme/depar_task.cpp index de39775..5f0f93a 100644 --- a/softwareDirectory/AutoVerScheme/depar_task.cpp +++ b/softwareDirectory/AutoVerScheme/depar_task.cpp @@ -2,13 +2,19 @@ #include "ui_depar_task.h" #include "QMessageBox" #include "InfoBase.h" +#include "QStandardItemModel" Depar_Task::Depar_Task(QWidget *parent) : InfoBase(parent), ui(new Ui::Depar_Task) { ui->setupUi(this); + //初始化列表 this->initForm(); + + + + } Depar_Task::~Depar_Task() @@ -17,8 +23,31 @@ } void Depar_Task::initForm() { + //tableWidget设置 + //设置控件的边框显示 + ui->tableWidget->setStyleSheet("QHeaderView::section {" + "border: 1px solid rgba(197, 196, 196, 1);" + "border-left:none;" + "border-top:none;" + "background-color:white;" + "}"); - //ShowMessageBox("标题","初始化完成"); + ui->tableWidget->setRowCount(10); // 设置10行 + ui->tableWidget->setColumnCount(10); // 设置11列 + ui->tableWidget->setColumnWidth(0, 80); // 设置第一列的宽度为100像素 + ui->tableWidget->verticalHeader()->setParent(nullptr); //隐藏行头 + QTableWidgetItem *item = new QTableWidgetItem("测试数据"); + item->setTextAlignment(Qt::AlignCenter); //文件居中 + ui->tableWidget->setItem(0, 0, item); //设置数据 + + //初始化TableWidget 设置列 + QStringList headers; + headers << "序号" << "设备名称" << "型号规则" << "辅助字段" << "辅助字段"<< "出厂编号" + << "生产厂家" <<"委托方"<<"使用部门"<<"要求检完时间"<<"是否加急"; + ui->tableWidget->setHorizontalHeaderLabels(headers); + + + } void Depar_Task::ShowMessageBox(QString title,QString value) { // 创建一个QMessageBox对象 @@ -38,5 +67,5 @@ } void Depar_Task::Load() { - ShowMessageBox("部门任务页面","部门任务初始化完成"); + //ShowMessageBox("部门任务页面","部门任务初始化完成"); } diff --git a/softwareDirectory/AutoVerScheme/depar_task.h b/softwareDirectory/AutoVerScheme/depar_task.h index 8716faf..110008d 100644 --- a/softwareDirectory/AutoVerScheme/depar_task.h +++ b/softwareDirectory/AutoVerScheme/depar_task.h @@ -3,6 +3,7 @@ #include "InfoBase.h" +#include "QStandardItemModel" namespace Ui { class Depar_Task; @@ -20,9 +21,12 @@ private slots: void initForm(); //初始化界面数据 void ShowMessageBox(QString title,QString value); + //继承父类的Load方法 void Load() override; + private: Ui::Depar_Task *ui; + // QStandardItemModel *model; }; #endif // DEPAR_TASK_H diff --git a/softwareDirectory/AutoVerScheme/depar_task.ui b/softwareDirectory/AutoVerScheme/depar_task.ui index ff3d44f..1a95cc4 100644 --- a/softwareDirectory/AutoVerScheme/depar_task.ui +++ b/softwareDirectory/AutoVerScheme/depar_task.ui @@ -6,7 +6,7 @@ 0 0 - 1184 + 1190 456 @@ -143,7 +143,34 @@ + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + 0 + 30 + + + + Qt::RightToLeft + + + background-color:rgb(3, 58, 152); +color:white; + + 查询 @@ -151,6 +178,20 @@ + + + 0 + 30 + + + + Qt::RightToLeft + + + background-color:rgb(207, 132, 33); +color:white; + + 重置 @@ -168,8 +209,15 @@ + + + - + + + + + diff --git a/softwareDirectory/AutoVerScheme/indexwindow.cpp b/softwareDirectory/AutoVerScheme/indexwindow.cpp index fca900a..cbba812 100644 --- a/softwareDirectory/AutoVerScheme/indexwindow.cpp +++ b/softwareDirectory/AutoVerScheme/indexwindow.cpp @@ -13,11 +13,37 @@ { ui->setupUi(this); this->initForm(); +/* + //主要作用 当页面关闭后 回到indexwindow页面 并 通过~IndexWindow 释放此页面指针所占用内存 + // 假设 ShowDataSyncView 是一个指向 DataSyncView 实例的指针 + // 当 ShowDataSyncView 关闭时,它的 closed() 信号会被发出 + // 连接这个信号到 IndexWindow 的 onNewWindowClosed() 槽函数 + if(ShowDataSyncView) { + //数据同步页面 信号槽 + connect(ShowDataSyncView, &DataSyncView::close, this, &IndexWindow::onNewWindowClosed); + } + if(ShowInfoManageView) { + //信息管理 信号槽 + connect(ShowInfoManageView, &InfoManageView::close, this, &IndexWindow::onNewWindowClosed); + } + */ } IndexWindow::~IndexWindow() { delete ui; + //释放页面内存 + /* + if (ShowDataSyncView) { + ShowDataSyncView->close(); + delete ShowDataSyncView; + } + else if(ShowInfoManageView) + { + ShowInfoManageView->close(); + delete ShowInfoManageView; + } + */ } void IndexWindow::initForm() { @@ -57,6 +83,15 @@ } + +void IndexWindow::onNewWindowClosed() +{ + // 新窗体关闭后,设置 IndexWindow 为活动窗口 + this->activateWindow(); + // 也可以设置焦点到 MainWindow 中的某个控件 + // ui->someWidget->setFocus(); +} + void IndexWindow::showCheckWindow() { CheckWindow *checkWindow = new CheckWindow; @@ -65,6 +100,26 @@ checkWindow->show(); } +//信息管理按钮 +void IndexWindow::on_tb3_clicked() +{ + InfoManageView *ShowInfoManageView = new InfoManageView(); + ShowInfoManageView->setWindowState(Qt::WindowMaximized); + ShowInfoManageView->setWindowModality(Qt::ApplicationModal); + ShowInfoManageView->show(); +} +//数据同步按钮 +void IndexWindow::on_tb6_clicked() +{ + + // 创建新窗体实例并显示 + DataSyncView *ShowDataSyncView = new DataSyncView(); + ShowDataSyncView->setWindowState(Qt::WindowMaximized); + ShowDataSyncView->setWindowModality(Qt::ApplicationModal); + ShowDataSyncView->show(); +} + + void IndexWindow::showCheckMethod() { CheckMethodManage *checkWindow = new CheckMethodManage; diff --git a/softwareDirectory/AutoVerScheme/indexwindow.h b/softwareDirectory/AutoVerScheme/indexwindow.h index a05d802..190b0f1 100644 --- a/softwareDirectory/AutoVerScheme/indexwindow.h +++ b/softwareDirectory/AutoVerScheme/indexwindow.h @@ -2,6 +2,8 @@ #define INDEXWINDOW_H #include +#include "datasyncView.h" +#include "infomanageview.h" namespace Ui { class IndexWindow; @@ -23,8 +25,21 @@ void showVerifyMethod(); + void on_tb3_clicked(); + + void on_tb6_clicked(); + + //页面关闭响应函数 + void onNewWindowClosed(); + + void on_tb1_clicked(); + private: Ui::IndexWindow *ui; + + //数据同步页面 指针 + //DataSyncView *ShowDataSyncView; + //InfoManageView *ShowInfoManageView; }; #endif // INDEXWINDOW_H diff --git a/softwareDirectory/AutoVerScheme/indexwindow.ui b/softwareDirectory/AutoVerScheme/indexwindow.ui index d69a54d..dec7207 100644 --- a/softwareDirectory/AutoVerScheme/indexwindow.ui +++ b/softwareDirectory/AutoVerScheme/indexwindow.ui @@ -189,7 +189,7 @@ - + 0 @@ -236,7 +236,7 @@ - + 0 @@ -270,7 +270,7 @@ - + 0 @@ -310,7 +310,7 @@ - + 0 @@ -357,7 +357,7 @@ - + 0 @@ -423,7 +423,7 @@ - + 0 @@ -521,66 +521,34 @@ - toolButton_4 + tb1 clicked() IndexWindow showCheckWindow() - 214 - 250 + 260 + 276 - 351 - 107 + 666 + 394 - toolButton_6 + tb4 clicked() IndexWindow showCheckMethod() - 249 - 606 + 260 + 598 - 331 - 452 - - - - - toolButton_5 - clicked() - IndexWindow - showVerifyMethod() - - - 706 - 589 - - - 692 - 442 - - - - - toolButton_2 - clicked() - IndexWindow - showVerifyWindow() - - - 758 - 249 - - - 862 - 114 + 666 + 394 diff --git a/softwareDirectory/AutoVerScheme/infomanageview.cpp b/softwareDirectory/AutoVerScheme/infomanageview.cpp index a206c6f..d045c60 100644 --- a/softwareDirectory/AutoVerScheme/infomanageview.cpp +++ b/softwareDirectory/AutoVerScheme/infomanageview.cpp @@ -2,6 +2,7 @@ #include "ui_infomanageview.h" #include #include +#include //子窗体 #include "depar_task.h" #include "my_task.h" @@ -19,6 +20,7 @@ { ui->setupUi(this); this->setWindowTitle("信息管理"); + //初始化调用所有函数 this->initForm(); this->initWidget(); @@ -115,7 +117,8 @@ //底部加个弹簧 QSpacerItem *verticalSpacer = new QSpacerItem(20, 40, QSizePolicy::Minimum, QSizePolicy::Expanding); ui->widgetLeft->layout()->addItem(verticalSpacer); - btns.at(names.count() - 1)->click(); + + btns.at(0)->click();//选择启动页面 第一个 } //按钮点击切换UI事件 void InfoManageView::buttonClicked() diff --git a/softwareDirectory/AutoVerScheme/infomanageview.h b/softwareDirectory/AutoVerScheme/infomanageview.h index 3c1463f..5e44bba 100644 --- a/softwareDirectory/AutoVerScheme/infomanageview.h +++ b/softwareDirectory/AutoVerScheme/infomanageview.h @@ -2,6 +2,7 @@ #define INFOMANAGEVIEW_H #include +#include class QAbstractButton; diff --git a/softwareDirectory/AutoVerScheme/infomanageview.ui b/softwareDirectory/AutoVerScheme/infomanageview.ui index 4b39e7d..ef0b87b 100644 --- a/softwareDirectory/AutoVerScheme/infomanageview.ui +++ b/softwareDirectory/AutoVerScheme/infomanageview.ui @@ -10,8 +10,15 @@ 644 + + Qt::DefaultContextMenu + - Form + 信息管理 + + + color:black; +background-color:rgba(240, 240, 240, 1); @@ -68,8 +75,8 @@ - - 170 + + 0 0 diff --git a/softwareDirectory/AutoVerScheme/inspectdataitem.cpp b/softwareDirectory/AutoVerScheme/inspectdataitem.cpp index e9c2adc..efc00ba 100644 --- a/softwareDirectory/AutoVerScheme/inspectdataitem.cpp +++ b/softwareDirectory/AutoVerScheme/inspectdataitem.cpp @@ -1,14 +1,62 @@ #include "inspectdataitem.h" #include "ui_inspectdataitem.h" +#include "QMessageBox.h" InspectDataItem::InspectDataItem(QWidget *parent) : - QWidget(parent), + InfoBase(parent), ui(new Ui::InspectDataItem) { ui->setupUi(this); + this->initForm(); } InspectDataItem::~InspectDataItem() { delete ui; } +void InspectDataItem::initForm() +{ + //tableWidget设置 + //设置控件的边框显示 + ui->tableWidget->setStyleSheet("QHeaderView::section {" + "border: 1px solid rgba(197, 196, 196, 1);" + "border-left:none;" + "border-top:none;" + "background-color:white;" + "}"); + + ui->tableWidget->setRowCount(10); // 设置10行 + ui->tableWidget->setColumnCount(12); // 设置11列 + ui->tableWidget->setColumnWidth(0, 80); // 设置第一列的宽度为100像素 + ui->tableWidget->verticalHeader()->setParent(nullptr); //隐藏行头 + QTableWidgetItem *item = new QTableWidgetItem("测试数据"); + item->setTextAlignment(Qt::AlignCenter); + ui->tableWidget->setItem(0, 0, item); //设置数据 + + //初始化TableWidget 设置列 + QStringList headers; + headers << "序号" << "设备名称" << "型号规则" << "出厂编号" + <<"核查件名称"<<"核查件型号"<<"核查件编号" <<"核查员" + << "核查日期" <<"实验室"<<"部门"<<"操作"; + ui->tableWidget->setHorizontalHeaderLabels(headers); +} +void InspectDataItem::ShowMessageBox(QString title,QString value) { + // 创建一个QMessageBox对象 + QMessageBox msgBox; + + // 设置消息框的标题 + msgBox.setWindowTitle(title); + + // 设置消息框的文本内容 + msgBox.setText(value); + + // 设置消息框的标准按钮,这里是“确定”按钮 + msgBox.setStandardButtons(QMessageBox::Ok); + + // 显示消息框 + msgBox.exec(); +} +void InspectDataItem::Load() +{ + //ShowMessageBox("核查数据","核查数据"); +} diff --git a/softwareDirectory/AutoVerScheme/inspectdataitem.h b/softwareDirectory/AutoVerScheme/inspectdataitem.h index 57551bb..bdf7066 100644 --- a/softwareDirectory/AutoVerScheme/inspectdataitem.h +++ b/softwareDirectory/AutoVerScheme/inspectdataitem.h @@ -2,19 +2,24 @@ #define INSPECTDATAITEM_H #include +#include "InfoBase.h" namespace Ui { class InspectDataItem; } -class InspectDataItem : public QWidget +class InspectDataItem : public InfoBase { Q_OBJECT public: explicit InspectDataItem(QWidget *parent = nullptr); ~InspectDataItem(); - +private slots: + void initForm(); //初始化界面数据 + void ShowMessageBox(QString title,QString value); + //继承父类的Load方法 + void Load() override; private: Ui::InspectDataItem *ui; }; diff --git a/softwareDirectory/AutoVerScheme/inspectdataitem.ui b/softwareDirectory/AutoVerScheme/inspectdataitem.ui index 45f04e0..86786c9 100644 --- a/softwareDirectory/AutoVerScheme/inspectdataitem.ui +++ b/softwareDirectory/AutoVerScheme/inspectdataitem.ui @@ -6,26 +6,236 @@ 0 0 - 400 - 300 + 1362 + 543 Form - - - - 120 - 130 - 89 - 24 - - - - 核查数据管理 - - + + + + + + 0 + 0 + + + + background-color:white; + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 设备名称: + + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 型号规则: + + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 出厂编号: + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 核查员: + + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 核查日期: + + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 实验室: + + + + + + + + + + Qt::Horizontal + + + QSizePolicy::Expanding + + + + 40 + 20 + + + + + + + + Qt::RightToLeft + + + 查询 + + + + + + + Qt::RightToLeft + + + 重置 + + + + + + + + + + background-color:white; + + + + + + + + + + + + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/my_task.cpp b/softwareDirectory/AutoVerScheme/my_task.cpp index 40aceb2..559a73b 100644 --- a/softwareDirectory/AutoVerScheme/my_task.cpp +++ b/softwareDirectory/AutoVerScheme/my_task.cpp @@ -7,7 +7,8 @@ ui(new Ui::My_Task) { ui->setupUi(this); - + //初始化QStandardItemModel + model=new QStandardItemModel(parent); this->initForm(); } @@ -17,7 +18,28 @@ } void My_Task::initForm() { + //tableWidget设置 + //设置控件的边框显示 + ui->tableWidget->setStyleSheet("QHeaderView::section {" + "border: 1px solid rgba(197, 196, 196, 1);" + "border-left:none;" + "border-top:none;" + "background-color:white;" + "}"); + ui->tableWidget->setRowCount(10); // 设置10行 + ui->tableWidget->setColumnCount(10); // 设置11列 + ui->tableWidget->setColumnWidth(0, 80); // 设置第一列的宽度为100像素 + ui->tableWidget->verticalHeader()->setParent(nullptr); //隐藏行头 + QTableWidgetItem *item = new QTableWidgetItem("测试数据"); + item->setTextAlignment(Qt::AlignCenter); + ui->tableWidget->setItem(0, 0, item); //设置数据 + + //初始化TableWidget 设置列 + QStringList headers; + headers << "序号" << "设备名称" << "型号规则" << "辅助字段" << "辅助字段"<< "出厂编号" + << "生产厂家" <<"委托方"<<"使用部门"<<"要求检完时间"<<"是否加急"; + ui->tableWidget->setHorizontalHeaderLabels(headers); } void My_Task::ShowMessageBox(QString title,QString value) { @@ -38,5 +60,5 @@ } void My_Task::Load() { - ShowMessageBox("我的任务页面","我的任务初始化完成"); + //ShowMessageBox("我的任务页面","我的任务初始化完成"); } diff --git a/softwareDirectory/AutoVerScheme/my_task.ui b/softwareDirectory/AutoVerScheme/my_task.ui index 89245b8..a078840 100644 --- a/softwareDirectory/AutoVerScheme/my_task.ui +++ b/softwareDirectory/AutoVerScheme/my_task.ui @@ -6,8 +6,8 @@ 0 0 - 857 - 511 + 1190 + 577 @@ -140,7 +140,23 @@ + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + Qt::RightToLeft + 查询 @@ -148,6 +164,9 @@ + + Qt::RightToLeft + 重置 @@ -166,7 +185,14 @@ - + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/res/qss/Index.css b/softwareDirectory/AutoVerScheme/res/qss/Index.css index 8fad195..d2ba43e 100644 --- a/softwareDirectory/AutoVerScheme/res/qss/Index.css +++ b/softwareDirectory/AutoVerScheme/res/qss/Index.css @@ -1,18 +1,25 @@ -*{ - -color:black; -font: 18pt 微软雅黑; - -} -QMainWindow +QMainWindow#IndexWindow { background-image: url(:/image/Index/u15.png); background-color:white; } -QToolButton:hover{ +QToolButton#tb1:hover{ background-image: url(:/image/Index/u26_mouseOver.svg); } -QToolButton{ +QToolButton#tb2:hover{ + background-image: url(:/image/Index/u26_mouseOver.svg); +} +QToolButton#tb3:hover{ + background-image: url(:/image/Index/u26_mouseOver.svg); +}QToolButton#tb4:hover{ +background-image: url(:/image/Index/u26_mouseOver.svg); +}QToolButton#tb5:hover{ +background-image: url(:/image/Index/u26_mouseOver.svg); +} +QToolButton#tb6:hover{ + background-image: url(:/image/Index/u26_mouseOver.svg); +} +QToolButton#tb1{ color: white; background-image: url(:/image/Index/u26.svg); font-weight: bold; @@ -20,4 +27,52 @@ text-align: center; margin:10; margin-right: 180px; +font: 18pt 微软雅黑; +} +QToolButton#tb2{ +color: white; +background-image: url(:/image/Index/u26.svg); +font-weight: bold; +border-radius: 5px; +text-align: center; +margin:10; +margin-right: 180px; +font: 18pt 微软雅黑; +} +QToolButton#tb3{ +color: white; +background-image: url(:/image/Index/u26.svg); +font-weight: bold; +border-radius: 5px; +text-align: center; +margin:10; +margin-right: 180px; +font: 18pt 微软雅黑; +}QToolButton#tb4{ +color: white; +background-image: url(:/image/Index/u26.svg); +font-weight: bold; +border-radius: 5px; +text-align: center; +margin:10; +margin-right: 180px; +font: 18pt 微软雅黑; +}QToolButton#tb5{ +color: white; +background-image: url(:/image/Index/u26.svg); +font-weight: bold; +border-radius: 5px; +text-align: center; +margin:10; +margin-right: 180px; +font: 18pt 微软雅黑; +}QToolButton#tb6{ +color: white; +background-image: url(:/image/Index/u26.svg); +font-weight: bold; +border-radius: 5px; +text-align: center; +margin:10; +margin-right: 180px; +font: 18pt 微软雅黑; } diff --git a/softwareDirectory/AutoVerScheme/rulefileitem.cpp b/softwareDirectory/AutoVerScheme/rulefileitem.cpp index 6f9ddd3..095165e 100644 --- a/softwareDirectory/AutoVerScheme/rulefileitem.cpp +++ b/softwareDirectory/AutoVerScheme/rulefileitem.cpp @@ -1,14 +1,63 @@ #include "rulefileitem.h" #include "ui_rulefileitem.h" +#include "QMessageBox" + RuleFileItem::RuleFileItem(QWidget *parent) : - QWidget(parent), + InfoBase(parent), ui(new Ui::RuleFileItem) { ui->setupUi(this); + this->initForm(); } RuleFileItem::~RuleFileItem() { delete ui; } +void RuleFileItem::initForm() +{ + + //tableWidget设置 + //设置控件的边框显示 + ui->tableWidget->setStyleSheet("QHeaderView::section {" + "border: 1px solid rgba(197, 196, 196, 1);" + "border-left:none;" + "border-top:none;" + "background-color:white;" + "}"); + + ui->tableWidget->setRowCount(10); // 设置10行 + ui->tableWidget->setColumnCount(9); // 设置11列 + ui->tableWidget->setColumnWidth(0, 80); // 设置第一列的宽度为100像素 + ui->tableWidget->verticalHeader()->setParent(nullptr); //隐藏行头 + QTableWidgetItem *item = new QTableWidgetItem("测试数据"); + item->setTextAlignment(Qt::AlignCenter); + ui->tableWidget->setItem(0, 0, item); //设置数据 + + //初始化TableWidget 设置列 + QStringList headers; + headers << "序号" << "文件号" << "文件名称" << "版本号" << "文件类型"<< "颁布时间" + << "实施时间" <<"备注"<<"操作"; + ui->tableWidget->setHorizontalHeaderLabels(headers); +} +void RuleFileItem::ShowMessageBox(QString title,QString value) { + // 创建一个QMessageBox对象 + QMessageBox msgBox; + + // 设置消息框的标题 + msgBox.setWindowTitle(title); + + // 设置消息框的文本内容 + msgBox.setText(value); + + // 设置消息框的标准按钮,这里是“确定”按钮 + msgBox.setStandardButtons(QMessageBox::Ok); + + // 显示消息框 + msgBox.exec(); +} +void RuleFileItem::Load() +{ + //ShowMessageBox("技术文件","技术文件初始化完成"); +} diff --git a/softwareDirectory/AutoVerScheme/rulefileitem.h b/softwareDirectory/AutoVerScheme/rulefileitem.h index 1fc81a1..d892a71 100644 --- a/softwareDirectory/AutoVerScheme/rulefileitem.h +++ b/softwareDirectory/AutoVerScheme/rulefileitem.h @@ -2,19 +2,24 @@ #define RULEFILEITEM_H #include +#include "InfoBase.h" namespace Ui { class RuleFileItem; } -class RuleFileItem : public QWidget +class RuleFileItem : public InfoBase { Q_OBJECT public: explicit RuleFileItem(QWidget *parent = nullptr); ~RuleFileItem(); - +private slots: + void initForm(); //初始化界面数据 + void ShowMessageBox(QString title,QString value); + //继承父类的Load方法 + void Load() override; private: Ui::RuleFileItem *ui; }; diff --git a/softwareDirectory/AutoVerScheme/rulefileitem.ui b/softwareDirectory/AutoVerScheme/rulefileitem.ui index 599e025..9144b96 100644 --- a/softwareDirectory/AutoVerScheme/rulefileitem.ui +++ b/softwareDirectory/AutoVerScheme/rulefileitem.ui @@ -6,26 +6,149 @@ 0 0 - 400 - 300 + 918 + 582 Form - - - - 140 - 130 - 121 - 24 - - - - 规程文件管理 - - + + + + + + 0 + 0 + + + + background-color:white; + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 文件号: + + + + + + + + 0 + 0 + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 文件名称: + + + + + + + + 0 + 0 + + + + + + + + Qt::Horizontal + + + QSizePolicy::Expanding + + + + 40 + 20 + + + + + + + + Qt::RightToLeft + + + 查询 + + + + + + + Qt::RightToLeft + + + 重置 + + + + + + + + + + background-color:white; + + + + + + + + + + + + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/standard_deviceitem.cpp b/softwareDirectory/AutoVerScheme/standard_deviceitem.cpp index ed15b0a..d1a6a80 100644 --- a/softwareDirectory/AutoVerScheme/standard_deviceitem.cpp +++ b/softwareDirectory/AutoVerScheme/standard_deviceitem.cpp @@ -1,14 +1,62 @@ #include "standard_deviceitem.h" #include "ui_standard_deviceitem.h" +#include "InfoBase.h" +#include "QMessageBox" Standard_DeviceItem::Standard_DeviceItem(QWidget *parent) : - QWidget(parent), + InfoBase(parent), ui(new Ui::Standard_DeviceItem) { ui->setupUi(this); + this->initForm(); } Standard_DeviceItem::~Standard_DeviceItem() { delete ui; } +void Standard_DeviceItem::initForm() +{ + //tableWidget设置 + //设置控件的边框显示 + ui->tableWidget->setStyleSheet("QHeaderView::section {" + "border: 1px solid rgba(197, 196, 196, 1);" + "border-left:none;" + "border-top:none;" + "background-color:white;" + "}"); + + ui->tableWidget->setRowCount(10); // 设置10行 + ui->tableWidget->setColumnCount(6); // 设置11列 + ui->tableWidget->setColumnWidth(0, 80); // 设置第一列的宽度为100像素 + ui->tableWidget->verticalHeader()->setParent(nullptr); //隐藏行头 + QTableWidgetItem *item = new QTableWidgetItem("测试数据"); + item->setTextAlignment(Qt::AlignCenter); + ui->tableWidget->setItem(0, 0, item); //设置数据 + + //初始化TableWidget 设置列 + QStringList headers; + headers << "序号" << "设备名称" << "型号规则" << "出厂编号" + << "生产厂家" <<"操作"; + ui->tableWidget->setHorizontalHeaderLabels(headers); +} +void Standard_DeviceItem::ShowMessageBox(QString title,QString value) { + // 创建一个QMessageBox对象 + QMessageBox msgBox; + + // 设置消息框的标题 + msgBox.setWindowTitle(title); + + // 设置消息框的文本内容 + msgBox.setText(value); + + // 设置消息框的标准按钮,这里是“确定”按钮 + msgBox.setStandardButtons(QMessageBox::Ok); + + // 显示消息框 + msgBox.exec(); +} +void Standard_DeviceItem::Load() +{ + //ShowMessageBox("标准管理","标准管理初始化完成"); +} diff --git a/softwareDirectory/AutoVerScheme/standard_deviceitem.h b/softwareDirectory/AutoVerScheme/standard_deviceitem.h index 198c362..97f5d2b 100644 --- a/softwareDirectory/AutoVerScheme/standard_deviceitem.h +++ b/softwareDirectory/AutoVerScheme/standard_deviceitem.h @@ -2,19 +2,24 @@ #define STANDARD_DEVICEITEM_H #include +#include "InfoBase.h" namespace Ui { class Standard_DeviceItem; } -class Standard_DeviceItem : public QWidget +class Standard_DeviceItem : public InfoBase { Q_OBJECT public: explicit Standard_DeviceItem(QWidget *parent = nullptr); ~Standard_DeviceItem(); - +private slots: + void initForm(); //初始化界面数据 + void ShowMessageBox(QString title,QString value); + //继承父类的Load方法 + void Load() override; private: Ui::Standard_DeviceItem *ui; }; diff --git a/softwareDirectory/AutoVerScheme/standard_deviceitem.ui b/softwareDirectory/AutoVerScheme/standard_deviceitem.ui index 00070b7..7421175 100644 --- a/softwareDirectory/AutoVerScheme/standard_deviceitem.ui +++ b/softwareDirectory/AutoVerScheme/standard_deviceitem.ui @@ -6,26 +6,196 @@ 0 0 - 400 - 300 + 1184 + 624 Form - - - - 150 - 140 - 89 - 24 - - - - 标准设备管理 - - + + + + + + 0 + 0 + + + + background-color:white; + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 设备名称: + + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 型号规则: + + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 出厂编号: + + + + + + + + 0 + 0 + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 生产厂家: + + + + + + + + 180 + 0 + + + + + 200 + 0 + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + Qt::RightToLeft + + + 查询 + + + + + + + Qt::RightToLeft + + + 重置 + + + + + + + + + + background-color:white; + + + + + + + + + + + + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/testdataitem.cpp b/softwareDirectory/AutoVerScheme/testdataitem.cpp index 4fde9cf..5666404 100644 --- a/softwareDirectory/AutoVerScheme/testdataitem.cpp +++ b/softwareDirectory/AutoVerScheme/testdataitem.cpp @@ -1,14 +1,63 @@ #include "testdataitem.h" #include "ui_testdataitem.h" +#include "QMessageBox.h" TestDataItem::TestDataItem(QWidget *parent) : - QWidget(parent), + InfoBase(parent), ui(new Ui::TestDataItem) { ui->setupUi(this); + this->initForm(); } TestDataItem::~TestDataItem() { delete ui; } +void TestDataItem::initForm() +{ + + //tableWidget设置 + //设置控件的边框显示 + ui->tableWidget->setStyleSheet("QHeaderView::section {" + "border: 1px solid rgba(197, 196, 196, 1);" + "border-left:none;" + "border-top:none;" + "background-color:white;" + "}"); + + ui->tableWidget->setRowCount(10); // 设置10行 + ui->tableWidget->setColumnCount(14); // 设置11列 + ui->tableWidget->setColumnWidth(0, 80); // 设置第一列的宽度为100像素 + ui->tableWidget->verticalHeader()->setParent(nullptr); //隐藏行头 + QTableWidgetItem *item = new QTableWidgetItem("测试数据"); + item->setTextAlignment(Qt::AlignCenter); + ui->tableWidget->setItem(0, 0, item); //设置数据 + + //初始化TableWidget 设置列 + QStringList headers; + headers << "序号" << "设备名称" << "型号规则" << "辅助字段" << "出厂编号" + << "生产厂家"<<"委托单位" <<"使用部门"<< "检定员"<< "检定时间" + <<"检定有效期"<<"计量标识"<<"限用说明"<<"操作"; + ui->tableWidget->setHorizontalHeaderLabels(headers); +} +void TestDataItem::ShowMessageBox(QString title,QString value) { + // 创建一个QMessageBox对象 + QMessageBox msgBox; + + // 设置消息框的标题 + msgBox.setWindowTitle(title); + + // 设置消息框的文本内容 + msgBox.setText(value); + + // 设置消息框的标准按钮,这里是“确定”按钮 + msgBox.setStandardButtons(QMessageBox::Ok); + + // 显示消息框 + msgBox.exec(); +} +void TestDataItem::Load() +{ + //ShowMessageBox("检定","检定管理初始化完成"); +} diff --git a/softwareDirectory/AutoVerScheme/testdataitem.h b/softwareDirectory/AutoVerScheme/testdataitem.h index 81ca7fa..2e0563c 100644 --- a/softwareDirectory/AutoVerScheme/testdataitem.h +++ b/softwareDirectory/AutoVerScheme/testdataitem.h @@ -2,19 +2,24 @@ #define TESTDATAITEM_H #include +#include "InfoBase.h" namespace Ui { class TestDataItem; } -class TestDataItem : public QWidget +class TestDataItem : public InfoBase { Q_OBJECT public: explicit TestDataItem(QWidget *parent = nullptr); ~TestDataItem(); - +private slots: + void initForm(); //初始化界面数据 + void ShowMessageBox(QString title,QString value); + //继承父类的Load方法 + void Load() override; private: Ui::TestDataItem *ui; }; diff --git a/softwareDirectory/AutoVerScheme/testdataitem.ui b/softwareDirectory/AutoVerScheme/testdataitem.ui index 76d23de..45f3532 100644 --- a/softwareDirectory/AutoVerScheme/testdataitem.ui +++ b/softwareDirectory/AutoVerScheme/testdataitem.ui @@ -6,26 +6,258 @@ 0 0 - 400 - 300 + 1543 + 562 Form - - - - 120 - 150 - 89 - 24 - - - - 检定数据管理 - - + + + + + + 0 + 0 + + + + background-color:white; + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 设备名称: + + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 型号规则: + + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 出厂编号: + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 委托单位: + + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 使用部门: + + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 检定员: + + + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 检定日期: + + + + + + + + + + Qt::Horizontal + + + QSizePolicy::Expanding + + + + 40 + 20 + + + + + + + + Qt::RightToLeft + + + 查询 + + + + + + + Qt::RightToLeft + + + 重置 + + + + + + + + + + background-color:white; + + + + + + + + + + + + + + + + + + +