diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro index 5b8f852..fa0d8e5 100644 --- a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro @@ -1,5 +1,7 @@ QT += core gui QT += sql +QT += widgets + greaterThan(QT_MAJOR_VERSION, 4): QT += widgets CONFIG += c++11 @@ -16,22 +18,50 @@ #DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 SOURCES += \ + beexamined_deviceitem.cpp \ + create_task.cpp \ + depar_task.cpp \ indexwindow.cpp \ + infomanageview.cpp \ + inspectdataitem.cpp \ loginwindow.cpp \ main.cpp \ mainwindow.cpp \ + my_task.cpp \ + rulefileitem.cpp \ + standard_deviceitem.cpp \ + testdataitem.cpp \ testview.cpp HEADERS += \ + InfoBase.h \ + beexamined_deviceitem.h \ + create_task.h \ + depar_task.h \ indexwindow.h \ + infomanageview.h \ + inspectdataitem.h \ loginwindow.h \ mainwindow.h \ + my_task.h \ + rulefileitem.h \ + standard_deviceitem.h \ + testdataitem.h \ testview.h FORMS += \ + beexamined_deviceitem.ui \ + create_task.ui \ + depar_task.ui \ indexwindow.ui \ + infomanageview.ui \ + inspectdataitem.ui \ loginwindow.ui \ mainwindow.ui \ + my_task.ui \ + rulefileitem.ui \ + standard_deviceitem.ui \ + testdataitem.ui \ testview.ui # Default rules for deployment. diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro index 5b8f852..fa0d8e5 100644 --- a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro @@ -1,5 +1,7 @@ QT += core gui QT += sql +QT += widgets + greaterThan(QT_MAJOR_VERSION, 4): QT += widgets CONFIG += c++11 @@ -16,22 +18,50 @@ #DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 SOURCES += \ + beexamined_deviceitem.cpp \ + create_task.cpp \ + depar_task.cpp \ indexwindow.cpp \ + infomanageview.cpp \ + inspectdataitem.cpp \ loginwindow.cpp \ main.cpp \ mainwindow.cpp \ + my_task.cpp \ + rulefileitem.cpp \ + standard_deviceitem.cpp \ + testdataitem.cpp \ testview.cpp HEADERS += \ + InfoBase.h \ + beexamined_deviceitem.h \ + create_task.h \ + depar_task.h \ indexwindow.h \ + infomanageview.h \ + inspectdataitem.h \ loginwindow.h \ mainwindow.h \ + my_task.h \ + rulefileitem.h \ + standard_deviceitem.h \ + testdataitem.h \ testview.h FORMS += \ + beexamined_deviceitem.ui \ + create_task.ui \ + depar_task.ui \ indexwindow.ui \ + infomanageview.ui \ + inspectdataitem.ui \ loginwindow.ui \ mainwindow.ui \ + my_task.ui \ + rulefileitem.ui \ + standard_deviceitem.ui \ + testdataitem.ui \ testview.ui # Default rules for deployment. diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user index 1f5ec64..32d22e9 100644 --- a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user @@ -1,6 +1,6 @@ - + EnvironmentId @@ -64,249 +64,6 @@ ProjectExplorer.Project.Target.0 - Desktop Qt 5.14.2 MinGW 64-bit - Desktop Qt 5.14.2 MinGW 64-bit - qt.qt5.5142.win64_mingw73_kit - 0 - 0 - 0 - - 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 - - Qt4ProjectManager.Qt4RunConfiguration:D:/Auto_verification_scheme/AutoVerScheme/AutoVerScheme.pro - D:/Auto_verification_scheme/AutoVerScheme/AutoVerScheme.pro - - false - - false - true - true - false - false - true - - D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Debug - - 1 - - - - ProjectExplorer.Project.Target.1 - Desktop Qt 5.14.2 MinGW 32-bit Desktop Qt 5.14.2 MinGW 32-bit qt.qt5.5142.win32_mingw73_kit @@ -530,8 +287,252 @@ 2 - Qt4ProjectManager.Qt4RunConfiguration:D:/Auto_verification_scheme/AutoVerScheme/AutoVerScheme.pro - D:/Auto_verification_scheme/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 + + 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 diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro index 5b8f852..fa0d8e5 100644 --- a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro @@ -1,5 +1,7 @@ QT += core gui QT += sql +QT += widgets + greaterThan(QT_MAJOR_VERSION, 4): QT += widgets CONFIG += c++11 @@ -16,22 +18,50 @@ #DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 SOURCES += \ + beexamined_deviceitem.cpp \ + create_task.cpp \ + depar_task.cpp \ indexwindow.cpp \ + infomanageview.cpp \ + inspectdataitem.cpp \ loginwindow.cpp \ main.cpp \ mainwindow.cpp \ + my_task.cpp \ + rulefileitem.cpp \ + standard_deviceitem.cpp \ + testdataitem.cpp \ testview.cpp HEADERS += \ + InfoBase.h \ + beexamined_deviceitem.h \ + create_task.h \ + depar_task.h \ indexwindow.h \ + infomanageview.h \ + inspectdataitem.h \ loginwindow.h \ mainwindow.h \ + my_task.h \ + rulefileitem.h \ + standard_deviceitem.h \ + testdataitem.h \ testview.h FORMS += \ + beexamined_deviceitem.ui \ + create_task.ui \ + depar_task.ui \ indexwindow.ui \ + infomanageview.ui \ + inspectdataitem.ui \ loginwindow.ui \ mainwindow.ui \ + my_task.ui \ + rulefileitem.ui \ + standard_deviceitem.ui \ + testdataitem.ui \ testview.ui # Default rules for deployment. diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user index 1f5ec64..32d22e9 100644 --- a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user @@ -1,6 +1,6 @@ - + EnvironmentId @@ -64,249 +64,6 @@ ProjectExplorer.Project.Target.0 - Desktop Qt 5.14.2 MinGW 64-bit - Desktop Qt 5.14.2 MinGW 64-bit - qt.qt5.5142.win64_mingw73_kit - 0 - 0 - 0 - - 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 - - Qt4ProjectManager.Qt4RunConfiguration:D:/Auto_verification_scheme/AutoVerScheme/AutoVerScheme.pro - D:/Auto_verification_scheme/AutoVerScheme/AutoVerScheme.pro - - false - - false - true - true - false - false - true - - D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Debug - - 1 - - - - ProjectExplorer.Project.Target.1 - Desktop Qt 5.14.2 MinGW 32-bit Desktop Qt 5.14.2 MinGW 32-bit qt.qt5.5142.win32_mingw73_kit @@ -530,8 +287,252 @@ 2 - Qt4ProjectManager.Qt4RunConfiguration:D:/Auto_verification_scheme/AutoVerScheme/AutoVerScheme.pro - D:/Auto_verification_scheme/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 + + 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 diff --git a/softwareDirectory/AutoVerScheme/InfoBase.cpp b/softwareDirectory/AutoVerScheme/InfoBase.cpp new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/InfoBase.cpp diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro index 5b8f852..fa0d8e5 100644 --- a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro @@ -1,5 +1,7 @@ QT += core gui QT += sql +QT += widgets + greaterThan(QT_MAJOR_VERSION, 4): QT += widgets CONFIG += c++11 @@ -16,22 +18,50 @@ #DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 SOURCES += \ + beexamined_deviceitem.cpp \ + create_task.cpp \ + depar_task.cpp \ indexwindow.cpp \ + infomanageview.cpp \ + inspectdataitem.cpp \ loginwindow.cpp \ main.cpp \ mainwindow.cpp \ + my_task.cpp \ + rulefileitem.cpp \ + standard_deviceitem.cpp \ + testdataitem.cpp \ testview.cpp HEADERS += \ + InfoBase.h \ + beexamined_deviceitem.h \ + create_task.h \ + depar_task.h \ indexwindow.h \ + infomanageview.h \ + inspectdataitem.h \ loginwindow.h \ mainwindow.h \ + my_task.h \ + rulefileitem.h \ + standard_deviceitem.h \ + testdataitem.h \ testview.h FORMS += \ + beexamined_deviceitem.ui \ + create_task.ui \ + depar_task.ui \ indexwindow.ui \ + infomanageview.ui \ + inspectdataitem.ui \ loginwindow.ui \ mainwindow.ui \ + my_task.ui \ + rulefileitem.ui \ + standard_deviceitem.ui \ + testdataitem.ui \ testview.ui # Default rules for deployment. diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user index 1f5ec64..32d22e9 100644 --- a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user @@ -1,6 +1,6 @@ - + EnvironmentId @@ -64,249 +64,6 @@ ProjectExplorer.Project.Target.0 - Desktop Qt 5.14.2 MinGW 64-bit - Desktop Qt 5.14.2 MinGW 64-bit - qt.qt5.5142.win64_mingw73_kit - 0 - 0 - 0 - - 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 - - Qt4ProjectManager.Qt4RunConfiguration:D:/Auto_verification_scheme/AutoVerScheme/AutoVerScheme.pro - D:/Auto_verification_scheme/AutoVerScheme/AutoVerScheme.pro - - false - - false - true - true - false - false - true - - D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Debug - - 1 - - - - ProjectExplorer.Project.Target.1 - Desktop Qt 5.14.2 MinGW 32-bit Desktop Qt 5.14.2 MinGW 32-bit qt.qt5.5142.win32_mingw73_kit @@ -530,8 +287,252 @@ 2 - Qt4ProjectManager.Qt4RunConfiguration:D:/Auto_verification_scheme/AutoVerScheme/AutoVerScheme.pro - D:/Auto_verification_scheme/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 + + 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 diff --git a/softwareDirectory/AutoVerScheme/InfoBase.cpp b/softwareDirectory/AutoVerScheme/InfoBase.cpp new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/InfoBase.cpp diff --git a/softwareDirectory/AutoVerScheme/InfoBase.h b/softwareDirectory/AutoVerScheme/InfoBase.h new file mode 100644 index 0000000..7fec63e --- /dev/null +++ b/softwareDirectory/AutoVerScheme/InfoBase.h @@ -0,0 +1,16 @@ +#ifndef INFOBASE_H +#define INFOBASE_H + +#include +///信号管理页面的基类 所有信息管理页面都继承于InfoBase +/// 便于统一管理 所有子类必须实现Load方法 +/// 每次按钮点击切换都会调用Load方法 用于每次页面的数据刷新 +class InfoBase : public QWidget { + Q_OBJECT +public: + InfoBase(QWidget *parent = nullptr): QWidget(parent){}; + // 纯虚函数 + virtual void Load()=0; +}; +#endif // INFOBASE_H + diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro index 5b8f852..fa0d8e5 100644 --- a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro @@ -1,5 +1,7 @@ QT += core gui QT += sql +QT += widgets + greaterThan(QT_MAJOR_VERSION, 4): QT += widgets CONFIG += c++11 @@ -16,22 +18,50 @@ #DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 SOURCES += \ + beexamined_deviceitem.cpp \ + create_task.cpp \ + depar_task.cpp \ indexwindow.cpp \ + infomanageview.cpp \ + inspectdataitem.cpp \ loginwindow.cpp \ main.cpp \ mainwindow.cpp \ + my_task.cpp \ + rulefileitem.cpp \ + standard_deviceitem.cpp \ + testdataitem.cpp \ testview.cpp HEADERS += \ + InfoBase.h \ + beexamined_deviceitem.h \ + create_task.h \ + depar_task.h \ indexwindow.h \ + infomanageview.h \ + inspectdataitem.h \ loginwindow.h \ mainwindow.h \ + my_task.h \ + rulefileitem.h \ + standard_deviceitem.h \ + testdataitem.h \ testview.h FORMS += \ + beexamined_deviceitem.ui \ + create_task.ui \ + depar_task.ui \ indexwindow.ui \ + infomanageview.ui \ + inspectdataitem.ui \ loginwindow.ui \ mainwindow.ui \ + my_task.ui \ + rulefileitem.ui \ + standard_deviceitem.ui \ + testdataitem.ui \ testview.ui # Default rules for deployment. diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user index 1f5ec64..32d22e9 100644 --- a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user @@ -1,6 +1,6 @@ - + EnvironmentId @@ -64,249 +64,6 @@ ProjectExplorer.Project.Target.0 - Desktop Qt 5.14.2 MinGW 64-bit - Desktop Qt 5.14.2 MinGW 64-bit - qt.qt5.5142.win64_mingw73_kit - 0 - 0 - 0 - - 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 - - Qt4ProjectManager.Qt4RunConfiguration:D:/Auto_verification_scheme/AutoVerScheme/AutoVerScheme.pro - D:/Auto_verification_scheme/AutoVerScheme/AutoVerScheme.pro - - false - - false - true - true - false - false - true - - D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Debug - - 1 - - - - ProjectExplorer.Project.Target.1 - Desktop Qt 5.14.2 MinGW 32-bit Desktop Qt 5.14.2 MinGW 32-bit qt.qt5.5142.win32_mingw73_kit @@ -530,8 +287,252 @@ 2 - Qt4ProjectManager.Qt4RunConfiguration:D:/Auto_verification_scheme/AutoVerScheme/AutoVerScheme.pro - D:/Auto_verification_scheme/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 + + 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 diff --git a/softwareDirectory/AutoVerScheme/InfoBase.cpp b/softwareDirectory/AutoVerScheme/InfoBase.cpp new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/InfoBase.cpp diff --git a/softwareDirectory/AutoVerScheme/InfoBase.h b/softwareDirectory/AutoVerScheme/InfoBase.h new file mode 100644 index 0000000..7fec63e --- /dev/null +++ b/softwareDirectory/AutoVerScheme/InfoBase.h @@ -0,0 +1,16 @@ +#ifndef INFOBASE_H +#define INFOBASE_H + +#include +///信号管理页面的基类 所有信息管理页面都继承于InfoBase +/// 便于统一管理 所有子类必须实现Load方法 +/// 每次按钮点击切换都会调用Load方法 用于每次页面的数据刷新 +class InfoBase : public QWidget { + Q_OBJECT +public: + InfoBase(QWidget *parent = nullptr): QWidget(parent){}; + // 纯虚函数 + virtual void Load()=0; +}; +#endif // INFOBASE_H + diff --git a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.cpp b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.cpp new file mode 100644 index 0000000..7ac1e87 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.cpp @@ -0,0 +1,14 @@ +#include "beexamined_deviceitem.h" +#include "ui_beexamined_deviceitem.h" + +BeExamined_DeviceItem::BeExamined_DeviceItem(QWidget *parent) : + QWidget(parent), + ui(new Ui::BeExamined_DeviceItem) +{ + ui->setupUi(this); +} + +BeExamined_DeviceItem::~BeExamined_DeviceItem() +{ + delete ui; +} diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro index 5b8f852..fa0d8e5 100644 --- a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro @@ -1,5 +1,7 @@ QT += core gui QT += sql +QT += widgets + greaterThan(QT_MAJOR_VERSION, 4): QT += widgets CONFIG += c++11 @@ -16,22 +18,50 @@ #DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 SOURCES += \ + beexamined_deviceitem.cpp \ + create_task.cpp \ + depar_task.cpp \ indexwindow.cpp \ + infomanageview.cpp \ + inspectdataitem.cpp \ loginwindow.cpp \ main.cpp \ mainwindow.cpp \ + my_task.cpp \ + rulefileitem.cpp \ + standard_deviceitem.cpp \ + testdataitem.cpp \ testview.cpp HEADERS += \ + InfoBase.h \ + beexamined_deviceitem.h \ + create_task.h \ + depar_task.h \ indexwindow.h \ + infomanageview.h \ + inspectdataitem.h \ loginwindow.h \ mainwindow.h \ + my_task.h \ + rulefileitem.h \ + standard_deviceitem.h \ + testdataitem.h \ testview.h FORMS += \ + beexamined_deviceitem.ui \ + create_task.ui \ + depar_task.ui \ indexwindow.ui \ + infomanageview.ui \ + inspectdataitem.ui \ loginwindow.ui \ mainwindow.ui \ + my_task.ui \ + rulefileitem.ui \ + standard_deviceitem.ui \ + testdataitem.ui \ testview.ui # Default rules for deployment. diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user index 1f5ec64..32d22e9 100644 --- a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user @@ -1,6 +1,6 @@ - + EnvironmentId @@ -64,249 +64,6 @@ ProjectExplorer.Project.Target.0 - Desktop Qt 5.14.2 MinGW 64-bit - Desktop Qt 5.14.2 MinGW 64-bit - qt.qt5.5142.win64_mingw73_kit - 0 - 0 - 0 - - 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 - - Qt4ProjectManager.Qt4RunConfiguration:D:/Auto_verification_scheme/AutoVerScheme/AutoVerScheme.pro - D:/Auto_verification_scheme/AutoVerScheme/AutoVerScheme.pro - - false - - false - true - true - false - false - true - - D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Debug - - 1 - - - - ProjectExplorer.Project.Target.1 - Desktop Qt 5.14.2 MinGW 32-bit Desktop Qt 5.14.2 MinGW 32-bit qt.qt5.5142.win32_mingw73_kit @@ -530,8 +287,252 @@ 2 - Qt4ProjectManager.Qt4RunConfiguration:D:/Auto_verification_scheme/AutoVerScheme/AutoVerScheme.pro - D:/Auto_verification_scheme/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 + + 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 diff --git a/softwareDirectory/AutoVerScheme/InfoBase.cpp b/softwareDirectory/AutoVerScheme/InfoBase.cpp new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/InfoBase.cpp diff --git a/softwareDirectory/AutoVerScheme/InfoBase.h b/softwareDirectory/AutoVerScheme/InfoBase.h new file mode 100644 index 0000000..7fec63e --- /dev/null +++ b/softwareDirectory/AutoVerScheme/InfoBase.h @@ -0,0 +1,16 @@ +#ifndef INFOBASE_H +#define INFOBASE_H + +#include +///信号管理页面的基类 所有信息管理页面都继承于InfoBase +/// 便于统一管理 所有子类必须实现Load方法 +/// 每次按钮点击切换都会调用Load方法 用于每次页面的数据刷新 +class InfoBase : public QWidget { + Q_OBJECT +public: + InfoBase(QWidget *parent = nullptr): QWidget(parent){}; + // 纯虚函数 + virtual void Load()=0; +}; +#endif // INFOBASE_H + diff --git a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.cpp b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.cpp new file mode 100644 index 0000000..7ac1e87 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.cpp @@ -0,0 +1,14 @@ +#include "beexamined_deviceitem.h" +#include "ui_beexamined_deviceitem.h" + +BeExamined_DeviceItem::BeExamined_DeviceItem(QWidget *parent) : + QWidget(parent), + ui(new Ui::BeExamined_DeviceItem) +{ + ui->setupUi(this); +} + +BeExamined_DeviceItem::~BeExamined_DeviceItem() +{ + delete ui; +} diff --git a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.h b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.h new file mode 100644 index 0000000..76b061d --- /dev/null +++ b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.h @@ -0,0 +1,22 @@ +#ifndef BEEXAMINED_DEVICEITEM_H +#define BEEXAMINED_DEVICEITEM_H + +#include + +namespace Ui { +class BeExamined_DeviceItem; +} + +class BeExamined_DeviceItem : public QWidget +{ + Q_OBJECT + +public: + explicit BeExamined_DeviceItem(QWidget *parent = nullptr); + ~BeExamined_DeviceItem(); + +private: + Ui::BeExamined_DeviceItem *ui; +}; + +#endif // BEEXAMINED_DEVICEITEM_H diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro index 5b8f852..fa0d8e5 100644 --- a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro @@ -1,5 +1,7 @@ QT += core gui QT += sql +QT += widgets + greaterThan(QT_MAJOR_VERSION, 4): QT += widgets CONFIG += c++11 @@ -16,22 +18,50 @@ #DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 SOURCES += \ + beexamined_deviceitem.cpp \ + create_task.cpp \ + depar_task.cpp \ indexwindow.cpp \ + infomanageview.cpp \ + inspectdataitem.cpp \ loginwindow.cpp \ main.cpp \ mainwindow.cpp \ + my_task.cpp \ + rulefileitem.cpp \ + standard_deviceitem.cpp \ + testdataitem.cpp \ testview.cpp HEADERS += \ + InfoBase.h \ + beexamined_deviceitem.h \ + create_task.h \ + depar_task.h \ indexwindow.h \ + infomanageview.h \ + inspectdataitem.h \ loginwindow.h \ mainwindow.h \ + my_task.h \ + rulefileitem.h \ + standard_deviceitem.h \ + testdataitem.h \ testview.h FORMS += \ + beexamined_deviceitem.ui \ + create_task.ui \ + depar_task.ui \ indexwindow.ui \ + infomanageview.ui \ + inspectdataitem.ui \ loginwindow.ui \ mainwindow.ui \ + my_task.ui \ + rulefileitem.ui \ + standard_deviceitem.ui \ + testdataitem.ui \ testview.ui # Default rules for deployment. diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user index 1f5ec64..32d22e9 100644 --- a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user @@ -1,6 +1,6 @@ - + EnvironmentId @@ -64,249 +64,6 @@ ProjectExplorer.Project.Target.0 - Desktop Qt 5.14.2 MinGW 64-bit - Desktop Qt 5.14.2 MinGW 64-bit - qt.qt5.5142.win64_mingw73_kit - 0 - 0 - 0 - - 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 - - Qt4ProjectManager.Qt4RunConfiguration:D:/Auto_verification_scheme/AutoVerScheme/AutoVerScheme.pro - D:/Auto_verification_scheme/AutoVerScheme/AutoVerScheme.pro - - false - - false - true - true - false - false - true - - D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Debug - - 1 - - - - ProjectExplorer.Project.Target.1 - Desktop Qt 5.14.2 MinGW 32-bit Desktop Qt 5.14.2 MinGW 32-bit qt.qt5.5142.win32_mingw73_kit @@ -530,8 +287,252 @@ 2 - Qt4ProjectManager.Qt4RunConfiguration:D:/Auto_verification_scheme/AutoVerScheme/AutoVerScheme.pro - D:/Auto_verification_scheme/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 + + 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 diff --git a/softwareDirectory/AutoVerScheme/InfoBase.cpp b/softwareDirectory/AutoVerScheme/InfoBase.cpp new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/InfoBase.cpp diff --git a/softwareDirectory/AutoVerScheme/InfoBase.h b/softwareDirectory/AutoVerScheme/InfoBase.h new file mode 100644 index 0000000..7fec63e --- /dev/null +++ b/softwareDirectory/AutoVerScheme/InfoBase.h @@ -0,0 +1,16 @@ +#ifndef INFOBASE_H +#define INFOBASE_H + +#include +///信号管理页面的基类 所有信息管理页面都继承于InfoBase +/// 便于统一管理 所有子类必须实现Load方法 +/// 每次按钮点击切换都会调用Load方法 用于每次页面的数据刷新 +class InfoBase : public QWidget { + Q_OBJECT +public: + InfoBase(QWidget *parent = nullptr): QWidget(parent){}; + // 纯虚函数 + virtual void Load()=0; +}; +#endif // INFOBASE_H + diff --git a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.cpp b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.cpp new file mode 100644 index 0000000..7ac1e87 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.cpp @@ -0,0 +1,14 @@ +#include "beexamined_deviceitem.h" +#include "ui_beexamined_deviceitem.h" + +BeExamined_DeviceItem::BeExamined_DeviceItem(QWidget *parent) : + QWidget(parent), + ui(new Ui::BeExamined_DeviceItem) +{ + ui->setupUi(this); +} + +BeExamined_DeviceItem::~BeExamined_DeviceItem() +{ + delete ui; +} diff --git a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.h b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.h new file mode 100644 index 0000000..76b061d --- /dev/null +++ b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.h @@ -0,0 +1,22 @@ +#ifndef BEEXAMINED_DEVICEITEM_H +#define BEEXAMINED_DEVICEITEM_H + +#include + +namespace Ui { +class BeExamined_DeviceItem; +} + +class BeExamined_DeviceItem : public QWidget +{ + Q_OBJECT + +public: + explicit BeExamined_DeviceItem(QWidget *parent = nullptr); + ~BeExamined_DeviceItem(); + +private: + Ui::BeExamined_DeviceItem *ui; +}; + +#endif // BEEXAMINED_DEVICEITEM_H diff --git a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.ui b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.ui new file mode 100644 index 0000000..af9f7bf --- /dev/null +++ b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.ui @@ -0,0 +1,32 @@ + + + BeExamined_DeviceItem + + + + 0 + 0 + 400 + 300 + + + + Form + + + + + 130 + 140 + 89 + 24 + + + + 被检设备管理 + + + + + + diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro index 5b8f852..fa0d8e5 100644 --- a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro @@ -1,5 +1,7 @@ QT += core gui QT += sql +QT += widgets + greaterThan(QT_MAJOR_VERSION, 4): QT += widgets CONFIG += c++11 @@ -16,22 +18,50 @@ #DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 SOURCES += \ + beexamined_deviceitem.cpp \ + create_task.cpp \ + depar_task.cpp \ indexwindow.cpp \ + infomanageview.cpp \ + inspectdataitem.cpp \ loginwindow.cpp \ main.cpp \ mainwindow.cpp \ + my_task.cpp \ + rulefileitem.cpp \ + standard_deviceitem.cpp \ + testdataitem.cpp \ testview.cpp HEADERS += \ + InfoBase.h \ + beexamined_deviceitem.h \ + create_task.h \ + depar_task.h \ indexwindow.h \ + infomanageview.h \ + inspectdataitem.h \ loginwindow.h \ mainwindow.h \ + my_task.h \ + rulefileitem.h \ + standard_deviceitem.h \ + testdataitem.h \ testview.h FORMS += \ + beexamined_deviceitem.ui \ + create_task.ui \ + depar_task.ui \ indexwindow.ui \ + infomanageview.ui \ + inspectdataitem.ui \ loginwindow.ui \ mainwindow.ui \ + my_task.ui \ + rulefileitem.ui \ + standard_deviceitem.ui \ + testdataitem.ui \ testview.ui # Default rules for deployment. diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user index 1f5ec64..32d22e9 100644 --- a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user @@ -1,6 +1,6 @@ - + EnvironmentId @@ -64,249 +64,6 @@ ProjectExplorer.Project.Target.0 - Desktop Qt 5.14.2 MinGW 64-bit - Desktop Qt 5.14.2 MinGW 64-bit - qt.qt5.5142.win64_mingw73_kit - 0 - 0 - 0 - - 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 - - Qt4ProjectManager.Qt4RunConfiguration:D:/Auto_verification_scheme/AutoVerScheme/AutoVerScheme.pro - D:/Auto_verification_scheme/AutoVerScheme/AutoVerScheme.pro - - false - - false - true - true - false - false - true - - D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Debug - - 1 - - - - ProjectExplorer.Project.Target.1 - Desktop Qt 5.14.2 MinGW 32-bit Desktop Qt 5.14.2 MinGW 32-bit qt.qt5.5142.win32_mingw73_kit @@ -530,8 +287,252 @@ 2 - Qt4ProjectManager.Qt4RunConfiguration:D:/Auto_verification_scheme/AutoVerScheme/AutoVerScheme.pro - D:/Auto_verification_scheme/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 + + 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 diff --git a/softwareDirectory/AutoVerScheme/InfoBase.cpp b/softwareDirectory/AutoVerScheme/InfoBase.cpp new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/InfoBase.cpp diff --git a/softwareDirectory/AutoVerScheme/InfoBase.h b/softwareDirectory/AutoVerScheme/InfoBase.h new file mode 100644 index 0000000..7fec63e --- /dev/null +++ b/softwareDirectory/AutoVerScheme/InfoBase.h @@ -0,0 +1,16 @@ +#ifndef INFOBASE_H +#define INFOBASE_H + +#include +///信号管理页面的基类 所有信息管理页面都继承于InfoBase +/// 便于统一管理 所有子类必须实现Load方法 +/// 每次按钮点击切换都会调用Load方法 用于每次页面的数据刷新 +class InfoBase : public QWidget { + Q_OBJECT +public: + InfoBase(QWidget *parent = nullptr): QWidget(parent){}; + // 纯虚函数 + virtual void Load()=0; +}; +#endif // INFOBASE_H + diff --git a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.cpp b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.cpp new file mode 100644 index 0000000..7ac1e87 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.cpp @@ -0,0 +1,14 @@ +#include "beexamined_deviceitem.h" +#include "ui_beexamined_deviceitem.h" + +BeExamined_DeviceItem::BeExamined_DeviceItem(QWidget *parent) : + QWidget(parent), + ui(new Ui::BeExamined_DeviceItem) +{ + ui->setupUi(this); +} + +BeExamined_DeviceItem::~BeExamined_DeviceItem() +{ + delete ui; +} diff --git a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.h b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.h new file mode 100644 index 0000000..76b061d --- /dev/null +++ b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.h @@ -0,0 +1,22 @@ +#ifndef BEEXAMINED_DEVICEITEM_H +#define BEEXAMINED_DEVICEITEM_H + +#include + +namespace Ui { +class BeExamined_DeviceItem; +} + +class BeExamined_DeviceItem : public QWidget +{ + Q_OBJECT + +public: + explicit BeExamined_DeviceItem(QWidget *parent = nullptr); + ~BeExamined_DeviceItem(); + +private: + Ui::BeExamined_DeviceItem *ui; +}; + +#endif // BEEXAMINED_DEVICEITEM_H diff --git a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.ui b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.ui new file mode 100644 index 0000000..af9f7bf --- /dev/null +++ b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.ui @@ -0,0 +1,32 @@ + + + BeExamined_DeviceItem + + + + 0 + 0 + 400 + 300 + + + + Form + + + + + 130 + 140 + 89 + 24 + + + + 被检设备管理 + + + + + + diff --git a/softwareDirectory/AutoVerScheme/create_task.cpp b/softwareDirectory/AutoVerScheme/create_task.cpp new file mode 100644 index 0000000..4193efc --- /dev/null +++ b/softwareDirectory/AutoVerScheme/create_task.cpp @@ -0,0 +1,14 @@ +#include "create_task.h" +#include "ui_create_task.h" + +Create_Task::Create_Task(QWidget *parent) : + QWidget(parent), + ui(new Ui::Create_Task) +{ + ui->setupUi(this); +} + +Create_Task::~Create_Task() +{ + delete ui; +} diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro index 5b8f852..fa0d8e5 100644 --- a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro @@ -1,5 +1,7 @@ QT += core gui QT += sql +QT += widgets + greaterThan(QT_MAJOR_VERSION, 4): QT += widgets CONFIG += c++11 @@ -16,22 +18,50 @@ #DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 SOURCES += \ + beexamined_deviceitem.cpp \ + create_task.cpp \ + depar_task.cpp \ indexwindow.cpp \ + infomanageview.cpp \ + inspectdataitem.cpp \ loginwindow.cpp \ main.cpp \ mainwindow.cpp \ + my_task.cpp \ + rulefileitem.cpp \ + standard_deviceitem.cpp \ + testdataitem.cpp \ testview.cpp HEADERS += \ + InfoBase.h \ + beexamined_deviceitem.h \ + create_task.h \ + depar_task.h \ indexwindow.h \ + infomanageview.h \ + inspectdataitem.h \ loginwindow.h \ mainwindow.h \ + my_task.h \ + rulefileitem.h \ + standard_deviceitem.h \ + testdataitem.h \ testview.h FORMS += \ + beexamined_deviceitem.ui \ + create_task.ui \ + depar_task.ui \ indexwindow.ui \ + infomanageview.ui \ + inspectdataitem.ui \ loginwindow.ui \ mainwindow.ui \ + my_task.ui \ + rulefileitem.ui \ + standard_deviceitem.ui \ + testdataitem.ui \ testview.ui # Default rules for deployment. diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user index 1f5ec64..32d22e9 100644 --- a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user @@ -1,6 +1,6 @@ - + EnvironmentId @@ -64,249 +64,6 @@ ProjectExplorer.Project.Target.0 - Desktop Qt 5.14.2 MinGW 64-bit - Desktop Qt 5.14.2 MinGW 64-bit - qt.qt5.5142.win64_mingw73_kit - 0 - 0 - 0 - - 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 - - Qt4ProjectManager.Qt4RunConfiguration:D:/Auto_verification_scheme/AutoVerScheme/AutoVerScheme.pro - D:/Auto_verification_scheme/AutoVerScheme/AutoVerScheme.pro - - false - - false - true - true - false - false - true - - D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Debug - - 1 - - - - ProjectExplorer.Project.Target.1 - Desktop Qt 5.14.2 MinGW 32-bit Desktop Qt 5.14.2 MinGW 32-bit qt.qt5.5142.win32_mingw73_kit @@ -530,8 +287,252 @@ 2 - Qt4ProjectManager.Qt4RunConfiguration:D:/Auto_verification_scheme/AutoVerScheme/AutoVerScheme.pro - D:/Auto_verification_scheme/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 + + 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 diff --git a/softwareDirectory/AutoVerScheme/InfoBase.cpp b/softwareDirectory/AutoVerScheme/InfoBase.cpp new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/InfoBase.cpp diff --git a/softwareDirectory/AutoVerScheme/InfoBase.h b/softwareDirectory/AutoVerScheme/InfoBase.h new file mode 100644 index 0000000..7fec63e --- /dev/null +++ b/softwareDirectory/AutoVerScheme/InfoBase.h @@ -0,0 +1,16 @@ +#ifndef INFOBASE_H +#define INFOBASE_H + +#include +///信号管理页面的基类 所有信息管理页面都继承于InfoBase +/// 便于统一管理 所有子类必须实现Load方法 +/// 每次按钮点击切换都会调用Load方法 用于每次页面的数据刷新 +class InfoBase : public QWidget { + Q_OBJECT +public: + InfoBase(QWidget *parent = nullptr): QWidget(parent){}; + // 纯虚函数 + virtual void Load()=0; +}; +#endif // INFOBASE_H + diff --git a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.cpp b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.cpp new file mode 100644 index 0000000..7ac1e87 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.cpp @@ -0,0 +1,14 @@ +#include "beexamined_deviceitem.h" +#include "ui_beexamined_deviceitem.h" + +BeExamined_DeviceItem::BeExamined_DeviceItem(QWidget *parent) : + QWidget(parent), + ui(new Ui::BeExamined_DeviceItem) +{ + ui->setupUi(this); +} + +BeExamined_DeviceItem::~BeExamined_DeviceItem() +{ + delete ui; +} diff --git a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.h b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.h new file mode 100644 index 0000000..76b061d --- /dev/null +++ b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.h @@ -0,0 +1,22 @@ +#ifndef BEEXAMINED_DEVICEITEM_H +#define BEEXAMINED_DEVICEITEM_H + +#include + +namespace Ui { +class BeExamined_DeviceItem; +} + +class BeExamined_DeviceItem : public QWidget +{ + Q_OBJECT + +public: + explicit BeExamined_DeviceItem(QWidget *parent = nullptr); + ~BeExamined_DeviceItem(); + +private: + Ui::BeExamined_DeviceItem *ui; +}; + +#endif // BEEXAMINED_DEVICEITEM_H diff --git a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.ui b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.ui new file mode 100644 index 0000000..af9f7bf --- /dev/null +++ b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.ui @@ -0,0 +1,32 @@ + + + BeExamined_DeviceItem + + + + 0 + 0 + 400 + 300 + + + + Form + + + + + 130 + 140 + 89 + 24 + + + + 被检设备管理 + + + + + + diff --git a/softwareDirectory/AutoVerScheme/create_task.cpp b/softwareDirectory/AutoVerScheme/create_task.cpp new file mode 100644 index 0000000..4193efc --- /dev/null +++ b/softwareDirectory/AutoVerScheme/create_task.cpp @@ -0,0 +1,14 @@ +#include "create_task.h" +#include "ui_create_task.h" + +Create_Task::Create_Task(QWidget *parent) : + QWidget(parent), + ui(new Ui::Create_Task) +{ + ui->setupUi(this); +} + +Create_Task::~Create_Task() +{ + delete ui; +} diff --git a/softwareDirectory/AutoVerScheme/create_task.h b/softwareDirectory/AutoVerScheme/create_task.h new file mode 100644 index 0000000..e2264de --- /dev/null +++ b/softwareDirectory/AutoVerScheme/create_task.h @@ -0,0 +1,22 @@ +#ifndef CREATE_TASK_H +#define CREATE_TASK_H + +#include + +namespace Ui { +class Create_Task; +} + +class Create_Task : public QWidget +{ + Q_OBJECT + +public: + explicit Create_Task(QWidget *parent = nullptr); + ~Create_Task(); + +private: + Ui::Create_Task *ui; +}; + +#endif // CREATE_TASK_H diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro index 5b8f852..fa0d8e5 100644 --- a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro @@ -1,5 +1,7 @@ QT += core gui QT += sql +QT += widgets + greaterThan(QT_MAJOR_VERSION, 4): QT += widgets CONFIG += c++11 @@ -16,22 +18,50 @@ #DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 SOURCES += \ + beexamined_deviceitem.cpp \ + create_task.cpp \ + depar_task.cpp \ indexwindow.cpp \ + infomanageview.cpp \ + inspectdataitem.cpp \ loginwindow.cpp \ main.cpp \ mainwindow.cpp \ + my_task.cpp \ + rulefileitem.cpp \ + standard_deviceitem.cpp \ + testdataitem.cpp \ testview.cpp HEADERS += \ + InfoBase.h \ + beexamined_deviceitem.h \ + create_task.h \ + depar_task.h \ indexwindow.h \ + infomanageview.h \ + inspectdataitem.h \ loginwindow.h \ mainwindow.h \ + my_task.h \ + rulefileitem.h \ + standard_deviceitem.h \ + testdataitem.h \ testview.h FORMS += \ + beexamined_deviceitem.ui \ + create_task.ui \ + depar_task.ui \ indexwindow.ui \ + infomanageview.ui \ + inspectdataitem.ui \ loginwindow.ui \ mainwindow.ui \ + my_task.ui \ + rulefileitem.ui \ + standard_deviceitem.ui \ + testdataitem.ui \ testview.ui # Default rules for deployment. diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user index 1f5ec64..32d22e9 100644 --- a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user @@ -1,6 +1,6 @@ - + EnvironmentId @@ -64,249 +64,6 @@ ProjectExplorer.Project.Target.0 - Desktop Qt 5.14.2 MinGW 64-bit - Desktop Qt 5.14.2 MinGW 64-bit - qt.qt5.5142.win64_mingw73_kit - 0 - 0 - 0 - - 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 - - Qt4ProjectManager.Qt4RunConfiguration:D:/Auto_verification_scheme/AutoVerScheme/AutoVerScheme.pro - D:/Auto_verification_scheme/AutoVerScheme/AutoVerScheme.pro - - false - - false - true - true - false - false - true - - D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Debug - - 1 - - - - ProjectExplorer.Project.Target.1 - Desktop Qt 5.14.2 MinGW 32-bit Desktop Qt 5.14.2 MinGW 32-bit qt.qt5.5142.win32_mingw73_kit @@ -530,8 +287,252 @@ 2 - Qt4ProjectManager.Qt4RunConfiguration:D:/Auto_verification_scheme/AutoVerScheme/AutoVerScheme.pro - D:/Auto_verification_scheme/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 + + 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 diff --git a/softwareDirectory/AutoVerScheme/InfoBase.cpp b/softwareDirectory/AutoVerScheme/InfoBase.cpp new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/InfoBase.cpp diff --git a/softwareDirectory/AutoVerScheme/InfoBase.h b/softwareDirectory/AutoVerScheme/InfoBase.h new file mode 100644 index 0000000..7fec63e --- /dev/null +++ b/softwareDirectory/AutoVerScheme/InfoBase.h @@ -0,0 +1,16 @@ +#ifndef INFOBASE_H +#define INFOBASE_H + +#include +///信号管理页面的基类 所有信息管理页面都继承于InfoBase +/// 便于统一管理 所有子类必须实现Load方法 +/// 每次按钮点击切换都会调用Load方法 用于每次页面的数据刷新 +class InfoBase : public QWidget { + Q_OBJECT +public: + InfoBase(QWidget *parent = nullptr): QWidget(parent){}; + // 纯虚函数 + virtual void Load()=0; +}; +#endif // INFOBASE_H + diff --git a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.cpp b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.cpp new file mode 100644 index 0000000..7ac1e87 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.cpp @@ -0,0 +1,14 @@ +#include "beexamined_deviceitem.h" +#include "ui_beexamined_deviceitem.h" + +BeExamined_DeviceItem::BeExamined_DeviceItem(QWidget *parent) : + QWidget(parent), + ui(new Ui::BeExamined_DeviceItem) +{ + ui->setupUi(this); +} + +BeExamined_DeviceItem::~BeExamined_DeviceItem() +{ + delete ui; +} diff --git a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.h b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.h new file mode 100644 index 0000000..76b061d --- /dev/null +++ b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.h @@ -0,0 +1,22 @@ +#ifndef BEEXAMINED_DEVICEITEM_H +#define BEEXAMINED_DEVICEITEM_H + +#include + +namespace Ui { +class BeExamined_DeviceItem; +} + +class BeExamined_DeviceItem : public QWidget +{ + Q_OBJECT + +public: + explicit BeExamined_DeviceItem(QWidget *parent = nullptr); + ~BeExamined_DeviceItem(); + +private: + Ui::BeExamined_DeviceItem *ui; +}; + +#endif // BEEXAMINED_DEVICEITEM_H diff --git a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.ui b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.ui new file mode 100644 index 0000000..af9f7bf --- /dev/null +++ b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.ui @@ -0,0 +1,32 @@ + + + BeExamined_DeviceItem + + + + 0 + 0 + 400 + 300 + + + + Form + + + + + 130 + 140 + 89 + 24 + + + + 被检设备管理 + + + + + + diff --git a/softwareDirectory/AutoVerScheme/create_task.cpp b/softwareDirectory/AutoVerScheme/create_task.cpp new file mode 100644 index 0000000..4193efc --- /dev/null +++ b/softwareDirectory/AutoVerScheme/create_task.cpp @@ -0,0 +1,14 @@ +#include "create_task.h" +#include "ui_create_task.h" + +Create_Task::Create_Task(QWidget *parent) : + QWidget(parent), + ui(new Ui::Create_Task) +{ + ui->setupUi(this); +} + +Create_Task::~Create_Task() +{ + delete ui; +} diff --git a/softwareDirectory/AutoVerScheme/create_task.h b/softwareDirectory/AutoVerScheme/create_task.h new file mode 100644 index 0000000..e2264de --- /dev/null +++ b/softwareDirectory/AutoVerScheme/create_task.h @@ -0,0 +1,22 @@ +#ifndef CREATE_TASK_H +#define CREATE_TASK_H + +#include + +namespace Ui { +class Create_Task; +} + +class Create_Task : public QWidget +{ + Q_OBJECT + +public: + explicit Create_Task(QWidget *parent = nullptr); + ~Create_Task(); + +private: + Ui::Create_Task *ui; +}; + +#endif // CREATE_TASK_H diff --git a/softwareDirectory/AutoVerScheme/create_task.ui b/softwareDirectory/AutoVerScheme/create_task.ui new file mode 100644 index 0000000..b79c6a1 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/create_task.ui @@ -0,0 +1,35 @@ + + + Create_Task + + + + 0 + 0 + 400 + 300 + + + + Form + + + background-color:red; + + + + + 140 + 120 + 89 + 24 + + + + 创建任务单 + + + + + + diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro index 5b8f852..fa0d8e5 100644 --- a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro @@ -1,5 +1,7 @@ QT += core gui QT += sql +QT += widgets + greaterThan(QT_MAJOR_VERSION, 4): QT += widgets CONFIG += c++11 @@ -16,22 +18,50 @@ #DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 SOURCES += \ + beexamined_deviceitem.cpp \ + create_task.cpp \ + depar_task.cpp \ indexwindow.cpp \ + infomanageview.cpp \ + inspectdataitem.cpp \ loginwindow.cpp \ main.cpp \ mainwindow.cpp \ + my_task.cpp \ + rulefileitem.cpp \ + standard_deviceitem.cpp \ + testdataitem.cpp \ testview.cpp HEADERS += \ + InfoBase.h \ + beexamined_deviceitem.h \ + create_task.h \ + depar_task.h \ indexwindow.h \ + infomanageview.h \ + inspectdataitem.h \ loginwindow.h \ mainwindow.h \ + my_task.h \ + rulefileitem.h \ + standard_deviceitem.h \ + testdataitem.h \ testview.h FORMS += \ + beexamined_deviceitem.ui \ + create_task.ui \ + depar_task.ui \ indexwindow.ui \ + infomanageview.ui \ + inspectdataitem.ui \ loginwindow.ui \ mainwindow.ui \ + my_task.ui \ + rulefileitem.ui \ + standard_deviceitem.ui \ + testdataitem.ui \ testview.ui # Default rules for deployment. diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user index 1f5ec64..32d22e9 100644 --- a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user @@ -1,6 +1,6 @@ - + EnvironmentId @@ -64,249 +64,6 @@ ProjectExplorer.Project.Target.0 - Desktop Qt 5.14.2 MinGW 64-bit - Desktop Qt 5.14.2 MinGW 64-bit - qt.qt5.5142.win64_mingw73_kit - 0 - 0 - 0 - - 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 - - Qt4ProjectManager.Qt4RunConfiguration:D:/Auto_verification_scheme/AutoVerScheme/AutoVerScheme.pro - D:/Auto_verification_scheme/AutoVerScheme/AutoVerScheme.pro - - false - - false - true - true - false - false - true - - D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Debug - - 1 - - - - ProjectExplorer.Project.Target.1 - Desktop Qt 5.14.2 MinGW 32-bit Desktop Qt 5.14.2 MinGW 32-bit qt.qt5.5142.win32_mingw73_kit @@ -530,8 +287,252 @@ 2 - Qt4ProjectManager.Qt4RunConfiguration:D:/Auto_verification_scheme/AutoVerScheme/AutoVerScheme.pro - D:/Auto_verification_scheme/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 + + 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 diff --git a/softwareDirectory/AutoVerScheme/InfoBase.cpp b/softwareDirectory/AutoVerScheme/InfoBase.cpp new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/InfoBase.cpp diff --git a/softwareDirectory/AutoVerScheme/InfoBase.h b/softwareDirectory/AutoVerScheme/InfoBase.h new file mode 100644 index 0000000..7fec63e --- /dev/null +++ b/softwareDirectory/AutoVerScheme/InfoBase.h @@ -0,0 +1,16 @@ +#ifndef INFOBASE_H +#define INFOBASE_H + +#include +///信号管理页面的基类 所有信息管理页面都继承于InfoBase +/// 便于统一管理 所有子类必须实现Load方法 +/// 每次按钮点击切换都会调用Load方法 用于每次页面的数据刷新 +class InfoBase : public QWidget { + Q_OBJECT +public: + InfoBase(QWidget *parent = nullptr): QWidget(parent){}; + // 纯虚函数 + virtual void Load()=0; +}; +#endif // INFOBASE_H + diff --git a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.cpp b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.cpp new file mode 100644 index 0000000..7ac1e87 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.cpp @@ -0,0 +1,14 @@ +#include "beexamined_deviceitem.h" +#include "ui_beexamined_deviceitem.h" + +BeExamined_DeviceItem::BeExamined_DeviceItem(QWidget *parent) : + QWidget(parent), + ui(new Ui::BeExamined_DeviceItem) +{ + ui->setupUi(this); +} + +BeExamined_DeviceItem::~BeExamined_DeviceItem() +{ + delete ui; +} diff --git a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.h b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.h new file mode 100644 index 0000000..76b061d --- /dev/null +++ b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.h @@ -0,0 +1,22 @@ +#ifndef BEEXAMINED_DEVICEITEM_H +#define BEEXAMINED_DEVICEITEM_H + +#include + +namespace Ui { +class BeExamined_DeviceItem; +} + +class BeExamined_DeviceItem : public QWidget +{ + Q_OBJECT + +public: + explicit BeExamined_DeviceItem(QWidget *parent = nullptr); + ~BeExamined_DeviceItem(); + +private: + Ui::BeExamined_DeviceItem *ui; +}; + +#endif // BEEXAMINED_DEVICEITEM_H diff --git a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.ui b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.ui new file mode 100644 index 0000000..af9f7bf --- /dev/null +++ b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.ui @@ -0,0 +1,32 @@ + + + BeExamined_DeviceItem + + + + 0 + 0 + 400 + 300 + + + + Form + + + + + 130 + 140 + 89 + 24 + + + + 被检设备管理 + + + + + + diff --git a/softwareDirectory/AutoVerScheme/create_task.cpp b/softwareDirectory/AutoVerScheme/create_task.cpp new file mode 100644 index 0000000..4193efc --- /dev/null +++ b/softwareDirectory/AutoVerScheme/create_task.cpp @@ -0,0 +1,14 @@ +#include "create_task.h" +#include "ui_create_task.h" + +Create_Task::Create_Task(QWidget *parent) : + QWidget(parent), + ui(new Ui::Create_Task) +{ + ui->setupUi(this); +} + +Create_Task::~Create_Task() +{ + delete ui; +} diff --git a/softwareDirectory/AutoVerScheme/create_task.h b/softwareDirectory/AutoVerScheme/create_task.h new file mode 100644 index 0000000..e2264de --- /dev/null +++ b/softwareDirectory/AutoVerScheme/create_task.h @@ -0,0 +1,22 @@ +#ifndef CREATE_TASK_H +#define CREATE_TASK_H + +#include + +namespace Ui { +class Create_Task; +} + +class Create_Task : public QWidget +{ + Q_OBJECT + +public: + explicit Create_Task(QWidget *parent = nullptr); + ~Create_Task(); + +private: + Ui::Create_Task *ui; +}; + +#endif // CREATE_TASK_H diff --git a/softwareDirectory/AutoVerScheme/create_task.ui b/softwareDirectory/AutoVerScheme/create_task.ui new file mode 100644 index 0000000..b79c6a1 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/create_task.ui @@ -0,0 +1,35 @@ + + + Create_Task + + + + 0 + 0 + 400 + 300 + + + + Form + + + background-color:red; + + + + + 140 + 120 + 89 + 24 + + + + 创建任务单 + + + + + + diff --git a/softwareDirectory/AutoVerScheme/depar_task.cpp b/softwareDirectory/AutoVerScheme/depar_task.cpp new file mode 100644 index 0000000..de39775 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/depar_task.cpp @@ -0,0 +1,42 @@ +#include "depar_task.h" +#include "ui_depar_task.h" +#include "QMessageBox" +#include "InfoBase.h" + +Depar_Task::Depar_Task(QWidget *parent) : + InfoBase(parent), + ui(new Ui::Depar_Task) +{ + ui->setupUi(this); + this->initForm(); +} + +Depar_Task::~Depar_Task() +{ + delete ui; +} +void Depar_Task::initForm() +{ + + //ShowMessageBox("标题","初始化完成"); +} +void Depar_Task::ShowMessageBox(QString title,QString value) { + // 创建一个QMessageBox对象 + QMessageBox msgBox; + + // 设置消息框的标题 + msgBox.setWindowTitle(title); + + // 设置消息框的文本内容 + msgBox.setText(value); + + // 设置消息框的标准按钮,这里是“确定”按钮 + msgBox.setStandardButtons(QMessageBox::Ok); + + // 显示消息框 + msgBox.exec(); +} +void Depar_Task::Load() +{ + ShowMessageBox("部门任务页面","部门任务初始化完成"); +} diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro index 5b8f852..fa0d8e5 100644 --- a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro @@ -1,5 +1,7 @@ QT += core gui QT += sql +QT += widgets + greaterThan(QT_MAJOR_VERSION, 4): QT += widgets CONFIG += c++11 @@ -16,22 +18,50 @@ #DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 SOURCES += \ + beexamined_deviceitem.cpp \ + create_task.cpp \ + depar_task.cpp \ indexwindow.cpp \ + infomanageview.cpp \ + inspectdataitem.cpp \ loginwindow.cpp \ main.cpp \ mainwindow.cpp \ + my_task.cpp \ + rulefileitem.cpp \ + standard_deviceitem.cpp \ + testdataitem.cpp \ testview.cpp HEADERS += \ + InfoBase.h \ + beexamined_deviceitem.h \ + create_task.h \ + depar_task.h \ indexwindow.h \ + infomanageview.h \ + inspectdataitem.h \ loginwindow.h \ mainwindow.h \ + my_task.h \ + rulefileitem.h \ + standard_deviceitem.h \ + testdataitem.h \ testview.h FORMS += \ + beexamined_deviceitem.ui \ + create_task.ui \ + depar_task.ui \ indexwindow.ui \ + infomanageview.ui \ + inspectdataitem.ui \ loginwindow.ui \ mainwindow.ui \ + my_task.ui \ + rulefileitem.ui \ + standard_deviceitem.ui \ + testdataitem.ui \ testview.ui # Default rules for deployment. diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user index 1f5ec64..32d22e9 100644 --- a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user @@ -1,6 +1,6 @@ - + EnvironmentId @@ -64,249 +64,6 @@ ProjectExplorer.Project.Target.0 - Desktop Qt 5.14.2 MinGW 64-bit - Desktop Qt 5.14.2 MinGW 64-bit - qt.qt5.5142.win64_mingw73_kit - 0 - 0 - 0 - - 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 - - Qt4ProjectManager.Qt4RunConfiguration:D:/Auto_verification_scheme/AutoVerScheme/AutoVerScheme.pro - D:/Auto_verification_scheme/AutoVerScheme/AutoVerScheme.pro - - false - - false - true - true - false - false - true - - D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Debug - - 1 - - - - ProjectExplorer.Project.Target.1 - Desktop Qt 5.14.2 MinGW 32-bit Desktop Qt 5.14.2 MinGW 32-bit qt.qt5.5142.win32_mingw73_kit @@ -530,8 +287,252 @@ 2 - Qt4ProjectManager.Qt4RunConfiguration:D:/Auto_verification_scheme/AutoVerScheme/AutoVerScheme.pro - D:/Auto_verification_scheme/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 + + 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 diff --git a/softwareDirectory/AutoVerScheme/InfoBase.cpp b/softwareDirectory/AutoVerScheme/InfoBase.cpp new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/InfoBase.cpp diff --git a/softwareDirectory/AutoVerScheme/InfoBase.h b/softwareDirectory/AutoVerScheme/InfoBase.h new file mode 100644 index 0000000..7fec63e --- /dev/null +++ b/softwareDirectory/AutoVerScheme/InfoBase.h @@ -0,0 +1,16 @@ +#ifndef INFOBASE_H +#define INFOBASE_H + +#include +///信号管理页面的基类 所有信息管理页面都继承于InfoBase +/// 便于统一管理 所有子类必须实现Load方法 +/// 每次按钮点击切换都会调用Load方法 用于每次页面的数据刷新 +class InfoBase : public QWidget { + Q_OBJECT +public: + InfoBase(QWidget *parent = nullptr): QWidget(parent){}; + // 纯虚函数 + virtual void Load()=0; +}; +#endif // INFOBASE_H + diff --git a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.cpp b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.cpp new file mode 100644 index 0000000..7ac1e87 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.cpp @@ -0,0 +1,14 @@ +#include "beexamined_deviceitem.h" +#include "ui_beexamined_deviceitem.h" + +BeExamined_DeviceItem::BeExamined_DeviceItem(QWidget *parent) : + QWidget(parent), + ui(new Ui::BeExamined_DeviceItem) +{ + ui->setupUi(this); +} + +BeExamined_DeviceItem::~BeExamined_DeviceItem() +{ + delete ui; +} diff --git a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.h b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.h new file mode 100644 index 0000000..76b061d --- /dev/null +++ b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.h @@ -0,0 +1,22 @@ +#ifndef BEEXAMINED_DEVICEITEM_H +#define BEEXAMINED_DEVICEITEM_H + +#include + +namespace Ui { +class BeExamined_DeviceItem; +} + +class BeExamined_DeviceItem : public QWidget +{ + Q_OBJECT + +public: + explicit BeExamined_DeviceItem(QWidget *parent = nullptr); + ~BeExamined_DeviceItem(); + +private: + Ui::BeExamined_DeviceItem *ui; +}; + +#endif // BEEXAMINED_DEVICEITEM_H diff --git a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.ui b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.ui new file mode 100644 index 0000000..af9f7bf --- /dev/null +++ b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.ui @@ -0,0 +1,32 @@ + + + BeExamined_DeviceItem + + + + 0 + 0 + 400 + 300 + + + + Form + + + + + 130 + 140 + 89 + 24 + + + + 被检设备管理 + + + + + + diff --git a/softwareDirectory/AutoVerScheme/create_task.cpp b/softwareDirectory/AutoVerScheme/create_task.cpp new file mode 100644 index 0000000..4193efc --- /dev/null +++ b/softwareDirectory/AutoVerScheme/create_task.cpp @@ -0,0 +1,14 @@ +#include "create_task.h" +#include "ui_create_task.h" + +Create_Task::Create_Task(QWidget *parent) : + QWidget(parent), + ui(new Ui::Create_Task) +{ + ui->setupUi(this); +} + +Create_Task::~Create_Task() +{ + delete ui; +} diff --git a/softwareDirectory/AutoVerScheme/create_task.h b/softwareDirectory/AutoVerScheme/create_task.h new file mode 100644 index 0000000..e2264de --- /dev/null +++ b/softwareDirectory/AutoVerScheme/create_task.h @@ -0,0 +1,22 @@ +#ifndef CREATE_TASK_H +#define CREATE_TASK_H + +#include + +namespace Ui { +class Create_Task; +} + +class Create_Task : public QWidget +{ + Q_OBJECT + +public: + explicit Create_Task(QWidget *parent = nullptr); + ~Create_Task(); + +private: + Ui::Create_Task *ui; +}; + +#endif // CREATE_TASK_H diff --git a/softwareDirectory/AutoVerScheme/create_task.ui b/softwareDirectory/AutoVerScheme/create_task.ui new file mode 100644 index 0000000..b79c6a1 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/create_task.ui @@ -0,0 +1,35 @@ + + + Create_Task + + + + 0 + 0 + 400 + 300 + + + + Form + + + background-color:red; + + + + + 140 + 120 + 89 + 24 + + + + 创建任务单 + + + + + + diff --git a/softwareDirectory/AutoVerScheme/depar_task.cpp b/softwareDirectory/AutoVerScheme/depar_task.cpp new file mode 100644 index 0000000..de39775 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/depar_task.cpp @@ -0,0 +1,42 @@ +#include "depar_task.h" +#include "ui_depar_task.h" +#include "QMessageBox" +#include "InfoBase.h" + +Depar_Task::Depar_Task(QWidget *parent) : + InfoBase(parent), + ui(new Ui::Depar_Task) +{ + ui->setupUi(this); + this->initForm(); +} + +Depar_Task::~Depar_Task() +{ + delete ui; +} +void Depar_Task::initForm() +{ + + //ShowMessageBox("标题","初始化完成"); +} +void Depar_Task::ShowMessageBox(QString title,QString value) { + // 创建一个QMessageBox对象 + QMessageBox msgBox; + + // 设置消息框的标题 + msgBox.setWindowTitle(title); + + // 设置消息框的文本内容 + msgBox.setText(value); + + // 设置消息框的标准按钮,这里是“确定”按钮 + msgBox.setStandardButtons(QMessageBox::Ok); + + // 显示消息框 + msgBox.exec(); +} +void Depar_Task::Load() +{ + ShowMessageBox("部门任务页面","部门任务初始化完成"); +} diff --git a/softwareDirectory/AutoVerScheme/depar_task.h b/softwareDirectory/AutoVerScheme/depar_task.h new file mode 100644 index 0000000..8716faf --- /dev/null +++ b/softwareDirectory/AutoVerScheme/depar_task.h @@ -0,0 +1,28 @@ +#ifndef DEPAR_TASK_H +#define DEPAR_TASK_H + + +#include "InfoBase.h" + +namespace Ui { +class Depar_Task; +} + +class Depar_Task :public InfoBase +{ + Q_OBJECT + +public: + Depar_Task(QWidget *parent = nullptr); + ~Depar_Task(); + + +private slots: + void initForm(); //初始化界面数据 + void ShowMessageBox(QString title,QString value); + void Load() override; +private: + Ui::Depar_Task *ui; +}; + +#endif // DEPAR_TASK_H diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro index 5b8f852..fa0d8e5 100644 --- a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro @@ -1,5 +1,7 @@ QT += core gui QT += sql +QT += widgets + greaterThan(QT_MAJOR_VERSION, 4): QT += widgets CONFIG += c++11 @@ -16,22 +18,50 @@ #DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 SOURCES += \ + beexamined_deviceitem.cpp \ + create_task.cpp \ + depar_task.cpp \ indexwindow.cpp \ + infomanageview.cpp \ + inspectdataitem.cpp \ loginwindow.cpp \ main.cpp \ mainwindow.cpp \ + my_task.cpp \ + rulefileitem.cpp \ + standard_deviceitem.cpp \ + testdataitem.cpp \ testview.cpp HEADERS += \ + InfoBase.h \ + beexamined_deviceitem.h \ + create_task.h \ + depar_task.h \ indexwindow.h \ + infomanageview.h \ + inspectdataitem.h \ loginwindow.h \ mainwindow.h \ + my_task.h \ + rulefileitem.h \ + standard_deviceitem.h \ + testdataitem.h \ testview.h FORMS += \ + beexamined_deviceitem.ui \ + create_task.ui \ + depar_task.ui \ indexwindow.ui \ + infomanageview.ui \ + inspectdataitem.ui \ loginwindow.ui \ mainwindow.ui \ + my_task.ui \ + rulefileitem.ui \ + standard_deviceitem.ui \ + testdataitem.ui \ testview.ui # Default rules for deployment. diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user index 1f5ec64..32d22e9 100644 --- a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user @@ -1,6 +1,6 @@ - + EnvironmentId @@ -64,249 +64,6 @@ ProjectExplorer.Project.Target.0 - Desktop Qt 5.14.2 MinGW 64-bit - Desktop Qt 5.14.2 MinGW 64-bit - qt.qt5.5142.win64_mingw73_kit - 0 - 0 - 0 - - 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 - - Qt4ProjectManager.Qt4RunConfiguration:D:/Auto_verification_scheme/AutoVerScheme/AutoVerScheme.pro - D:/Auto_verification_scheme/AutoVerScheme/AutoVerScheme.pro - - false - - false - true - true - false - false - true - - D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Debug - - 1 - - - - ProjectExplorer.Project.Target.1 - Desktop Qt 5.14.2 MinGW 32-bit Desktop Qt 5.14.2 MinGW 32-bit qt.qt5.5142.win32_mingw73_kit @@ -530,8 +287,252 @@ 2 - Qt4ProjectManager.Qt4RunConfiguration:D:/Auto_verification_scheme/AutoVerScheme/AutoVerScheme.pro - D:/Auto_verification_scheme/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 + + 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 diff --git a/softwareDirectory/AutoVerScheme/InfoBase.cpp b/softwareDirectory/AutoVerScheme/InfoBase.cpp new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/InfoBase.cpp diff --git a/softwareDirectory/AutoVerScheme/InfoBase.h b/softwareDirectory/AutoVerScheme/InfoBase.h new file mode 100644 index 0000000..7fec63e --- /dev/null +++ b/softwareDirectory/AutoVerScheme/InfoBase.h @@ -0,0 +1,16 @@ +#ifndef INFOBASE_H +#define INFOBASE_H + +#include +///信号管理页面的基类 所有信息管理页面都继承于InfoBase +/// 便于统一管理 所有子类必须实现Load方法 +/// 每次按钮点击切换都会调用Load方法 用于每次页面的数据刷新 +class InfoBase : public QWidget { + Q_OBJECT +public: + InfoBase(QWidget *parent = nullptr): QWidget(parent){}; + // 纯虚函数 + virtual void Load()=0; +}; +#endif // INFOBASE_H + diff --git a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.cpp b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.cpp new file mode 100644 index 0000000..7ac1e87 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.cpp @@ -0,0 +1,14 @@ +#include "beexamined_deviceitem.h" +#include "ui_beexamined_deviceitem.h" + +BeExamined_DeviceItem::BeExamined_DeviceItem(QWidget *parent) : + QWidget(parent), + ui(new Ui::BeExamined_DeviceItem) +{ + ui->setupUi(this); +} + +BeExamined_DeviceItem::~BeExamined_DeviceItem() +{ + delete ui; +} diff --git a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.h b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.h new file mode 100644 index 0000000..76b061d --- /dev/null +++ b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.h @@ -0,0 +1,22 @@ +#ifndef BEEXAMINED_DEVICEITEM_H +#define BEEXAMINED_DEVICEITEM_H + +#include + +namespace Ui { +class BeExamined_DeviceItem; +} + +class BeExamined_DeviceItem : public QWidget +{ + Q_OBJECT + +public: + explicit BeExamined_DeviceItem(QWidget *parent = nullptr); + ~BeExamined_DeviceItem(); + +private: + Ui::BeExamined_DeviceItem *ui; +}; + +#endif // BEEXAMINED_DEVICEITEM_H diff --git a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.ui b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.ui new file mode 100644 index 0000000..af9f7bf --- /dev/null +++ b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.ui @@ -0,0 +1,32 @@ + + + BeExamined_DeviceItem + + + + 0 + 0 + 400 + 300 + + + + Form + + + + + 130 + 140 + 89 + 24 + + + + 被检设备管理 + + + + + + diff --git a/softwareDirectory/AutoVerScheme/create_task.cpp b/softwareDirectory/AutoVerScheme/create_task.cpp new file mode 100644 index 0000000..4193efc --- /dev/null +++ b/softwareDirectory/AutoVerScheme/create_task.cpp @@ -0,0 +1,14 @@ +#include "create_task.h" +#include "ui_create_task.h" + +Create_Task::Create_Task(QWidget *parent) : + QWidget(parent), + ui(new Ui::Create_Task) +{ + ui->setupUi(this); +} + +Create_Task::~Create_Task() +{ + delete ui; +} diff --git a/softwareDirectory/AutoVerScheme/create_task.h b/softwareDirectory/AutoVerScheme/create_task.h new file mode 100644 index 0000000..e2264de --- /dev/null +++ b/softwareDirectory/AutoVerScheme/create_task.h @@ -0,0 +1,22 @@ +#ifndef CREATE_TASK_H +#define CREATE_TASK_H + +#include + +namespace Ui { +class Create_Task; +} + +class Create_Task : public QWidget +{ + Q_OBJECT + +public: + explicit Create_Task(QWidget *parent = nullptr); + ~Create_Task(); + +private: + Ui::Create_Task *ui; +}; + +#endif // CREATE_TASK_H diff --git a/softwareDirectory/AutoVerScheme/create_task.ui b/softwareDirectory/AutoVerScheme/create_task.ui new file mode 100644 index 0000000..b79c6a1 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/create_task.ui @@ -0,0 +1,35 @@ + + + Create_Task + + + + 0 + 0 + 400 + 300 + + + + Form + + + background-color:red; + + + + + 140 + 120 + 89 + 24 + + + + 创建任务单 + + + + + + diff --git a/softwareDirectory/AutoVerScheme/depar_task.cpp b/softwareDirectory/AutoVerScheme/depar_task.cpp new file mode 100644 index 0000000..de39775 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/depar_task.cpp @@ -0,0 +1,42 @@ +#include "depar_task.h" +#include "ui_depar_task.h" +#include "QMessageBox" +#include "InfoBase.h" + +Depar_Task::Depar_Task(QWidget *parent) : + InfoBase(parent), + ui(new Ui::Depar_Task) +{ + ui->setupUi(this); + this->initForm(); +} + +Depar_Task::~Depar_Task() +{ + delete ui; +} +void Depar_Task::initForm() +{ + + //ShowMessageBox("标题","初始化完成"); +} +void Depar_Task::ShowMessageBox(QString title,QString value) { + // 创建一个QMessageBox对象 + QMessageBox msgBox; + + // 设置消息框的标题 + msgBox.setWindowTitle(title); + + // 设置消息框的文本内容 + msgBox.setText(value); + + // 设置消息框的标准按钮,这里是“确定”按钮 + msgBox.setStandardButtons(QMessageBox::Ok); + + // 显示消息框 + msgBox.exec(); +} +void Depar_Task::Load() +{ + ShowMessageBox("部门任务页面","部门任务初始化完成"); +} diff --git a/softwareDirectory/AutoVerScheme/depar_task.h b/softwareDirectory/AutoVerScheme/depar_task.h new file mode 100644 index 0000000..8716faf --- /dev/null +++ b/softwareDirectory/AutoVerScheme/depar_task.h @@ -0,0 +1,28 @@ +#ifndef DEPAR_TASK_H +#define DEPAR_TASK_H + + +#include "InfoBase.h" + +namespace Ui { +class Depar_Task; +} + +class Depar_Task :public InfoBase +{ + Q_OBJECT + +public: + Depar_Task(QWidget *parent = nullptr); + ~Depar_Task(); + + +private slots: + void initForm(); //初始化界面数据 + void ShowMessageBox(QString title,QString value); + void Load() override; +private: + Ui::Depar_Task *ui; +}; + +#endif // DEPAR_TASK_H diff --git a/softwareDirectory/AutoVerScheme/depar_task.ui b/softwareDirectory/AutoVerScheme/depar_task.ui new file mode 100644 index 0000000..ff3d44f --- /dev/null +++ b/softwareDirectory/AutoVerScheme/depar_task.ui @@ -0,0 +1,181 @@ + + + Depar_Task + + + + 0 + 0 + 1184 + 456 + + + + Form + + + color:black; + + + + + + + 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 + + + + 要求完成时间: + + + + + + + + + + 查询 + + + + + + + 重置 + + + + + + + + + + background-color:white; + + + + + + + + + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro index 5b8f852..fa0d8e5 100644 --- a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro @@ -1,5 +1,7 @@ QT += core gui QT += sql +QT += widgets + greaterThan(QT_MAJOR_VERSION, 4): QT += widgets CONFIG += c++11 @@ -16,22 +18,50 @@ #DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 SOURCES += \ + beexamined_deviceitem.cpp \ + create_task.cpp \ + depar_task.cpp \ indexwindow.cpp \ + infomanageview.cpp \ + inspectdataitem.cpp \ loginwindow.cpp \ main.cpp \ mainwindow.cpp \ + my_task.cpp \ + rulefileitem.cpp \ + standard_deviceitem.cpp \ + testdataitem.cpp \ testview.cpp HEADERS += \ + InfoBase.h \ + beexamined_deviceitem.h \ + create_task.h \ + depar_task.h \ indexwindow.h \ + infomanageview.h \ + inspectdataitem.h \ loginwindow.h \ mainwindow.h \ + my_task.h \ + rulefileitem.h \ + standard_deviceitem.h \ + testdataitem.h \ testview.h FORMS += \ + beexamined_deviceitem.ui \ + create_task.ui \ + depar_task.ui \ indexwindow.ui \ + infomanageview.ui \ + inspectdataitem.ui \ loginwindow.ui \ mainwindow.ui \ + my_task.ui \ + rulefileitem.ui \ + standard_deviceitem.ui \ + testdataitem.ui \ testview.ui # Default rules for deployment. diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user index 1f5ec64..32d22e9 100644 --- a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user @@ -1,6 +1,6 @@ - + EnvironmentId @@ -64,249 +64,6 @@ ProjectExplorer.Project.Target.0 - Desktop Qt 5.14.2 MinGW 64-bit - Desktop Qt 5.14.2 MinGW 64-bit - qt.qt5.5142.win64_mingw73_kit - 0 - 0 - 0 - - 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 - - Qt4ProjectManager.Qt4RunConfiguration:D:/Auto_verification_scheme/AutoVerScheme/AutoVerScheme.pro - D:/Auto_verification_scheme/AutoVerScheme/AutoVerScheme.pro - - false - - false - true - true - false - false - true - - D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Debug - - 1 - - - - ProjectExplorer.Project.Target.1 - Desktop Qt 5.14.2 MinGW 32-bit Desktop Qt 5.14.2 MinGW 32-bit qt.qt5.5142.win32_mingw73_kit @@ -530,8 +287,252 @@ 2 - Qt4ProjectManager.Qt4RunConfiguration:D:/Auto_verification_scheme/AutoVerScheme/AutoVerScheme.pro - D:/Auto_verification_scheme/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 + + 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 diff --git a/softwareDirectory/AutoVerScheme/InfoBase.cpp b/softwareDirectory/AutoVerScheme/InfoBase.cpp new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/InfoBase.cpp diff --git a/softwareDirectory/AutoVerScheme/InfoBase.h b/softwareDirectory/AutoVerScheme/InfoBase.h new file mode 100644 index 0000000..7fec63e --- /dev/null +++ b/softwareDirectory/AutoVerScheme/InfoBase.h @@ -0,0 +1,16 @@ +#ifndef INFOBASE_H +#define INFOBASE_H + +#include +///信号管理页面的基类 所有信息管理页面都继承于InfoBase +/// 便于统一管理 所有子类必须实现Load方法 +/// 每次按钮点击切换都会调用Load方法 用于每次页面的数据刷新 +class InfoBase : public QWidget { + Q_OBJECT +public: + InfoBase(QWidget *parent = nullptr): QWidget(parent){}; + // 纯虚函数 + virtual void Load()=0; +}; +#endif // INFOBASE_H + diff --git a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.cpp b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.cpp new file mode 100644 index 0000000..7ac1e87 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.cpp @@ -0,0 +1,14 @@ +#include "beexamined_deviceitem.h" +#include "ui_beexamined_deviceitem.h" + +BeExamined_DeviceItem::BeExamined_DeviceItem(QWidget *parent) : + QWidget(parent), + ui(new Ui::BeExamined_DeviceItem) +{ + ui->setupUi(this); +} + +BeExamined_DeviceItem::~BeExamined_DeviceItem() +{ + delete ui; +} diff --git a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.h b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.h new file mode 100644 index 0000000..76b061d --- /dev/null +++ b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.h @@ -0,0 +1,22 @@ +#ifndef BEEXAMINED_DEVICEITEM_H +#define BEEXAMINED_DEVICEITEM_H + +#include + +namespace Ui { +class BeExamined_DeviceItem; +} + +class BeExamined_DeviceItem : public QWidget +{ + Q_OBJECT + +public: + explicit BeExamined_DeviceItem(QWidget *parent = nullptr); + ~BeExamined_DeviceItem(); + +private: + Ui::BeExamined_DeviceItem *ui; +}; + +#endif // BEEXAMINED_DEVICEITEM_H diff --git a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.ui b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.ui new file mode 100644 index 0000000..af9f7bf --- /dev/null +++ b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.ui @@ -0,0 +1,32 @@ + + + BeExamined_DeviceItem + + + + 0 + 0 + 400 + 300 + + + + Form + + + + + 130 + 140 + 89 + 24 + + + + 被检设备管理 + + + + + + diff --git a/softwareDirectory/AutoVerScheme/create_task.cpp b/softwareDirectory/AutoVerScheme/create_task.cpp new file mode 100644 index 0000000..4193efc --- /dev/null +++ b/softwareDirectory/AutoVerScheme/create_task.cpp @@ -0,0 +1,14 @@ +#include "create_task.h" +#include "ui_create_task.h" + +Create_Task::Create_Task(QWidget *parent) : + QWidget(parent), + ui(new Ui::Create_Task) +{ + ui->setupUi(this); +} + +Create_Task::~Create_Task() +{ + delete ui; +} diff --git a/softwareDirectory/AutoVerScheme/create_task.h b/softwareDirectory/AutoVerScheme/create_task.h new file mode 100644 index 0000000..e2264de --- /dev/null +++ b/softwareDirectory/AutoVerScheme/create_task.h @@ -0,0 +1,22 @@ +#ifndef CREATE_TASK_H +#define CREATE_TASK_H + +#include + +namespace Ui { +class Create_Task; +} + +class Create_Task : public QWidget +{ + Q_OBJECT + +public: + explicit Create_Task(QWidget *parent = nullptr); + ~Create_Task(); + +private: + Ui::Create_Task *ui; +}; + +#endif // CREATE_TASK_H diff --git a/softwareDirectory/AutoVerScheme/create_task.ui b/softwareDirectory/AutoVerScheme/create_task.ui new file mode 100644 index 0000000..b79c6a1 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/create_task.ui @@ -0,0 +1,35 @@ + + + Create_Task + + + + 0 + 0 + 400 + 300 + + + + Form + + + background-color:red; + + + + + 140 + 120 + 89 + 24 + + + + 创建任务单 + + + + + + diff --git a/softwareDirectory/AutoVerScheme/depar_task.cpp b/softwareDirectory/AutoVerScheme/depar_task.cpp new file mode 100644 index 0000000..de39775 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/depar_task.cpp @@ -0,0 +1,42 @@ +#include "depar_task.h" +#include "ui_depar_task.h" +#include "QMessageBox" +#include "InfoBase.h" + +Depar_Task::Depar_Task(QWidget *parent) : + InfoBase(parent), + ui(new Ui::Depar_Task) +{ + ui->setupUi(this); + this->initForm(); +} + +Depar_Task::~Depar_Task() +{ + delete ui; +} +void Depar_Task::initForm() +{ + + //ShowMessageBox("标题","初始化完成"); +} +void Depar_Task::ShowMessageBox(QString title,QString value) { + // 创建一个QMessageBox对象 + QMessageBox msgBox; + + // 设置消息框的标题 + msgBox.setWindowTitle(title); + + // 设置消息框的文本内容 + msgBox.setText(value); + + // 设置消息框的标准按钮,这里是“确定”按钮 + msgBox.setStandardButtons(QMessageBox::Ok); + + // 显示消息框 + msgBox.exec(); +} +void Depar_Task::Load() +{ + ShowMessageBox("部门任务页面","部门任务初始化完成"); +} diff --git a/softwareDirectory/AutoVerScheme/depar_task.h b/softwareDirectory/AutoVerScheme/depar_task.h new file mode 100644 index 0000000..8716faf --- /dev/null +++ b/softwareDirectory/AutoVerScheme/depar_task.h @@ -0,0 +1,28 @@ +#ifndef DEPAR_TASK_H +#define DEPAR_TASK_H + + +#include "InfoBase.h" + +namespace Ui { +class Depar_Task; +} + +class Depar_Task :public InfoBase +{ + Q_OBJECT + +public: + Depar_Task(QWidget *parent = nullptr); + ~Depar_Task(); + + +private slots: + void initForm(); //初始化界面数据 + void ShowMessageBox(QString title,QString value); + void Load() override; +private: + Ui::Depar_Task *ui; +}; + +#endif // DEPAR_TASK_H diff --git a/softwareDirectory/AutoVerScheme/depar_task.ui b/softwareDirectory/AutoVerScheme/depar_task.ui new file mode 100644 index 0000000..ff3d44f --- /dev/null +++ b/softwareDirectory/AutoVerScheme/depar_task.ui @@ -0,0 +1,181 @@ + + + Depar_Task + + + + 0 + 0 + 1184 + 456 + + + + Form + + + color:black; + + + + + + + 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 + + + + 要求完成时间: + + + + + + + + + + 查询 + + + + + + + 重置 + + + + + + + + + + background-color:white; + + + + + + + + + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/indexwindow.cpp b/softwareDirectory/AutoVerScheme/indexwindow.cpp index 3e52c7b..9bd65b1 100644 --- a/softwareDirectory/AutoVerScheme/indexwindow.cpp +++ b/softwareDirectory/AutoVerScheme/indexwindow.cpp @@ -21,6 +21,7 @@ //调用样式 loadStyle(":/qss/Index.css"); + } void IndexWindow::loadStyle(const QString &qssFile) diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro index 5b8f852..fa0d8e5 100644 --- a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro @@ -1,5 +1,7 @@ QT += core gui QT += sql +QT += widgets + greaterThan(QT_MAJOR_VERSION, 4): QT += widgets CONFIG += c++11 @@ -16,22 +18,50 @@ #DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 SOURCES += \ + beexamined_deviceitem.cpp \ + create_task.cpp \ + depar_task.cpp \ indexwindow.cpp \ + infomanageview.cpp \ + inspectdataitem.cpp \ loginwindow.cpp \ main.cpp \ mainwindow.cpp \ + my_task.cpp \ + rulefileitem.cpp \ + standard_deviceitem.cpp \ + testdataitem.cpp \ testview.cpp HEADERS += \ + InfoBase.h \ + beexamined_deviceitem.h \ + create_task.h \ + depar_task.h \ indexwindow.h \ + infomanageview.h \ + inspectdataitem.h \ loginwindow.h \ mainwindow.h \ + my_task.h \ + rulefileitem.h \ + standard_deviceitem.h \ + testdataitem.h \ testview.h FORMS += \ + beexamined_deviceitem.ui \ + create_task.ui \ + depar_task.ui \ indexwindow.ui \ + infomanageview.ui \ + inspectdataitem.ui \ loginwindow.ui \ mainwindow.ui \ + my_task.ui \ + rulefileitem.ui \ + standard_deviceitem.ui \ + testdataitem.ui \ testview.ui # Default rules for deployment. diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user index 1f5ec64..32d22e9 100644 --- a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user @@ -1,6 +1,6 @@ - + EnvironmentId @@ -64,249 +64,6 @@ ProjectExplorer.Project.Target.0 - Desktop Qt 5.14.2 MinGW 64-bit - Desktop Qt 5.14.2 MinGW 64-bit - qt.qt5.5142.win64_mingw73_kit - 0 - 0 - 0 - - 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 - - Qt4ProjectManager.Qt4RunConfiguration:D:/Auto_verification_scheme/AutoVerScheme/AutoVerScheme.pro - D:/Auto_verification_scheme/AutoVerScheme/AutoVerScheme.pro - - false - - false - true - true - false - false - true - - D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Debug - - 1 - - - - ProjectExplorer.Project.Target.1 - Desktop Qt 5.14.2 MinGW 32-bit Desktop Qt 5.14.2 MinGW 32-bit qt.qt5.5142.win32_mingw73_kit @@ -530,8 +287,252 @@ 2 - Qt4ProjectManager.Qt4RunConfiguration:D:/Auto_verification_scheme/AutoVerScheme/AutoVerScheme.pro - D:/Auto_verification_scheme/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 + + 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 diff --git a/softwareDirectory/AutoVerScheme/InfoBase.cpp b/softwareDirectory/AutoVerScheme/InfoBase.cpp new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/InfoBase.cpp diff --git a/softwareDirectory/AutoVerScheme/InfoBase.h b/softwareDirectory/AutoVerScheme/InfoBase.h new file mode 100644 index 0000000..7fec63e --- /dev/null +++ b/softwareDirectory/AutoVerScheme/InfoBase.h @@ -0,0 +1,16 @@ +#ifndef INFOBASE_H +#define INFOBASE_H + +#include +///信号管理页面的基类 所有信息管理页面都继承于InfoBase +/// 便于统一管理 所有子类必须实现Load方法 +/// 每次按钮点击切换都会调用Load方法 用于每次页面的数据刷新 +class InfoBase : public QWidget { + Q_OBJECT +public: + InfoBase(QWidget *parent = nullptr): QWidget(parent){}; + // 纯虚函数 + virtual void Load()=0; +}; +#endif // INFOBASE_H + diff --git a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.cpp b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.cpp new file mode 100644 index 0000000..7ac1e87 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.cpp @@ -0,0 +1,14 @@ +#include "beexamined_deviceitem.h" +#include "ui_beexamined_deviceitem.h" + +BeExamined_DeviceItem::BeExamined_DeviceItem(QWidget *parent) : + QWidget(parent), + ui(new Ui::BeExamined_DeviceItem) +{ + ui->setupUi(this); +} + +BeExamined_DeviceItem::~BeExamined_DeviceItem() +{ + delete ui; +} diff --git a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.h b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.h new file mode 100644 index 0000000..76b061d --- /dev/null +++ b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.h @@ -0,0 +1,22 @@ +#ifndef BEEXAMINED_DEVICEITEM_H +#define BEEXAMINED_DEVICEITEM_H + +#include + +namespace Ui { +class BeExamined_DeviceItem; +} + +class BeExamined_DeviceItem : public QWidget +{ + Q_OBJECT + +public: + explicit BeExamined_DeviceItem(QWidget *parent = nullptr); + ~BeExamined_DeviceItem(); + +private: + Ui::BeExamined_DeviceItem *ui; +}; + +#endif // BEEXAMINED_DEVICEITEM_H diff --git a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.ui b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.ui new file mode 100644 index 0000000..af9f7bf --- /dev/null +++ b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.ui @@ -0,0 +1,32 @@ + + + BeExamined_DeviceItem + + + + 0 + 0 + 400 + 300 + + + + Form + + + + + 130 + 140 + 89 + 24 + + + + 被检设备管理 + + + + + + diff --git a/softwareDirectory/AutoVerScheme/create_task.cpp b/softwareDirectory/AutoVerScheme/create_task.cpp new file mode 100644 index 0000000..4193efc --- /dev/null +++ b/softwareDirectory/AutoVerScheme/create_task.cpp @@ -0,0 +1,14 @@ +#include "create_task.h" +#include "ui_create_task.h" + +Create_Task::Create_Task(QWidget *parent) : + QWidget(parent), + ui(new Ui::Create_Task) +{ + ui->setupUi(this); +} + +Create_Task::~Create_Task() +{ + delete ui; +} diff --git a/softwareDirectory/AutoVerScheme/create_task.h b/softwareDirectory/AutoVerScheme/create_task.h new file mode 100644 index 0000000..e2264de --- /dev/null +++ b/softwareDirectory/AutoVerScheme/create_task.h @@ -0,0 +1,22 @@ +#ifndef CREATE_TASK_H +#define CREATE_TASK_H + +#include + +namespace Ui { +class Create_Task; +} + +class Create_Task : public QWidget +{ + Q_OBJECT + +public: + explicit Create_Task(QWidget *parent = nullptr); + ~Create_Task(); + +private: + Ui::Create_Task *ui; +}; + +#endif // CREATE_TASK_H diff --git a/softwareDirectory/AutoVerScheme/create_task.ui b/softwareDirectory/AutoVerScheme/create_task.ui new file mode 100644 index 0000000..b79c6a1 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/create_task.ui @@ -0,0 +1,35 @@ + + + Create_Task + + + + 0 + 0 + 400 + 300 + + + + Form + + + background-color:red; + + + + + 140 + 120 + 89 + 24 + + + + 创建任务单 + + + + + + diff --git a/softwareDirectory/AutoVerScheme/depar_task.cpp b/softwareDirectory/AutoVerScheme/depar_task.cpp new file mode 100644 index 0000000..de39775 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/depar_task.cpp @@ -0,0 +1,42 @@ +#include "depar_task.h" +#include "ui_depar_task.h" +#include "QMessageBox" +#include "InfoBase.h" + +Depar_Task::Depar_Task(QWidget *parent) : + InfoBase(parent), + ui(new Ui::Depar_Task) +{ + ui->setupUi(this); + this->initForm(); +} + +Depar_Task::~Depar_Task() +{ + delete ui; +} +void Depar_Task::initForm() +{ + + //ShowMessageBox("标题","初始化完成"); +} +void Depar_Task::ShowMessageBox(QString title,QString value) { + // 创建一个QMessageBox对象 + QMessageBox msgBox; + + // 设置消息框的标题 + msgBox.setWindowTitle(title); + + // 设置消息框的文本内容 + msgBox.setText(value); + + // 设置消息框的标准按钮,这里是“确定”按钮 + msgBox.setStandardButtons(QMessageBox::Ok); + + // 显示消息框 + msgBox.exec(); +} +void Depar_Task::Load() +{ + ShowMessageBox("部门任务页面","部门任务初始化完成"); +} diff --git a/softwareDirectory/AutoVerScheme/depar_task.h b/softwareDirectory/AutoVerScheme/depar_task.h new file mode 100644 index 0000000..8716faf --- /dev/null +++ b/softwareDirectory/AutoVerScheme/depar_task.h @@ -0,0 +1,28 @@ +#ifndef DEPAR_TASK_H +#define DEPAR_TASK_H + + +#include "InfoBase.h" + +namespace Ui { +class Depar_Task; +} + +class Depar_Task :public InfoBase +{ + Q_OBJECT + +public: + Depar_Task(QWidget *parent = nullptr); + ~Depar_Task(); + + +private slots: + void initForm(); //初始化界面数据 + void ShowMessageBox(QString title,QString value); + void Load() override; +private: + Ui::Depar_Task *ui; +}; + +#endif // DEPAR_TASK_H diff --git a/softwareDirectory/AutoVerScheme/depar_task.ui b/softwareDirectory/AutoVerScheme/depar_task.ui new file mode 100644 index 0000000..ff3d44f --- /dev/null +++ b/softwareDirectory/AutoVerScheme/depar_task.ui @@ -0,0 +1,181 @@ + + + Depar_Task + + + + 0 + 0 + 1184 + 456 + + + + Form + + + color:black; + + + + + + + 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 + + + + 要求完成时间: + + + + + + + + + + 查询 + + + + + + + 重置 + + + + + + + + + + background-color:white; + + + + + + + + + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/indexwindow.cpp b/softwareDirectory/AutoVerScheme/indexwindow.cpp index 3e52c7b..9bd65b1 100644 --- a/softwareDirectory/AutoVerScheme/indexwindow.cpp +++ b/softwareDirectory/AutoVerScheme/indexwindow.cpp @@ -21,6 +21,7 @@ //调用样式 loadStyle(":/qss/Index.css"); + } void IndexWindow::loadStyle(const QString &qssFile) diff --git a/softwareDirectory/AutoVerScheme/infomanageview.cpp b/softwareDirectory/AutoVerScheme/infomanageview.cpp new file mode 100644 index 0000000..a206c6f --- /dev/null +++ b/softwareDirectory/AutoVerScheme/infomanageview.cpp @@ -0,0 +1,150 @@ +#include "infomanageview.h" +#include "ui_infomanageview.h" +#include +#include +//子窗体 +#include "depar_task.h" +#include "my_task.h" +#include "create_task.h" +#include "beexamined_deviceitem.h" +#include "inspectdataitem.h" +#include "rulefileitem.h" +#include "standard_deviceitem.h" +#include "testdataitem.h" +#include "InfoBase.h" + +InfoManageView::InfoManageView(QWidget *parent) : + QWidget(parent), + ui(new Ui::InfoManageView) +{ + ui->setupUi(this); + this->setWindowTitle("信息管理"); + //初始化调用所有函数 + this->initForm(); + this->initWidget(); + this->initNav(); + this->initIcon(); +} +//左侧滚动条事件 +void InfoManageView::showEvent(QShowEvent *) +{ + //滚动到底部 + QScrollBar *bar = ui->scrollArea->verticalScrollBar(); + bar->setValue(bar->maximum()); +} + +//左侧导航栏样式初始化 +void InfoManageView::initIcon() +{ + //左侧导航样式,可以设置各种牛逼的参数,超级棒 + // IconHelper::StyleColor styleColor; + //styleColor.defaultBorder = true; + // IconHelper::setStyle(ui->widgetLeft, btns, icons, styleColor); +} + +//颜色初始化设置 +QList InfoManageView::colors = QList(); +void InfoManageView::initForm() +{ + //颜色集合供其他界面使用 + colors << QColor(211, 78, 78) << QColor(29, 185, 242) << QColor(170, 162, 119) << QColor(255, 192, 1); + colors << QColor(0, 176, 180) << QColor(0, 113, 193) << QColor(255, 192, 0); + colors << QColor(72, 103, 149) << QColor(185, 87, 86) << QColor(0, 177, 125); + colors << QColor(214, 77, 84) << QColor(71, 164, 233) << QColor(34, 163, 169); + colors << QColor(59, 123, 156) << QColor(162, 121, 197) << QColor(72, 202, 245); + colors << QColor(0, 150, 121) << QColor(111, 9, 176) << QColor(250, 170, 20); + + ui->scrollArea->setFixedWidth(170); + ui->widgetLeft->setProperty("flag", "left"); +} + +//右侧可切换UI导入 +void InfoManageView::initWidget() +{ + ui->stackedWidget->addWidget(new Depar_Task); //部门任务 + ui->stackedWidget->addWidget(new My_Task); //我的任务 + ui->stackedWidget->addWidget(new Create_Task); //创建任务单 + ui->stackedWidget->addWidget(new Standard_DeviceItem); //标准设备管理 + ui->stackedWidget->addWidget(new BeExamined_DeviceItem); //被检设备管理 + ui->stackedWidget->addWidget(new TestDataItem); //检定数据管理 + ui->stackedWidget->addWidget(new InspectDataItem); //核查数据管理 + ui->stackedWidget->addWidget(new RuleFileItem); //技术文件管理 + + +} +//左侧列表信息导入 +void InfoManageView::initNav() +{ + //按钮文字集合 + QStringList names; + names << "部门任务" << "我的任务" << "创建任务单" << "标准设备管理" << "被检设备管理" + << "检定数据管理" << "核查数据管理" << "技术文件管理" ; + + //自动生成按钮 + for (int i = 0; i < names.count(); i++) { + QToolButton *btn = new QToolButton; + //设置按钮固定高度 + btn->setFixedHeight(35); + //设置按钮的文字 + //btn->setText(QString("%1. %2").arg(i + 1, 2, 10, QChar('0')).arg(names.at(i))); + btn->setText(QString("%1").arg(names.at(i))); + //设置按钮可选中按下类似复选框的功能 + btn->setCheckable(true); + //设置按钮图标在左侧文字在右侧 + // btn->setToolButtonStyle(Qt::ToolButtonTextBesideIcon); + //设置按钮拉伸策略为横向填充 + btn->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Preferred); + //关联按钮单击事件 + connect(btn, SIGNAL(clicked(bool)), this, SLOT(buttonClicked())); + //将按钮加入到布局 + ui->widgetLeft->layout()->addWidget(btn); + //可以指定不同的图标 + //icons << 0xf061; + btns << btn; + //设置按钮大小 + btn->setFixedSize(170, 70); + //设置鼠标经过和点击事件 + btn->setStyleSheet("QToolButton:hover " + "{ background-color: rgba(53, 91, 171, 1); }" + "QToolButton::checked { " + "background-color: rgba(53, 91, 171, 1)}"); + + //ui->widgetLeft->setFixedWidth(200); + } + + //底部加个弹簧 + QSpacerItem *verticalSpacer = new QSpacerItem(20, 40, QSizePolicy::Minimum, QSizePolicy::Expanding); + ui->widgetLeft->layout()->addItem(verticalSpacer); + btns.at(names.count() - 1)->click(); +} +//按钮点击切换UI事件 +void InfoManageView::buttonClicked() +{ + QAbstractButton *b = (QAbstractButton *)sender(); + int count = btns.count(); + int index = btns.indexOf(b); + ui->stackedWidget->setCurrentIndex(index); + + + // 获取当前在 QStackedWidget 中的部件 + QWidget* currentWidget = ui->stackedWidget->currentWidget(); + + // 尝试将当前部件转换为 InfoBase 类型 + InfoBase* currQWidget = qobject_cast(currentWidget); + // 检查转换是否成功 + if (currQWidget != nullptr) + { + // 如果转换成功,调用子类Load 方法 + currQWidget->Load(); + } + + for (int i = 0; i < count; i++) { + QAbstractButton *btn = btns.at(i); + btn->setChecked(btn == b); + } +} + +InfoManageView::~InfoManageView() +{ + delete ui; +} diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro index 5b8f852..fa0d8e5 100644 --- a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro @@ -1,5 +1,7 @@ QT += core gui QT += sql +QT += widgets + greaterThan(QT_MAJOR_VERSION, 4): QT += widgets CONFIG += c++11 @@ -16,22 +18,50 @@ #DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 SOURCES += \ + beexamined_deviceitem.cpp \ + create_task.cpp \ + depar_task.cpp \ indexwindow.cpp \ + infomanageview.cpp \ + inspectdataitem.cpp \ loginwindow.cpp \ main.cpp \ mainwindow.cpp \ + my_task.cpp \ + rulefileitem.cpp \ + standard_deviceitem.cpp \ + testdataitem.cpp \ testview.cpp HEADERS += \ + InfoBase.h \ + beexamined_deviceitem.h \ + create_task.h \ + depar_task.h \ indexwindow.h \ + infomanageview.h \ + inspectdataitem.h \ loginwindow.h \ mainwindow.h \ + my_task.h \ + rulefileitem.h \ + standard_deviceitem.h \ + testdataitem.h \ testview.h FORMS += \ + beexamined_deviceitem.ui \ + create_task.ui \ + depar_task.ui \ indexwindow.ui \ + infomanageview.ui \ + inspectdataitem.ui \ loginwindow.ui \ mainwindow.ui \ + my_task.ui \ + rulefileitem.ui \ + standard_deviceitem.ui \ + testdataitem.ui \ testview.ui # Default rules for deployment. diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user index 1f5ec64..32d22e9 100644 --- a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user @@ -1,6 +1,6 @@ - + EnvironmentId @@ -64,249 +64,6 @@ ProjectExplorer.Project.Target.0 - Desktop Qt 5.14.2 MinGW 64-bit - Desktop Qt 5.14.2 MinGW 64-bit - qt.qt5.5142.win64_mingw73_kit - 0 - 0 - 0 - - 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 - - Qt4ProjectManager.Qt4RunConfiguration:D:/Auto_verification_scheme/AutoVerScheme/AutoVerScheme.pro - D:/Auto_verification_scheme/AutoVerScheme/AutoVerScheme.pro - - false - - false - true - true - false - false - true - - D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Debug - - 1 - - - - ProjectExplorer.Project.Target.1 - Desktop Qt 5.14.2 MinGW 32-bit Desktop Qt 5.14.2 MinGW 32-bit qt.qt5.5142.win32_mingw73_kit @@ -530,8 +287,252 @@ 2 - Qt4ProjectManager.Qt4RunConfiguration:D:/Auto_verification_scheme/AutoVerScheme/AutoVerScheme.pro - D:/Auto_verification_scheme/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 + + 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 diff --git a/softwareDirectory/AutoVerScheme/InfoBase.cpp b/softwareDirectory/AutoVerScheme/InfoBase.cpp new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/InfoBase.cpp diff --git a/softwareDirectory/AutoVerScheme/InfoBase.h b/softwareDirectory/AutoVerScheme/InfoBase.h new file mode 100644 index 0000000..7fec63e --- /dev/null +++ b/softwareDirectory/AutoVerScheme/InfoBase.h @@ -0,0 +1,16 @@ +#ifndef INFOBASE_H +#define INFOBASE_H + +#include +///信号管理页面的基类 所有信息管理页面都继承于InfoBase +/// 便于统一管理 所有子类必须实现Load方法 +/// 每次按钮点击切换都会调用Load方法 用于每次页面的数据刷新 +class InfoBase : public QWidget { + Q_OBJECT +public: + InfoBase(QWidget *parent = nullptr): QWidget(parent){}; + // 纯虚函数 + virtual void Load()=0; +}; +#endif // INFOBASE_H + diff --git a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.cpp b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.cpp new file mode 100644 index 0000000..7ac1e87 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.cpp @@ -0,0 +1,14 @@ +#include "beexamined_deviceitem.h" +#include "ui_beexamined_deviceitem.h" + +BeExamined_DeviceItem::BeExamined_DeviceItem(QWidget *parent) : + QWidget(parent), + ui(new Ui::BeExamined_DeviceItem) +{ + ui->setupUi(this); +} + +BeExamined_DeviceItem::~BeExamined_DeviceItem() +{ + delete ui; +} diff --git a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.h b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.h new file mode 100644 index 0000000..76b061d --- /dev/null +++ b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.h @@ -0,0 +1,22 @@ +#ifndef BEEXAMINED_DEVICEITEM_H +#define BEEXAMINED_DEVICEITEM_H + +#include + +namespace Ui { +class BeExamined_DeviceItem; +} + +class BeExamined_DeviceItem : public QWidget +{ + Q_OBJECT + +public: + explicit BeExamined_DeviceItem(QWidget *parent = nullptr); + ~BeExamined_DeviceItem(); + +private: + Ui::BeExamined_DeviceItem *ui; +}; + +#endif // BEEXAMINED_DEVICEITEM_H diff --git a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.ui b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.ui new file mode 100644 index 0000000..af9f7bf --- /dev/null +++ b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.ui @@ -0,0 +1,32 @@ + + + BeExamined_DeviceItem + + + + 0 + 0 + 400 + 300 + + + + Form + + + + + 130 + 140 + 89 + 24 + + + + 被检设备管理 + + + + + + diff --git a/softwareDirectory/AutoVerScheme/create_task.cpp b/softwareDirectory/AutoVerScheme/create_task.cpp new file mode 100644 index 0000000..4193efc --- /dev/null +++ b/softwareDirectory/AutoVerScheme/create_task.cpp @@ -0,0 +1,14 @@ +#include "create_task.h" +#include "ui_create_task.h" + +Create_Task::Create_Task(QWidget *parent) : + QWidget(parent), + ui(new Ui::Create_Task) +{ + ui->setupUi(this); +} + +Create_Task::~Create_Task() +{ + delete ui; +} diff --git a/softwareDirectory/AutoVerScheme/create_task.h b/softwareDirectory/AutoVerScheme/create_task.h new file mode 100644 index 0000000..e2264de --- /dev/null +++ b/softwareDirectory/AutoVerScheme/create_task.h @@ -0,0 +1,22 @@ +#ifndef CREATE_TASK_H +#define CREATE_TASK_H + +#include + +namespace Ui { +class Create_Task; +} + +class Create_Task : public QWidget +{ + Q_OBJECT + +public: + explicit Create_Task(QWidget *parent = nullptr); + ~Create_Task(); + +private: + Ui::Create_Task *ui; +}; + +#endif // CREATE_TASK_H diff --git a/softwareDirectory/AutoVerScheme/create_task.ui b/softwareDirectory/AutoVerScheme/create_task.ui new file mode 100644 index 0000000..b79c6a1 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/create_task.ui @@ -0,0 +1,35 @@ + + + Create_Task + + + + 0 + 0 + 400 + 300 + + + + Form + + + background-color:red; + + + + + 140 + 120 + 89 + 24 + + + + 创建任务单 + + + + + + diff --git a/softwareDirectory/AutoVerScheme/depar_task.cpp b/softwareDirectory/AutoVerScheme/depar_task.cpp new file mode 100644 index 0000000..de39775 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/depar_task.cpp @@ -0,0 +1,42 @@ +#include "depar_task.h" +#include "ui_depar_task.h" +#include "QMessageBox" +#include "InfoBase.h" + +Depar_Task::Depar_Task(QWidget *parent) : + InfoBase(parent), + ui(new Ui::Depar_Task) +{ + ui->setupUi(this); + this->initForm(); +} + +Depar_Task::~Depar_Task() +{ + delete ui; +} +void Depar_Task::initForm() +{ + + //ShowMessageBox("标题","初始化完成"); +} +void Depar_Task::ShowMessageBox(QString title,QString value) { + // 创建一个QMessageBox对象 + QMessageBox msgBox; + + // 设置消息框的标题 + msgBox.setWindowTitle(title); + + // 设置消息框的文本内容 + msgBox.setText(value); + + // 设置消息框的标准按钮,这里是“确定”按钮 + msgBox.setStandardButtons(QMessageBox::Ok); + + // 显示消息框 + msgBox.exec(); +} +void Depar_Task::Load() +{ + ShowMessageBox("部门任务页面","部门任务初始化完成"); +} diff --git a/softwareDirectory/AutoVerScheme/depar_task.h b/softwareDirectory/AutoVerScheme/depar_task.h new file mode 100644 index 0000000..8716faf --- /dev/null +++ b/softwareDirectory/AutoVerScheme/depar_task.h @@ -0,0 +1,28 @@ +#ifndef DEPAR_TASK_H +#define DEPAR_TASK_H + + +#include "InfoBase.h" + +namespace Ui { +class Depar_Task; +} + +class Depar_Task :public InfoBase +{ + Q_OBJECT + +public: + Depar_Task(QWidget *parent = nullptr); + ~Depar_Task(); + + +private slots: + void initForm(); //初始化界面数据 + void ShowMessageBox(QString title,QString value); + void Load() override; +private: + Ui::Depar_Task *ui; +}; + +#endif // DEPAR_TASK_H diff --git a/softwareDirectory/AutoVerScheme/depar_task.ui b/softwareDirectory/AutoVerScheme/depar_task.ui new file mode 100644 index 0000000..ff3d44f --- /dev/null +++ b/softwareDirectory/AutoVerScheme/depar_task.ui @@ -0,0 +1,181 @@ + + + Depar_Task + + + + 0 + 0 + 1184 + 456 + + + + Form + + + color:black; + + + + + + + 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 + + + + 要求完成时间: + + + + + + + + + + 查询 + + + + + + + 重置 + + + + + + + + + + background-color:white; + + + + + + + + + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/indexwindow.cpp b/softwareDirectory/AutoVerScheme/indexwindow.cpp index 3e52c7b..9bd65b1 100644 --- a/softwareDirectory/AutoVerScheme/indexwindow.cpp +++ b/softwareDirectory/AutoVerScheme/indexwindow.cpp @@ -21,6 +21,7 @@ //调用样式 loadStyle(":/qss/Index.css"); + } void IndexWindow::loadStyle(const QString &qssFile) diff --git a/softwareDirectory/AutoVerScheme/infomanageview.cpp b/softwareDirectory/AutoVerScheme/infomanageview.cpp new file mode 100644 index 0000000..a206c6f --- /dev/null +++ b/softwareDirectory/AutoVerScheme/infomanageview.cpp @@ -0,0 +1,150 @@ +#include "infomanageview.h" +#include "ui_infomanageview.h" +#include +#include +//子窗体 +#include "depar_task.h" +#include "my_task.h" +#include "create_task.h" +#include "beexamined_deviceitem.h" +#include "inspectdataitem.h" +#include "rulefileitem.h" +#include "standard_deviceitem.h" +#include "testdataitem.h" +#include "InfoBase.h" + +InfoManageView::InfoManageView(QWidget *parent) : + QWidget(parent), + ui(new Ui::InfoManageView) +{ + ui->setupUi(this); + this->setWindowTitle("信息管理"); + //初始化调用所有函数 + this->initForm(); + this->initWidget(); + this->initNav(); + this->initIcon(); +} +//左侧滚动条事件 +void InfoManageView::showEvent(QShowEvent *) +{ + //滚动到底部 + QScrollBar *bar = ui->scrollArea->verticalScrollBar(); + bar->setValue(bar->maximum()); +} + +//左侧导航栏样式初始化 +void InfoManageView::initIcon() +{ + //左侧导航样式,可以设置各种牛逼的参数,超级棒 + // IconHelper::StyleColor styleColor; + //styleColor.defaultBorder = true; + // IconHelper::setStyle(ui->widgetLeft, btns, icons, styleColor); +} + +//颜色初始化设置 +QList InfoManageView::colors = QList(); +void InfoManageView::initForm() +{ + //颜色集合供其他界面使用 + colors << QColor(211, 78, 78) << QColor(29, 185, 242) << QColor(170, 162, 119) << QColor(255, 192, 1); + colors << QColor(0, 176, 180) << QColor(0, 113, 193) << QColor(255, 192, 0); + colors << QColor(72, 103, 149) << QColor(185, 87, 86) << QColor(0, 177, 125); + colors << QColor(214, 77, 84) << QColor(71, 164, 233) << QColor(34, 163, 169); + colors << QColor(59, 123, 156) << QColor(162, 121, 197) << QColor(72, 202, 245); + colors << QColor(0, 150, 121) << QColor(111, 9, 176) << QColor(250, 170, 20); + + ui->scrollArea->setFixedWidth(170); + ui->widgetLeft->setProperty("flag", "left"); +} + +//右侧可切换UI导入 +void InfoManageView::initWidget() +{ + ui->stackedWidget->addWidget(new Depar_Task); //部门任务 + ui->stackedWidget->addWidget(new My_Task); //我的任务 + ui->stackedWidget->addWidget(new Create_Task); //创建任务单 + ui->stackedWidget->addWidget(new Standard_DeviceItem); //标准设备管理 + ui->stackedWidget->addWidget(new BeExamined_DeviceItem); //被检设备管理 + ui->stackedWidget->addWidget(new TestDataItem); //检定数据管理 + ui->stackedWidget->addWidget(new InspectDataItem); //核查数据管理 + ui->stackedWidget->addWidget(new RuleFileItem); //技术文件管理 + + +} +//左侧列表信息导入 +void InfoManageView::initNav() +{ + //按钮文字集合 + QStringList names; + names << "部门任务" << "我的任务" << "创建任务单" << "标准设备管理" << "被检设备管理" + << "检定数据管理" << "核查数据管理" << "技术文件管理" ; + + //自动生成按钮 + for (int i = 0; i < names.count(); i++) { + QToolButton *btn = new QToolButton; + //设置按钮固定高度 + btn->setFixedHeight(35); + //设置按钮的文字 + //btn->setText(QString("%1. %2").arg(i + 1, 2, 10, QChar('0')).arg(names.at(i))); + btn->setText(QString("%1").arg(names.at(i))); + //设置按钮可选中按下类似复选框的功能 + btn->setCheckable(true); + //设置按钮图标在左侧文字在右侧 + // btn->setToolButtonStyle(Qt::ToolButtonTextBesideIcon); + //设置按钮拉伸策略为横向填充 + btn->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Preferred); + //关联按钮单击事件 + connect(btn, SIGNAL(clicked(bool)), this, SLOT(buttonClicked())); + //将按钮加入到布局 + ui->widgetLeft->layout()->addWidget(btn); + //可以指定不同的图标 + //icons << 0xf061; + btns << btn; + //设置按钮大小 + btn->setFixedSize(170, 70); + //设置鼠标经过和点击事件 + btn->setStyleSheet("QToolButton:hover " + "{ background-color: rgba(53, 91, 171, 1); }" + "QToolButton::checked { " + "background-color: rgba(53, 91, 171, 1)}"); + + //ui->widgetLeft->setFixedWidth(200); + } + + //底部加个弹簧 + QSpacerItem *verticalSpacer = new QSpacerItem(20, 40, QSizePolicy::Minimum, QSizePolicy::Expanding); + ui->widgetLeft->layout()->addItem(verticalSpacer); + btns.at(names.count() - 1)->click(); +} +//按钮点击切换UI事件 +void InfoManageView::buttonClicked() +{ + QAbstractButton *b = (QAbstractButton *)sender(); + int count = btns.count(); + int index = btns.indexOf(b); + ui->stackedWidget->setCurrentIndex(index); + + + // 获取当前在 QStackedWidget 中的部件 + QWidget* currentWidget = ui->stackedWidget->currentWidget(); + + // 尝试将当前部件转换为 InfoBase 类型 + InfoBase* currQWidget = qobject_cast(currentWidget); + // 检查转换是否成功 + if (currQWidget != nullptr) + { + // 如果转换成功,调用子类Load 方法 + currQWidget->Load(); + } + + for (int i = 0; i < count; i++) { + QAbstractButton *btn = btns.at(i); + btn->setChecked(btn == b); + } +} + +InfoManageView::~InfoManageView() +{ + delete ui; +} diff --git a/softwareDirectory/AutoVerScheme/infomanageview.h b/softwareDirectory/AutoVerScheme/infomanageview.h new file mode 100644 index 0000000..3c1463f --- /dev/null +++ b/softwareDirectory/AutoVerScheme/infomanageview.h @@ -0,0 +1,38 @@ +#ifndef INFOMANAGEVIEW_H +#define INFOMANAGEVIEW_H + +#include + +class QAbstractButton; + + +namespace Ui { +class InfoManageView; +} + +class InfoManageView : public QWidget +{ + Q_OBJECT + +public: + static QList colors; + + explicit InfoManageView(QWidget *parent = nullptr); + ~InfoManageView(); +private slots: + void initForm(); //初始化界面数据 + void initWidget(); //初始化子窗体 + void initNav(); //初始化导航按钮 + void initIcon(); //初始化导航按钮图标 + void buttonClicked(); //导航按钮单击事件 +protected: + void showEvent(QShowEvent *); +private: + Ui::InfoManageView *ui; + + //左侧导航栏图标+按钮集合 + QList icons; + QList btns; +}; + +#endif // INFOMANAGEVIEW_H diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro index 5b8f852..fa0d8e5 100644 --- a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro @@ -1,5 +1,7 @@ QT += core gui QT += sql +QT += widgets + greaterThan(QT_MAJOR_VERSION, 4): QT += widgets CONFIG += c++11 @@ -16,22 +18,50 @@ #DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 SOURCES += \ + beexamined_deviceitem.cpp \ + create_task.cpp \ + depar_task.cpp \ indexwindow.cpp \ + infomanageview.cpp \ + inspectdataitem.cpp \ loginwindow.cpp \ main.cpp \ mainwindow.cpp \ + my_task.cpp \ + rulefileitem.cpp \ + standard_deviceitem.cpp \ + testdataitem.cpp \ testview.cpp HEADERS += \ + InfoBase.h \ + beexamined_deviceitem.h \ + create_task.h \ + depar_task.h \ indexwindow.h \ + infomanageview.h \ + inspectdataitem.h \ loginwindow.h \ mainwindow.h \ + my_task.h \ + rulefileitem.h \ + standard_deviceitem.h \ + testdataitem.h \ testview.h FORMS += \ + beexamined_deviceitem.ui \ + create_task.ui \ + depar_task.ui \ indexwindow.ui \ + infomanageview.ui \ + inspectdataitem.ui \ loginwindow.ui \ mainwindow.ui \ + my_task.ui \ + rulefileitem.ui \ + standard_deviceitem.ui \ + testdataitem.ui \ testview.ui # Default rules for deployment. diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user index 1f5ec64..32d22e9 100644 --- a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user @@ -1,6 +1,6 @@ - + EnvironmentId @@ -64,249 +64,6 @@ ProjectExplorer.Project.Target.0 - Desktop Qt 5.14.2 MinGW 64-bit - Desktop Qt 5.14.2 MinGW 64-bit - qt.qt5.5142.win64_mingw73_kit - 0 - 0 - 0 - - 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 - - Qt4ProjectManager.Qt4RunConfiguration:D:/Auto_verification_scheme/AutoVerScheme/AutoVerScheme.pro - D:/Auto_verification_scheme/AutoVerScheme/AutoVerScheme.pro - - false - - false - true - true - false - false - true - - D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Debug - - 1 - - - - ProjectExplorer.Project.Target.1 - Desktop Qt 5.14.2 MinGW 32-bit Desktop Qt 5.14.2 MinGW 32-bit qt.qt5.5142.win32_mingw73_kit @@ -530,8 +287,252 @@ 2 - Qt4ProjectManager.Qt4RunConfiguration:D:/Auto_verification_scheme/AutoVerScheme/AutoVerScheme.pro - D:/Auto_verification_scheme/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 + + 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 diff --git a/softwareDirectory/AutoVerScheme/InfoBase.cpp b/softwareDirectory/AutoVerScheme/InfoBase.cpp new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/InfoBase.cpp diff --git a/softwareDirectory/AutoVerScheme/InfoBase.h b/softwareDirectory/AutoVerScheme/InfoBase.h new file mode 100644 index 0000000..7fec63e --- /dev/null +++ b/softwareDirectory/AutoVerScheme/InfoBase.h @@ -0,0 +1,16 @@ +#ifndef INFOBASE_H +#define INFOBASE_H + +#include +///信号管理页面的基类 所有信息管理页面都继承于InfoBase +/// 便于统一管理 所有子类必须实现Load方法 +/// 每次按钮点击切换都会调用Load方法 用于每次页面的数据刷新 +class InfoBase : public QWidget { + Q_OBJECT +public: + InfoBase(QWidget *parent = nullptr): QWidget(parent){}; + // 纯虚函数 + virtual void Load()=0; +}; +#endif // INFOBASE_H + diff --git a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.cpp b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.cpp new file mode 100644 index 0000000..7ac1e87 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.cpp @@ -0,0 +1,14 @@ +#include "beexamined_deviceitem.h" +#include "ui_beexamined_deviceitem.h" + +BeExamined_DeviceItem::BeExamined_DeviceItem(QWidget *parent) : + QWidget(parent), + ui(new Ui::BeExamined_DeviceItem) +{ + ui->setupUi(this); +} + +BeExamined_DeviceItem::~BeExamined_DeviceItem() +{ + delete ui; +} diff --git a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.h b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.h new file mode 100644 index 0000000..76b061d --- /dev/null +++ b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.h @@ -0,0 +1,22 @@ +#ifndef BEEXAMINED_DEVICEITEM_H +#define BEEXAMINED_DEVICEITEM_H + +#include + +namespace Ui { +class BeExamined_DeviceItem; +} + +class BeExamined_DeviceItem : public QWidget +{ + Q_OBJECT + +public: + explicit BeExamined_DeviceItem(QWidget *parent = nullptr); + ~BeExamined_DeviceItem(); + +private: + Ui::BeExamined_DeviceItem *ui; +}; + +#endif // BEEXAMINED_DEVICEITEM_H diff --git a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.ui b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.ui new file mode 100644 index 0000000..af9f7bf --- /dev/null +++ b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.ui @@ -0,0 +1,32 @@ + + + BeExamined_DeviceItem + + + + 0 + 0 + 400 + 300 + + + + Form + + + + + 130 + 140 + 89 + 24 + + + + 被检设备管理 + + + + + + diff --git a/softwareDirectory/AutoVerScheme/create_task.cpp b/softwareDirectory/AutoVerScheme/create_task.cpp new file mode 100644 index 0000000..4193efc --- /dev/null +++ b/softwareDirectory/AutoVerScheme/create_task.cpp @@ -0,0 +1,14 @@ +#include "create_task.h" +#include "ui_create_task.h" + +Create_Task::Create_Task(QWidget *parent) : + QWidget(parent), + ui(new Ui::Create_Task) +{ + ui->setupUi(this); +} + +Create_Task::~Create_Task() +{ + delete ui; +} diff --git a/softwareDirectory/AutoVerScheme/create_task.h b/softwareDirectory/AutoVerScheme/create_task.h new file mode 100644 index 0000000..e2264de --- /dev/null +++ b/softwareDirectory/AutoVerScheme/create_task.h @@ -0,0 +1,22 @@ +#ifndef CREATE_TASK_H +#define CREATE_TASK_H + +#include + +namespace Ui { +class Create_Task; +} + +class Create_Task : public QWidget +{ + Q_OBJECT + +public: + explicit Create_Task(QWidget *parent = nullptr); + ~Create_Task(); + +private: + Ui::Create_Task *ui; +}; + +#endif // CREATE_TASK_H diff --git a/softwareDirectory/AutoVerScheme/create_task.ui b/softwareDirectory/AutoVerScheme/create_task.ui new file mode 100644 index 0000000..b79c6a1 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/create_task.ui @@ -0,0 +1,35 @@ + + + Create_Task + + + + 0 + 0 + 400 + 300 + + + + Form + + + background-color:red; + + + + + 140 + 120 + 89 + 24 + + + + 创建任务单 + + + + + + diff --git a/softwareDirectory/AutoVerScheme/depar_task.cpp b/softwareDirectory/AutoVerScheme/depar_task.cpp new file mode 100644 index 0000000..de39775 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/depar_task.cpp @@ -0,0 +1,42 @@ +#include "depar_task.h" +#include "ui_depar_task.h" +#include "QMessageBox" +#include "InfoBase.h" + +Depar_Task::Depar_Task(QWidget *parent) : + InfoBase(parent), + ui(new Ui::Depar_Task) +{ + ui->setupUi(this); + this->initForm(); +} + +Depar_Task::~Depar_Task() +{ + delete ui; +} +void Depar_Task::initForm() +{ + + //ShowMessageBox("标题","初始化完成"); +} +void Depar_Task::ShowMessageBox(QString title,QString value) { + // 创建一个QMessageBox对象 + QMessageBox msgBox; + + // 设置消息框的标题 + msgBox.setWindowTitle(title); + + // 设置消息框的文本内容 + msgBox.setText(value); + + // 设置消息框的标准按钮,这里是“确定”按钮 + msgBox.setStandardButtons(QMessageBox::Ok); + + // 显示消息框 + msgBox.exec(); +} +void Depar_Task::Load() +{ + ShowMessageBox("部门任务页面","部门任务初始化完成"); +} diff --git a/softwareDirectory/AutoVerScheme/depar_task.h b/softwareDirectory/AutoVerScheme/depar_task.h new file mode 100644 index 0000000..8716faf --- /dev/null +++ b/softwareDirectory/AutoVerScheme/depar_task.h @@ -0,0 +1,28 @@ +#ifndef DEPAR_TASK_H +#define DEPAR_TASK_H + + +#include "InfoBase.h" + +namespace Ui { +class Depar_Task; +} + +class Depar_Task :public InfoBase +{ + Q_OBJECT + +public: + Depar_Task(QWidget *parent = nullptr); + ~Depar_Task(); + + +private slots: + void initForm(); //初始化界面数据 + void ShowMessageBox(QString title,QString value); + void Load() override; +private: + Ui::Depar_Task *ui; +}; + +#endif // DEPAR_TASK_H diff --git a/softwareDirectory/AutoVerScheme/depar_task.ui b/softwareDirectory/AutoVerScheme/depar_task.ui new file mode 100644 index 0000000..ff3d44f --- /dev/null +++ b/softwareDirectory/AutoVerScheme/depar_task.ui @@ -0,0 +1,181 @@ + + + Depar_Task + + + + 0 + 0 + 1184 + 456 + + + + Form + + + color:black; + + + + + + + 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 + + + + 要求完成时间: + + + + + + + + + + 查询 + + + + + + + 重置 + + + + + + + + + + background-color:white; + + + + + + + + + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/indexwindow.cpp b/softwareDirectory/AutoVerScheme/indexwindow.cpp index 3e52c7b..9bd65b1 100644 --- a/softwareDirectory/AutoVerScheme/indexwindow.cpp +++ b/softwareDirectory/AutoVerScheme/indexwindow.cpp @@ -21,6 +21,7 @@ //调用样式 loadStyle(":/qss/Index.css"); + } void IndexWindow::loadStyle(const QString &qssFile) diff --git a/softwareDirectory/AutoVerScheme/infomanageview.cpp b/softwareDirectory/AutoVerScheme/infomanageview.cpp new file mode 100644 index 0000000..a206c6f --- /dev/null +++ b/softwareDirectory/AutoVerScheme/infomanageview.cpp @@ -0,0 +1,150 @@ +#include "infomanageview.h" +#include "ui_infomanageview.h" +#include +#include +//子窗体 +#include "depar_task.h" +#include "my_task.h" +#include "create_task.h" +#include "beexamined_deviceitem.h" +#include "inspectdataitem.h" +#include "rulefileitem.h" +#include "standard_deviceitem.h" +#include "testdataitem.h" +#include "InfoBase.h" + +InfoManageView::InfoManageView(QWidget *parent) : + QWidget(parent), + ui(new Ui::InfoManageView) +{ + ui->setupUi(this); + this->setWindowTitle("信息管理"); + //初始化调用所有函数 + this->initForm(); + this->initWidget(); + this->initNav(); + this->initIcon(); +} +//左侧滚动条事件 +void InfoManageView::showEvent(QShowEvent *) +{ + //滚动到底部 + QScrollBar *bar = ui->scrollArea->verticalScrollBar(); + bar->setValue(bar->maximum()); +} + +//左侧导航栏样式初始化 +void InfoManageView::initIcon() +{ + //左侧导航样式,可以设置各种牛逼的参数,超级棒 + // IconHelper::StyleColor styleColor; + //styleColor.defaultBorder = true; + // IconHelper::setStyle(ui->widgetLeft, btns, icons, styleColor); +} + +//颜色初始化设置 +QList InfoManageView::colors = QList(); +void InfoManageView::initForm() +{ + //颜色集合供其他界面使用 + colors << QColor(211, 78, 78) << QColor(29, 185, 242) << QColor(170, 162, 119) << QColor(255, 192, 1); + colors << QColor(0, 176, 180) << QColor(0, 113, 193) << QColor(255, 192, 0); + colors << QColor(72, 103, 149) << QColor(185, 87, 86) << QColor(0, 177, 125); + colors << QColor(214, 77, 84) << QColor(71, 164, 233) << QColor(34, 163, 169); + colors << QColor(59, 123, 156) << QColor(162, 121, 197) << QColor(72, 202, 245); + colors << QColor(0, 150, 121) << QColor(111, 9, 176) << QColor(250, 170, 20); + + ui->scrollArea->setFixedWidth(170); + ui->widgetLeft->setProperty("flag", "left"); +} + +//右侧可切换UI导入 +void InfoManageView::initWidget() +{ + ui->stackedWidget->addWidget(new Depar_Task); //部门任务 + ui->stackedWidget->addWidget(new My_Task); //我的任务 + ui->stackedWidget->addWidget(new Create_Task); //创建任务单 + ui->stackedWidget->addWidget(new Standard_DeviceItem); //标准设备管理 + ui->stackedWidget->addWidget(new BeExamined_DeviceItem); //被检设备管理 + ui->stackedWidget->addWidget(new TestDataItem); //检定数据管理 + ui->stackedWidget->addWidget(new InspectDataItem); //核查数据管理 + ui->stackedWidget->addWidget(new RuleFileItem); //技术文件管理 + + +} +//左侧列表信息导入 +void InfoManageView::initNav() +{ + //按钮文字集合 + QStringList names; + names << "部门任务" << "我的任务" << "创建任务单" << "标准设备管理" << "被检设备管理" + << "检定数据管理" << "核查数据管理" << "技术文件管理" ; + + //自动生成按钮 + for (int i = 0; i < names.count(); i++) { + QToolButton *btn = new QToolButton; + //设置按钮固定高度 + btn->setFixedHeight(35); + //设置按钮的文字 + //btn->setText(QString("%1. %2").arg(i + 1, 2, 10, QChar('0')).arg(names.at(i))); + btn->setText(QString("%1").arg(names.at(i))); + //设置按钮可选中按下类似复选框的功能 + btn->setCheckable(true); + //设置按钮图标在左侧文字在右侧 + // btn->setToolButtonStyle(Qt::ToolButtonTextBesideIcon); + //设置按钮拉伸策略为横向填充 + btn->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Preferred); + //关联按钮单击事件 + connect(btn, SIGNAL(clicked(bool)), this, SLOT(buttonClicked())); + //将按钮加入到布局 + ui->widgetLeft->layout()->addWidget(btn); + //可以指定不同的图标 + //icons << 0xf061; + btns << btn; + //设置按钮大小 + btn->setFixedSize(170, 70); + //设置鼠标经过和点击事件 + btn->setStyleSheet("QToolButton:hover " + "{ background-color: rgba(53, 91, 171, 1); }" + "QToolButton::checked { " + "background-color: rgba(53, 91, 171, 1)}"); + + //ui->widgetLeft->setFixedWidth(200); + } + + //底部加个弹簧 + QSpacerItem *verticalSpacer = new QSpacerItem(20, 40, QSizePolicy::Minimum, QSizePolicy::Expanding); + ui->widgetLeft->layout()->addItem(verticalSpacer); + btns.at(names.count() - 1)->click(); +} +//按钮点击切换UI事件 +void InfoManageView::buttonClicked() +{ + QAbstractButton *b = (QAbstractButton *)sender(); + int count = btns.count(); + int index = btns.indexOf(b); + ui->stackedWidget->setCurrentIndex(index); + + + // 获取当前在 QStackedWidget 中的部件 + QWidget* currentWidget = ui->stackedWidget->currentWidget(); + + // 尝试将当前部件转换为 InfoBase 类型 + InfoBase* currQWidget = qobject_cast(currentWidget); + // 检查转换是否成功 + if (currQWidget != nullptr) + { + // 如果转换成功,调用子类Load 方法 + currQWidget->Load(); + } + + for (int i = 0; i < count; i++) { + QAbstractButton *btn = btns.at(i); + btn->setChecked(btn == b); + } +} + +InfoManageView::~InfoManageView() +{ + delete ui; +} diff --git a/softwareDirectory/AutoVerScheme/infomanageview.h b/softwareDirectory/AutoVerScheme/infomanageview.h new file mode 100644 index 0000000..3c1463f --- /dev/null +++ b/softwareDirectory/AutoVerScheme/infomanageview.h @@ -0,0 +1,38 @@ +#ifndef INFOMANAGEVIEW_H +#define INFOMANAGEVIEW_H + +#include + +class QAbstractButton; + + +namespace Ui { +class InfoManageView; +} + +class InfoManageView : public QWidget +{ + Q_OBJECT + +public: + static QList colors; + + explicit InfoManageView(QWidget *parent = nullptr); + ~InfoManageView(); +private slots: + void initForm(); //初始化界面数据 + void initWidget(); //初始化子窗体 + void initNav(); //初始化导航按钮 + void initIcon(); //初始化导航按钮图标 + void buttonClicked(); //导航按钮单击事件 +protected: + void showEvent(QShowEvent *); +private: + Ui::InfoManageView *ui; + + //左侧导航栏图标+按钮集合 + QList icons; + QList btns; +}; + +#endif // INFOMANAGEVIEW_H diff --git a/softwareDirectory/AutoVerScheme/infomanageview.ui b/softwareDirectory/AutoVerScheme/infomanageview.ui new file mode 100644 index 0000000..4b39e7d --- /dev/null +++ b/softwareDirectory/AutoVerScheme/infomanageview.ui @@ -0,0 +1,109 @@ + + + InfoManageView + + + + 0 + 0 + 883 + 644 + + + + Form + + + + 0 + + + 0 + + + 0 + + + 0 + + + 0 + + + + + + 0 + 0 + + + + + 170 + 0 + + + + + 16777215 + 16777215 + + + + color:White; + font-weight: bold; + font-size: 16px; +background-color:rgba(10, 15, 92, 1); + + + true + + + + + 0 + 0 + 170 + 625 + + + + + 170 + 0 + + + + + 170 + 0 + + + + + 0 + + + 0 + + + 0 + + + 0 + + + 0 + + + + + + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro index 5b8f852..fa0d8e5 100644 --- a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro @@ -1,5 +1,7 @@ QT += core gui QT += sql +QT += widgets + greaterThan(QT_MAJOR_VERSION, 4): QT += widgets CONFIG += c++11 @@ -16,22 +18,50 @@ #DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 SOURCES += \ + beexamined_deviceitem.cpp \ + create_task.cpp \ + depar_task.cpp \ indexwindow.cpp \ + infomanageview.cpp \ + inspectdataitem.cpp \ loginwindow.cpp \ main.cpp \ mainwindow.cpp \ + my_task.cpp \ + rulefileitem.cpp \ + standard_deviceitem.cpp \ + testdataitem.cpp \ testview.cpp HEADERS += \ + InfoBase.h \ + beexamined_deviceitem.h \ + create_task.h \ + depar_task.h \ indexwindow.h \ + infomanageview.h \ + inspectdataitem.h \ loginwindow.h \ mainwindow.h \ + my_task.h \ + rulefileitem.h \ + standard_deviceitem.h \ + testdataitem.h \ testview.h FORMS += \ + beexamined_deviceitem.ui \ + create_task.ui \ + depar_task.ui \ indexwindow.ui \ + infomanageview.ui \ + inspectdataitem.ui \ loginwindow.ui \ mainwindow.ui \ + my_task.ui \ + rulefileitem.ui \ + standard_deviceitem.ui \ + testdataitem.ui \ testview.ui # Default rules for deployment. diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user index 1f5ec64..32d22e9 100644 --- a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user @@ -1,6 +1,6 @@ - + EnvironmentId @@ -64,249 +64,6 @@ ProjectExplorer.Project.Target.0 - Desktop Qt 5.14.2 MinGW 64-bit - Desktop Qt 5.14.2 MinGW 64-bit - qt.qt5.5142.win64_mingw73_kit - 0 - 0 - 0 - - 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 - - Qt4ProjectManager.Qt4RunConfiguration:D:/Auto_verification_scheme/AutoVerScheme/AutoVerScheme.pro - D:/Auto_verification_scheme/AutoVerScheme/AutoVerScheme.pro - - false - - false - true - true - false - false - true - - D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Debug - - 1 - - - - ProjectExplorer.Project.Target.1 - Desktop Qt 5.14.2 MinGW 32-bit Desktop Qt 5.14.2 MinGW 32-bit qt.qt5.5142.win32_mingw73_kit @@ -530,8 +287,252 @@ 2 - Qt4ProjectManager.Qt4RunConfiguration:D:/Auto_verification_scheme/AutoVerScheme/AutoVerScheme.pro - D:/Auto_verification_scheme/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 + + 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 diff --git a/softwareDirectory/AutoVerScheme/InfoBase.cpp b/softwareDirectory/AutoVerScheme/InfoBase.cpp new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/InfoBase.cpp diff --git a/softwareDirectory/AutoVerScheme/InfoBase.h b/softwareDirectory/AutoVerScheme/InfoBase.h new file mode 100644 index 0000000..7fec63e --- /dev/null +++ b/softwareDirectory/AutoVerScheme/InfoBase.h @@ -0,0 +1,16 @@ +#ifndef INFOBASE_H +#define INFOBASE_H + +#include +///信号管理页面的基类 所有信息管理页面都继承于InfoBase +/// 便于统一管理 所有子类必须实现Load方法 +/// 每次按钮点击切换都会调用Load方法 用于每次页面的数据刷新 +class InfoBase : public QWidget { + Q_OBJECT +public: + InfoBase(QWidget *parent = nullptr): QWidget(parent){}; + // 纯虚函数 + virtual void Load()=0; +}; +#endif // INFOBASE_H + diff --git a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.cpp b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.cpp new file mode 100644 index 0000000..7ac1e87 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.cpp @@ -0,0 +1,14 @@ +#include "beexamined_deviceitem.h" +#include "ui_beexamined_deviceitem.h" + +BeExamined_DeviceItem::BeExamined_DeviceItem(QWidget *parent) : + QWidget(parent), + ui(new Ui::BeExamined_DeviceItem) +{ + ui->setupUi(this); +} + +BeExamined_DeviceItem::~BeExamined_DeviceItem() +{ + delete ui; +} diff --git a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.h b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.h new file mode 100644 index 0000000..76b061d --- /dev/null +++ b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.h @@ -0,0 +1,22 @@ +#ifndef BEEXAMINED_DEVICEITEM_H +#define BEEXAMINED_DEVICEITEM_H + +#include + +namespace Ui { +class BeExamined_DeviceItem; +} + +class BeExamined_DeviceItem : public QWidget +{ + Q_OBJECT + +public: + explicit BeExamined_DeviceItem(QWidget *parent = nullptr); + ~BeExamined_DeviceItem(); + +private: + Ui::BeExamined_DeviceItem *ui; +}; + +#endif // BEEXAMINED_DEVICEITEM_H diff --git a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.ui b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.ui new file mode 100644 index 0000000..af9f7bf --- /dev/null +++ b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.ui @@ -0,0 +1,32 @@ + + + BeExamined_DeviceItem + + + + 0 + 0 + 400 + 300 + + + + Form + + + + + 130 + 140 + 89 + 24 + + + + 被检设备管理 + + + + + + diff --git a/softwareDirectory/AutoVerScheme/create_task.cpp b/softwareDirectory/AutoVerScheme/create_task.cpp new file mode 100644 index 0000000..4193efc --- /dev/null +++ b/softwareDirectory/AutoVerScheme/create_task.cpp @@ -0,0 +1,14 @@ +#include "create_task.h" +#include "ui_create_task.h" + +Create_Task::Create_Task(QWidget *parent) : + QWidget(parent), + ui(new Ui::Create_Task) +{ + ui->setupUi(this); +} + +Create_Task::~Create_Task() +{ + delete ui; +} diff --git a/softwareDirectory/AutoVerScheme/create_task.h b/softwareDirectory/AutoVerScheme/create_task.h new file mode 100644 index 0000000..e2264de --- /dev/null +++ b/softwareDirectory/AutoVerScheme/create_task.h @@ -0,0 +1,22 @@ +#ifndef CREATE_TASK_H +#define CREATE_TASK_H + +#include + +namespace Ui { +class Create_Task; +} + +class Create_Task : public QWidget +{ + Q_OBJECT + +public: + explicit Create_Task(QWidget *parent = nullptr); + ~Create_Task(); + +private: + Ui::Create_Task *ui; +}; + +#endif // CREATE_TASK_H diff --git a/softwareDirectory/AutoVerScheme/create_task.ui b/softwareDirectory/AutoVerScheme/create_task.ui new file mode 100644 index 0000000..b79c6a1 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/create_task.ui @@ -0,0 +1,35 @@ + + + Create_Task + + + + 0 + 0 + 400 + 300 + + + + Form + + + background-color:red; + + + + + 140 + 120 + 89 + 24 + + + + 创建任务单 + + + + + + diff --git a/softwareDirectory/AutoVerScheme/depar_task.cpp b/softwareDirectory/AutoVerScheme/depar_task.cpp new file mode 100644 index 0000000..de39775 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/depar_task.cpp @@ -0,0 +1,42 @@ +#include "depar_task.h" +#include "ui_depar_task.h" +#include "QMessageBox" +#include "InfoBase.h" + +Depar_Task::Depar_Task(QWidget *parent) : + InfoBase(parent), + ui(new Ui::Depar_Task) +{ + ui->setupUi(this); + this->initForm(); +} + +Depar_Task::~Depar_Task() +{ + delete ui; +} +void Depar_Task::initForm() +{ + + //ShowMessageBox("标题","初始化完成"); +} +void Depar_Task::ShowMessageBox(QString title,QString value) { + // 创建一个QMessageBox对象 + QMessageBox msgBox; + + // 设置消息框的标题 + msgBox.setWindowTitle(title); + + // 设置消息框的文本内容 + msgBox.setText(value); + + // 设置消息框的标准按钮,这里是“确定”按钮 + msgBox.setStandardButtons(QMessageBox::Ok); + + // 显示消息框 + msgBox.exec(); +} +void Depar_Task::Load() +{ + ShowMessageBox("部门任务页面","部门任务初始化完成"); +} diff --git a/softwareDirectory/AutoVerScheme/depar_task.h b/softwareDirectory/AutoVerScheme/depar_task.h new file mode 100644 index 0000000..8716faf --- /dev/null +++ b/softwareDirectory/AutoVerScheme/depar_task.h @@ -0,0 +1,28 @@ +#ifndef DEPAR_TASK_H +#define DEPAR_TASK_H + + +#include "InfoBase.h" + +namespace Ui { +class Depar_Task; +} + +class Depar_Task :public InfoBase +{ + Q_OBJECT + +public: + Depar_Task(QWidget *parent = nullptr); + ~Depar_Task(); + + +private slots: + void initForm(); //初始化界面数据 + void ShowMessageBox(QString title,QString value); + void Load() override; +private: + Ui::Depar_Task *ui; +}; + +#endif // DEPAR_TASK_H diff --git a/softwareDirectory/AutoVerScheme/depar_task.ui b/softwareDirectory/AutoVerScheme/depar_task.ui new file mode 100644 index 0000000..ff3d44f --- /dev/null +++ b/softwareDirectory/AutoVerScheme/depar_task.ui @@ -0,0 +1,181 @@ + + + Depar_Task + + + + 0 + 0 + 1184 + 456 + + + + Form + + + color:black; + + + + + + + 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 + + + + 要求完成时间: + + + + + + + + + + 查询 + + + + + + + 重置 + + + + + + + + + + background-color:white; + + + + + + + + + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/indexwindow.cpp b/softwareDirectory/AutoVerScheme/indexwindow.cpp index 3e52c7b..9bd65b1 100644 --- a/softwareDirectory/AutoVerScheme/indexwindow.cpp +++ b/softwareDirectory/AutoVerScheme/indexwindow.cpp @@ -21,6 +21,7 @@ //调用样式 loadStyle(":/qss/Index.css"); + } void IndexWindow::loadStyle(const QString &qssFile) diff --git a/softwareDirectory/AutoVerScheme/infomanageview.cpp b/softwareDirectory/AutoVerScheme/infomanageview.cpp new file mode 100644 index 0000000..a206c6f --- /dev/null +++ b/softwareDirectory/AutoVerScheme/infomanageview.cpp @@ -0,0 +1,150 @@ +#include "infomanageview.h" +#include "ui_infomanageview.h" +#include +#include +//子窗体 +#include "depar_task.h" +#include "my_task.h" +#include "create_task.h" +#include "beexamined_deviceitem.h" +#include "inspectdataitem.h" +#include "rulefileitem.h" +#include "standard_deviceitem.h" +#include "testdataitem.h" +#include "InfoBase.h" + +InfoManageView::InfoManageView(QWidget *parent) : + QWidget(parent), + ui(new Ui::InfoManageView) +{ + ui->setupUi(this); + this->setWindowTitle("信息管理"); + //初始化调用所有函数 + this->initForm(); + this->initWidget(); + this->initNav(); + this->initIcon(); +} +//左侧滚动条事件 +void InfoManageView::showEvent(QShowEvent *) +{ + //滚动到底部 + QScrollBar *bar = ui->scrollArea->verticalScrollBar(); + bar->setValue(bar->maximum()); +} + +//左侧导航栏样式初始化 +void InfoManageView::initIcon() +{ + //左侧导航样式,可以设置各种牛逼的参数,超级棒 + // IconHelper::StyleColor styleColor; + //styleColor.defaultBorder = true; + // IconHelper::setStyle(ui->widgetLeft, btns, icons, styleColor); +} + +//颜色初始化设置 +QList InfoManageView::colors = QList(); +void InfoManageView::initForm() +{ + //颜色集合供其他界面使用 + colors << QColor(211, 78, 78) << QColor(29, 185, 242) << QColor(170, 162, 119) << QColor(255, 192, 1); + colors << QColor(0, 176, 180) << QColor(0, 113, 193) << QColor(255, 192, 0); + colors << QColor(72, 103, 149) << QColor(185, 87, 86) << QColor(0, 177, 125); + colors << QColor(214, 77, 84) << QColor(71, 164, 233) << QColor(34, 163, 169); + colors << QColor(59, 123, 156) << QColor(162, 121, 197) << QColor(72, 202, 245); + colors << QColor(0, 150, 121) << QColor(111, 9, 176) << QColor(250, 170, 20); + + ui->scrollArea->setFixedWidth(170); + ui->widgetLeft->setProperty("flag", "left"); +} + +//右侧可切换UI导入 +void InfoManageView::initWidget() +{ + ui->stackedWidget->addWidget(new Depar_Task); //部门任务 + ui->stackedWidget->addWidget(new My_Task); //我的任务 + ui->stackedWidget->addWidget(new Create_Task); //创建任务单 + ui->stackedWidget->addWidget(new Standard_DeviceItem); //标准设备管理 + ui->stackedWidget->addWidget(new BeExamined_DeviceItem); //被检设备管理 + ui->stackedWidget->addWidget(new TestDataItem); //检定数据管理 + ui->stackedWidget->addWidget(new InspectDataItem); //核查数据管理 + ui->stackedWidget->addWidget(new RuleFileItem); //技术文件管理 + + +} +//左侧列表信息导入 +void InfoManageView::initNav() +{ + //按钮文字集合 + QStringList names; + names << "部门任务" << "我的任务" << "创建任务单" << "标准设备管理" << "被检设备管理" + << "检定数据管理" << "核查数据管理" << "技术文件管理" ; + + //自动生成按钮 + for (int i = 0; i < names.count(); i++) { + QToolButton *btn = new QToolButton; + //设置按钮固定高度 + btn->setFixedHeight(35); + //设置按钮的文字 + //btn->setText(QString("%1. %2").arg(i + 1, 2, 10, QChar('0')).arg(names.at(i))); + btn->setText(QString("%1").arg(names.at(i))); + //设置按钮可选中按下类似复选框的功能 + btn->setCheckable(true); + //设置按钮图标在左侧文字在右侧 + // btn->setToolButtonStyle(Qt::ToolButtonTextBesideIcon); + //设置按钮拉伸策略为横向填充 + btn->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Preferred); + //关联按钮单击事件 + connect(btn, SIGNAL(clicked(bool)), this, SLOT(buttonClicked())); + //将按钮加入到布局 + ui->widgetLeft->layout()->addWidget(btn); + //可以指定不同的图标 + //icons << 0xf061; + btns << btn; + //设置按钮大小 + btn->setFixedSize(170, 70); + //设置鼠标经过和点击事件 + btn->setStyleSheet("QToolButton:hover " + "{ background-color: rgba(53, 91, 171, 1); }" + "QToolButton::checked { " + "background-color: rgba(53, 91, 171, 1)}"); + + //ui->widgetLeft->setFixedWidth(200); + } + + //底部加个弹簧 + QSpacerItem *verticalSpacer = new QSpacerItem(20, 40, QSizePolicy::Minimum, QSizePolicy::Expanding); + ui->widgetLeft->layout()->addItem(verticalSpacer); + btns.at(names.count() - 1)->click(); +} +//按钮点击切换UI事件 +void InfoManageView::buttonClicked() +{ + QAbstractButton *b = (QAbstractButton *)sender(); + int count = btns.count(); + int index = btns.indexOf(b); + ui->stackedWidget->setCurrentIndex(index); + + + // 获取当前在 QStackedWidget 中的部件 + QWidget* currentWidget = ui->stackedWidget->currentWidget(); + + // 尝试将当前部件转换为 InfoBase 类型 + InfoBase* currQWidget = qobject_cast(currentWidget); + // 检查转换是否成功 + if (currQWidget != nullptr) + { + // 如果转换成功,调用子类Load 方法 + currQWidget->Load(); + } + + for (int i = 0; i < count; i++) { + QAbstractButton *btn = btns.at(i); + btn->setChecked(btn == b); + } +} + +InfoManageView::~InfoManageView() +{ + delete ui; +} diff --git a/softwareDirectory/AutoVerScheme/infomanageview.h b/softwareDirectory/AutoVerScheme/infomanageview.h new file mode 100644 index 0000000..3c1463f --- /dev/null +++ b/softwareDirectory/AutoVerScheme/infomanageview.h @@ -0,0 +1,38 @@ +#ifndef INFOMANAGEVIEW_H +#define INFOMANAGEVIEW_H + +#include + +class QAbstractButton; + + +namespace Ui { +class InfoManageView; +} + +class InfoManageView : public QWidget +{ + Q_OBJECT + +public: + static QList colors; + + explicit InfoManageView(QWidget *parent = nullptr); + ~InfoManageView(); +private slots: + void initForm(); //初始化界面数据 + void initWidget(); //初始化子窗体 + void initNav(); //初始化导航按钮 + void initIcon(); //初始化导航按钮图标 + void buttonClicked(); //导航按钮单击事件 +protected: + void showEvent(QShowEvent *); +private: + Ui::InfoManageView *ui; + + //左侧导航栏图标+按钮集合 + QList icons; + QList btns; +}; + +#endif // INFOMANAGEVIEW_H diff --git a/softwareDirectory/AutoVerScheme/infomanageview.ui b/softwareDirectory/AutoVerScheme/infomanageview.ui new file mode 100644 index 0000000..4b39e7d --- /dev/null +++ b/softwareDirectory/AutoVerScheme/infomanageview.ui @@ -0,0 +1,109 @@ + + + InfoManageView + + + + 0 + 0 + 883 + 644 + + + + Form + + + + 0 + + + 0 + + + 0 + + + 0 + + + 0 + + + + + + 0 + 0 + + + + + 170 + 0 + + + + + 16777215 + 16777215 + + + + color:White; + font-weight: bold; + font-size: 16px; +background-color:rgba(10, 15, 92, 1); + + + true + + + + + 0 + 0 + 170 + 625 + + + + + 170 + 0 + + + + + 170 + 0 + + + + + 0 + + + 0 + + + 0 + + + 0 + + + 0 + + + + + + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/inspectdataitem.cpp b/softwareDirectory/AutoVerScheme/inspectdataitem.cpp new file mode 100644 index 0000000..e9c2adc --- /dev/null +++ b/softwareDirectory/AutoVerScheme/inspectdataitem.cpp @@ -0,0 +1,14 @@ +#include "inspectdataitem.h" +#include "ui_inspectdataitem.h" + +InspectDataItem::InspectDataItem(QWidget *parent) : + QWidget(parent), + ui(new Ui::InspectDataItem) +{ + ui->setupUi(this); +} + +InspectDataItem::~InspectDataItem() +{ + delete ui; +} diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro index 5b8f852..fa0d8e5 100644 --- a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro @@ -1,5 +1,7 @@ QT += core gui QT += sql +QT += widgets + greaterThan(QT_MAJOR_VERSION, 4): QT += widgets CONFIG += c++11 @@ -16,22 +18,50 @@ #DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 SOURCES += \ + beexamined_deviceitem.cpp \ + create_task.cpp \ + depar_task.cpp \ indexwindow.cpp \ + infomanageview.cpp \ + inspectdataitem.cpp \ loginwindow.cpp \ main.cpp \ mainwindow.cpp \ + my_task.cpp \ + rulefileitem.cpp \ + standard_deviceitem.cpp \ + testdataitem.cpp \ testview.cpp HEADERS += \ + InfoBase.h \ + beexamined_deviceitem.h \ + create_task.h \ + depar_task.h \ indexwindow.h \ + infomanageview.h \ + inspectdataitem.h \ loginwindow.h \ mainwindow.h \ + my_task.h \ + rulefileitem.h \ + standard_deviceitem.h \ + testdataitem.h \ testview.h FORMS += \ + beexamined_deviceitem.ui \ + create_task.ui \ + depar_task.ui \ indexwindow.ui \ + infomanageview.ui \ + inspectdataitem.ui \ loginwindow.ui \ mainwindow.ui \ + my_task.ui \ + rulefileitem.ui \ + standard_deviceitem.ui \ + testdataitem.ui \ testview.ui # Default rules for deployment. diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user index 1f5ec64..32d22e9 100644 --- a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user @@ -1,6 +1,6 @@ - + EnvironmentId @@ -64,249 +64,6 @@ ProjectExplorer.Project.Target.0 - Desktop Qt 5.14.2 MinGW 64-bit - Desktop Qt 5.14.2 MinGW 64-bit - qt.qt5.5142.win64_mingw73_kit - 0 - 0 - 0 - - 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 - - Qt4ProjectManager.Qt4RunConfiguration:D:/Auto_verification_scheme/AutoVerScheme/AutoVerScheme.pro - D:/Auto_verification_scheme/AutoVerScheme/AutoVerScheme.pro - - false - - false - true - true - false - false - true - - D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Debug - - 1 - - - - ProjectExplorer.Project.Target.1 - Desktop Qt 5.14.2 MinGW 32-bit Desktop Qt 5.14.2 MinGW 32-bit qt.qt5.5142.win32_mingw73_kit @@ -530,8 +287,252 @@ 2 - Qt4ProjectManager.Qt4RunConfiguration:D:/Auto_verification_scheme/AutoVerScheme/AutoVerScheme.pro - D:/Auto_verification_scheme/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 + + 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 diff --git a/softwareDirectory/AutoVerScheme/InfoBase.cpp b/softwareDirectory/AutoVerScheme/InfoBase.cpp new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/InfoBase.cpp diff --git a/softwareDirectory/AutoVerScheme/InfoBase.h b/softwareDirectory/AutoVerScheme/InfoBase.h new file mode 100644 index 0000000..7fec63e --- /dev/null +++ b/softwareDirectory/AutoVerScheme/InfoBase.h @@ -0,0 +1,16 @@ +#ifndef INFOBASE_H +#define INFOBASE_H + +#include +///信号管理页面的基类 所有信息管理页面都继承于InfoBase +/// 便于统一管理 所有子类必须实现Load方法 +/// 每次按钮点击切换都会调用Load方法 用于每次页面的数据刷新 +class InfoBase : public QWidget { + Q_OBJECT +public: + InfoBase(QWidget *parent = nullptr): QWidget(parent){}; + // 纯虚函数 + virtual void Load()=0; +}; +#endif // INFOBASE_H + diff --git a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.cpp b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.cpp new file mode 100644 index 0000000..7ac1e87 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.cpp @@ -0,0 +1,14 @@ +#include "beexamined_deviceitem.h" +#include "ui_beexamined_deviceitem.h" + +BeExamined_DeviceItem::BeExamined_DeviceItem(QWidget *parent) : + QWidget(parent), + ui(new Ui::BeExamined_DeviceItem) +{ + ui->setupUi(this); +} + +BeExamined_DeviceItem::~BeExamined_DeviceItem() +{ + delete ui; +} diff --git a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.h b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.h new file mode 100644 index 0000000..76b061d --- /dev/null +++ b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.h @@ -0,0 +1,22 @@ +#ifndef BEEXAMINED_DEVICEITEM_H +#define BEEXAMINED_DEVICEITEM_H + +#include + +namespace Ui { +class BeExamined_DeviceItem; +} + +class BeExamined_DeviceItem : public QWidget +{ + Q_OBJECT + +public: + explicit BeExamined_DeviceItem(QWidget *parent = nullptr); + ~BeExamined_DeviceItem(); + +private: + Ui::BeExamined_DeviceItem *ui; +}; + +#endif // BEEXAMINED_DEVICEITEM_H diff --git a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.ui b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.ui new file mode 100644 index 0000000..af9f7bf --- /dev/null +++ b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.ui @@ -0,0 +1,32 @@ + + + BeExamined_DeviceItem + + + + 0 + 0 + 400 + 300 + + + + Form + + + + + 130 + 140 + 89 + 24 + + + + 被检设备管理 + + + + + + diff --git a/softwareDirectory/AutoVerScheme/create_task.cpp b/softwareDirectory/AutoVerScheme/create_task.cpp new file mode 100644 index 0000000..4193efc --- /dev/null +++ b/softwareDirectory/AutoVerScheme/create_task.cpp @@ -0,0 +1,14 @@ +#include "create_task.h" +#include "ui_create_task.h" + +Create_Task::Create_Task(QWidget *parent) : + QWidget(parent), + ui(new Ui::Create_Task) +{ + ui->setupUi(this); +} + +Create_Task::~Create_Task() +{ + delete ui; +} diff --git a/softwareDirectory/AutoVerScheme/create_task.h b/softwareDirectory/AutoVerScheme/create_task.h new file mode 100644 index 0000000..e2264de --- /dev/null +++ b/softwareDirectory/AutoVerScheme/create_task.h @@ -0,0 +1,22 @@ +#ifndef CREATE_TASK_H +#define CREATE_TASK_H + +#include + +namespace Ui { +class Create_Task; +} + +class Create_Task : public QWidget +{ + Q_OBJECT + +public: + explicit Create_Task(QWidget *parent = nullptr); + ~Create_Task(); + +private: + Ui::Create_Task *ui; +}; + +#endif // CREATE_TASK_H diff --git a/softwareDirectory/AutoVerScheme/create_task.ui b/softwareDirectory/AutoVerScheme/create_task.ui new file mode 100644 index 0000000..b79c6a1 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/create_task.ui @@ -0,0 +1,35 @@ + + + Create_Task + + + + 0 + 0 + 400 + 300 + + + + Form + + + background-color:red; + + + + + 140 + 120 + 89 + 24 + + + + 创建任务单 + + + + + + diff --git a/softwareDirectory/AutoVerScheme/depar_task.cpp b/softwareDirectory/AutoVerScheme/depar_task.cpp new file mode 100644 index 0000000..de39775 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/depar_task.cpp @@ -0,0 +1,42 @@ +#include "depar_task.h" +#include "ui_depar_task.h" +#include "QMessageBox" +#include "InfoBase.h" + +Depar_Task::Depar_Task(QWidget *parent) : + InfoBase(parent), + ui(new Ui::Depar_Task) +{ + ui->setupUi(this); + this->initForm(); +} + +Depar_Task::~Depar_Task() +{ + delete ui; +} +void Depar_Task::initForm() +{ + + //ShowMessageBox("标题","初始化完成"); +} +void Depar_Task::ShowMessageBox(QString title,QString value) { + // 创建一个QMessageBox对象 + QMessageBox msgBox; + + // 设置消息框的标题 + msgBox.setWindowTitle(title); + + // 设置消息框的文本内容 + msgBox.setText(value); + + // 设置消息框的标准按钮,这里是“确定”按钮 + msgBox.setStandardButtons(QMessageBox::Ok); + + // 显示消息框 + msgBox.exec(); +} +void Depar_Task::Load() +{ + ShowMessageBox("部门任务页面","部门任务初始化完成"); +} diff --git a/softwareDirectory/AutoVerScheme/depar_task.h b/softwareDirectory/AutoVerScheme/depar_task.h new file mode 100644 index 0000000..8716faf --- /dev/null +++ b/softwareDirectory/AutoVerScheme/depar_task.h @@ -0,0 +1,28 @@ +#ifndef DEPAR_TASK_H +#define DEPAR_TASK_H + + +#include "InfoBase.h" + +namespace Ui { +class Depar_Task; +} + +class Depar_Task :public InfoBase +{ + Q_OBJECT + +public: + Depar_Task(QWidget *parent = nullptr); + ~Depar_Task(); + + +private slots: + void initForm(); //初始化界面数据 + void ShowMessageBox(QString title,QString value); + void Load() override; +private: + Ui::Depar_Task *ui; +}; + +#endif // DEPAR_TASK_H diff --git a/softwareDirectory/AutoVerScheme/depar_task.ui b/softwareDirectory/AutoVerScheme/depar_task.ui new file mode 100644 index 0000000..ff3d44f --- /dev/null +++ b/softwareDirectory/AutoVerScheme/depar_task.ui @@ -0,0 +1,181 @@ + + + Depar_Task + + + + 0 + 0 + 1184 + 456 + + + + Form + + + color:black; + + + + + + + 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 + + + + 要求完成时间: + + + + + + + + + + 查询 + + + + + + + 重置 + + + + + + + + + + background-color:white; + + + + + + + + + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/indexwindow.cpp b/softwareDirectory/AutoVerScheme/indexwindow.cpp index 3e52c7b..9bd65b1 100644 --- a/softwareDirectory/AutoVerScheme/indexwindow.cpp +++ b/softwareDirectory/AutoVerScheme/indexwindow.cpp @@ -21,6 +21,7 @@ //调用样式 loadStyle(":/qss/Index.css"); + } void IndexWindow::loadStyle(const QString &qssFile) diff --git a/softwareDirectory/AutoVerScheme/infomanageview.cpp b/softwareDirectory/AutoVerScheme/infomanageview.cpp new file mode 100644 index 0000000..a206c6f --- /dev/null +++ b/softwareDirectory/AutoVerScheme/infomanageview.cpp @@ -0,0 +1,150 @@ +#include "infomanageview.h" +#include "ui_infomanageview.h" +#include +#include +//子窗体 +#include "depar_task.h" +#include "my_task.h" +#include "create_task.h" +#include "beexamined_deviceitem.h" +#include "inspectdataitem.h" +#include "rulefileitem.h" +#include "standard_deviceitem.h" +#include "testdataitem.h" +#include "InfoBase.h" + +InfoManageView::InfoManageView(QWidget *parent) : + QWidget(parent), + ui(new Ui::InfoManageView) +{ + ui->setupUi(this); + this->setWindowTitle("信息管理"); + //初始化调用所有函数 + this->initForm(); + this->initWidget(); + this->initNav(); + this->initIcon(); +} +//左侧滚动条事件 +void InfoManageView::showEvent(QShowEvent *) +{ + //滚动到底部 + QScrollBar *bar = ui->scrollArea->verticalScrollBar(); + bar->setValue(bar->maximum()); +} + +//左侧导航栏样式初始化 +void InfoManageView::initIcon() +{ + //左侧导航样式,可以设置各种牛逼的参数,超级棒 + // IconHelper::StyleColor styleColor; + //styleColor.defaultBorder = true; + // IconHelper::setStyle(ui->widgetLeft, btns, icons, styleColor); +} + +//颜色初始化设置 +QList InfoManageView::colors = QList(); +void InfoManageView::initForm() +{ + //颜色集合供其他界面使用 + colors << QColor(211, 78, 78) << QColor(29, 185, 242) << QColor(170, 162, 119) << QColor(255, 192, 1); + colors << QColor(0, 176, 180) << QColor(0, 113, 193) << QColor(255, 192, 0); + colors << QColor(72, 103, 149) << QColor(185, 87, 86) << QColor(0, 177, 125); + colors << QColor(214, 77, 84) << QColor(71, 164, 233) << QColor(34, 163, 169); + colors << QColor(59, 123, 156) << QColor(162, 121, 197) << QColor(72, 202, 245); + colors << QColor(0, 150, 121) << QColor(111, 9, 176) << QColor(250, 170, 20); + + ui->scrollArea->setFixedWidth(170); + ui->widgetLeft->setProperty("flag", "left"); +} + +//右侧可切换UI导入 +void InfoManageView::initWidget() +{ + ui->stackedWidget->addWidget(new Depar_Task); //部门任务 + ui->stackedWidget->addWidget(new My_Task); //我的任务 + ui->stackedWidget->addWidget(new Create_Task); //创建任务单 + ui->stackedWidget->addWidget(new Standard_DeviceItem); //标准设备管理 + ui->stackedWidget->addWidget(new BeExamined_DeviceItem); //被检设备管理 + ui->stackedWidget->addWidget(new TestDataItem); //检定数据管理 + ui->stackedWidget->addWidget(new InspectDataItem); //核查数据管理 + ui->stackedWidget->addWidget(new RuleFileItem); //技术文件管理 + + +} +//左侧列表信息导入 +void InfoManageView::initNav() +{ + //按钮文字集合 + QStringList names; + names << "部门任务" << "我的任务" << "创建任务单" << "标准设备管理" << "被检设备管理" + << "检定数据管理" << "核查数据管理" << "技术文件管理" ; + + //自动生成按钮 + for (int i = 0; i < names.count(); i++) { + QToolButton *btn = new QToolButton; + //设置按钮固定高度 + btn->setFixedHeight(35); + //设置按钮的文字 + //btn->setText(QString("%1. %2").arg(i + 1, 2, 10, QChar('0')).arg(names.at(i))); + btn->setText(QString("%1").arg(names.at(i))); + //设置按钮可选中按下类似复选框的功能 + btn->setCheckable(true); + //设置按钮图标在左侧文字在右侧 + // btn->setToolButtonStyle(Qt::ToolButtonTextBesideIcon); + //设置按钮拉伸策略为横向填充 + btn->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Preferred); + //关联按钮单击事件 + connect(btn, SIGNAL(clicked(bool)), this, SLOT(buttonClicked())); + //将按钮加入到布局 + ui->widgetLeft->layout()->addWidget(btn); + //可以指定不同的图标 + //icons << 0xf061; + btns << btn; + //设置按钮大小 + btn->setFixedSize(170, 70); + //设置鼠标经过和点击事件 + btn->setStyleSheet("QToolButton:hover " + "{ background-color: rgba(53, 91, 171, 1); }" + "QToolButton::checked { " + "background-color: rgba(53, 91, 171, 1)}"); + + //ui->widgetLeft->setFixedWidth(200); + } + + //底部加个弹簧 + QSpacerItem *verticalSpacer = new QSpacerItem(20, 40, QSizePolicy::Minimum, QSizePolicy::Expanding); + ui->widgetLeft->layout()->addItem(verticalSpacer); + btns.at(names.count() - 1)->click(); +} +//按钮点击切换UI事件 +void InfoManageView::buttonClicked() +{ + QAbstractButton *b = (QAbstractButton *)sender(); + int count = btns.count(); + int index = btns.indexOf(b); + ui->stackedWidget->setCurrentIndex(index); + + + // 获取当前在 QStackedWidget 中的部件 + QWidget* currentWidget = ui->stackedWidget->currentWidget(); + + // 尝试将当前部件转换为 InfoBase 类型 + InfoBase* currQWidget = qobject_cast(currentWidget); + // 检查转换是否成功 + if (currQWidget != nullptr) + { + // 如果转换成功,调用子类Load 方法 + currQWidget->Load(); + } + + for (int i = 0; i < count; i++) { + QAbstractButton *btn = btns.at(i); + btn->setChecked(btn == b); + } +} + +InfoManageView::~InfoManageView() +{ + delete ui; +} diff --git a/softwareDirectory/AutoVerScheme/infomanageview.h b/softwareDirectory/AutoVerScheme/infomanageview.h new file mode 100644 index 0000000..3c1463f --- /dev/null +++ b/softwareDirectory/AutoVerScheme/infomanageview.h @@ -0,0 +1,38 @@ +#ifndef INFOMANAGEVIEW_H +#define INFOMANAGEVIEW_H + +#include + +class QAbstractButton; + + +namespace Ui { +class InfoManageView; +} + +class InfoManageView : public QWidget +{ + Q_OBJECT + +public: + static QList colors; + + explicit InfoManageView(QWidget *parent = nullptr); + ~InfoManageView(); +private slots: + void initForm(); //初始化界面数据 + void initWidget(); //初始化子窗体 + void initNav(); //初始化导航按钮 + void initIcon(); //初始化导航按钮图标 + void buttonClicked(); //导航按钮单击事件 +protected: + void showEvent(QShowEvent *); +private: + Ui::InfoManageView *ui; + + //左侧导航栏图标+按钮集合 + QList icons; + QList btns; +}; + +#endif // INFOMANAGEVIEW_H diff --git a/softwareDirectory/AutoVerScheme/infomanageview.ui b/softwareDirectory/AutoVerScheme/infomanageview.ui new file mode 100644 index 0000000..4b39e7d --- /dev/null +++ b/softwareDirectory/AutoVerScheme/infomanageview.ui @@ -0,0 +1,109 @@ + + + InfoManageView + + + + 0 + 0 + 883 + 644 + + + + Form + + + + 0 + + + 0 + + + 0 + + + 0 + + + 0 + + + + + + 0 + 0 + + + + + 170 + 0 + + + + + 16777215 + 16777215 + + + + color:White; + font-weight: bold; + font-size: 16px; +background-color:rgba(10, 15, 92, 1); + + + true + + + + + 0 + 0 + 170 + 625 + + + + + 170 + 0 + + + + + 170 + 0 + + + + + 0 + + + 0 + + + 0 + + + 0 + + + 0 + + + + + + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/inspectdataitem.cpp b/softwareDirectory/AutoVerScheme/inspectdataitem.cpp new file mode 100644 index 0000000..e9c2adc --- /dev/null +++ b/softwareDirectory/AutoVerScheme/inspectdataitem.cpp @@ -0,0 +1,14 @@ +#include "inspectdataitem.h" +#include "ui_inspectdataitem.h" + +InspectDataItem::InspectDataItem(QWidget *parent) : + QWidget(parent), + ui(new Ui::InspectDataItem) +{ + ui->setupUi(this); +} + +InspectDataItem::~InspectDataItem() +{ + delete ui; +} diff --git a/softwareDirectory/AutoVerScheme/inspectdataitem.h b/softwareDirectory/AutoVerScheme/inspectdataitem.h new file mode 100644 index 0000000..57551bb --- /dev/null +++ b/softwareDirectory/AutoVerScheme/inspectdataitem.h @@ -0,0 +1,22 @@ +#ifndef INSPECTDATAITEM_H +#define INSPECTDATAITEM_H + +#include + +namespace Ui { +class InspectDataItem; +} + +class InspectDataItem : public QWidget +{ + Q_OBJECT + +public: + explicit InspectDataItem(QWidget *parent = nullptr); + ~InspectDataItem(); + +private: + Ui::InspectDataItem *ui; +}; + +#endif // INSPECTDATAITEM_H diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro index 5b8f852..fa0d8e5 100644 --- a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro @@ -1,5 +1,7 @@ QT += core gui QT += sql +QT += widgets + greaterThan(QT_MAJOR_VERSION, 4): QT += widgets CONFIG += c++11 @@ -16,22 +18,50 @@ #DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 SOURCES += \ + beexamined_deviceitem.cpp \ + create_task.cpp \ + depar_task.cpp \ indexwindow.cpp \ + infomanageview.cpp \ + inspectdataitem.cpp \ loginwindow.cpp \ main.cpp \ mainwindow.cpp \ + my_task.cpp \ + rulefileitem.cpp \ + standard_deviceitem.cpp \ + testdataitem.cpp \ testview.cpp HEADERS += \ + InfoBase.h \ + beexamined_deviceitem.h \ + create_task.h \ + depar_task.h \ indexwindow.h \ + infomanageview.h \ + inspectdataitem.h \ loginwindow.h \ mainwindow.h \ + my_task.h \ + rulefileitem.h \ + standard_deviceitem.h \ + testdataitem.h \ testview.h FORMS += \ + beexamined_deviceitem.ui \ + create_task.ui \ + depar_task.ui \ indexwindow.ui \ + infomanageview.ui \ + inspectdataitem.ui \ loginwindow.ui \ mainwindow.ui \ + my_task.ui \ + rulefileitem.ui \ + standard_deviceitem.ui \ + testdataitem.ui \ testview.ui # Default rules for deployment. diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user index 1f5ec64..32d22e9 100644 --- a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user @@ -1,6 +1,6 @@ - + EnvironmentId @@ -64,249 +64,6 @@ ProjectExplorer.Project.Target.0 - Desktop Qt 5.14.2 MinGW 64-bit - Desktop Qt 5.14.2 MinGW 64-bit - qt.qt5.5142.win64_mingw73_kit - 0 - 0 - 0 - - 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 - - Qt4ProjectManager.Qt4RunConfiguration:D:/Auto_verification_scheme/AutoVerScheme/AutoVerScheme.pro - D:/Auto_verification_scheme/AutoVerScheme/AutoVerScheme.pro - - false - - false - true - true - false - false - true - - D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Debug - - 1 - - - - ProjectExplorer.Project.Target.1 - Desktop Qt 5.14.2 MinGW 32-bit Desktop Qt 5.14.2 MinGW 32-bit qt.qt5.5142.win32_mingw73_kit @@ -530,8 +287,252 @@ 2 - Qt4ProjectManager.Qt4RunConfiguration:D:/Auto_verification_scheme/AutoVerScheme/AutoVerScheme.pro - D:/Auto_verification_scheme/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 + + 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 diff --git a/softwareDirectory/AutoVerScheme/InfoBase.cpp b/softwareDirectory/AutoVerScheme/InfoBase.cpp new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/InfoBase.cpp diff --git a/softwareDirectory/AutoVerScheme/InfoBase.h b/softwareDirectory/AutoVerScheme/InfoBase.h new file mode 100644 index 0000000..7fec63e --- /dev/null +++ b/softwareDirectory/AutoVerScheme/InfoBase.h @@ -0,0 +1,16 @@ +#ifndef INFOBASE_H +#define INFOBASE_H + +#include +///信号管理页面的基类 所有信息管理页面都继承于InfoBase +/// 便于统一管理 所有子类必须实现Load方法 +/// 每次按钮点击切换都会调用Load方法 用于每次页面的数据刷新 +class InfoBase : public QWidget { + Q_OBJECT +public: + InfoBase(QWidget *parent = nullptr): QWidget(parent){}; + // 纯虚函数 + virtual void Load()=0; +}; +#endif // INFOBASE_H + diff --git a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.cpp b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.cpp new file mode 100644 index 0000000..7ac1e87 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.cpp @@ -0,0 +1,14 @@ +#include "beexamined_deviceitem.h" +#include "ui_beexamined_deviceitem.h" + +BeExamined_DeviceItem::BeExamined_DeviceItem(QWidget *parent) : + QWidget(parent), + ui(new Ui::BeExamined_DeviceItem) +{ + ui->setupUi(this); +} + +BeExamined_DeviceItem::~BeExamined_DeviceItem() +{ + delete ui; +} diff --git a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.h b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.h new file mode 100644 index 0000000..76b061d --- /dev/null +++ b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.h @@ -0,0 +1,22 @@ +#ifndef BEEXAMINED_DEVICEITEM_H +#define BEEXAMINED_DEVICEITEM_H + +#include + +namespace Ui { +class BeExamined_DeviceItem; +} + +class BeExamined_DeviceItem : public QWidget +{ + Q_OBJECT + +public: + explicit BeExamined_DeviceItem(QWidget *parent = nullptr); + ~BeExamined_DeviceItem(); + +private: + Ui::BeExamined_DeviceItem *ui; +}; + +#endif // BEEXAMINED_DEVICEITEM_H diff --git a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.ui b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.ui new file mode 100644 index 0000000..af9f7bf --- /dev/null +++ b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.ui @@ -0,0 +1,32 @@ + + + BeExamined_DeviceItem + + + + 0 + 0 + 400 + 300 + + + + Form + + + + + 130 + 140 + 89 + 24 + + + + 被检设备管理 + + + + + + diff --git a/softwareDirectory/AutoVerScheme/create_task.cpp b/softwareDirectory/AutoVerScheme/create_task.cpp new file mode 100644 index 0000000..4193efc --- /dev/null +++ b/softwareDirectory/AutoVerScheme/create_task.cpp @@ -0,0 +1,14 @@ +#include "create_task.h" +#include "ui_create_task.h" + +Create_Task::Create_Task(QWidget *parent) : + QWidget(parent), + ui(new Ui::Create_Task) +{ + ui->setupUi(this); +} + +Create_Task::~Create_Task() +{ + delete ui; +} diff --git a/softwareDirectory/AutoVerScheme/create_task.h b/softwareDirectory/AutoVerScheme/create_task.h new file mode 100644 index 0000000..e2264de --- /dev/null +++ b/softwareDirectory/AutoVerScheme/create_task.h @@ -0,0 +1,22 @@ +#ifndef CREATE_TASK_H +#define CREATE_TASK_H + +#include + +namespace Ui { +class Create_Task; +} + +class Create_Task : public QWidget +{ + Q_OBJECT + +public: + explicit Create_Task(QWidget *parent = nullptr); + ~Create_Task(); + +private: + Ui::Create_Task *ui; +}; + +#endif // CREATE_TASK_H diff --git a/softwareDirectory/AutoVerScheme/create_task.ui b/softwareDirectory/AutoVerScheme/create_task.ui new file mode 100644 index 0000000..b79c6a1 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/create_task.ui @@ -0,0 +1,35 @@ + + + Create_Task + + + + 0 + 0 + 400 + 300 + + + + Form + + + background-color:red; + + + + + 140 + 120 + 89 + 24 + + + + 创建任务单 + + + + + + diff --git a/softwareDirectory/AutoVerScheme/depar_task.cpp b/softwareDirectory/AutoVerScheme/depar_task.cpp new file mode 100644 index 0000000..de39775 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/depar_task.cpp @@ -0,0 +1,42 @@ +#include "depar_task.h" +#include "ui_depar_task.h" +#include "QMessageBox" +#include "InfoBase.h" + +Depar_Task::Depar_Task(QWidget *parent) : + InfoBase(parent), + ui(new Ui::Depar_Task) +{ + ui->setupUi(this); + this->initForm(); +} + +Depar_Task::~Depar_Task() +{ + delete ui; +} +void Depar_Task::initForm() +{ + + //ShowMessageBox("标题","初始化完成"); +} +void Depar_Task::ShowMessageBox(QString title,QString value) { + // 创建一个QMessageBox对象 + QMessageBox msgBox; + + // 设置消息框的标题 + msgBox.setWindowTitle(title); + + // 设置消息框的文本内容 + msgBox.setText(value); + + // 设置消息框的标准按钮,这里是“确定”按钮 + msgBox.setStandardButtons(QMessageBox::Ok); + + // 显示消息框 + msgBox.exec(); +} +void Depar_Task::Load() +{ + ShowMessageBox("部门任务页面","部门任务初始化完成"); +} diff --git a/softwareDirectory/AutoVerScheme/depar_task.h b/softwareDirectory/AutoVerScheme/depar_task.h new file mode 100644 index 0000000..8716faf --- /dev/null +++ b/softwareDirectory/AutoVerScheme/depar_task.h @@ -0,0 +1,28 @@ +#ifndef DEPAR_TASK_H +#define DEPAR_TASK_H + + +#include "InfoBase.h" + +namespace Ui { +class Depar_Task; +} + +class Depar_Task :public InfoBase +{ + Q_OBJECT + +public: + Depar_Task(QWidget *parent = nullptr); + ~Depar_Task(); + + +private slots: + void initForm(); //初始化界面数据 + void ShowMessageBox(QString title,QString value); + void Load() override; +private: + Ui::Depar_Task *ui; +}; + +#endif // DEPAR_TASK_H diff --git a/softwareDirectory/AutoVerScheme/depar_task.ui b/softwareDirectory/AutoVerScheme/depar_task.ui new file mode 100644 index 0000000..ff3d44f --- /dev/null +++ b/softwareDirectory/AutoVerScheme/depar_task.ui @@ -0,0 +1,181 @@ + + + Depar_Task + + + + 0 + 0 + 1184 + 456 + + + + Form + + + color:black; + + + + + + + 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 + + + + 要求完成时间: + + + + + + + + + + 查询 + + + + + + + 重置 + + + + + + + + + + background-color:white; + + + + + + + + + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/indexwindow.cpp b/softwareDirectory/AutoVerScheme/indexwindow.cpp index 3e52c7b..9bd65b1 100644 --- a/softwareDirectory/AutoVerScheme/indexwindow.cpp +++ b/softwareDirectory/AutoVerScheme/indexwindow.cpp @@ -21,6 +21,7 @@ //调用样式 loadStyle(":/qss/Index.css"); + } void IndexWindow::loadStyle(const QString &qssFile) diff --git a/softwareDirectory/AutoVerScheme/infomanageview.cpp b/softwareDirectory/AutoVerScheme/infomanageview.cpp new file mode 100644 index 0000000..a206c6f --- /dev/null +++ b/softwareDirectory/AutoVerScheme/infomanageview.cpp @@ -0,0 +1,150 @@ +#include "infomanageview.h" +#include "ui_infomanageview.h" +#include +#include +//子窗体 +#include "depar_task.h" +#include "my_task.h" +#include "create_task.h" +#include "beexamined_deviceitem.h" +#include "inspectdataitem.h" +#include "rulefileitem.h" +#include "standard_deviceitem.h" +#include "testdataitem.h" +#include "InfoBase.h" + +InfoManageView::InfoManageView(QWidget *parent) : + QWidget(parent), + ui(new Ui::InfoManageView) +{ + ui->setupUi(this); + this->setWindowTitle("信息管理"); + //初始化调用所有函数 + this->initForm(); + this->initWidget(); + this->initNav(); + this->initIcon(); +} +//左侧滚动条事件 +void InfoManageView::showEvent(QShowEvent *) +{ + //滚动到底部 + QScrollBar *bar = ui->scrollArea->verticalScrollBar(); + bar->setValue(bar->maximum()); +} + +//左侧导航栏样式初始化 +void InfoManageView::initIcon() +{ + //左侧导航样式,可以设置各种牛逼的参数,超级棒 + // IconHelper::StyleColor styleColor; + //styleColor.defaultBorder = true; + // IconHelper::setStyle(ui->widgetLeft, btns, icons, styleColor); +} + +//颜色初始化设置 +QList InfoManageView::colors = QList(); +void InfoManageView::initForm() +{ + //颜色集合供其他界面使用 + colors << QColor(211, 78, 78) << QColor(29, 185, 242) << QColor(170, 162, 119) << QColor(255, 192, 1); + colors << QColor(0, 176, 180) << QColor(0, 113, 193) << QColor(255, 192, 0); + colors << QColor(72, 103, 149) << QColor(185, 87, 86) << QColor(0, 177, 125); + colors << QColor(214, 77, 84) << QColor(71, 164, 233) << QColor(34, 163, 169); + colors << QColor(59, 123, 156) << QColor(162, 121, 197) << QColor(72, 202, 245); + colors << QColor(0, 150, 121) << QColor(111, 9, 176) << QColor(250, 170, 20); + + ui->scrollArea->setFixedWidth(170); + ui->widgetLeft->setProperty("flag", "left"); +} + +//右侧可切换UI导入 +void InfoManageView::initWidget() +{ + ui->stackedWidget->addWidget(new Depar_Task); //部门任务 + ui->stackedWidget->addWidget(new My_Task); //我的任务 + ui->stackedWidget->addWidget(new Create_Task); //创建任务单 + ui->stackedWidget->addWidget(new Standard_DeviceItem); //标准设备管理 + ui->stackedWidget->addWidget(new BeExamined_DeviceItem); //被检设备管理 + ui->stackedWidget->addWidget(new TestDataItem); //检定数据管理 + ui->stackedWidget->addWidget(new InspectDataItem); //核查数据管理 + ui->stackedWidget->addWidget(new RuleFileItem); //技术文件管理 + + +} +//左侧列表信息导入 +void InfoManageView::initNav() +{ + //按钮文字集合 + QStringList names; + names << "部门任务" << "我的任务" << "创建任务单" << "标准设备管理" << "被检设备管理" + << "检定数据管理" << "核查数据管理" << "技术文件管理" ; + + //自动生成按钮 + for (int i = 0; i < names.count(); i++) { + QToolButton *btn = new QToolButton; + //设置按钮固定高度 + btn->setFixedHeight(35); + //设置按钮的文字 + //btn->setText(QString("%1. %2").arg(i + 1, 2, 10, QChar('0')).arg(names.at(i))); + btn->setText(QString("%1").arg(names.at(i))); + //设置按钮可选中按下类似复选框的功能 + btn->setCheckable(true); + //设置按钮图标在左侧文字在右侧 + // btn->setToolButtonStyle(Qt::ToolButtonTextBesideIcon); + //设置按钮拉伸策略为横向填充 + btn->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Preferred); + //关联按钮单击事件 + connect(btn, SIGNAL(clicked(bool)), this, SLOT(buttonClicked())); + //将按钮加入到布局 + ui->widgetLeft->layout()->addWidget(btn); + //可以指定不同的图标 + //icons << 0xf061; + btns << btn; + //设置按钮大小 + btn->setFixedSize(170, 70); + //设置鼠标经过和点击事件 + btn->setStyleSheet("QToolButton:hover " + "{ background-color: rgba(53, 91, 171, 1); }" + "QToolButton::checked { " + "background-color: rgba(53, 91, 171, 1)}"); + + //ui->widgetLeft->setFixedWidth(200); + } + + //底部加个弹簧 + QSpacerItem *verticalSpacer = new QSpacerItem(20, 40, QSizePolicy::Minimum, QSizePolicy::Expanding); + ui->widgetLeft->layout()->addItem(verticalSpacer); + btns.at(names.count() - 1)->click(); +} +//按钮点击切换UI事件 +void InfoManageView::buttonClicked() +{ + QAbstractButton *b = (QAbstractButton *)sender(); + int count = btns.count(); + int index = btns.indexOf(b); + ui->stackedWidget->setCurrentIndex(index); + + + // 获取当前在 QStackedWidget 中的部件 + QWidget* currentWidget = ui->stackedWidget->currentWidget(); + + // 尝试将当前部件转换为 InfoBase 类型 + InfoBase* currQWidget = qobject_cast(currentWidget); + // 检查转换是否成功 + if (currQWidget != nullptr) + { + // 如果转换成功,调用子类Load 方法 + currQWidget->Load(); + } + + for (int i = 0; i < count; i++) { + QAbstractButton *btn = btns.at(i); + btn->setChecked(btn == b); + } +} + +InfoManageView::~InfoManageView() +{ + delete ui; +} diff --git a/softwareDirectory/AutoVerScheme/infomanageview.h b/softwareDirectory/AutoVerScheme/infomanageview.h new file mode 100644 index 0000000..3c1463f --- /dev/null +++ b/softwareDirectory/AutoVerScheme/infomanageview.h @@ -0,0 +1,38 @@ +#ifndef INFOMANAGEVIEW_H +#define INFOMANAGEVIEW_H + +#include + +class QAbstractButton; + + +namespace Ui { +class InfoManageView; +} + +class InfoManageView : public QWidget +{ + Q_OBJECT + +public: + static QList colors; + + explicit InfoManageView(QWidget *parent = nullptr); + ~InfoManageView(); +private slots: + void initForm(); //初始化界面数据 + void initWidget(); //初始化子窗体 + void initNav(); //初始化导航按钮 + void initIcon(); //初始化导航按钮图标 + void buttonClicked(); //导航按钮单击事件 +protected: + void showEvent(QShowEvent *); +private: + Ui::InfoManageView *ui; + + //左侧导航栏图标+按钮集合 + QList icons; + QList btns; +}; + +#endif // INFOMANAGEVIEW_H diff --git a/softwareDirectory/AutoVerScheme/infomanageview.ui b/softwareDirectory/AutoVerScheme/infomanageview.ui new file mode 100644 index 0000000..4b39e7d --- /dev/null +++ b/softwareDirectory/AutoVerScheme/infomanageview.ui @@ -0,0 +1,109 @@ + + + InfoManageView + + + + 0 + 0 + 883 + 644 + + + + Form + + + + 0 + + + 0 + + + 0 + + + 0 + + + 0 + + + + + + 0 + 0 + + + + + 170 + 0 + + + + + 16777215 + 16777215 + + + + color:White; + font-weight: bold; + font-size: 16px; +background-color:rgba(10, 15, 92, 1); + + + true + + + + + 0 + 0 + 170 + 625 + + + + + 170 + 0 + + + + + 170 + 0 + + + + + 0 + + + 0 + + + 0 + + + 0 + + + 0 + + + + + + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/inspectdataitem.cpp b/softwareDirectory/AutoVerScheme/inspectdataitem.cpp new file mode 100644 index 0000000..e9c2adc --- /dev/null +++ b/softwareDirectory/AutoVerScheme/inspectdataitem.cpp @@ -0,0 +1,14 @@ +#include "inspectdataitem.h" +#include "ui_inspectdataitem.h" + +InspectDataItem::InspectDataItem(QWidget *parent) : + QWidget(parent), + ui(new Ui::InspectDataItem) +{ + ui->setupUi(this); +} + +InspectDataItem::~InspectDataItem() +{ + delete ui; +} diff --git a/softwareDirectory/AutoVerScheme/inspectdataitem.h b/softwareDirectory/AutoVerScheme/inspectdataitem.h new file mode 100644 index 0000000..57551bb --- /dev/null +++ b/softwareDirectory/AutoVerScheme/inspectdataitem.h @@ -0,0 +1,22 @@ +#ifndef INSPECTDATAITEM_H +#define INSPECTDATAITEM_H + +#include + +namespace Ui { +class InspectDataItem; +} + +class InspectDataItem : public QWidget +{ + Q_OBJECT + +public: + explicit InspectDataItem(QWidget *parent = nullptr); + ~InspectDataItem(); + +private: + Ui::InspectDataItem *ui; +}; + +#endif // INSPECTDATAITEM_H diff --git a/softwareDirectory/AutoVerScheme/inspectdataitem.ui b/softwareDirectory/AutoVerScheme/inspectdataitem.ui new file mode 100644 index 0000000..45f04e0 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/inspectdataitem.ui @@ -0,0 +1,32 @@ + + + InspectDataItem + + + + 0 + 0 + 400 + 300 + + + + Form + + + + + 120 + 130 + 89 + 24 + + + + 核查数据管理 + + + + + + diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro index 5b8f852..fa0d8e5 100644 --- a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro @@ -1,5 +1,7 @@ QT += core gui QT += sql +QT += widgets + greaterThan(QT_MAJOR_VERSION, 4): QT += widgets CONFIG += c++11 @@ -16,22 +18,50 @@ #DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 SOURCES += \ + beexamined_deviceitem.cpp \ + create_task.cpp \ + depar_task.cpp \ indexwindow.cpp \ + infomanageview.cpp \ + inspectdataitem.cpp \ loginwindow.cpp \ main.cpp \ mainwindow.cpp \ + my_task.cpp \ + rulefileitem.cpp \ + standard_deviceitem.cpp \ + testdataitem.cpp \ testview.cpp HEADERS += \ + InfoBase.h \ + beexamined_deviceitem.h \ + create_task.h \ + depar_task.h \ indexwindow.h \ + infomanageview.h \ + inspectdataitem.h \ loginwindow.h \ mainwindow.h \ + my_task.h \ + rulefileitem.h \ + standard_deviceitem.h \ + testdataitem.h \ testview.h FORMS += \ + beexamined_deviceitem.ui \ + create_task.ui \ + depar_task.ui \ indexwindow.ui \ + infomanageview.ui \ + inspectdataitem.ui \ loginwindow.ui \ mainwindow.ui \ + my_task.ui \ + rulefileitem.ui \ + standard_deviceitem.ui \ + testdataitem.ui \ testview.ui # Default rules for deployment. diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user index 1f5ec64..32d22e9 100644 --- a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user @@ -1,6 +1,6 @@ - + EnvironmentId @@ -64,249 +64,6 @@ ProjectExplorer.Project.Target.0 - Desktop Qt 5.14.2 MinGW 64-bit - Desktop Qt 5.14.2 MinGW 64-bit - qt.qt5.5142.win64_mingw73_kit - 0 - 0 - 0 - - 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 - - Qt4ProjectManager.Qt4RunConfiguration:D:/Auto_verification_scheme/AutoVerScheme/AutoVerScheme.pro - D:/Auto_verification_scheme/AutoVerScheme/AutoVerScheme.pro - - false - - false - true - true - false - false - true - - D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Debug - - 1 - - - - ProjectExplorer.Project.Target.1 - Desktop Qt 5.14.2 MinGW 32-bit Desktop Qt 5.14.2 MinGW 32-bit qt.qt5.5142.win32_mingw73_kit @@ -530,8 +287,252 @@ 2 - Qt4ProjectManager.Qt4RunConfiguration:D:/Auto_verification_scheme/AutoVerScheme/AutoVerScheme.pro - D:/Auto_verification_scheme/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 + + 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 diff --git a/softwareDirectory/AutoVerScheme/InfoBase.cpp b/softwareDirectory/AutoVerScheme/InfoBase.cpp new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/InfoBase.cpp diff --git a/softwareDirectory/AutoVerScheme/InfoBase.h b/softwareDirectory/AutoVerScheme/InfoBase.h new file mode 100644 index 0000000..7fec63e --- /dev/null +++ b/softwareDirectory/AutoVerScheme/InfoBase.h @@ -0,0 +1,16 @@ +#ifndef INFOBASE_H +#define INFOBASE_H + +#include +///信号管理页面的基类 所有信息管理页面都继承于InfoBase +/// 便于统一管理 所有子类必须实现Load方法 +/// 每次按钮点击切换都会调用Load方法 用于每次页面的数据刷新 +class InfoBase : public QWidget { + Q_OBJECT +public: + InfoBase(QWidget *parent = nullptr): QWidget(parent){}; + // 纯虚函数 + virtual void Load()=0; +}; +#endif // INFOBASE_H + diff --git a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.cpp b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.cpp new file mode 100644 index 0000000..7ac1e87 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.cpp @@ -0,0 +1,14 @@ +#include "beexamined_deviceitem.h" +#include "ui_beexamined_deviceitem.h" + +BeExamined_DeviceItem::BeExamined_DeviceItem(QWidget *parent) : + QWidget(parent), + ui(new Ui::BeExamined_DeviceItem) +{ + ui->setupUi(this); +} + +BeExamined_DeviceItem::~BeExamined_DeviceItem() +{ + delete ui; +} diff --git a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.h b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.h new file mode 100644 index 0000000..76b061d --- /dev/null +++ b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.h @@ -0,0 +1,22 @@ +#ifndef BEEXAMINED_DEVICEITEM_H +#define BEEXAMINED_DEVICEITEM_H + +#include + +namespace Ui { +class BeExamined_DeviceItem; +} + +class BeExamined_DeviceItem : public QWidget +{ + Q_OBJECT + +public: + explicit BeExamined_DeviceItem(QWidget *parent = nullptr); + ~BeExamined_DeviceItem(); + +private: + Ui::BeExamined_DeviceItem *ui; +}; + +#endif // BEEXAMINED_DEVICEITEM_H diff --git a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.ui b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.ui new file mode 100644 index 0000000..af9f7bf --- /dev/null +++ b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.ui @@ -0,0 +1,32 @@ + + + BeExamined_DeviceItem + + + + 0 + 0 + 400 + 300 + + + + Form + + + + + 130 + 140 + 89 + 24 + + + + 被检设备管理 + + + + + + diff --git a/softwareDirectory/AutoVerScheme/create_task.cpp b/softwareDirectory/AutoVerScheme/create_task.cpp new file mode 100644 index 0000000..4193efc --- /dev/null +++ b/softwareDirectory/AutoVerScheme/create_task.cpp @@ -0,0 +1,14 @@ +#include "create_task.h" +#include "ui_create_task.h" + +Create_Task::Create_Task(QWidget *parent) : + QWidget(parent), + ui(new Ui::Create_Task) +{ + ui->setupUi(this); +} + +Create_Task::~Create_Task() +{ + delete ui; +} diff --git a/softwareDirectory/AutoVerScheme/create_task.h b/softwareDirectory/AutoVerScheme/create_task.h new file mode 100644 index 0000000..e2264de --- /dev/null +++ b/softwareDirectory/AutoVerScheme/create_task.h @@ -0,0 +1,22 @@ +#ifndef CREATE_TASK_H +#define CREATE_TASK_H + +#include + +namespace Ui { +class Create_Task; +} + +class Create_Task : public QWidget +{ + Q_OBJECT + +public: + explicit Create_Task(QWidget *parent = nullptr); + ~Create_Task(); + +private: + Ui::Create_Task *ui; +}; + +#endif // CREATE_TASK_H diff --git a/softwareDirectory/AutoVerScheme/create_task.ui b/softwareDirectory/AutoVerScheme/create_task.ui new file mode 100644 index 0000000..b79c6a1 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/create_task.ui @@ -0,0 +1,35 @@ + + + Create_Task + + + + 0 + 0 + 400 + 300 + + + + Form + + + background-color:red; + + + + + 140 + 120 + 89 + 24 + + + + 创建任务单 + + + + + + diff --git a/softwareDirectory/AutoVerScheme/depar_task.cpp b/softwareDirectory/AutoVerScheme/depar_task.cpp new file mode 100644 index 0000000..de39775 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/depar_task.cpp @@ -0,0 +1,42 @@ +#include "depar_task.h" +#include "ui_depar_task.h" +#include "QMessageBox" +#include "InfoBase.h" + +Depar_Task::Depar_Task(QWidget *parent) : + InfoBase(parent), + ui(new Ui::Depar_Task) +{ + ui->setupUi(this); + this->initForm(); +} + +Depar_Task::~Depar_Task() +{ + delete ui; +} +void Depar_Task::initForm() +{ + + //ShowMessageBox("标题","初始化完成"); +} +void Depar_Task::ShowMessageBox(QString title,QString value) { + // 创建一个QMessageBox对象 + QMessageBox msgBox; + + // 设置消息框的标题 + msgBox.setWindowTitle(title); + + // 设置消息框的文本内容 + msgBox.setText(value); + + // 设置消息框的标准按钮,这里是“确定”按钮 + msgBox.setStandardButtons(QMessageBox::Ok); + + // 显示消息框 + msgBox.exec(); +} +void Depar_Task::Load() +{ + ShowMessageBox("部门任务页面","部门任务初始化完成"); +} diff --git a/softwareDirectory/AutoVerScheme/depar_task.h b/softwareDirectory/AutoVerScheme/depar_task.h new file mode 100644 index 0000000..8716faf --- /dev/null +++ b/softwareDirectory/AutoVerScheme/depar_task.h @@ -0,0 +1,28 @@ +#ifndef DEPAR_TASK_H +#define DEPAR_TASK_H + + +#include "InfoBase.h" + +namespace Ui { +class Depar_Task; +} + +class Depar_Task :public InfoBase +{ + Q_OBJECT + +public: + Depar_Task(QWidget *parent = nullptr); + ~Depar_Task(); + + +private slots: + void initForm(); //初始化界面数据 + void ShowMessageBox(QString title,QString value); + void Load() override; +private: + Ui::Depar_Task *ui; +}; + +#endif // DEPAR_TASK_H diff --git a/softwareDirectory/AutoVerScheme/depar_task.ui b/softwareDirectory/AutoVerScheme/depar_task.ui new file mode 100644 index 0000000..ff3d44f --- /dev/null +++ b/softwareDirectory/AutoVerScheme/depar_task.ui @@ -0,0 +1,181 @@ + + + Depar_Task + + + + 0 + 0 + 1184 + 456 + + + + Form + + + color:black; + + + + + + + 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 + + + + 要求完成时间: + + + + + + + + + + 查询 + + + + + + + 重置 + + + + + + + + + + background-color:white; + + + + + + + + + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/indexwindow.cpp b/softwareDirectory/AutoVerScheme/indexwindow.cpp index 3e52c7b..9bd65b1 100644 --- a/softwareDirectory/AutoVerScheme/indexwindow.cpp +++ b/softwareDirectory/AutoVerScheme/indexwindow.cpp @@ -21,6 +21,7 @@ //调用样式 loadStyle(":/qss/Index.css"); + } void IndexWindow::loadStyle(const QString &qssFile) diff --git a/softwareDirectory/AutoVerScheme/infomanageview.cpp b/softwareDirectory/AutoVerScheme/infomanageview.cpp new file mode 100644 index 0000000..a206c6f --- /dev/null +++ b/softwareDirectory/AutoVerScheme/infomanageview.cpp @@ -0,0 +1,150 @@ +#include "infomanageview.h" +#include "ui_infomanageview.h" +#include +#include +//子窗体 +#include "depar_task.h" +#include "my_task.h" +#include "create_task.h" +#include "beexamined_deviceitem.h" +#include "inspectdataitem.h" +#include "rulefileitem.h" +#include "standard_deviceitem.h" +#include "testdataitem.h" +#include "InfoBase.h" + +InfoManageView::InfoManageView(QWidget *parent) : + QWidget(parent), + ui(new Ui::InfoManageView) +{ + ui->setupUi(this); + this->setWindowTitle("信息管理"); + //初始化调用所有函数 + this->initForm(); + this->initWidget(); + this->initNav(); + this->initIcon(); +} +//左侧滚动条事件 +void InfoManageView::showEvent(QShowEvent *) +{ + //滚动到底部 + QScrollBar *bar = ui->scrollArea->verticalScrollBar(); + bar->setValue(bar->maximum()); +} + +//左侧导航栏样式初始化 +void InfoManageView::initIcon() +{ + //左侧导航样式,可以设置各种牛逼的参数,超级棒 + // IconHelper::StyleColor styleColor; + //styleColor.defaultBorder = true; + // IconHelper::setStyle(ui->widgetLeft, btns, icons, styleColor); +} + +//颜色初始化设置 +QList InfoManageView::colors = QList(); +void InfoManageView::initForm() +{ + //颜色集合供其他界面使用 + colors << QColor(211, 78, 78) << QColor(29, 185, 242) << QColor(170, 162, 119) << QColor(255, 192, 1); + colors << QColor(0, 176, 180) << QColor(0, 113, 193) << QColor(255, 192, 0); + colors << QColor(72, 103, 149) << QColor(185, 87, 86) << QColor(0, 177, 125); + colors << QColor(214, 77, 84) << QColor(71, 164, 233) << QColor(34, 163, 169); + colors << QColor(59, 123, 156) << QColor(162, 121, 197) << QColor(72, 202, 245); + colors << QColor(0, 150, 121) << QColor(111, 9, 176) << QColor(250, 170, 20); + + ui->scrollArea->setFixedWidth(170); + ui->widgetLeft->setProperty("flag", "left"); +} + +//右侧可切换UI导入 +void InfoManageView::initWidget() +{ + ui->stackedWidget->addWidget(new Depar_Task); //部门任务 + ui->stackedWidget->addWidget(new My_Task); //我的任务 + ui->stackedWidget->addWidget(new Create_Task); //创建任务单 + ui->stackedWidget->addWidget(new Standard_DeviceItem); //标准设备管理 + ui->stackedWidget->addWidget(new BeExamined_DeviceItem); //被检设备管理 + ui->stackedWidget->addWidget(new TestDataItem); //检定数据管理 + ui->stackedWidget->addWidget(new InspectDataItem); //核查数据管理 + ui->stackedWidget->addWidget(new RuleFileItem); //技术文件管理 + + +} +//左侧列表信息导入 +void InfoManageView::initNav() +{ + //按钮文字集合 + QStringList names; + names << "部门任务" << "我的任务" << "创建任务单" << "标准设备管理" << "被检设备管理" + << "检定数据管理" << "核查数据管理" << "技术文件管理" ; + + //自动生成按钮 + for (int i = 0; i < names.count(); i++) { + QToolButton *btn = new QToolButton; + //设置按钮固定高度 + btn->setFixedHeight(35); + //设置按钮的文字 + //btn->setText(QString("%1. %2").arg(i + 1, 2, 10, QChar('0')).arg(names.at(i))); + btn->setText(QString("%1").arg(names.at(i))); + //设置按钮可选中按下类似复选框的功能 + btn->setCheckable(true); + //设置按钮图标在左侧文字在右侧 + // btn->setToolButtonStyle(Qt::ToolButtonTextBesideIcon); + //设置按钮拉伸策略为横向填充 + btn->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Preferred); + //关联按钮单击事件 + connect(btn, SIGNAL(clicked(bool)), this, SLOT(buttonClicked())); + //将按钮加入到布局 + ui->widgetLeft->layout()->addWidget(btn); + //可以指定不同的图标 + //icons << 0xf061; + btns << btn; + //设置按钮大小 + btn->setFixedSize(170, 70); + //设置鼠标经过和点击事件 + btn->setStyleSheet("QToolButton:hover " + "{ background-color: rgba(53, 91, 171, 1); }" + "QToolButton::checked { " + "background-color: rgba(53, 91, 171, 1)}"); + + //ui->widgetLeft->setFixedWidth(200); + } + + //底部加个弹簧 + QSpacerItem *verticalSpacer = new QSpacerItem(20, 40, QSizePolicy::Minimum, QSizePolicy::Expanding); + ui->widgetLeft->layout()->addItem(verticalSpacer); + btns.at(names.count() - 1)->click(); +} +//按钮点击切换UI事件 +void InfoManageView::buttonClicked() +{ + QAbstractButton *b = (QAbstractButton *)sender(); + int count = btns.count(); + int index = btns.indexOf(b); + ui->stackedWidget->setCurrentIndex(index); + + + // 获取当前在 QStackedWidget 中的部件 + QWidget* currentWidget = ui->stackedWidget->currentWidget(); + + // 尝试将当前部件转换为 InfoBase 类型 + InfoBase* currQWidget = qobject_cast(currentWidget); + // 检查转换是否成功 + if (currQWidget != nullptr) + { + // 如果转换成功,调用子类Load 方法 + currQWidget->Load(); + } + + for (int i = 0; i < count; i++) { + QAbstractButton *btn = btns.at(i); + btn->setChecked(btn == b); + } +} + +InfoManageView::~InfoManageView() +{ + delete ui; +} diff --git a/softwareDirectory/AutoVerScheme/infomanageview.h b/softwareDirectory/AutoVerScheme/infomanageview.h new file mode 100644 index 0000000..3c1463f --- /dev/null +++ b/softwareDirectory/AutoVerScheme/infomanageview.h @@ -0,0 +1,38 @@ +#ifndef INFOMANAGEVIEW_H +#define INFOMANAGEVIEW_H + +#include + +class QAbstractButton; + + +namespace Ui { +class InfoManageView; +} + +class InfoManageView : public QWidget +{ + Q_OBJECT + +public: + static QList colors; + + explicit InfoManageView(QWidget *parent = nullptr); + ~InfoManageView(); +private slots: + void initForm(); //初始化界面数据 + void initWidget(); //初始化子窗体 + void initNav(); //初始化导航按钮 + void initIcon(); //初始化导航按钮图标 + void buttonClicked(); //导航按钮单击事件 +protected: + void showEvent(QShowEvent *); +private: + Ui::InfoManageView *ui; + + //左侧导航栏图标+按钮集合 + QList icons; + QList btns; +}; + +#endif // INFOMANAGEVIEW_H diff --git a/softwareDirectory/AutoVerScheme/infomanageview.ui b/softwareDirectory/AutoVerScheme/infomanageview.ui new file mode 100644 index 0000000..4b39e7d --- /dev/null +++ b/softwareDirectory/AutoVerScheme/infomanageview.ui @@ -0,0 +1,109 @@ + + + InfoManageView + + + + 0 + 0 + 883 + 644 + + + + Form + + + + 0 + + + 0 + + + 0 + + + 0 + + + 0 + + + + + + 0 + 0 + + + + + 170 + 0 + + + + + 16777215 + 16777215 + + + + color:White; + font-weight: bold; + font-size: 16px; +background-color:rgba(10, 15, 92, 1); + + + true + + + + + 0 + 0 + 170 + 625 + + + + + 170 + 0 + + + + + 170 + 0 + + + + + 0 + + + 0 + + + 0 + + + 0 + + + 0 + + + + + + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/inspectdataitem.cpp b/softwareDirectory/AutoVerScheme/inspectdataitem.cpp new file mode 100644 index 0000000..e9c2adc --- /dev/null +++ b/softwareDirectory/AutoVerScheme/inspectdataitem.cpp @@ -0,0 +1,14 @@ +#include "inspectdataitem.h" +#include "ui_inspectdataitem.h" + +InspectDataItem::InspectDataItem(QWidget *parent) : + QWidget(parent), + ui(new Ui::InspectDataItem) +{ + ui->setupUi(this); +} + +InspectDataItem::~InspectDataItem() +{ + delete ui; +} diff --git a/softwareDirectory/AutoVerScheme/inspectdataitem.h b/softwareDirectory/AutoVerScheme/inspectdataitem.h new file mode 100644 index 0000000..57551bb --- /dev/null +++ b/softwareDirectory/AutoVerScheme/inspectdataitem.h @@ -0,0 +1,22 @@ +#ifndef INSPECTDATAITEM_H +#define INSPECTDATAITEM_H + +#include + +namespace Ui { +class InspectDataItem; +} + +class InspectDataItem : public QWidget +{ + Q_OBJECT + +public: + explicit InspectDataItem(QWidget *parent = nullptr); + ~InspectDataItem(); + +private: + Ui::InspectDataItem *ui; +}; + +#endif // INSPECTDATAITEM_H diff --git a/softwareDirectory/AutoVerScheme/inspectdataitem.ui b/softwareDirectory/AutoVerScheme/inspectdataitem.ui new file mode 100644 index 0000000..45f04e0 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/inspectdataitem.ui @@ -0,0 +1,32 @@ + + + InspectDataItem + + + + 0 + 0 + 400 + 300 + + + + Form + + + + + 120 + 130 + 89 + 24 + + + + 核查数据管理 + + + + + + diff --git a/softwareDirectory/AutoVerScheme/my_task.cpp b/softwareDirectory/AutoVerScheme/my_task.cpp new file mode 100644 index 0000000..40aceb2 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/my_task.cpp @@ -0,0 +1,42 @@ +#include "my_task.h" +#include "ui_my_task.h" +#include "QMessageBox" + +My_Task::My_Task(QWidget *parent) : + InfoBase(parent), + ui(new Ui::My_Task) +{ + ui->setupUi(this); + + this->initForm(); +} + +My_Task::~My_Task() +{ + delete ui; +} +void My_Task::initForm() +{ + + +} +void My_Task::ShowMessageBox(QString title,QString value) { + // 创建一个QMessageBox对象 + QMessageBox msgBox; + + // 设置消息框的标题 + msgBox.setWindowTitle(title); + + // 设置消息框的文本内容 + msgBox.setText(value); + + // 设置消息框的标准按钮,这里是“确定”按钮 + msgBox.setStandardButtons(QMessageBox::Ok); + + // 显示消息框 + msgBox.exec(); +} +void My_Task::Load() +{ + ShowMessageBox("我的任务页面","我的任务初始化完成"); +} diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro index 5b8f852..fa0d8e5 100644 --- a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro @@ -1,5 +1,7 @@ QT += core gui QT += sql +QT += widgets + greaterThan(QT_MAJOR_VERSION, 4): QT += widgets CONFIG += c++11 @@ -16,22 +18,50 @@ #DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 SOURCES += \ + beexamined_deviceitem.cpp \ + create_task.cpp \ + depar_task.cpp \ indexwindow.cpp \ + infomanageview.cpp \ + inspectdataitem.cpp \ loginwindow.cpp \ main.cpp \ mainwindow.cpp \ + my_task.cpp \ + rulefileitem.cpp \ + standard_deviceitem.cpp \ + testdataitem.cpp \ testview.cpp HEADERS += \ + InfoBase.h \ + beexamined_deviceitem.h \ + create_task.h \ + depar_task.h \ indexwindow.h \ + infomanageview.h \ + inspectdataitem.h \ loginwindow.h \ mainwindow.h \ + my_task.h \ + rulefileitem.h \ + standard_deviceitem.h \ + testdataitem.h \ testview.h FORMS += \ + beexamined_deviceitem.ui \ + create_task.ui \ + depar_task.ui \ indexwindow.ui \ + infomanageview.ui \ + inspectdataitem.ui \ loginwindow.ui \ mainwindow.ui \ + my_task.ui \ + rulefileitem.ui \ + standard_deviceitem.ui \ + testdataitem.ui \ testview.ui # Default rules for deployment. diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user index 1f5ec64..32d22e9 100644 --- a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user @@ -1,6 +1,6 @@ - + EnvironmentId @@ -64,249 +64,6 @@ ProjectExplorer.Project.Target.0 - Desktop Qt 5.14.2 MinGW 64-bit - Desktop Qt 5.14.2 MinGW 64-bit - qt.qt5.5142.win64_mingw73_kit - 0 - 0 - 0 - - 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 - - Qt4ProjectManager.Qt4RunConfiguration:D:/Auto_verification_scheme/AutoVerScheme/AutoVerScheme.pro - D:/Auto_verification_scheme/AutoVerScheme/AutoVerScheme.pro - - false - - false - true - true - false - false - true - - D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Debug - - 1 - - - - ProjectExplorer.Project.Target.1 - Desktop Qt 5.14.2 MinGW 32-bit Desktop Qt 5.14.2 MinGW 32-bit qt.qt5.5142.win32_mingw73_kit @@ -530,8 +287,252 @@ 2 - Qt4ProjectManager.Qt4RunConfiguration:D:/Auto_verification_scheme/AutoVerScheme/AutoVerScheme.pro - D:/Auto_verification_scheme/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 + + 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 diff --git a/softwareDirectory/AutoVerScheme/InfoBase.cpp b/softwareDirectory/AutoVerScheme/InfoBase.cpp new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/InfoBase.cpp diff --git a/softwareDirectory/AutoVerScheme/InfoBase.h b/softwareDirectory/AutoVerScheme/InfoBase.h new file mode 100644 index 0000000..7fec63e --- /dev/null +++ b/softwareDirectory/AutoVerScheme/InfoBase.h @@ -0,0 +1,16 @@ +#ifndef INFOBASE_H +#define INFOBASE_H + +#include +///信号管理页面的基类 所有信息管理页面都继承于InfoBase +/// 便于统一管理 所有子类必须实现Load方法 +/// 每次按钮点击切换都会调用Load方法 用于每次页面的数据刷新 +class InfoBase : public QWidget { + Q_OBJECT +public: + InfoBase(QWidget *parent = nullptr): QWidget(parent){}; + // 纯虚函数 + virtual void Load()=0; +}; +#endif // INFOBASE_H + diff --git a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.cpp b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.cpp new file mode 100644 index 0000000..7ac1e87 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.cpp @@ -0,0 +1,14 @@ +#include "beexamined_deviceitem.h" +#include "ui_beexamined_deviceitem.h" + +BeExamined_DeviceItem::BeExamined_DeviceItem(QWidget *parent) : + QWidget(parent), + ui(new Ui::BeExamined_DeviceItem) +{ + ui->setupUi(this); +} + +BeExamined_DeviceItem::~BeExamined_DeviceItem() +{ + delete ui; +} diff --git a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.h b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.h new file mode 100644 index 0000000..76b061d --- /dev/null +++ b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.h @@ -0,0 +1,22 @@ +#ifndef BEEXAMINED_DEVICEITEM_H +#define BEEXAMINED_DEVICEITEM_H + +#include + +namespace Ui { +class BeExamined_DeviceItem; +} + +class BeExamined_DeviceItem : public QWidget +{ + Q_OBJECT + +public: + explicit BeExamined_DeviceItem(QWidget *parent = nullptr); + ~BeExamined_DeviceItem(); + +private: + Ui::BeExamined_DeviceItem *ui; +}; + +#endif // BEEXAMINED_DEVICEITEM_H diff --git a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.ui b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.ui new file mode 100644 index 0000000..af9f7bf --- /dev/null +++ b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.ui @@ -0,0 +1,32 @@ + + + BeExamined_DeviceItem + + + + 0 + 0 + 400 + 300 + + + + Form + + + + + 130 + 140 + 89 + 24 + + + + 被检设备管理 + + + + + + diff --git a/softwareDirectory/AutoVerScheme/create_task.cpp b/softwareDirectory/AutoVerScheme/create_task.cpp new file mode 100644 index 0000000..4193efc --- /dev/null +++ b/softwareDirectory/AutoVerScheme/create_task.cpp @@ -0,0 +1,14 @@ +#include "create_task.h" +#include "ui_create_task.h" + +Create_Task::Create_Task(QWidget *parent) : + QWidget(parent), + ui(new Ui::Create_Task) +{ + ui->setupUi(this); +} + +Create_Task::~Create_Task() +{ + delete ui; +} diff --git a/softwareDirectory/AutoVerScheme/create_task.h b/softwareDirectory/AutoVerScheme/create_task.h new file mode 100644 index 0000000..e2264de --- /dev/null +++ b/softwareDirectory/AutoVerScheme/create_task.h @@ -0,0 +1,22 @@ +#ifndef CREATE_TASK_H +#define CREATE_TASK_H + +#include + +namespace Ui { +class Create_Task; +} + +class Create_Task : public QWidget +{ + Q_OBJECT + +public: + explicit Create_Task(QWidget *parent = nullptr); + ~Create_Task(); + +private: + Ui::Create_Task *ui; +}; + +#endif // CREATE_TASK_H diff --git a/softwareDirectory/AutoVerScheme/create_task.ui b/softwareDirectory/AutoVerScheme/create_task.ui new file mode 100644 index 0000000..b79c6a1 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/create_task.ui @@ -0,0 +1,35 @@ + + + Create_Task + + + + 0 + 0 + 400 + 300 + + + + Form + + + background-color:red; + + + + + 140 + 120 + 89 + 24 + + + + 创建任务单 + + + + + + diff --git a/softwareDirectory/AutoVerScheme/depar_task.cpp b/softwareDirectory/AutoVerScheme/depar_task.cpp new file mode 100644 index 0000000..de39775 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/depar_task.cpp @@ -0,0 +1,42 @@ +#include "depar_task.h" +#include "ui_depar_task.h" +#include "QMessageBox" +#include "InfoBase.h" + +Depar_Task::Depar_Task(QWidget *parent) : + InfoBase(parent), + ui(new Ui::Depar_Task) +{ + ui->setupUi(this); + this->initForm(); +} + +Depar_Task::~Depar_Task() +{ + delete ui; +} +void Depar_Task::initForm() +{ + + //ShowMessageBox("标题","初始化完成"); +} +void Depar_Task::ShowMessageBox(QString title,QString value) { + // 创建一个QMessageBox对象 + QMessageBox msgBox; + + // 设置消息框的标题 + msgBox.setWindowTitle(title); + + // 设置消息框的文本内容 + msgBox.setText(value); + + // 设置消息框的标准按钮,这里是“确定”按钮 + msgBox.setStandardButtons(QMessageBox::Ok); + + // 显示消息框 + msgBox.exec(); +} +void Depar_Task::Load() +{ + ShowMessageBox("部门任务页面","部门任务初始化完成"); +} diff --git a/softwareDirectory/AutoVerScheme/depar_task.h b/softwareDirectory/AutoVerScheme/depar_task.h new file mode 100644 index 0000000..8716faf --- /dev/null +++ b/softwareDirectory/AutoVerScheme/depar_task.h @@ -0,0 +1,28 @@ +#ifndef DEPAR_TASK_H +#define DEPAR_TASK_H + + +#include "InfoBase.h" + +namespace Ui { +class Depar_Task; +} + +class Depar_Task :public InfoBase +{ + Q_OBJECT + +public: + Depar_Task(QWidget *parent = nullptr); + ~Depar_Task(); + + +private slots: + void initForm(); //初始化界面数据 + void ShowMessageBox(QString title,QString value); + void Load() override; +private: + Ui::Depar_Task *ui; +}; + +#endif // DEPAR_TASK_H diff --git a/softwareDirectory/AutoVerScheme/depar_task.ui b/softwareDirectory/AutoVerScheme/depar_task.ui new file mode 100644 index 0000000..ff3d44f --- /dev/null +++ b/softwareDirectory/AutoVerScheme/depar_task.ui @@ -0,0 +1,181 @@ + + + Depar_Task + + + + 0 + 0 + 1184 + 456 + + + + Form + + + color:black; + + + + + + + 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 + + + + 要求完成时间: + + + + + + + + + + 查询 + + + + + + + 重置 + + + + + + + + + + background-color:white; + + + + + + + + + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/indexwindow.cpp b/softwareDirectory/AutoVerScheme/indexwindow.cpp index 3e52c7b..9bd65b1 100644 --- a/softwareDirectory/AutoVerScheme/indexwindow.cpp +++ b/softwareDirectory/AutoVerScheme/indexwindow.cpp @@ -21,6 +21,7 @@ //调用样式 loadStyle(":/qss/Index.css"); + } void IndexWindow::loadStyle(const QString &qssFile) diff --git a/softwareDirectory/AutoVerScheme/infomanageview.cpp b/softwareDirectory/AutoVerScheme/infomanageview.cpp new file mode 100644 index 0000000..a206c6f --- /dev/null +++ b/softwareDirectory/AutoVerScheme/infomanageview.cpp @@ -0,0 +1,150 @@ +#include "infomanageview.h" +#include "ui_infomanageview.h" +#include +#include +//子窗体 +#include "depar_task.h" +#include "my_task.h" +#include "create_task.h" +#include "beexamined_deviceitem.h" +#include "inspectdataitem.h" +#include "rulefileitem.h" +#include "standard_deviceitem.h" +#include "testdataitem.h" +#include "InfoBase.h" + +InfoManageView::InfoManageView(QWidget *parent) : + QWidget(parent), + ui(new Ui::InfoManageView) +{ + ui->setupUi(this); + this->setWindowTitle("信息管理"); + //初始化调用所有函数 + this->initForm(); + this->initWidget(); + this->initNav(); + this->initIcon(); +} +//左侧滚动条事件 +void InfoManageView::showEvent(QShowEvent *) +{ + //滚动到底部 + QScrollBar *bar = ui->scrollArea->verticalScrollBar(); + bar->setValue(bar->maximum()); +} + +//左侧导航栏样式初始化 +void InfoManageView::initIcon() +{ + //左侧导航样式,可以设置各种牛逼的参数,超级棒 + // IconHelper::StyleColor styleColor; + //styleColor.defaultBorder = true; + // IconHelper::setStyle(ui->widgetLeft, btns, icons, styleColor); +} + +//颜色初始化设置 +QList InfoManageView::colors = QList(); +void InfoManageView::initForm() +{ + //颜色集合供其他界面使用 + colors << QColor(211, 78, 78) << QColor(29, 185, 242) << QColor(170, 162, 119) << QColor(255, 192, 1); + colors << QColor(0, 176, 180) << QColor(0, 113, 193) << QColor(255, 192, 0); + colors << QColor(72, 103, 149) << QColor(185, 87, 86) << QColor(0, 177, 125); + colors << QColor(214, 77, 84) << QColor(71, 164, 233) << QColor(34, 163, 169); + colors << QColor(59, 123, 156) << QColor(162, 121, 197) << QColor(72, 202, 245); + colors << QColor(0, 150, 121) << QColor(111, 9, 176) << QColor(250, 170, 20); + + ui->scrollArea->setFixedWidth(170); + ui->widgetLeft->setProperty("flag", "left"); +} + +//右侧可切换UI导入 +void InfoManageView::initWidget() +{ + ui->stackedWidget->addWidget(new Depar_Task); //部门任务 + ui->stackedWidget->addWidget(new My_Task); //我的任务 + ui->stackedWidget->addWidget(new Create_Task); //创建任务单 + ui->stackedWidget->addWidget(new Standard_DeviceItem); //标准设备管理 + ui->stackedWidget->addWidget(new BeExamined_DeviceItem); //被检设备管理 + ui->stackedWidget->addWidget(new TestDataItem); //检定数据管理 + ui->stackedWidget->addWidget(new InspectDataItem); //核查数据管理 + ui->stackedWidget->addWidget(new RuleFileItem); //技术文件管理 + + +} +//左侧列表信息导入 +void InfoManageView::initNav() +{ + //按钮文字集合 + QStringList names; + names << "部门任务" << "我的任务" << "创建任务单" << "标准设备管理" << "被检设备管理" + << "检定数据管理" << "核查数据管理" << "技术文件管理" ; + + //自动生成按钮 + for (int i = 0; i < names.count(); i++) { + QToolButton *btn = new QToolButton; + //设置按钮固定高度 + btn->setFixedHeight(35); + //设置按钮的文字 + //btn->setText(QString("%1. %2").arg(i + 1, 2, 10, QChar('0')).arg(names.at(i))); + btn->setText(QString("%1").arg(names.at(i))); + //设置按钮可选中按下类似复选框的功能 + btn->setCheckable(true); + //设置按钮图标在左侧文字在右侧 + // btn->setToolButtonStyle(Qt::ToolButtonTextBesideIcon); + //设置按钮拉伸策略为横向填充 + btn->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Preferred); + //关联按钮单击事件 + connect(btn, SIGNAL(clicked(bool)), this, SLOT(buttonClicked())); + //将按钮加入到布局 + ui->widgetLeft->layout()->addWidget(btn); + //可以指定不同的图标 + //icons << 0xf061; + btns << btn; + //设置按钮大小 + btn->setFixedSize(170, 70); + //设置鼠标经过和点击事件 + btn->setStyleSheet("QToolButton:hover " + "{ background-color: rgba(53, 91, 171, 1); }" + "QToolButton::checked { " + "background-color: rgba(53, 91, 171, 1)}"); + + //ui->widgetLeft->setFixedWidth(200); + } + + //底部加个弹簧 + QSpacerItem *verticalSpacer = new QSpacerItem(20, 40, QSizePolicy::Minimum, QSizePolicy::Expanding); + ui->widgetLeft->layout()->addItem(verticalSpacer); + btns.at(names.count() - 1)->click(); +} +//按钮点击切换UI事件 +void InfoManageView::buttonClicked() +{ + QAbstractButton *b = (QAbstractButton *)sender(); + int count = btns.count(); + int index = btns.indexOf(b); + ui->stackedWidget->setCurrentIndex(index); + + + // 获取当前在 QStackedWidget 中的部件 + QWidget* currentWidget = ui->stackedWidget->currentWidget(); + + // 尝试将当前部件转换为 InfoBase 类型 + InfoBase* currQWidget = qobject_cast(currentWidget); + // 检查转换是否成功 + if (currQWidget != nullptr) + { + // 如果转换成功,调用子类Load 方法 + currQWidget->Load(); + } + + for (int i = 0; i < count; i++) { + QAbstractButton *btn = btns.at(i); + btn->setChecked(btn == b); + } +} + +InfoManageView::~InfoManageView() +{ + delete ui; +} diff --git a/softwareDirectory/AutoVerScheme/infomanageview.h b/softwareDirectory/AutoVerScheme/infomanageview.h new file mode 100644 index 0000000..3c1463f --- /dev/null +++ b/softwareDirectory/AutoVerScheme/infomanageview.h @@ -0,0 +1,38 @@ +#ifndef INFOMANAGEVIEW_H +#define INFOMANAGEVIEW_H + +#include + +class QAbstractButton; + + +namespace Ui { +class InfoManageView; +} + +class InfoManageView : public QWidget +{ + Q_OBJECT + +public: + static QList colors; + + explicit InfoManageView(QWidget *parent = nullptr); + ~InfoManageView(); +private slots: + void initForm(); //初始化界面数据 + void initWidget(); //初始化子窗体 + void initNav(); //初始化导航按钮 + void initIcon(); //初始化导航按钮图标 + void buttonClicked(); //导航按钮单击事件 +protected: + void showEvent(QShowEvent *); +private: + Ui::InfoManageView *ui; + + //左侧导航栏图标+按钮集合 + QList icons; + QList btns; +}; + +#endif // INFOMANAGEVIEW_H diff --git a/softwareDirectory/AutoVerScheme/infomanageview.ui b/softwareDirectory/AutoVerScheme/infomanageview.ui new file mode 100644 index 0000000..4b39e7d --- /dev/null +++ b/softwareDirectory/AutoVerScheme/infomanageview.ui @@ -0,0 +1,109 @@ + + + InfoManageView + + + + 0 + 0 + 883 + 644 + + + + Form + + + + 0 + + + 0 + + + 0 + + + 0 + + + 0 + + + + + + 0 + 0 + + + + + 170 + 0 + + + + + 16777215 + 16777215 + + + + color:White; + font-weight: bold; + font-size: 16px; +background-color:rgba(10, 15, 92, 1); + + + true + + + + + 0 + 0 + 170 + 625 + + + + + 170 + 0 + + + + + 170 + 0 + + + + + 0 + + + 0 + + + 0 + + + 0 + + + 0 + + + + + + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/inspectdataitem.cpp b/softwareDirectory/AutoVerScheme/inspectdataitem.cpp new file mode 100644 index 0000000..e9c2adc --- /dev/null +++ b/softwareDirectory/AutoVerScheme/inspectdataitem.cpp @@ -0,0 +1,14 @@ +#include "inspectdataitem.h" +#include "ui_inspectdataitem.h" + +InspectDataItem::InspectDataItem(QWidget *parent) : + QWidget(parent), + ui(new Ui::InspectDataItem) +{ + ui->setupUi(this); +} + +InspectDataItem::~InspectDataItem() +{ + delete ui; +} diff --git a/softwareDirectory/AutoVerScheme/inspectdataitem.h b/softwareDirectory/AutoVerScheme/inspectdataitem.h new file mode 100644 index 0000000..57551bb --- /dev/null +++ b/softwareDirectory/AutoVerScheme/inspectdataitem.h @@ -0,0 +1,22 @@ +#ifndef INSPECTDATAITEM_H +#define INSPECTDATAITEM_H + +#include + +namespace Ui { +class InspectDataItem; +} + +class InspectDataItem : public QWidget +{ + Q_OBJECT + +public: + explicit InspectDataItem(QWidget *parent = nullptr); + ~InspectDataItem(); + +private: + Ui::InspectDataItem *ui; +}; + +#endif // INSPECTDATAITEM_H diff --git a/softwareDirectory/AutoVerScheme/inspectdataitem.ui b/softwareDirectory/AutoVerScheme/inspectdataitem.ui new file mode 100644 index 0000000..45f04e0 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/inspectdataitem.ui @@ -0,0 +1,32 @@ + + + InspectDataItem + + + + 0 + 0 + 400 + 300 + + + + Form + + + + + 120 + 130 + 89 + 24 + + + + 核查数据管理 + + + + + + diff --git a/softwareDirectory/AutoVerScheme/my_task.cpp b/softwareDirectory/AutoVerScheme/my_task.cpp new file mode 100644 index 0000000..40aceb2 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/my_task.cpp @@ -0,0 +1,42 @@ +#include "my_task.h" +#include "ui_my_task.h" +#include "QMessageBox" + +My_Task::My_Task(QWidget *parent) : + InfoBase(parent), + ui(new Ui::My_Task) +{ + ui->setupUi(this); + + this->initForm(); +} + +My_Task::~My_Task() +{ + delete ui; +} +void My_Task::initForm() +{ + + +} +void My_Task::ShowMessageBox(QString title,QString value) { + // 创建一个QMessageBox对象 + QMessageBox msgBox; + + // 设置消息框的标题 + msgBox.setWindowTitle(title); + + // 设置消息框的文本内容 + msgBox.setText(value); + + // 设置消息框的标准按钮,这里是“确定”按钮 + msgBox.setStandardButtons(QMessageBox::Ok); + + // 显示消息框 + msgBox.exec(); +} +void My_Task::Load() +{ + ShowMessageBox("我的任务页面","我的任务初始化完成"); +} diff --git a/softwareDirectory/AutoVerScheme/my_task.h b/softwareDirectory/AutoVerScheme/my_task.h new file mode 100644 index 0000000..d6600cb --- /dev/null +++ b/softwareDirectory/AutoVerScheme/my_task.h @@ -0,0 +1,28 @@ +#ifndef MY_TASK_H +#define MY_TASK_H + +#include +#include "InfoBase.h" + +namespace Ui { +class My_Task; +} + +class My_Task :public InfoBase +{ + Q_OBJECT + +public: + explicit My_Task(QWidget *parent = nullptr); + ~My_Task(); + + +private slots: + void initForm(); //初始化界面数据 + void ShowMessageBox(QString title,QString value); + void Load() override; +private: + Ui::My_Task *ui; +}; + +#endif // MY_TASK_H diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro index 5b8f852..fa0d8e5 100644 --- a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro @@ -1,5 +1,7 @@ QT += core gui QT += sql +QT += widgets + greaterThan(QT_MAJOR_VERSION, 4): QT += widgets CONFIG += c++11 @@ -16,22 +18,50 @@ #DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 SOURCES += \ + beexamined_deviceitem.cpp \ + create_task.cpp \ + depar_task.cpp \ indexwindow.cpp \ + infomanageview.cpp \ + inspectdataitem.cpp \ loginwindow.cpp \ main.cpp \ mainwindow.cpp \ + my_task.cpp \ + rulefileitem.cpp \ + standard_deviceitem.cpp \ + testdataitem.cpp \ testview.cpp HEADERS += \ + InfoBase.h \ + beexamined_deviceitem.h \ + create_task.h \ + depar_task.h \ indexwindow.h \ + infomanageview.h \ + inspectdataitem.h \ loginwindow.h \ mainwindow.h \ + my_task.h \ + rulefileitem.h \ + standard_deviceitem.h \ + testdataitem.h \ testview.h FORMS += \ + beexamined_deviceitem.ui \ + create_task.ui \ + depar_task.ui \ indexwindow.ui \ + infomanageview.ui \ + inspectdataitem.ui \ loginwindow.ui \ mainwindow.ui \ + my_task.ui \ + rulefileitem.ui \ + standard_deviceitem.ui \ + testdataitem.ui \ testview.ui # Default rules for deployment. diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user index 1f5ec64..32d22e9 100644 --- a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user @@ -1,6 +1,6 @@ - + EnvironmentId @@ -64,249 +64,6 @@ ProjectExplorer.Project.Target.0 - Desktop Qt 5.14.2 MinGW 64-bit - Desktop Qt 5.14.2 MinGW 64-bit - qt.qt5.5142.win64_mingw73_kit - 0 - 0 - 0 - - 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 - - Qt4ProjectManager.Qt4RunConfiguration:D:/Auto_verification_scheme/AutoVerScheme/AutoVerScheme.pro - D:/Auto_verification_scheme/AutoVerScheme/AutoVerScheme.pro - - false - - false - true - true - false - false - true - - D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Debug - - 1 - - - - ProjectExplorer.Project.Target.1 - Desktop Qt 5.14.2 MinGW 32-bit Desktop Qt 5.14.2 MinGW 32-bit qt.qt5.5142.win32_mingw73_kit @@ -530,8 +287,252 @@ 2 - Qt4ProjectManager.Qt4RunConfiguration:D:/Auto_verification_scheme/AutoVerScheme/AutoVerScheme.pro - D:/Auto_verification_scheme/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 + + 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 diff --git a/softwareDirectory/AutoVerScheme/InfoBase.cpp b/softwareDirectory/AutoVerScheme/InfoBase.cpp new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/InfoBase.cpp diff --git a/softwareDirectory/AutoVerScheme/InfoBase.h b/softwareDirectory/AutoVerScheme/InfoBase.h new file mode 100644 index 0000000..7fec63e --- /dev/null +++ b/softwareDirectory/AutoVerScheme/InfoBase.h @@ -0,0 +1,16 @@ +#ifndef INFOBASE_H +#define INFOBASE_H + +#include +///信号管理页面的基类 所有信息管理页面都继承于InfoBase +/// 便于统一管理 所有子类必须实现Load方法 +/// 每次按钮点击切换都会调用Load方法 用于每次页面的数据刷新 +class InfoBase : public QWidget { + Q_OBJECT +public: + InfoBase(QWidget *parent = nullptr): QWidget(parent){}; + // 纯虚函数 + virtual void Load()=0; +}; +#endif // INFOBASE_H + diff --git a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.cpp b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.cpp new file mode 100644 index 0000000..7ac1e87 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.cpp @@ -0,0 +1,14 @@ +#include "beexamined_deviceitem.h" +#include "ui_beexamined_deviceitem.h" + +BeExamined_DeviceItem::BeExamined_DeviceItem(QWidget *parent) : + QWidget(parent), + ui(new Ui::BeExamined_DeviceItem) +{ + ui->setupUi(this); +} + +BeExamined_DeviceItem::~BeExamined_DeviceItem() +{ + delete ui; +} diff --git a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.h b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.h new file mode 100644 index 0000000..76b061d --- /dev/null +++ b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.h @@ -0,0 +1,22 @@ +#ifndef BEEXAMINED_DEVICEITEM_H +#define BEEXAMINED_DEVICEITEM_H + +#include + +namespace Ui { +class BeExamined_DeviceItem; +} + +class BeExamined_DeviceItem : public QWidget +{ + Q_OBJECT + +public: + explicit BeExamined_DeviceItem(QWidget *parent = nullptr); + ~BeExamined_DeviceItem(); + +private: + Ui::BeExamined_DeviceItem *ui; +}; + +#endif // BEEXAMINED_DEVICEITEM_H diff --git a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.ui b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.ui new file mode 100644 index 0000000..af9f7bf --- /dev/null +++ b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.ui @@ -0,0 +1,32 @@ + + + BeExamined_DeviceItem + + + + 0 + 0 + 400 + 300 + + + + Form + + + + + 130 + 140 + 89 + 24 + + + + 被检设备管理 + + + + + + diff --git a/softwareDirectory/AutoVerScheme/create_task.cpp b/softwareDirectory/AutoVerScheme/create_task.cpp new file mode 100644 index 0000000..4193efc --- /dev/null +++ b/softwareDirectory/AutoVerScheme/create_task.cpp @@ -0,0 +1,14 @@ +#include "create_task.h" +#include "ui_create_task.h" + +Create_Task::Create_Task(QWidget *parent) : + QWidget(parent), + ui(new Ui::Create_Task) +{ + ui->setupUi(this); +} + +Create_Task::~Create_Task() +{ + delete ui; +} diff --git a/softwareDirectory/AutoVerScheme/create_task.h b/softwareDirectory/AutoVerScheme/create_task.h new file mode 100644 index 0000000..e2264de --- /dev/null +++ b/softwareDirectory/AutoVerScheme/create_task.h @@ -0,0 +1,22 @@ +#ifndef CREATE_TASK_H +#define CREATE_TASK_H + +#include + +namespace Ui { +class Create_Task; +} + +class Create_Task : public QWidget +{ + Q_OBJECT + +public: + explicit Create_Task(QWidget *parent = nullptr); + ~Create_Task(); + +private: + Ui::Create_Task *ui; +}; + +#endif // CREATE_TASK_H diff --git a/softwareDirectory/AutoVerScheme/create_task.ui b/softwareDirectory/AutoVerScheme/create_task.ui new file mode 100644 index 0000000..b79c6a1 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/create_task.ui @@ -0,0 +1,35 @@ + + + Create_Task + + + + 0 + 0 + 400 + 300 + + + + Form + + + background-color:red; + + + + + 140 + 120 + 89 + 24 + + + + 创建任务单 + + + + + + diff --git a/softwareDirectory/AutoVerScheme/depar_task.cpp b/softwareDirectory/AutoVerScheme/depar_task.cpp new file mode 100644 index 0000000..de39775 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/depar_task.cpp @@ -0,0 +1,42 @@ +#include "depar_task.h" +#include "ui_depar_task.h" +#include "QMessageBox" +#include "InfoBase.h" + +Depar_Task::Depar_Task(QWidget *parent) : + InfoBase(parent), + ui(new Ui::Depar_Task) +{ + ui->setupUi(this); + this->initForm(); +} + +Depar_Task::~Depar_Task() +{ + delete ui; +} +void Depar_Task::initForm() +{ + + //ShowMessageBox("标题","初始化完成"); +} +void Depar_Task::ShowMessageBox(QString title,QString value) { + // 创建一个QMessageBox对象 + QMessageBox msgBox; + + // 设置消息框的标题 + msgBox.setWindowTitle(title); + + // 设置消息框的文本内容 + msgBox.setText(value); + + // 设置消息框的标准按钮,这里是“确定”按钮 + msgBox.setStandardButtons(QMessageBox::Ok); + + // 显示消息框 + msgBox.exec(); +} +void Depar_Task::Load() +{ + ShowMessageBox("部门任务页面","部门任务初始化完成"); +} diff --git a/softwareDirectory/AutoVerScheme/depar_task.h b/softwareDirectory/AutoVerScheme/depar_task.h new file mode 100644 index 0000000..8716faf --- /dev/null +++ b/softwareDirectory/AutoVerScheme/depar_task.h @@ -0,0 +1,28 @@ +#ifndef DEPAR_TASK_H +#define DEPAR_TASK_H + + +#include "InfoBase.h" + +namespace Ui { +class Depar_Task; +} + +class Depar_Task :public InfoBase +{ + Q_OBJECT + +public: + Depar_Task(QWidget *parent = nullptr); + ~Depar_Task(); + + +private slots: + void initForm(); //初始化界面数据 + void ShowMessageBox(QString title,QString value); + void Load() override; +private: + Ui::Depar_Task *ui; +}; + +#endif // DEPAR_TASK_H diff --git a/softwareDirectory/AutoVerScheme/depar_task.ui b/softwareDirectory/AutoVerScheme/depar_task.ui new file mode 100644 index 0000000..ff3d44f --- /dev/null +++ b/softwareDirectory/AutoVerScheme/depar_task.ui @@ -0,0 +1,181 @@ + + + Depar_Task + + + + 0 + 0 + 1184 + 456 + + + + Form + + + color:black; + + + + + + + 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 + + + + 要求完成时间: + + + + + + + + + + 查询 + + + + + + + 重置 + + + + + + + + + + background-color:white; + + + + + + + + + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/indexwindow.cpp b/softwareDirectory/AutoVerScheme/indexwindow.cpp index 3e52c7b..9bd65b1 100644 --- a/softwareDirectory/AutoVerScheme/indexwindow.cpp +++ b/softwareDirectory/AutoVerScheme/indexwindow.cpp @@ -21,6 +21,7 @@ //调用样式 loadStyle(":/qss/Index.css"); + } void IndexWindow::loadStyle(const QString &qssFile) diff --git a/softwareDirectory/AutoVerScheme/infomanageview.cpp b/softwareDirectory/AutoVerScheme/infomanageview.cpp new file mode 100644 index 0000000..a206c6f --- /dev/null +++ b/softwareDirectory/AutoVerScheme/infomanageview.cpp @@ -0,0 +1,150 @@ +#include "infomanageview.h" +#include "ui_infomanageview.h" +#include +#include +//子窗体 +#include "depar_task.h" +#include "my_task.h" +#include "create_task.h" +#include "beexamined_deviceitem.h" +#include "inspectdataitem.h" +#include "rulefileitem.h" +#include "standard_deviceitem.h" +#include "testdataitem.h" +#include "InfoBase.h" + +InfoManageView::InfoManageView(QWidget *parent) : + QWidget(parent), + ui(new Ui::InfoManageView) +{ + ui->setupUi(this); + this->setWindowTitle("信息管理"); + //初始化调用所有函数 + this->initForm(); + this->initWidget(); + this->initNav(); + this->initIcon(); +} +//左侧滚动条事件 +void InfoManageView::showEvent(QShowEvent *) +{ + //滚动到底部 + QScrollBar *bar = ui->scrollArea->verticalScrollBar(); + bar->setValue(bar->maximum()); +} + +//左侧导航栏样式初始化 +void InfoManageView::initIcon() +{ + //左侧导航样式,可以设置各种牛逼的参数,超级棒 + // IconHelper::StyleColor styleColor; + //styleColor.defaultBorder = true; + // IconHelper::setStyle(ui->widgetLeft, btns, icons, styleColor); +} + +//颜色初始化设置 +QList InfoManageView::colors = QList(); +void InfoManageView::initForm() +{ + //颜色集合供其他界面使用 + colors << QColor(211, 78, 78) << QColor(29, 185, 242) << QColor(170, 162, 119) << QColor(255, 192, 1); + colors << QColor(0, 176, 180) << QColor(0, 113, 193) << QColor(255, 192, 0); + colors << QColor(72, 103, 149) << QColor(185, 87, 86) << QColor(0, 177, 125); + colors << QColor(214, 77, 84) << QColor(71, 164, 233) << QColor(34, 163, 169); + colors << QColor(59, 123, 156) << QColor(162, 121, 197) << QColor(72, 202, 245); + colors << QColor(0, 150, 121) << QColor(111, 9, 176) << QColor(250, 170, 20); + + ui->scrollArea->setFixedWidth(170); + ui->widgetLeft->setProperty("flag", "left"); +} + +//右侧可切换UI导入 +void InfoManageView::initWidget() +{ + ui->stackedWidget->addWidget(new Depar_Task); //部门任务 + ui->stackedWidget->addWidget(new My_Task); //我的任务 + ui->stackedWidget->addWidget(new Create_Task); //创建任务单 + ui->stackedWidget->addWidget(new Standard_DeviceItem); //标准设备管理 + ui->stackedWidget->addWidget(new BeExamined_DeviceItem); //被检设备管理 + ui->stackedWidget->addWidget(new TestDataItem); //检定数据管理 + ui->stackedWidget->addWidget(new InspectDataItem); //核查数据管理 + ui->stackedWidget->addWidget(new RuleFileItem); //技术文件管理 + + +} +//左侧列表信息导入 +void InfoManageView::initNav() +{ + //按钮文字集合 + QStringList names; + names << "部门任务" << "我的任务" << "创建任务单" << "标准设备管理" << "被检设备管理" + << "检定数据管理" << "核查数据管理" << "技术文件管理" ; + + //自动生成按钮 + for (int i = 0; i < names.count(); i++) { + QToolButton *btn = new QToolButton; + //设置按钮固定高度 + btn->setFixedHeight(35); + //设置按钮的文字 + //btn->setText(QString("%1. %2").arg(i + 1, 2, 10, QChar('0')).arg(names.at(i))); + btn->setText(QString("%1").arg(names.at(i))); + //设置按钮可选中按下类似复选框的功能 + btn->setCheckable(true); + //设置按钮图标在左侧文字在右侧 + // btn->setToolButtonStyle(Qt::ToolButtonTextBesideIcon); + //设置按钮拉伸策略为横向填充 + btn->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Preferred); + //关联按钮单击事件 + connect(btn, SIGNAL(clicked(bool)), this, SLOT(buttonClicked())); + //将按钮加入到布局 + ui->widgetLeft->layout()->addWidget(btn); + //可以指定不同的图标 + //icons << 0xf061; + btns << btn; + //设置按钮大小 + btn->setFixedSize(170, 70); + //设置鼠标经过和点击事件 + btn->setStyleSheet("QToolButton:hover " + "{ background-color: rgba(53, 91, 171, 1); }" + "QToolButton::checked { " + "background-color: rgba(53, 91, 171, 1)}"); + + //ui->widgetLeft->setFixedWidth(200); + } + + //底部加个弹簧 + QSpacerItem *verticalSpacer = new QSpacerItem(20, 40, QSizePolicy::Minimum, QSizePolicy::Expanding); + ui->widgetLeft->layout()->addItem(verticalSpacer); + btns.at(names.count() - 1)->click(); +} +//按钮点击切换UI事件 +void InfoManageView::buttonClicked() +{ + QAbstractButton *b = (QAbstractButton *)sender(); + int count = btns.count(); + int index = btns.indexOf(b); + ui->stackedWidget->setCurrentIndex(index); + + + // 获取当前在 QStackedWidget 中的部件 + QWidget* currentWidget = ui->stackedWidget->currentWidget(); + + // 尝试将当前部件转换为 InfoBase 类型 + InfoBase* currQWidget = qobject_cast(currentWidget); + // 检查转换是否成功 + if (currQWidget != nullptr) + { + // 如果转换成功,调用子类Load 方法 + currQWidget->Load(); + } + + for (int i = 0; i < count; i++) { + QAbstractButton *btn = btns.at(i); + btn->setChecked(btn == b); + } +} + +InfoManageView::~InfoManageView() +{ + delete ui; +} diff --git a/softwareDirectory/AutoVerScheme/infomanageview.h b/softwareDirectory/AutoVerScheme/infomanageview.h new file mode 100644 index 0000000..3c1463f --- /dev/null +++ b/softwareDirectory/AutoVerScheme/infomanageview.h @@ -0,0 +1,38 @@ +#ifndef INFOMANAGEVIEW_H +#define INFOMANAGEVIEW_H + +#include + +class QAbstractButton; + + +namespace Ui { +class InfoManageView; +} + +class InfoManageView : public QWidget +{ + Q_OBJECT + +public: + static QList colors; + + explicit InfoManageView(QWidget *parent = nullptr); + ~InfoManageView(); +private slots: + void initForm(); //初始化界面数据 + void initWidget(); //初始化子窗体 + void initNav(); //初始化导航按钮 + void initIcon(); //初始化导航按钮图标 + void buttonClicked(); //导航按钮单击事件 +protected: + void showEvent(QShowEvent *); +private: + Ui::InfoManageView *ui; + + //左侧导航栏图标+按钮集合 + QList icons; + QList btns; +}; + +#endif // INFOMANAGEVIEW_H diff --git a/softwareDirectory/AutoVerScheme/infomanageview.ui b/softwareDirectory/AutoVerScheme/infomanageview.ui new file mode 100644 index 0000000..4b39e7d --- /dev/null +++ b/softwareDirectory/AutoVerScheme/infomanageview.ui @@ -0,0 +1,109 @@ + + + InfoManageView + + + + 0 + 0 + 883 + 644 + + + + Form + + + + 0 + + + 0 + + + 0 + + + 0 + + + 0 + + + + + + 0 + 0 + + + + + 170 + 0 + + + + + 16777215 + 16777215 + + + + color:White; + font-weight: bold; + font-size: 16px; +background-color:rgba(10, 15, 92, 1); + + + true + + + + + 0 + 0 + 170 + 625 + + + + + 170 + 0 + + + + + 170 + 0 + + + + + 0 + + + 0 + + + 0 + + + 0 + + + 0 + + + + + + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/inspectdataitem.cpp b/softwareDirectory/AutoVerScheme/inspectdataitem.cpp new file mode 100644 index 0000000..e9c2adc --- /dev/null +++ b/softwareDirectory/AutoVerScheme/inspectdataitem.cpp @@ -0,0 +1,14 @@ +#include "inspectdataitem.h" +#include "ui_inspectdataitem.h" + +InspectDataItem::InspectDataItem(QWidget *parent) : + QWidget(parent), + ui(new Ui::InspectDataItem) +{ + ui->setupUi(this); +} + +InspectDataItem::~InspectDataItem() +{ + delete ui; +} diff --git a/softwareDirectory/AutoVerScheme/inspectdataitem.h b/softwareDirectory/AutoVerScheme/inspectdataitem.h new file mode 100644 index 0000000..57551bb --- /dev/null +++ b/softwareDirectory/AutoVerScheme/inspectdataitem.h @@ -0,0 +1,22 @@ +#ifndef INSPECTDATAITEM_H +#define INSPECTDATAITEM_H + +#include + +namespace Ui { +class InspectDataItem; +} + +class InspectDataItem : public QWidget +{ + Q_OBJECT + +public: + explicit InspectDataItem(QWidget *parent = nullptr); + ~InspectDataItem(); + +private: + Ui::InspectDataItem *ui; +}; + +#endif // INSPECTDATAITEM_H diff --git a/softwareDirectory/AutoVerScheme/inspectdataitem.ui b/softwareDirectory/AutoVerScheme/inspectdataitem.ui new file mode 100644 index 0000000..45f04e0 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/inspectdataitem.ui @@ -0,0 +1,32 @@ + + + InspectDataItem + + + + 0 + 0 + 400 + 300 + + + + Form + + + + + 120 + 130 + 89 + 24 + + + + 核查数据管理 + + + + + + diff --git a/softwareDirectory/AutoVerScheme/my_task.cpp b/softwareDirectory/AutoVerScheme/my_task.cpp new file mode 100644 index 0000000..40aceb2 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/my_task.cpp @@ -0,0 +1,42 @@ +#include "my_task.h" +#include "ui_my_task.h" +#include "QMessageBox" + +My_Task::My_Task(QWidget *parent) : + InfoBase(parent), + ui(new Ui::My_Task) +{ + ui->setupUi(this); + + this->initForm(); +} + +My_Task::~My_Task() +{ + delete ui; +} +void My_Task::initForm() +{ + + +} +void My_Task::ShowMessageBox(QString title,QString value) { + // 创建一个QMessageBox对象 + QMessageBox msgBox; + + // 设置消息框的标题 + msgBox.setWindowTitle(title); + + // 设置消息框的文本内容 + msgBox.setText(value); + + // 设置消息框的标准按钮,这里是“确定”按钮 + msgBox.setStandardButtons(QMessageBox::Ok); + + // 显示消息框 + msgBox.exec(); +} +void My_Task::Load() +{ + ShowMessageBox("我的任务页面","我的任务初始化完成"); +} diff --git a/softwareDirectory/AutoVerScheme/my_task.h b/softwareDirectory/AutoVerScheme/my_task.h new file mode 100644 index 0000000..d6600cb --- /dev/null +++ b/softwareDirectory/AutoVerScheme/my_task.h @@ -0,0 +1,28 @@ +#ifndef MY_TASK_H +#define MY_TASK_H + +#include +#include "InfoBase.h" + +namespace Ui { +class My_Task; +} + +class My_Task :public InfoBase +{ + Q_OBJECT + +public: + explicit My_Task(QWidget *parent = nullptr); + ~My_Task(); + + +private slots: + void initForm(); //初始化界面数据 + void ShowMessageBox(QString title,QString value); + void Load() override; +private: + Ui::My_Task *ui; +}; + +#endif // MY_TASK_H diff --git a/softwareDirectory/AutoVerScheme/my_task.ui b/softwareDirectory/AutoVerScheme/my_task.ui new file mode 100644 index 0000000..89245b8 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/my_task.ui @@ -0,0 +1,178 @@ + + + My_Task + + + + 0 + 0 + 857 + 511 + + + + Form + + + + + + + 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 + + + + 要求完成时间: + + + + + + + + + + 查询 + + + + + + + 重置 + + + + + + + + + + background-color:white; + + + + + + + + + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro index 5b8f852..fa0d8e5 100644 --- a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro @@ -1,5 +1,7 @@ QT += core gui QT += sql +QT += widgets + greaterThan(QT_MAJOR_VERSION, 4): QT += widgets CONFIG += c++11 @@ -16,22 +18,50 @@ #DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 SOURCES += \ + beexamined_deviceitem.cpp \ + create_task.cpp \ + depar_task.cpp \ indexwindow.cpp \ + infomanageview.cpp \ + inspectdataitem.cpp \ loginwindow.cpp \ main.cpp \ mainwindow.cpp \ + my_task.cpp \ + rulefileitem.cpp \ + standard_deviceitem.cpp \ + testdataitem.cpp \ testview.cpp HEADERS += \ + InfoBase.h \ + beexamined_deviceitem.h \ + create_task.h \ + depar_task.h \ indexwindow.h \ + infomanageview.h \ + inspectdataitem.h \ loginwindow.h \ mainwindow.h \ + my_task.h \ + rulefileitem.h \ + standard_deviceitem.h \ + testdataitem.h \ testview.h FORMS += \ + beexamined_deviceitem.ui \ + create_task.ui \ + depar_task.ui \ indexwindow.ui \ + infomanageview.ui \ + inspectdataitem.ui \ loginwindow.ui \ mainwindow.ui \ + my_task.ui \ + rulefileitem.ui \ + standard_deviceitem.ui \ + testdataitem.ui \ testview.ui # Default rules for deployment. diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user index 1f5ec64..32d22e9 100644 --- a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user @@ -1,6 +1,6 @@ - + EnvironmentId @@ -64,249 +64,6 @@ ProjectExplorer.Project.Target.0 - Desktop Qt 5.14.2 MinGW 64-bit - Desktop Qt 5.14.2 MinGW 64-bit - qt.qt5.5142.win64_mingw73_kit - 0 - 0 - 0 - - 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 - - Qt4ProjectManager.Qt4RunConfiguration:D:/Auto_verification_scheme/AutoVerScheme/AutoVerScheme.pro - D:/Auto_verification_scheme/AutoVerScheme/AutoVerScheme.pro - - false - - false - true - true - false - false - true - - D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Debug - - 1 - - - - ProjectExplorer.Project.Target.1 - Desktop Qt 5.14.2 MinGW 32-bit Desktop Qt 5.14.2 MinGW 32-bit qt.qt5.5142.win32_mingw73_kit @@ -530,8 +287,252 @@ 2 - Qt4ProjectManager.Qt4RunConfiguration:D:/Auto_verification_scheme/AutoVerScheme/AutoVerScheme.pro - D:/Auto_verification_scheme/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 + + 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 diff --git a/softwareDirectory/AutoVerScheme/InfoBase.cpp b/softwareDirectory/AutoVerScheme/InfoBase.cpp new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/InfoBase.cpp diff --git a/softwareDirectory/AutoVerScheme/InfoBase.h b/softwareDirectory/AutoVerScheme/InfoBase.h new file mode 100644 index 0000000..7fec63e --- /dev/null +++ b/softwareDirectory/AutoVerScheme/InfoBase.h @@ -0,0 +1,16 @@ +#ifndef INFOBASE_H +#define INFOBASE_H + +#include +///信号管理页面的基类 所有信息管理页面都继承于InfoBase +/// 便于统一管理 所有子类必须实现Load方法 +/// 每次按钮点击切换都会调用Load方法 用于每次页面的数据刷新 +class InfoBase : public QWidget { + Q_OBJECT +public: + InfoBase(QWidget *parent = nullptr): QWidget(parent){}; + // 纯虚函数 + virtual void Load()=0; +}; +#endif // INFOBASE_H + diff --git a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.cpp b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.cpp new file mode 100644 index 0000000..7ac1e87 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.cpp @@ -0,0 +1,14 @@ +#include "beexamined_deviceitem.h" +#include "ui_beexamined_deviceitem.h" + +BeExamined_DeviceItem::BeExamined_DeviceItem(QWidget *parent) : + QWidget(parent), + ui(new Ui::BeExamined_DeviceItem) +{ + ui->setupUi(this); +} + +BeExamined_DeviceItem::~BeExamined_DeviceItem() +{ + delete ui; +} diff --git a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.h b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.h new file mode 100644 index 0000000..76b061d --- /dev/null +++ b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.h @@ -0,0 +1,22 @@ +#ifndef BEEXAMINED_DEVICEITEM_H +#define BEEXAMINED_DEVICEITEM_H + +#include + +namespace Ui { +class BeExamined_DeviceItem; +} + +class BeExamined_DeviceItem : public QWidget +{ + Q_OBJECT + +public: + explicit BeExamined_DeviceItem(QWidget *parent = nullptr); + ~BeExamined_DeviceItem(); + +private: + Ui::BeExamined_DeviceItem *ui; +}; + +#endif // BEEXAMINED_DEVICEITEM_H diff --git a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.ui b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.ui new file mode 100644 index 0000000..af9f7bf --- /dev/null +++ b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.ui @@ -0,0 +1,32 @@ + + + BeExamined_DeviceItem + + + + 0 + 0 + 400 + 300 + + + + Form + + + + + 130 + 140 + 89 + 24 + + + + 被检设备管理 + + + + + + diff --git a/softwareDirectory/AutoVerScheme/create_task.cpp b/softwareDirectory/AutoVerScheme/create_task.cpp new file mode 100644 index 0000000..4193efc --- /dev/null +++ b/softwareDirectory/AutoVerScheme/create_task.cpp @@ -0,0 +1,14 @@ +#include "create_task.h" +#include "ui_create_task.h" + +Create_Task::Create_Task(QWidget *parent) : + QWidget(parent), + ui(new Ui::Create_Task) +{ + ui->setupUi(this); +} + +Create_Task::~Create_Task() +{ + delete ui; +} diff --git a/softwareDirectory/AutoVerScheme/create_task.h b/softwareDirectory/AutoVerScheme/create_task.h new file mode 100644 index 0000000..e2264de --- /dev/null +++ b/softwareDirectory/AutoVerScheme/create_task.h @@ -0,0 +1,22 @@ +#ifndef CREATE_TASK_H +#define CREATE_TASK_H + +#include + +namespace Ui { +class Create_Task; +} + +class Create_Task : public QWidget +{ + Q_OBJECT + +public: + explicit Create_Task(QWidget *parent = nullptr); + ~Create_Task(); + +private: + Ui::Create_Task *ui; +}; + +#endif // CREATE_TASK_H diff --git a/softwareDirectory/AutoVerScheme/create_task.ui b/softwareDirectory/AutoVerScheme/create_task.ui new file mode 100644 index 0000000..b79c6a1 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/create_task.ui @@ -0,0 +1,35 @@ + + + Create_Task + + + + 0 + 0 + 400 + 300 + + + + Form + + + background-color:red; + + + + + 140 + 120 + 89 + 24 + + + + 创建任务单 + + + + + + diff --git a/softwareDirectory/AutoVerScheme/depar_task.cpp b/softwareDirectory/AutoVerScheme/depar_task.cpp new file mode 100644 index 0000000..de39775 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/depar_task.cpp @@ -0,0 +1,42 @@ +#include "depar_task.h" +#include "ui_depar_task.h" +#include "QMessageBox" +#include "InfoBase.h" + +Depar_Task::Depar_Task(QWidget *parent) : + InfoBase(parent), + ui(new Ui::Depar_Task) +{ + ui->setupUi(this); + this->initForm(); +} + +Depar_Task::~Depar_Task() +{ + delete ui; +} +void Depar_Task::initForm() +{ + + //ShowMessageBox("标题","初始化完成"); +} +void Depar_Task::ShowMessageBox(QString title,QString value) { + // 创建一个QMessageBox对象 + QMessageBox msgBox; + + // 设置消息框的标题 + msgBox.setWindowTitle(title); + + // 设置消息框的文本内容 + msgBox.setText(value); + + // 设置消息框的标准按钮,这里是“确定”按钮 + msgBox.setStandardButtons(QMessageBox::Ok); + + // 显示消息框 + msgBox.exec(); +} +void Depar_Task::Load() +{ + ShowMessageBox("部门任务页面","部门任务初始化完成"); +} diff --git a/softwareDirectory/AutoVerScheme/depar_task.h b/softwareDirectory/AutoVerScheme/depar_task.h new file mode 100644 index 0000000..8716faf --- /dev/null +++ b/softwareDirectory/AutoVerScheme/depar_task.h @@ -0,0 +1,28 @@ +#ifndef DEPAR_TASK_H +#define DEPAR_TASK_H + + +#include "InfoBase.h" + +namespace Ui { +class Depar_Task; +} + +class Depar_Task :public InfoBase +{ + Q_OBJECT + +public: + Depar_Task(QWidget *parent = nullptr); + ~Depar_Task(); + + +private slots: + void initForm(); //初始化界面数据 + void ShowMessageBox(QString title,QString value); + void Load() override; +private: + Ui::Depar_Task *ui; +}; + +#endif // DEPAR_TASK_H diff --git a/softwareDirectory/AutoVerScheme/depar_task.ui b/softwareDirectory/AutoVerScheme/depar_task.ui new file mode 100644 index 0000000..ff3d44f --- /dev/null +++ b/softwareDirectory/AutoVerScheme/depar_task.ui @@ -0,0 +1,181 @@ + + + Depar_Task + + + + 0 + 0 + 1184 + 456 + + + + Form + + + color:black; + + + + + + + 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 + + + + 要求完成时间: + + + + + + + + + + 查询 + + + + + + + 重置 + + + + + + + + + + background-color:white; + + + + + + + + + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/indexwindow.cpp b/softwareDirectory/AutoVerScheme/indexwindow.cpp index 3e52c7b..9bd65b1 100644 --- a/softwareDirectory/AutoVerScheme/indexwindow.cpp +++ b/softwareDirectory/AutoVerScheme/indexwindow.cpp @@ -21,6 +21,7 @@ //调用样式 loadStyle(":/qss/Index.css"); + } void IndexWindow::loadStyle(const QString &qssFile) diff --git a/softwareDirectory/AutoVerScheme/infomanageview.cpp b/softwareDirectory/AutoVerScheme/infomanageview.cpp new file mode 100644 index 0000000..a206c6f --- /dev/null +++ b/softwareDirectory/AutoVerScheme/infomanageview.cpp @@ -0,0 +1,150 @@ +#include "infomanageview.h" +#include "ui_infomanageview.h" +#include +#include +//子窗体 +#include "depar_task.h" +#include "my_task.h" +#include "create_task.h" +#include "beexamined_deviceitem.h" +#include "inspectdataitem.h" +#include "rulefileitem.h" +#include "standard_deviceitem.h" +#include "testdataitem.h" +#include "InfoBase.h" + +InfoManageView::InfoManageView(QWidget *parent) : + QWidget(parent), + ui(new Ui::InfoManageView) +{ + ui->setupUi(this); + this->setWindowTitle("信息管理"); + //初始化调用所有函数 + this->initForm(); + this->initWidget(); + this->initNav(); + this->initIcon(); +} +//左侧滚动条事件 +void InfoManageView::showEvent(QShowEvent *) +{ + //滚动到底部 + QScrollBar *bar = ui->scrollArea->verticalScrollBar(); + bar->setValue(bar->maximum()); +} + +//左侧导航栏样式初始化 +void InfoManageView::initIcon() +{ + //左侧导航样式,可以设置各种牛逼的参数,超级棒 + // IconHelper::StyleColor styleColor; + //styleColor.defaultBorder = true; + // IconHelper::setStyle(ui->widgetLeft, btns, icons, styleColor); +} + +//颜色初始化设置 +QList InfoManageView::colors = QList(); +void InfoManageView::initForm() +{ + //颜色集合供其他界面使用 + colors << QColor(211, 78, 78) << QColor(29, 185, 242) << QColor(170, 162, 119) << QColor(255, 192, 1); + colors << QColor(0, 176, 180) << QColor(0, 113, 193) << QColor(255, 192, 0); + colors << QColor(72, 103, 149) << QColor(185, 87, 86) << QColor(0, 177, 125); + colors << QColor(214, 77, 84) << QColor(71, 164, 233) << QColor(34, 163, 169); + colors << QColor(59, 123, 156) << QColor(162, 121, 197) << QColor(72, 202, 245); + colors << QColor(0, 150, 121) << QColor(111, 9, 176) << QColor(250, 170, 20); + + ui->scrollArea->setFixedWidth(170); + ui->widgetLeft->setProperty("flag", "left"); +} + +//右侧可切换UI导入 +void InfoManageView::initWidget() +{ + ui->stackedWidget->addWidget(new Depar_Task); //部门任务 + ui->stackedWidget->addWidget(new My_Task); //我的任务 + ui->stackedWidget->addWidget(new Create_Task); //创建任务单 + ui->stackedWidget->addWidget(new Standard_DeviceItem); //标准设备管理 + ui->stackedWidget->addWidget(new BeExamined_DeviceItem); //被检设备管理 + ui->stackedWidget->addWidget(new TestDataItem); //检定数据管理 + ui->stackedWidget->addWidget(new InspectDataItem); //核查数据管理 + ui->stackedWidget->addWidget(new RuleFileItem); //技术文件管理 + + +} +//左侧列表信息导入 +void InfoManageView::initNav() +{ + //按钮文字集合 + QStringList names; + names << "部门任务" << "我的任务" << "创建任务单" << "标准设备管理" << "被检设备管理" + << "检定数据管理" << "核查数据管理" << "技术文件管理" ; + + //自动生成按钮 + for (int i = 0; i < names.count(); i++) { + QToolButton *btn = new QToolButton; + //设置按钮固定高度 + btn->setFixedHeight(35); + //设置按钮的文字 + //btn->setText(QString("%1. %2").arg(i + 1, 2, 10, QChar('0')).arg(names.at(i))); + btn->setText(QString("%1").arg(names.at(i))); + //设置按钮可选中按下类似复选框的功能 + btn->setCheckable(true); + //设置按钮图标在左侧文字在右侧 + // btn->setToolButtonStyle(Qt::ToolButtonTextBesideIcon); + //设置按钮拉伸策略为横向填充 + btn->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Preferred); + //关联按钮单击事件 + connect(btn, SIGNAL(clicked(bool)), this, SLOT(buttonClicked())); + //将按钮加入到布局 + ui->widgetLeft->layout()->addWidget(btn); + //可以指定不同的图标 + //icons << 0xf061; + btns << btn; + //设置按钮大小 + btn->setFixedSize(170, 70); + //设置鼠标经过和点击事件 + btn->setStyleSheet("QToolButton:hover " + "{ background-color: rgba(53, 91, 171, 1); }" + "QToolButton::checked { " + "background-color: rgba(53, 91, 171, 1)}"); + + //ui->widgetLeft->setFixedWidth(200); + } + + //底部加个弹簧 + QSpacerItem *verticalSpacer = new QSpacerItem(20, 40, QSizePolicy::Minimum, QSizePolicy::Expanding); + ui->widgetLeft->layout()->addItem(verticalSpacer); + btns.at(names.count() - 1)->click(); +} +//按钮点击切换UI事件 +void InfoManageView::buttonClicked() +{ + QAbstractButton *b = (QAbstractButton *)sender(); + int count = btns.count(); + int index = btns.indexOf(b); + ui->stackedWidget->setCurrentIndex(index); + + + // 获取当前在 QStackedWidget 中的部件 + QWidget* currentWidget = ui->stackedWidget->currentWidget(); + + // 尝试将当前部件转换为 InfoBase 类型 + InfoBase* currQWidget = qobject_cast(currentWidget); + // 检查转换是否成功 + if (currQWidget != nullptr) + { + // 如果转换成功,调用子类Load 方法 + currQWidget->Load(); + } + + for (int i = 0; i < count; i++) { + QAbstractButton *btn = btns.at(i); + btn->setChecked(btn == b); + } +} + +InfoManageView::~InfoManageView() +{ + delete ui; +} diff --git a/softwareDirectory/AutoVerScheme/infomanageview.h b/softwareDirectory/AutoVerScheme/infomanageview.h new file mode 100644 index 0000000..3c1463f --- /dev/null +++ b/softwareDirectory/AutoVerScheme/infomanageview.h @@ -0,0 +1,38 @@ +#ifndef INFOMANAGEVIEW_H +#define INFOMANAGEVIEW_H + +#include + +class QAbstractButton; + + +namespace Ui { +class InfoManageView; +} + +class InfoManageView : public QWidget +{ + Q_OBJECT + +public: + static QList colors; + + explicit InfoManageView(QWidget *parent = nullptr); + ~InfoManageView(); +private slots: + void initForm(); //初始化界面数据 + void initWidget(); //初始化子窗体 + void initNav(); //初始化导航按钮 + void initIcon(); //初始化导航按钮图标 + void buttonClicked(); //导航按钮单击事件 +protected: + void showEvent(QShowEvent *); +private: + Ui::InfoManageView *ui; + + //左侧导航栏图标+按钮集合 + QList icons; + QList btns; +}; + +#endif // INFOMANAGEVIEW_H diff --git a/softwareDirectory/AutoVerScheme/infomanageview.ui b/softwareDirectory/AutoVerScheme/infomanageview.ui new file mode 100644 index 0000000..4b39e7d --- /dev/null +++ b/softwareDirectory/AutoVerScheme/infomanageview.ui @@ -0,0 +1,109 @@ + + + InfoManageView + + + + 0 + 0 + 883 + 644 + + + + Form + + + + 0 + + + 0 + + + 0 + + + 0 + + + 0 + + + + + + 0 + 0 + + + + + 170 + 0 + + + + + 16777215 + 16777215 + + + + color:White; + font-weight: bold; + font-size: 16px; +background-color:rgba(10, 15, 92, 1); + + + true + + + + + 0 + 0 + 170 + 625 + + + + + 170 + 0 + + + + + 170 + 0 + + + + + 0 + + + 0 + + + 0 + + + 0 + + + 0 + + + + + + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/inspectdataitem.cpp b/softwareDirectory/AutoVerScheme/inspectdataitem.cpp new file mode 100644 index 0000000..e9c2adc --- /dev/null +++ b/softwareDirectory/AutoVerScheme/inspectdataitem.cpp @@ -0,0 +1,14 @@ +#include "inspectdataitem.h" +#include "ui_inspectdataitem.h" + +InspectDataItem::InspectDataItem(QWidget *parent) : + QWidget(parent), + ui(new Ui::InspectDataItem) +{ + ui->setupUi(this); +} + +InspectDataItem::~InspectDataItem() +{ + delete ui; +} diff --git a/softwareDirectory/AutoVerScheme/inspectdataitem.h b/softwareDirectory/AutoVerScheme/inspectdataitem.h new file mode 100644 index 0000000..57551bb --- /dev/null +++ b/softwareDirectory/AutoVerScheme/inspectdataitem.h @@ -0,0 +1,22 @@ +#ifndef INSPECTDATAITEM_H +#define INSPECTDATAITEM_H + +#include + +namespace Ui { +class InspectDataItem; +} + +class InspectDataItem : public QWidget +{ + Q_OBJECT + +public: + explicit InspectDataItem(QWidget *parent = nullptr); + ~InspectDataItem(); + +private: + Ui::InspectDataItem *ui; +}; + +#endif // INSPECTDATAITEM_H diff --git a/softwareDirectory/AutoVerScheme/inspectdataitem.ui b/softwareDirectory/AutoVerScheme/inspectdataitem.ui new file mode 100644 index 0000000..45f04e0 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/inspectdataitem.ui @@ -0,0 +1,32 @@ + + + InspectDataItem + + + + 0 + 0 + 400 + 300 + + + + Form + + + + + 120 + 130 + 89 + 24 + + + + 核查数据管理 + + + + + + diff --git a/softwareDirectory/AutoVerScheme/my_task.cpp b/softwareDirectory/AutoVerScheme/my_task.cpp new file mode 100644 index 0000000..40aceb2 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/my_task.cpp @@ -0,0 +1,42 @@ +#include "my_task.h" +#include "ui_my_task.h" +#include "QMessageBox" + +My_Task::My_Task(QWidget *parent) : + InfoBase(parent), + ui(new Ui::My_Task) +{ + ui->setupUi(this); + + this->initForm(); +} + +My_Task::~My_Task() +{ + delete ui; +} +void My_Task::initForm() +{ + + +} +void My_Task::ShowMessageBox(QString title,QString value) { + // 创建一个QMessageBox对象 + QMessageBox msgBox; + + // 设置消息框的标题 + msgBox.setWindowTitle(title); + + // 设置消息框的文本内容 + msgBox.setText(value); + + // 设置消息框的标准按钮,这里是“确定”按钮 + msgBox.setStandardButtons(QMessageBox::Ok); + + // 显示消息框 + msgBox.exec(); +} +void My_Task::Load() +{ + ShowMessageBox("我的任务页面","我的任务初始化完成"); +} diff --git a/softwareDirectory/AutoVerScheme/my_task.h b/softwareDirectory/AutoVerScheme/my_task.h new file mode 100644 index 0000000..d6600cb --- /dev/null +++ b/softwareDirectory/AutoVerScheme/my_task.h @@ -0,0 +1,28 @@ +#ifndef MY_TASK_H +#define MY_TASK_H + +#include +#include "InfoBase.h" + +namespace Ui { +class My_Task; +} + +class My_Task :public InfoBase +{ + Q_OBJECT + +public: + explicit My_Task(QWidget *parent = nullptr); + ~My_Task(); + + +private slots: + void initForm(); //初始化界面数据 + void ShowMessageBox(QString title,QString value); + void Load() override; +private: + Ui::My_Task *ui; +}; + +#endif // MY_TASK_H diff --git a/softwareDirectory/AutoVerScheme/my_task.ui b/softwareDirectory/AutoVerScheme/my_task.ui new file mode 100644 index 0000000..89245b8 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/my_task.ui @@ -0,0 +1,178 @@ + + + My_Task + + + + 0 + 0 + 857 + 511 + + + + Form + + + + + + + 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 + + + + 要求完成时间: + + + + + + + + + + 查询 + + + + + + + 重置 + + + + + + + + + + background-color:white; + + + + + + + + + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/rulefileitem.cpp b/softwareDirectory/AutoVerScheme/rulefileitem.cpp new file mode 100644 index 0000000..6f9ddd3 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/rulefileitem.cpp @@ -0,0 +1,14 @@ +#include "rulefileitem.h" +#include "ui_rulefileitem.h" + +RuleFileItem::RuleFileItem(QWidget *parent) : + QWidget(parent), + ui(new Ui::RuleFileItem) +{ + ui->setupUi(this); +} + +RuleFileItem::~RuleFileItem() +{ + delete ui; +} diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro index 5b8f852..fa0d8e5 100644 --- a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro @@ -1,5 +1,7 @@ QT += core gui QT += sql +QT += widgets + greaterThan(QT_MAJOR_VERSION, 4): QT += widgets CONFIG += c++11 @@ -16,22 +18,50 @@ #DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 SOURCES += \ + beexamined_deviceitem.cpp \ + create_task.cpp \ + depar_task.cpp \ indexwindow.cpp \ + infomanageview.cpp \ + inspectdataitem.cpp \ loginwindow.cpp \ main.cpp \ mainwindow.cpp \ + my_task.cpp \ + rulefileitem.cpp \ + standard_deviceitem.cpp \ + testdataitem.cpp \ testview.cpp HEADERS += \ + InfoBase.h \ + beexamined_deviceitem.h \ + create_task.h \ + depar_task.h \ indexwindow.h \ + infomanageview.h \ + inspectdataitem.h \ loginwindow.h \ mainwindow.h \ + my_task.h \ + rulefileitem.h \ + standard_deviceitem.h \ + testdataitem.h \ testview.h FORMS += \ + beexamined_deviceitem.ui \ + create_task.ui \ + depar_task.ui \ indexwindow.ui \ + infomanageview.ui \ + inspectdataitem.ui \ loginwindow.ui \ mainwindow.ui \ + my_task.ui \ + rulefileitem.ui \ + standard_deviceitem.ui \ + testdataitem.ui \ testview.ui # Default rules for deployment. diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user index 1f5ec64..32d22e9 100644 --- a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user @@ -1,6 +1,6 @@ - + EnvironmentId @@ -64,249 +64,6 @@ ProjectExplorer.Project.Target.0 - Desktop Qt 5.14.2 MinGW 64-bit - Desktop Qt 5.14.2 MinGW 64-bit - qt.qt5.5142.win64_mingw73_kit - 0 - 0 - 0 - - 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 - - Qt4ProjectManager.Qt4RunConfiguration:D:/Auto_verification_scheme/AutoVerScheme/AutoVerScheme.pro - D:/Auto_verification_scheme/AutoVerScheme/AutoVerScheme.pro - - false - - false - true - true - false - false - true - - D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Debug - - 1 - - - - ProjectExplorer.Project.Target.1 - Desktop Qt 5.14.2 MinGW 32-bit Desktop Qt 5.14.2 MinGW 32-bit qt.qt5.5142.win32_mingw73_kit @@ -530,8 +287,252 @@ 2 - Qt4ProjectManager.Qt4RunConfiguration:D:/Auto_verification_scheme/AutoVerScheme/AutoVerScheme.pro - D:/Auto_verification_scheme/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 + + 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 diff --git a/softwareDirectory/AutoVerScheme/InfoBase.cpp b/softwareDirectory/AutoVerScheme/InfoBase.cpp new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/InfoBase.cpp diff --git a/softwareDirectory/AutoVerScheme/InfoBase.h b/softwareDirectory/AutoVerScheme/InfoBase.h new file mode 100644 index 0000000..7fec63e --- /dev/null +++ b/softwareDirectory/AutoVerScheme/InfoBase.h @@ -0,0 +1,16 @@ +#ifndef INFOBASE_H +#define INFOBASE_H + +#include +///信号管理页面的基类 所有信息管理页面都继承于InfoBase +/// 便于统一管理 所有子类必须实现Load方法 +/// 每次按钮点击切换都会调用Load方法 用于每次页面的数据刷新 +class InfoBase : public QWidget { + Q_OBJECT +public: + InfoBase(QWidget *parent = nullptr): QWidget(parent){}; + // 纯虚函数 + virtual void Load()=0; +}; +#endif // INFOBASE_H + diff --git a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.cpp b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.cpp new file mode 100644 index 0000000..7ac1e87 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.cpp @@ -0,0 +1,14 @@ +#include "beexamined_deviceitem.h" +#include "ui_beexamined_deviceitem.h" + +BeExamined_DeviceItem::BeExamined_DeviceItem(QWidget *parent) : + QWidget(parent), + ui(new Ui::BeExamined_DeviceItem) +{ + ui->setupUi(this); +} + +BeExamined_DeviceItem::~BeExamined_DeviceItem() +{ + delete ui; +} diff --git a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.h b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.h new file mode 100644 index 0000000..76b061d --- /dev/null +++ b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.h @@ -0,0 +1,22 @@ +#ifndef BEEXAMINED_DEVICEITEM_H +#define BEEXAMINED_DEVICEITEM_H + +#include + +namespace Ui { +class BeExamined_DeviceItem; +} + +class BeExamined_DeviceItem : public QWidget +{ + Q_OBJECT + +public: + explicit BeExamined_DeviceItem(QWidget *parent = nullptr); + ~BeExamined_DeviceItem(); + +private: + Ui::BeExamined_DeviceItem *ui; +}; + +#endif // BEEXAMINED_DEVICEITEM_H diff --git a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.ui b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.ui new file mode 100644 index 0000000..af9f7bf --- /dev/null +++ b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.ui @@ -0,0 +1,32 @@ + + + BeExamined_DeviceItem + + + + 0 + 0 + 400 + 300 + + + + Form + + + + + 130 + 140 + 89 + 24 + + + + 被检设备管理 + + + + + + diff --git a/softwareDirectory/AutoVerScheme/create_task.cpp b/softwareDirectory/AutoVerScheme/create_task.cpp new file mode 100644 index 0000000..4193efc --- /dev/null +++ b/softwareDirectory/AutoVerScheme/create_task.cpp @@ -0,0 +1,14 @@ +#include "create_task.h" +#include "ui_create_task.h" + +Create_Task::Create_Task(QWidget *parent) : + QWidget(parent), + ui(new Ui::Create_Task) +{ + ui->setupUi(this); +} + +Create_Task::~Create_Task() +{ + delete ui; +} diff --git a/softwareDirectory/AutoVerScheme/create_task.h b/softwareDirectory/AutoVerScheme/create_task.h new file mode 100644 index 0000000..e2264de --- /dev/null +++ b/softwareDirectory/AutoVerScheme/create_task.h @@ -0,0 +1,22 @@ +#ifndef CREATE_TASK_H +#define CREATE_TASK_H + +#include + +namespace Ui { +class Create_Task; +} + +class Create_Task : public QWidget +{ + Q_OBJECT + +public: + explicit Create_Task(QWidget *parent = nullptr); + ~Create_Task(); + +private: + Ui::Create_Task *ui; +}; + +#endif // CREATE_TASK_H diff --git a/softwareDirectory/AutoVerScheme/create_task.ui b/softwareDirectory/AutoVerScheme/create_task.ui new file mode 100644 index 0000000..b79c6a1 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/create_task.ui @@ -0,0 +1,35 @@ + + + Create_Task + + + + 0 + 0 + 400 + 300 + + + + Form + + + background-color:red; + + + + + 140 + 120 + 89 + 24 + + + + 创建任务单 + + + + + + diff --git a/softwareDirectory/AutoVerScheme/depar_task.cpp b/softwareDirectory/AutoVerScheme/depar_task.cpp new file mode 100644 index 0000000..de39775 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/depar_task.cpp @@ -0,0 +1,42 @@ +#include "depar_task.h" +#include "ui_depar_task.h" +#include "QMessageBox" +#include "InfoBase.h" + +Depar_Task::Depar_Task(QWidget *parent) : + InfoBase(parent), + ui(new Ui::Depar_Task) +{ + ui->setupUi(this); + this->initForm(); +} + +Depar_Task::~Depar_Task() +{ + delete ui; +} +void Depar_Task::initForm() +{ + + //ShowMessageBox("标题","初始化完成"); +} +void Depar_Task::ShowMessageBox(QString title,QString value) { + // 创建一个QMessageBox对象 + QMessageBox msgBox; + + // 设置消息框的标题 + msgBox.setWindowTitle(title); + + // 设置消息框的文本内容 + msgBox.setText(value); + + // 设置消息框的标准按钮,这里是“确定”按钮 + msgBox.setStandardButtons(QMessageBox::Ok); + + // 显示消息框 + msgBox.exec(); +} +void Depar_Task::Load() +{ + ShowMessageBox("部门任务页面","部门任务初始化完成"); +} diff --git a/softwareDirectory/AutoVerScheme/depar_task.h b/softwareDirectory/AutoVerScheme/depar_task.h new file mode 100644 index 0000000..8716faf --- /dev/null +++ b/softwareDirectory/AutoVerScheme/depar_task.h @@ -0,0 +1,28 @@ +#ifndef DEPAR_TASK_H +#define DEPAR_TASK_H + + +#include "InfoBase.h" + +namespace Ui { +class Depar_Task; +} + +class Depar_Task :public InfoBase +{ + Q_OBJECT + +public: + Depar_Task(QWidget *parent = nullptr); + ~Depar_Task(); + + +private slots: + void initForm(); //初始化界面数据 + void ShowMessageBox(QString title,QString value); + void Load() override; +private: + Ui::Depar_Task *ui; +}; + +#endif // DEPAR_TASK_H diff --git a/softwareDirectory/AutoVerScheme/depar_task.ui b/softwareDirectory/AutoVerScheme/depar_task.ui new file mode 100644 index 0000000..ff3d44f --- /dev/null +++ b/softwareDirectory/AutoVerScheme/depar_task.ui @@ -0,0 +1,181 @@ + + + Depar_Task + + + + 0 + 0 + 1184 + 456 + + + + Form + + + color:black; + + + + + + + 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 + + + + 要求完成时间: + + + + + + + + + + 查询 + + + + + + + 重置 + + + + + + + + + + background-color:white; + + + + + + + + + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/indexwindow.cpp b/softwareDirectory/AutoVerScheme/indexwindow.cpp index 3e52c7b..9bd65b1 100644 --- a/softwareDirectory/AutoVerScheme/indexwindow.cpp +++ b/softwareDirectory/AutoVerScheme/indexwindow.cpp @@ -21,6 +21,7 @@ //调用样式 loadStyle(":/qss/Index.css"); + } void IndexWindow::loadStyle(const QString &qssFile) diff --git a/softwareDirectory/AutoVerScheme/infomanageview.cpp b/softwareDirectory/AutoVerScheme/infomanageview.cpp new file mode 100644 index 0000000..a206c6f --- /dev/null +++ b/softwareDirectory/AutoVerScheme/infomanageview.cpp @@ -0,0 +1,150 @@ +#include "infomanageview.h" +#include "ui_infomanageview.h" +#include +#include +//子窗体 +#include "depar_task.h" +#include "my_task.h" +#include "create_task.h" +#include "beexamined_deviceitem.h" +#include "inspectdataitem.h" +#include "rulefileitem.h" +#include "standard_deviceitem.h" +#include "testdataitem.h" +#include "InfoBase.h" + +InfoManageView::InfoManageView(QWidget *parent) : + QWidget(parent), + ui(new Ui::InfoManageView) +{ + ui->setupUi(this); + this->setWindowTitle("信息管理"); + //初始化调用所有函数 + this->initForm(); + this->initWidget(); + this->initNav(); + this->initIcon(); +} +//左侧滚动条事件 +void InfoManageView::showEvent(QShowEvent *) +{ + //滚动到底部 + QScrollBar *bar = ui->scrollArea->verticalScrollBar(); + bar->setValue(bar->maximum()); +} + +//左侧导航栏样式初始化 +void InfoManageView::initIcon() +{ + //左侧导航样式,可以设置各种牛逼的参数,超级棒 + // IconHelper::StyleColor styleColor; + //styleColor.defaultBorder = true; + // IconHelper::setStyle(ui->widgetLeft, btns, icons, styleColor); +} + +//颜色初始化设置 +QList InfoManageView::colors = QList(); +void InfoManageView::initForm() +{ + //颜色集合供其他界面使用 + colors << QColor(211, 78, 78) << QColor(29, 185, 242) << QColor(170, 162, 119) << QColor(255, 192, 1); + colors << QColor(0, 176, 180) << QColor(0, 113, 193) << QColor(255, 192, 0); + colors << QColor(72, 103, 149) << QColor(185, 87, 86) << QColor(0, 177, 125); + colors << QColor(214, 77, 84) << QColor(71, 164, 233) << QColor(34, 163, 169); + colors << QColor(59, 123, 156) << QColor(162, 121, 197) << QColor(72, 202, 245); + colors << QColor(0, 150, 121) << QColor(111, 9, 176) << QColor(250, 170, 20); + + ui->scrollArea->setFixedWidth(170); + ui->widgetLeft->setProperty("flag", "left"); +} + +//右侧可切换UI导入 +void InfoManageView::initWidget() +{ + ui->stackedWidget->addWidget(new Depar_Task); //部门任务 + ui->stackedWidget->addWidget(new My_Task); //我的任务 + ui->stackedWidget->addWidget(new Create_Task); //创建任务单 + ui->stackedWidget->addWidget(new Standard_DeviceItem); //标准设备管理 + ui->stackedWidget->addWidget(new BeExamined_DeviceItem); //被检设备管理 + ui->stackedWidget->addWidget(new TestDataItem); //检定数据管理 + ui->stackedWidget->addWidget(new InspectDataItem); //核查数据管理 + ui->stackedWidget->addWidget(new RuleFileItem); //技术文件管理 + + +} +//左侧列表信息导入 +void InfoManageView::initNav() +{ + //按钮文字集合 + QStringList names; + names << "部门任务" << "我的任务" << "创建任务单" << "标准设备管理" << "被检设备管理" + << "检定数据管理" << "核查数据管理" << "技术文件管理" ; + + //自动生成按钮 + for (int i = 0; i < names.count(); i++) { + QToolButton *btn = new QToolButton; + //设置按钮固定高度 + btn->setFixedHeight(35); + //设置按钮的文字 + //btn->setText(QString("%1. %2").arg(i + 1, 2, 10, QChar('0')).arg(names.at(i))); + btn->setText(QString("%1").arg(names.at(i))); + //设置按钮可选中按下类似复选框的功能 + btn->setCheckable(true); + //设置按钮图标在左侧文字在右侧 + // btn->setToolButtonStyle(Qt::ToolButtonTextBesideIcon); + //设置按钮拉伸策略为横向填充 + btn->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Preferred); + //关联按钮单击事件 + connect(btn, SIGNAL(clicked(bool)), this, SLOT(buttonClicked())); + //将按钮加入到布局 + ui->widgetLeft->layout()->addWidget(btn); + //可以指定不同的图标 + //icons << 0xf061; + btns << btn; + //设置按钮大小 + btn->setFixedSize(170, 70); + //设置鼠标经过和点击事件 + btn->setStyleSheet("QToolButton:hover " + "{ background-color: rgba(53, 91, 171, 1); }" + "QToolButton::checked { " + "background-color: rgba(53, 91, 171, 1)}"); + + //ui->widgetLeft->setFixedWidth(200); + } + + //底部加个弹簧 + QSpacerItem *verticalSpacer = new QSpacerItem(20, 40, QSizePolicy::Minimum, QSizePolicy::Expanding); + ui->widgetLeft->layout()->addItem(verticalSpacer); + btns.at(names.count() - 1)->click(); +} +//按钮点击切换UI事件 +void InfoManageView::buttonClicked() +{ + QAbstractButton *b = (QAbstractButton *)sender(); + int count = btns.count(); + int index = btns.indexOf(b); + ui->stackedWidget->setCurrentIndex(index); + + + // 获取当前在 QStackedWidget 中的部件 + QWidget* currentWidget = ui->stackedWidget->currentWidget(); + + // 尝试将当前部件转换为 InfoBase 类型 + InfoBase* currQWidget = qobject_cast(currentWidget); + // 检查转换是否成功 + if (currQWidget != nullptr) + { + // 如果转换成功,调用子类Load 方法 + currQWidget->Load(); + } + + for (int i = 0; i < count; i++) { + QAbstractButton *btn = btns.at(i); + btn->setChecked(btn == b); + } +} + +InfoManageView::~InfoManageView() +{ + delete ui; +} diff --git a/softwareDirectory/AutoVerScheme/infomanageview.h b/softwareDirectory/AutoVerScheme/infomanageview.h new file mode 100644 index 0000000..3c1463f --- /dev/null +++ b/softwareDirectory/AutoVerScheme/infomanageview.h @@ -0,0 +1,38 @@ +#ifndef INFOMANAGEVIEW_H +#define INFOMANAGEVIEW_H + +#include + +class QAbstractButton; + + +namespace Ui { +class InfoManageView; +} + +class InfoManageView : public QWidget +{ + Q_OBJECT + +public: + static QList colors; + + explicit InfoManageView(QWidget *parent = nullptr); + ~InfoManageView(); +private slots: + void initForm(); //初始化界面数据 + void initWidget(); //初始化子窗体 + void initNav(); //初始化导航按钮 + void initIcon(); //初始化导航按钮图标 + void buttonClicked(); //导航按钮单击事件 +protected: + void showEvent(QShowEvent *); +private: + Ui::InfoManageView *ui; + + //左侧导航栏图标+按钮集合 + QList icons; + QList btns; +}; + +#endif // INFOMANAGEVIEW_H diff --git a/softwareDirectory/AutoVerScheme/infomanageview.ui b/softwareDirectory/AutoVerScheme/infomanageview.ui new file mode 100644 index 0000000..4b39e7d --- /dev/null +++ b/softwareDirectory/AutoVerScheme/infomanageview.ui @@ -0,0 +1,109 @@ + + + InfoManageView + + + + 0 + 0 + 883 + 644 + + + + Form + + + + 0 + + + 0 + + + 0 + + + 0 + + + 0 + + + + + + 0 + 0 + + + + + 170 + 0 + + + + + 16777215 + 16777215 + + + + color:White; + font-weight: bold; + font-size: 16px; +background-color:rgba(10, 15, 92, 1); + + + true + + + + + 0 + 0 + 170 + 625 + + + + + 170 + 0 + + + + + 170 + 0 + + + + + 0 + + + 0 + + + 0 + + + 0 + + + 0 + + + + + + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/inspectdataitem.cpp b/softwareDirectory/AutoVerScheme/inspectdataitem.cpp new file mode 100644 index 0000000..e9c2adc --- /dev/null +++ b/softwareDirectory/AutoVerScheme/inspectdataitem.cpp @@ -0,0 +1,14 @@ +#include "inspectdataitem.h" +#include "ui_inspectdataitem.h" + +InspectDataItem::InspectDataItem(QWidget *parent) : + QWidget(parent), + ui(new Ui::InspectDataItem) +{ + ui->setupUi(this); +} + +InspectDataItem::~InspectDataItem() +{ + delete ui; +} diff --git a/softwareDirectory/AutoVerScheme/inspectdataitem.h b/softwareDirectory/AutoVerScheme/inspectdataitem.h new file mode 100644 index 0000000..57551bb --- /dev/null +++ b/softwareDirectory/AutoVerScheme/inspectdataitem.h @@ -0,0 +1,22 @@ +#ifndef INSPECTDATAITEM_H +#define INSPECTDATAITEM_H + +#include + +namespace Ui { +class InspectDataItem; +} + +class InspectDataItem : public QWidget +{ + Q_OBJECT + +public: + explicit InspectDataItem(QWidget *parent = nullptr); + ~InspectDataItem(); + +private: + Ui::InspectDataItem *ui; +}; + +#endif // INSPECTDATAITEM_H diff --git a/softwareDirectory/AutoVerScheme/inspectdataitem.ui b/softwareDirectory/AutoVerScheme/inspectdataitem.ui new file mode 100644 index 0000000..45f04e0 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/inspectdataitem.ui @@ -0,0 +1,32 @@ + + + InspectDataItem + + + + 0 + 0 + 400 + 300 + + + + Form + + + + + 120 + 130 + 89 + 24 + + + + 核查数据管理 + + + + + + diff --git a/softwareDirectory/AutoVerScheme/my_task.cpp b/softwareDirectory/AutoVerScheme/my_task.cpp new file mode 100644 index 0000000..40aceb2 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/my_task.cpp @@ -0,0 +1,42 @@ +#include "my_task.h" +#include "ui_my_task.h" +#include "QMessageBox" + +My_Task::My_Task(QWidget *parent) : + InfoBase(parent), + ui(new Ui::My_Task) +{ + ui->setupUi(this); + + this->initForm(); +} + +My_Task::~My_Task() +{ + delete ui; +} +void My_Task::initForm() +{ + + +} +void My_Task::ShowMessageBox(QString title,QString value) { + // 创建一个QMessageBox对象 + QMessageBox msgBox; + + // 设置消息框的标题 + msgBox.setWindowTitle(title); + + // 设置消息框的文本内容 + msgBox.setText(value); + + // 设置消息框的标准按钮,这里是“确定”按钮 + msgBox.setStandardButtons(QMessageBox::Ok); + + // 显示消息框 + msgBox.exec(); +} +void My_Task::Load() +{ + ShowMessageBox("我的任务页面","我的任务初始化完成"); +} diff --git a/softwareDirectory/AutoVerScheme/my_task.h b/softwareDirectory/AutoVerScheme/my_task.h new file mode 100644 index 0000000..d6600cb --- /dev/null +++ b/softwareDirectory/AutoVerScheme/my_task.h @@ -0,0 +1,28 @@ +#ifndef MY_TASK_H +#define MY_TASK_H + +#include +#include "InfoBase.h" + +namespace Ui { +class My_Task; +} + +class My_Task :public InfoBase +{ + Q_OBJECT + +public: + explicit My_Task(QWidget *parent = nullptr); + ~My_Task(); + + +private slots: + void initForm(); //初始化界面数据 + void ShowMessageBox(QString title,QString value); + void Load() override; +private: + Ui::My_Task *ui; +}; + +#endif // MY_TASK_H diff --git a/softwareDirectory/AutoVerScheme/my_task.ui b/softwareDirectory/AutoVerScheme/my_task.ui new file mode 100644 index 0000000..89245b8 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/my_task.ui @@ -0,0 +1,178 @@ + + + My_Task + + + + 0 + 0 + 857 + 511 + + + + Form + + + + + + + 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 + + + + 要求完成时间: + + + + + + + + + + 查询 + + + + + + + 重置 + + + + + + + + + + background-color:white; + + + + + + + + + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/rulefileitem.cpp b/softwareDirectory/AutoVerScheme/rulefileitem.cpp new file mode 100644 index 0000000..6f9ddd3 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/rulefileitem.cpp @@ -0,0 +1,14 @@ +#include "rulefileitem.h" +#include "ui_rulefileitem.h" + +RuleFileItem::RuleFileItem(QWidget *parent) : + QWidget(parent), + ui(new Ui::RuleFileItem) +{ + ui->setupUi(this); +} + +RuleFileItem::~RuleFileItem() +{ + delete ui; +} diff --git a/softwareDirectory/AutoVerScheme/rulefileitem.h b/softwareDirectory/AutoVerScheme/rulefileitem.h new file mode 100644 index 0000000..1fc81a1 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/rulefileitem.h @@ -0,0 +1,22 @@ +#ifndef RULEFILEITEM_H +#define RULEFILEITEM_H + +#include + +namespace Ui { +class RuleFileItem; +} + +class RuleFileItem : public QWidget +{ + Q_OBJECT + +public: + explicit RuleFileItem(QWidget *parent = nullptr); + ~RuleFileItem(); + +private: + Ui::RuleFileItem *ui; +}; + +#endif // RULEFILEITEM_H diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro index 5b8f852..fa0d8e5 100644 --- a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro @@ -1,5 +1,7 @@ QT += core gui QT += sql +QT += widgets + greaterThan(QT_MAJOR_VERSION, 4): QT += widgets CONFIG += c++11 @@ -16,22 +18,50 @@ #DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 SOURCES += \ + beexamined_deviceitem.cpp \ + create_task.cpp \ + depar_task.cpp \ indexwindow.cpp \ + infomanageview.cpp \ + inspectdataitem.cpp \ loginwindow.cpp \ main.cpp \ mainwindow.cpp \ + my_task.cpp \ + rulefileitem.cpp \ + standard_deviceitem.cpp \ + testdataitem.cpp \ testview.cpp HEADERS += \ + InfoBase.h \ + beexamined_deviceitem.h \ + create_task.h \ + depar_task.h \ indexwindow.h \ + infomanageview.h \ + inspectdataitem.h \ loginwindow.h \ mainwindow.h \ + my_task.h \ + rulefileitem.h \ + standard_deviceitem.h \ + testdataitem.h \ testview.h FORMS += \ + beexamined_deviceitem.ui \ + create_task.ui \ + depar_task.ui \ indexwindow.ui \ + infomanageview.ui \ + inspectdataitem.ui \ loginwindow.ui \ mainwindow.ui \ + my_task.ui \ + rulefileitem.ui \ + standard_deviceitem.ui \ + testdataitem.ui \ testview.ui # Default rules for deployment. diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user index 1f5ec64..32d22e9 100644 --- a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user @@ -1,6 +1,6 @@ - + EnvironmentId @@ -64,249 +64,6 @@ ProjectExplorer.Project.Target.0 - Desktop Qt 5.14.2 MinGW 64-bit - Desktop Qt 5.14.2 MinGW 64-bit - qt.qt5.5142.win64_mingw73_kit - 0 - 0 - 0 - - 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 - - Qt4ProjectManager.Qt4RunConfiguration:D:/Auto_verification_scheme/AutoVerScheme/AutoVerScheme.pro - D:/Auto_verification_scheme/AutoVerScheme/AutoVerScheme.pro - - false - - false - true - true - false - false - true - - D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Debug - - 1 - - - - ProjectExplorer.Project.Target.1 - Desktop Qt 5.14.2 MinGW 32-bit Desktop Qt 5.14.2 MinGW 32-bit qt.qt5.5142.win32_mingw73_kit @@ -530,8 +287,252 @@ 2 - Qt4ProjectManager.Qt4RunConfiguration:D:/Auto_verification_scheme/AutoVerScheme/AutoVerScheme.pro - D:/Auto_verification_scheme/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 + + 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 diff --git a/softwareDirectory/AutoVerScheme/InfoBase.cpp b/softwareDirectory/AutoVerScheme/InfoBase.cpp new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/InfoBase.cpp diff --git a/softwareDirectory/AutoVerScheme/InfoBase.h b/softwareDirectory/AutoVerScheme/InfoBase.h new file mode 100644 index 0000000..7fec63e --- /dev/null +++ b/softwareDirectory/AutoVerScheme/InfoBase.h @@ -0,0 +1,16 @@ +#ifndef INFOBASE_H +#define INFOBASE_H + +#include +///信号管理页面的基类 所有信息管理页面都继承于InfoBase +/// 便于统一管理 所有子类必须实现Load方法 +/// 每次按钮点击切换都会调用Load方法 用于每次页面的数据刷新 +class InfoBase : public QWidget { + Q_OBJECT +public: + InfoBase(QWidget *parent = nullptr): QWidget(parent){}; + // 纯虚函数 + virtual void Load()=0; +}; +#endif // INFOBASE_H + diff --git a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.cpp b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.cpp new file mode 100644 index 0000000..7ac1e87 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.cpp @@ -0,0 +1,14 @@ +#include "beexamined_deviceitem.h" +#include "ui_beexamined_deviceitem.h" + +BeExamined_DeviceItem::BeExamined_DeviceItem(QWidget *parent) : + QWidget(parent), + ui(new Ui::BeExamined_DeviceItem) +{ + ui->setupUi(this); +} + +BeExamined_DeviceItem::~BeExamined_DeviceItem() +{ + delete ui; +} diff --git a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.h b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.h new file mode 100644 index 0000000..76b061d --- /dev/null +++ b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.h @@ -0,0 +1,22 @@ +#ifndef BEEXAMINED_DEVICEITEM_H +#define BEEXAMINED_DEVICEITEM_H + +#include + +namespace Ui { +class BeExamined_DeviceItem; +} + +class BeExamined_DeviceItem : public QWidget +{ + Q_OBJECT + +public: + explicit BeExamined_DeviceItem(QWidget *parent = nullptr); + ~BeExamined_DeviceItem(); + +private: + Ui::BeExamined_DeviceItem *ui; +}; + +#endif // BEEXAMINED_DEVICEITEM_H diff --git a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.ui b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.ui new file mode 100644 index 0000000..af9f7bf --- /dev/null +++ b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.ui @@ -0,0 +1,32 @@ + + + BeExamined_DeviceItem + + + + 0 + 0 + 400 + 300 + + + + Form + + + + + 130 + 140 + 89 + 24 + + + + 被检设备管理 + + + + + + diff --git a/softwareDirectory/AutoVerScheme/create_task.cpp b/softwareDirectory/AutoVerScheme/create_task.cpp new file mode 100644 index 0000000..4193efc --- /dev/null +++ b/softwareDirectory/AutoVerScheme/create_task.cpp @@ -0,0 +1,14 @@ +#include "create_task.h" +#include "ui_create_task.h" + +Create_Task::Create_Task(QWidget *parent) : + QWidget(parent), + ui(new Ui::Create_Task) +{ + ui->setupUi(this); +} + +Create_Task::~Create_Task() +{ + delete ui; +} diff --git a/softwareDirectory/AutoVerScheme/create_task.h b/softwareDirectory/AutoVerScheme/create_task.h new file mode 100644 index 0000000..e2264de --- /dev/null +++ b/softwareDirectory/AutoVerScheme/create_task.h @@ -0,0 +1,22 @@ +#ifndef CREATE_TASK_H +#define CREATE_TASK_H + +#include + +namespace Ui { +class Create_Task; +} + +class Create_Task : public QWidget +{ + Q_OBJECT + +public: + explicit Create_Task(QWidget *parent = nullptr); + ~Create_Task(); + +private: + Ui::Create_Task *ui; +}; + +#endif // CREATE_TASK_H diff --git a/softwareDirectory/AutoVerScheme/create_task.ui b/softwareDirectory/AutoVerScheme/create_task.ui new file mode 100644 index 0000000..b79c6a1 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/create_task.ui @@ -0,0 +1,35 @@ + + + Create_Task + + + + 0 + 0 + 400 + 300 + + + + Form + + + background-color:red; + + + + + 140 + 120 + 89 + 24 + + + + 创建任务单 + + + + + + diff --git a/softwareDirectory/AutoVerScheme/depar_task.cpp b/softwareDirectory/AutoVerScheme/depar_task.cpp new file mode 100644 index 0000000..de39775 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/depar_task.cpp @@ -0,0 +1,42 @@ +#include "depar_task.h" +#include "ui_depar_task.h" +#include "QMessageBox" +#include "InfoBase.h" + +Depar_Task::Depar_Task(QWidget *parent) : + InfoBase(parent), + ui(new Ui::Depar_Task) +{ + ui->setupUi(this); + this->initForm(); +} + +Depar_Task::~Depar_Task() +{ + delete ui; +} +void Depar_Task::initForm() +{ + + //ShowMessageBox("标题","初始化完成"); +} +void Depar_Task::ShowMessageBox(QString title,QString value) { + // 创建一个QMessageBox对象 + QMessageBox msgBox; + + // 设置消息框的标题 + msgBox.setWindowTitle(title); + + // 设置消息框的文本内容 + msgBox.setText(value); + + // 设置消息框的标准按钮,这里是“确定”按钮 + msgBox.setStandardButtons(QMessageBox::Ok); + + // 显示消息框 + msgBox.exec(); +} +void Depar_Task::Load() +{ + ShowMessageBox("部门任务页面","部门任务初始化完成"); +} diff --git a/softwareDirectory/AutoVerScheme/depar_task.h b/softwareDirectory/AutoVerScheme/depar_task.h new file mode 100644 index 0000000..8716faf --- /dev/null +++ b/softwareDirectory/AutoVerScheme/depar_task.h @@ -0,0 +1,28 @@ +#ifndef DEPAR_TASK_H +#define DEPAR_TASK_H + + +#include "InfoBase.h" + +namespace Ui { +class Depar_Task; +} + +class Depar_Task :public InfoBase +{ + Q_OBJECT + +public: + Depar_Task(QWidget *parent = nullptr); + ~Depar_Task(); + + +private slots: + void initForm(); //初始化界面数据 + void ShowMessageBox(QString title,QString value); + void Load() override; +private: + Ui::Depar_Task *ui; +}; + +#endif // DEPAR_TASK_H diff --git a/softwareDirectory/AutoVerScheme/depar_task.ui b/softwareDirectory/AutoVerScheme/depar_task.ui new file mode 100644 index 0000000..ff3d44f --- /dev/null +++ b/softwareDirectory/AutoVerScheme/depar_task.ui @@ -0,0 +1,181 @@ + + + Depar_Task + + + + 0 + 0 + 1184 + 456 + + + + Form + + + color:black; + + + + + + + 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 + + + + 要求完成时间: + + + + + + + + + + 查询 + + + + + + + 重置 + + + + + + + + + + background-color:white; + + + + + + + + + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/indexwindow.cpp b/softwareDirectory/AutoVerScheme/indexwindow.cpp index 3e52c7b..9bd65b1 100644 --- a/softwareDirectory/AutoVerScheme/indexwindow.cpp +++ b/softwareDirectory/AutoVerScheme/indexwindow.cpp @@ -21,6 +21,7 @@ //调用样式 loadStyle(":/qss/Index.css"); + } void IndexWindow::loadStyle(const QString &qssFile) diff --git a/softwareDirectory/AutoVerScheme/infomanageview.cpp b/softwareDirectory/AutoVerScheme/infomanageview.cpp new file mode 100644 index 0000000..a206c6f --- /dev/null +++ b/softwareDirectory/AutoVerScheme/infomanageview.cpp @@ -0,0 +1,150 @@ +#include "infomanageview.h" +#include "ui_infomanageview.h" +#include +#include +//子窗体 +#include "depar_task.h" +#include "my_task.h" +#include "create_task.h" +#include "beexamined_deviceitem.h" +#include "inspectdataitem.h" +#include "rulefileitem.h" +#include "standard_deviceitem.h" +#include "testdataitem.h" +#include "InfoBase.h" + +InfoManageView::InfoManageView(QWidget *parent) : + QWidget(parent), + ui(new Ui::InfoManageView) +{ + ui->setupUi(this); + this->setWindowTitle("信息管理"); + //初始化调用所有函数 + this->initForm(); + this->initWidget(); + this->initNav(); + this->initIcon(); +} +//左侧滚动条事件 +void InfoManageView::showEvent(QShowEvent *) +{ + //滚动到底部 + QScrollBar *bar = ui->scrollArea->verticalScrollBar(); + bar->setValue(bar->maximum()); +} + +//左侧导航栏样式初始化 +void InfoManageView::initIcon() +{ + //左侧导航样式,可以设置各种牛逼的参数,超级棒 + // IconHelper::StyleColor styleColor; + //styleColor.defaultBorder = true; + // IconHelper::setStyle(ui->widgetLeft, btns, icons, styleColor); +} + +//颜色初始化设置 +QList InfoManageView::colors = QList(); +void InfoManageView::initForm() +{ + //颜色集合供其他界面使用 + colors << QColor(211, 78, 78) << QColor(29, 185, 242) << QColor(170, 162, 119) << QColor(255, 192, 1); + colors << QColor(0, 176, 180) << QColor(0, 113, 193) << QColor(255, 192, 0); + colors << QColor(72, 103, 149) << QColor(185, 87, 86) << QColor(0, 177, 125); + colors << QColor(214, 77, 84) << QColor(71, 164, 233) << QColor(34, 163, 169); + colors << QColor(59, 123, 156) << QColor(162, 121, 197) << QColor(72, 202, 245); + colors << QColor(0, 150, 121) << QColor(111, 9, 176) << QColor(250, 170, 20); + + ui->scrollArea->setFixedWidth(170); + ui->widgetLeft->setProperty("flag", "left"); +} + +//右侧可切换UI导入 +void InfoManageView::initWidget() +{ + ui->stackedWidget->addWidget(new Depar_Task); //部门任务 + ui->stackedWidget->addWidget(new My_Task); //我的任务 + ui->stackedWidget->addWidget(new Create_Task); //创建任务单 + ui->stackedWidget->addWidget(new Standard_DeviceItem); //标准设备管理 + ui->stackedWidget->addWidget(new BeExamined_DeviceItem); //被检设备管理 + ui->stackedWidget->addWidget(new TestDataItem); //检定数据管理 + ui->stackedWidget->addWidget(new InspectDataItem); //核查数据管理 + ui->stackedWidget->addWidget(new RuleFileItem); //技术文件管理 + + +} +//左侧列表信息导入 +void InfoManageView::initNav() +{ + //按钮文字集合 + QStringList names; + names << "部门任务" << "我的任务" << "创建任务单" << "标准设备管理" << "被检设备管理" + << "检定数据管理" << "核查数据管理" << "技术文件管理" ; + + //自动生成按钮 + for (int i = 0; i < names.count(); i++) { + QToolButton *btn = new QToolButton; + //设置按钮固定高度 + btn->setFixedHeight(35); + //设置按钮的文字 + //btn->setText(QString("%1. %2").arg(i + 1, 2, 10, QChar('0')).arg(names.at(i))); + btn->setText(QString("%1").arg(names.at(i))); + //设置按钮可选中按下类似复选框的功能 + btn->setCheckable(true); + //设置按钮图标在左侧文字在右侧 + // btn->setToolButtonStyle(Qt::ToolButtonTextBesideIcon); + //设置按钮拉伸策略为横向填充 + btn->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Preferred); + //关联按钮单击事件 + connect(btn, SIGNAL(clicked(bool)), this, SLOT(buttonClicked())); + //将按钮加入到布局 + ui->widgetLeft->layout()->addWidget(btn); + //可以指定不同的图标 + //icons << 0xf061; + btns << btn; + //设置按钮大小 + btn->setFixedSize(170, 70); + //设置鼠标经过和点击事件 + btn->setStyleSheet("QToolButton:hover " + "{ background-color: rgba(53, 91, 171, 1); }" + "QToolButton::checked { " + "background-color: rgba(53, 91, 171, 1)}"); + + //ui->widgetLeft->setFixedWidth(200); + } + + //底部加个弹簧 + QSpacerItem *verticalSpacer = new QSpacerItem(20, 40, QSizePolicy::Minimum, QSizePolicy::Expanding); + ui->widgetLeft->layout()->addItem(verticalSpacer); + btns.at(names.count() - 1)->click(); +} +//按钮点击切换UI事件 +void InfoManageView::buttonClicked() +{ + QAbstractButton *b = (QAbstractButton *)sender(); + int count = btns.count(); + int index = btns.indexOf(b); + ui->stackedWidget->setCurrentIndex(index); + + + // 获取当前在 QStackedWidget 中的部件 + QWidget* currentWidget = ui->stackedWidget->currentWidget(); + + // 尝试将当前部件转换为 InfoBase 类型 + InfoBase* currQWidget = qobject_cast(currentWidget); + // 检查转换是否成功 + if (currQWidget != nullptr) + { + // 如果转换成功,调用子类Load 方法 + currQWidget->Load(); + } + + for (int i = 0; i < count; i++) { + QAbstractButton *btn = btns.at(i); + btn->setChecked(btn == b); + } +} + +InfoManageView::~InfoManageView() +{ + delete ui; +} diff --git a/softwareDirectory/AutoVerScheme/infomanageview.h b/softwareDirectory/AutoVerScheme/infomanageview.h new file mode 100644 index 0000000..3c1463f --- /dev/null +++ b/softwareDirectory/AutoVerScheme/infomanageview.h @@ -0,0 +1,38 @@ +#ifndef INFOMANAGEVIEW_H +#define INFOMANAGEVIEW_H + +#include + +class QAbstractButton; + + +namespace Ui { +class InfoManageView; +} + +class InfoManageView : public QWidget +{ + Q_OBJECT + +public: + static QList colors; + + explicit InfoManageView(QWidget *parent = nullptr); + ~InfoManageView(); +private slots: + void initForm(); //初始化界面数据 + void initWidget(); //初始化子窗体 + void initNav(); //初始化导航按钮 + void initIcon(); //初始化导航按钮图标 + void buttonClicked(); //导航按钮单击事件 +protected: + void showEvent(QShowEvent *); +private: + Ui::InfoManageView *ui; + + //左侧导航栏图标+按钮集合 + QList icons; + QList btns; +}; + +#endif // INFOMANAGEVIEW_H diff --git a/softwareDirectory/AutoVerScheme/infomanageview.ui b/softwareDirectory/AutoVerScheme/infomanageview.ui new file mode 100644 index 0000000..4b39e7d --- /dev/null +++ b/softwareDirectory/AutoVerScheme/infomanageview.ui @@ -0,0 +1,109 @@ + + + InfoManageView + + + + 0 + 0 + 883 + 644 + + + + Form + + + + 0 + + + 0 + + + 0 + + + 0 + + + 0 + + + + + + 0 + 0 + + + + + 170 + 0 + + + + + 16777215 + 16777215 + + + + color:White; + font-weight: bold; + font-size: 16px; +background-color:rgba(10, 15, 92, 1); + + + true + + + + + 0 + 0 + 170 + 625 + + + + + 170 + 0 + + + + + 170 + 0 + + + + + 0 + + + 0 + + + 0 + + + 0 + + + 0 + + + + + + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/inspectdataitem.cpp b/softwareDirectory/AutoVerScheme/inspectdataitem.cpp new file mode 100644 index 0000000..e9c2adc --- /dev/null +++ b/softwareDirectory/AutoVerScheme/inspectdataitem.cpp @@ -0,0 +1,14 @@ +#include "inspectdataitem.h" +#include "ui_inspectdataitem.h" + +InspectDataItem::InspectDataItem(QWidget *parent) : + QWidget(parent), + ui(new Ui::InspectDataItem) +{ + ui->setupUi(this); +} + +InspectDataItem::~InspectDataItem() +{ + delete ui; +} diff --git a/softwareDirectory/AutoVerScheme/inspectdataitem.h b/softwareDirectory/AutoVerScheme/inspectdataitem.h new file mode 100644 index 0000000..57551bb --- /dev/null +++ b/softwareDirectory/AutoVerScheme/inspectdataitem.h @@ -0,0 +1,22 @@ +#ifndef INSPECTDATAITEM_H +#define INSPECTDATAITEM_H + +#include + +namespace Ui { +class InspectDataItem; +} + +class InspectDataItem : public QWidget +{ + Q_OBJECT + +public: + explicit InspectDataItem(QWidget *parent = nullptr); + ~InspectDataItem(); + +private: + Ui::InspectDataItem *ui; +}; + +#endif // INSPECTDATAITEM_H diff --git a/softwareDirectory/AutoVerScheme/inspectdataitem.ui b/softwareDirectory/AutoVerScheme/inspectdataitem.ui new file mode 100644 index 0000000..45f04e0 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/inspectdataitem.ui @@ -0,0 +1,32 @@ + + + InspectDataItem + + + + 0 + 0 + 400 + 300 + + + + Form + + + + + 120 + 130 + 89 + 24 + + + + 核查数据管理 + + + + + + diff --git a/softwareDirectory/AutoVerScheme/my_task.cpp b/softwareDirectory/AutoVerScheme/my_task.cpp new file mode 100644 index 0000000..40aceb2 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/my_task.cpp @@ -0,0 +1,42 @@ +#include "my_task.h" +#include "ui_my_task.h" +#include "QMessageBox" + +My_Task::My_Task(QWidget *parent) : + InfoBase(parent), + ui(new Ui::My_Task) +{ + ui->setupUi(this); + + this->initForm(); +} + +My_Task::~My_Task() +{ + delete ui; +} +void My_Task::initForm() +{ + + +} +void My_Task::ShowMessageBox(QString title,QString value) { + // 创建一个QMessageBox对象 + QMessageBox msgBox; + + // 设置消息框的标题 + msgBox.setWindowTitle(title); + + // 设置消息框的文本内容 + msgBox.setText(value); + + // 设置消息框的标准按钮,这里是“确定”按钮 + msgBox.setStandardButtons(QMessageBox::Ok); + + // 显示消息框 + msgBox.exec(); +} +void My_Task::Load() +{ + ShowMessageBox("我的任务页面","我的任务初始化完成"); +} diff --git a/softwareDirectory/AutoVerScheme/my_task.h b/softwareDirectory/AutoVerScheme/my_task.h new file mode 100644 index 0000000..d6600cb --- /dev/null +++ b/softwareDirectory/AutoVerScheme/my_task.h @@ -0,0 +1,28 @@ +#ifndef MY_TASK_H +#define MY_TASK_H + +#include +#include "InfoBase.h" + +namespace Ui { +class My_Task; +} + +class My_Task :public InfoBase +{ + Q_OBJECT + +public: + explicit My_Task(QWidget *parent = nullptr); + ~My_Task(); + + +private slots: + void initForm(); //初始化界面数据 + void ShowMessageBox(QString title,QString value); + void Load() override; +private: + Ui::My_Task *ui; +}; + +#endif // MY_TASK_H diff --git a/softwareDirectory/AutoVerScheme/my_task.ui b/softwareDirectory/AutoVerScheme/my_task.ui new file mode 100644 index 0000000..89245b8 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/my_task.ui @@ -0,0 +1,178 @@ + + + My_Task + + + + 0 + 0 + 857 + 511 + + + + Form + + + + + + + 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 + + + + 要求完成时间: + + + + + + + + + + 查询 + + + + + + + 重置 + + + + + + + + + + background-color:white; + + + + + + + + + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/rulefileitem.cpp b/softwareDirectory/AutoVerScheme/rulefileitem.cpp new file mode 100644 index 0000000..6f9ddd3 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/rulefileitem.cpp @@ -0,0 +1,14 @@ +#include "rulefileitem.h" +#include "ui_rulefileitem.h" + +RuleFileItem::RuleFileItem(QWidget *parent) : + QWidget(parent), + ui(new Ui::RuleFileItem) +{ + ui->setupUi(this); +} + +RuleFileItem::~RuleFileItem() +{ + delete ui; +} diff --git a/softwareDirectory/AutoVerScheme/rulefileitem.h b/softwareDirectory/AutoVerScheme/rulefileitem.h new file mode 100644 index 0000000..1fc81a1 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/rulefileitem.h @@ -0,0 +1,22 @@ +#ifndef RULEFILEITEM_H +#define RULEFILEITEM_H + +#include + +namespace Ui { +class RuleFileItem; +} + +class RuleFileItem : public QWidget +{ + Q_OBJECT + +public: + explicit RuleFileItem(QWidget *parent = nullptr); + ~RuleFileItem(); + +private: + Ui::RuleFileItem *ui; +}; + +#endif // RULEFILEITEM_H diff --git a/softwareDirectory/AutoVerScheme/rulefileitem.ui b/softwareDirectory/AutoVerScheme/rulefileitem.ui new file mode 100644 index 0000000..599e025 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/rulefileitem.ui @@ -0,0 +1,32 @@ + + + RuleFileItem + + + + 0 + 0 + 400 + 300 + + + + Form + + + + + 140 + 130 + 121 + 24 + + + + 规程文件管理 + + + + + + diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro index 5b8f852..fa0d8e5 100644 --- a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro @@ -1,5 +1,7 @@ QT += core gui QT += sql +QT += widgets + greaterThan(QT_MAJOR_VERSION, 4): QT += widgets CONFIG += c++11 @@ -16,22 +18,50 @@ #DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 SOURCES += \ + beexamined_deviceitem.cpp \ + create_task.cpp \ + depar_task.cpp \ indexwindow.cpp \ + infomanageview.cpp \ + inspectdataitem.cpp \ loginwindow.cpp \ main.cpp \ mainwindow.cpp \ + my_task.cpp \ + rulefileitem.cpp \ + standard_deviceitem.cpp \ + testdataitem.cpp \ testview.cpp HEADERS += \ + InfoBase.h \ + beexamined_deviceitem.h \ + create_task.h \ + depar_task.h \ indexwindow.h \ + infomanageview.h \ + inspectdataitem.h \ loginwindow.h \ mainwindow.h \ + my_task.h \ + rulefileitem.h \ + standard_deviceitem.h \ + testdataitem.h \ testview.h FORMS += \ + beexamined_deviceitem.ui \ + create_task.ui \ + depar_task.ui \ indexwindow.ui \ + infomanageview.ui \ + inspectdataitem.ui \ loginwindow.ui \ mainwindow.ui \ + my_task.ui \ + rulefileitem.ui \ + standard_deviceitem.ui \ + testdataitem.ui \ testview.ui # Default rules for deployment. diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user index 1f5ec64..32d22e9 100644 --- a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user @@ -1,6 +1,6 @@ - + EnvironmentId @@ -64,249 +64,6 @@ ProjectExplorer.Project.Target.0 - Desktop Qt 5.14.2 MinGW 64-bit - Desktop Qt 5.14.2 MinGW 64-bit - qt.qt5.5142.win64_mingw73_kit - 0 - 0 - 0 - - 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 - - Qt4ProjectManager.Qt4RunConfiguration:D:/Auto_verification_scheme/AutoVerScheme/AutoVerScheme.pro - D:/Auto_verification_scheme/AutoVerScheme/AutoVerScheme.pro - - false - - false - true - true - false - false - true - - D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Debug - - 1 - - - - ProjectExplorer.Project.Target.1 - Desktop Qt 5.14.2 MinGW 32-bit Desktop Qt 5.14.2 MinGW 32-bit qt.qt5.5142.win32_mingw73_kit @@ -530,8 +287,252 @@ 2 - Qt4ProjectManager.Qt4RunConfiguration:D:/Auto_verification_scheme/AutoVerScheme/AutoVerScheme.pro - D:/Auto_verification_scheme/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 + + 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 diff --git a/softwareDirectory/AutoVerScheme/InfoBase.cpp b/softwareDirectory/AutoVerScheme/InfoBase.cpp new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/InfoBase.cpp diff --git a/softwareDirectory/AutoVerScheme/InfoBase.h b/softwareDirectory/AutoVerScheme/InfoBase.h new file mode 100644 index 0000000..7fec63e --- /dev/null +++ b/softwareDirectory/AutoVerScheme/InfoBase.h @@ -0,0 +1,16 @@ +#ifndef INFOBASE_H +#define INFOBASE_H + +#include +///信号管理页面的基类 所有信息管理页面都继承于InfoBase +/// 便于统一管理 所有子类必须实现Load方法 +/// 每次按钮点击切换都会调用Load方法 用于每次页面的数据刷新 +class InfoBase : public QWidget { + Q_OBJECT +public: + InfoBase(QWidget *parent = nullptr): QWidget(parent){}; + // 纯虚函数 + virtual void Load()=0; +}; +#endif // INFOBASE_H + diff --git a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.cpp b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.cpp new file mode 100644 index 0000000..7ac1e87 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.cpp @@ -0,0 +1,14 @@ +#include "beexamined_deviceitem.h" +#include "ui_beexamined_deviceitem.h" + +BeExamined_DeviceItem::BeExamined_DeviceItem(QWidget *parent) : + QWidget(parent), + ui(new Ui::BeExamined_DeviceItem) +{ + ui->setupUi(this); +} + +BeExamined_DeviceItem::~BeExamined_DeviceItem() +{ + delete ui; +} diff --git a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.h b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.h new file mode 100644 index 0000000..76b061d --- /dev/null +++ b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.h @@ -0,0 +1,22 @@ +#ifndef BEEXAMINED_DEVICEITEM_H +#define BEEXAMINED_DEVICEITEM_H + +#include + +namespace Ui { +class BeExamined_DeviceItem; +} + +class BeExamined_DeviceItem : public QWidget +{ + Q_OBJECT + +public: + explicit BeExamined_DeviceItem(QWidget *parent = nullptr); + ~BeExamined_DeviceItem(); + +private: + Ui::BeExamined_DeviceItem *ui; +}; + +#endif // BEEXAMINED_DEVICEITEM_H diff --git a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.ui b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.ui new file mode 100644 index 0000000..af9f7bf --- /dev/null +++ b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.ui @@ -0,0 +1,32 @@ + + + BeExamined_DeviceItem + + + + 0 + 0 + 400 + 300 + + + + Form + + + + + 130 + 140 + 89 + 24 + + + + 被检设备管理 + + + + + + diff --git a/softwareDirectory/AutoVerScheme/create_task.cpp b/softwareDirectory/AutoVerScheme/create_task.cpp new file mode 100644 index 0000000..4193efc --- /dev/null +++ b/softwareDirectory/AutoVerScheme/create_task.cpp @@ -0,0 +1,14 @@ +#include "create_task.h" +#include "ui_create_task.h" + +Create_Task::Create_Task(QWidget *parent) : + QWidget(parent), + ui(new Ui::Create_Task) +{ + ui->setupUi(this); +} + +Create_Task::~Create_Task() +{ + delete ui; +} diff --git a/softwareDirectory/AutoVerScheme/create_task.h b/softwareDirectory/AutoVerScheme/create_task.h new file mode 100644 index 0000000..e2264de --- /dev/null +++ b/softwareDirectory/AutoVerScheme/create_task.h @@ -0,0 +1,22 @@ +#ifndef CREATE_TASK_H +#define CREATE_TASK_H + +#include + +namespace Ui { +class Create_Task; +} + +class Create_Task : public QWidget +{ + Q_OBJECT + +public: + explicit Create_Task(QWidget *parent = nullptr); + ~Create_Task(); + +private: + Ui::Create_Task *ui; +}; + +#endif // CREATE_TASK_H diff --git a/softwareDirectory/AutoVerScheme/create_task.ui b/softwareDirectory/AutoVerScheme/create_task.ui new file mode 100644 index 0000000..b79c6a1 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/create_task.ui @@ -0,0 +1,35 @@ + + + Create_Task + + + + 0 + 0 + 400 + 300 + + + + Form + + + background-color:red; + + + + + 140 + 120 + 89 + 24 + + + + 创建任务单 + + + + + + diff --git a/softwareDirectory/AutoVerScheme/depar_task.cpp b/softwareDirectory/AutoVerScheme/depar_task.cpp new file mode 100644 index 0000000..de39775 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/depar_task.cpp @@ -0,0 +1,42 @@ +#include "depar_task.h" +#include "ui_depar_task.h" +#include "QMessageBox" +#include "InfoBase.h" + +Depar_Task::Depar_Task(QWidget *parent) : + InfoBase(parent), + ui(new Ui::Depar_Task) +{ + ui->setupUi(this); + this->initForm(); +} + +Depar_Task::~Depar_Task() +{ + delete ui; +} +void Depar_Task::initForm() +{ + + //ShowMessageBox("标题","初始化完成"); +} +void Depar_Task::ShowMessageBox(QString title,QString value) { + // 创建一个QMessageBox对象 + QMessageBox msgBox; + + // 设置消息框的标题 + msgBox.setWindowTitle(title); + + // 设置消息框的文本内容 + msgBox.setText(value); + + // 设置消息框的标准按钮,这里是“确定”按钮 + msgBox.setStandardButtons(QMessageBox::Ok); + + // 显示消息框 + msgBox.exec(); +} +void Depar_Task::Load() +{ + ShowMessageBox("部门任务页面","部门任务初始化完成"); +} diff --git a/softwareDirectory/AutoVerScheme/depar_task.h b/softwareDirectory/AutoVerScheme/depar_task.h new file mode 100644 index 0000000..8716faf --- /dev/null +++ b/softwareDirectory/AutoVerScheme/depar_task.h @@ -0,0 +1,28 @@ +#ifndef DEPAR_TASK_H +#define DEPAR_TASK_H + + +#include "InfoBase.h" + +namespace Ui { +class Depar_Task; +} + +class Depar_Task :public InfoBase +{ + Q_OBJECT + +public: + Depar_Task(QWidget *parent = nullptr); + ~Depar_Task(); + + +private slots: + void initForm(); //初始化界面数据 + void ShowMessageBox(QString title,QString value); + void Load() override; +private: + Ui::Depar_Task *ui; +}; + +#endif // DEPAR_TASK_H diff --git a/softwareDirectory/AutoVerScheme/depar_task.ui b/softwareDirectory/AutoVerScheme/depar_task.ui new file mode 100644 index 0000000..ff3d44f --- /dev/null +++ b/softwareDirectory/AutoVerScheme/depar_task.ui @@ -0,0 +1,181 @@ + + + Depar_Task + + + + 0 + 0 + 1184 + 456 + + + + Form + + + color:black; + + + + + + + 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 + + + + 要求完成时间: + + + + + + + + + + 查询 + + + + + + + 重置 + + + + + + + + + + background-color:white; + + + + + + + + + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/indexwindow.cpp b/softwareDirectory/AutoVerScheme/indexwindow.cpp index 3e52c7b..9bd65b1 100644 --- a/softwareDirectory/AutoVerScheme/indexwindow.cpp +++ b/softwareDirectory/AutoVerScheme/indexwindow.cpp @@ -21,6 +21,7 @@ //调用样式 loadStyle(":/qss/Index.css"); + } void IndexWindow::loadStyle(const QString &qssFile) diff --git a/softwareDirectory/AutoVerScheme/infomanageview.cpp b/softwareDirectory/AutoVerScheme/infomanageview.cpp new file mode 100644 index 0000000..a206c6f --- /dev/null +++ b/softwareDirectory/AutoVerScheme/infomanageview.cpp @@ -0,0 +1,150 @@ +#include "infomanageview.h" +#include "ui_infomanageview.h" +#include +#include +//子窗体 +#include "depar_task.h" +#include "my_task.h" +#include "create_task.h" +#include "beexamined_deviceitem.h" +#include "inspectdataitem.h" +#include "rulefileitem.h" +#include "standard_deviceitem.h" +#include "testdataitem.h" +#include "InfoBase.h" + +InfoManageView::InfoManageView(QWidget *parent) : + QWidget(parent), + ui(new Ui::InfoManageView) +{ + ui->setupUi(this); + this->setWindowTitle("信息管理"); + //初始化调用所有函数 + this->initForm(); + this->initWidget(); + this->initNav(); + this->initIcon(); +} +//左侧滚动条事件 +void InfoManageView::showEvent(QShowEvent *) +{ + //滚动到底部 + QScrollBar *bar = ui->scrollArea->verticalScrollBar(); + bar->setValue(bar->maximum()); +} + +//左侧导航栏样式初始化 +void InfoManageView::initIcon() +{ + //左侧导航样式,可以设置各种牛逼的参数,超级棒 + // IconHelper::StyleColor styleColor; + //styleColor.defaultBorder = true; + // IconHelper::setStyle(ui->widgetLeft, btns, icons, styleColor); +} + +//颜色初始化设置 +QList InfoManageView::colors = QList(); +void InfoManageView::initForm() +{ + //颜色集合供其他界面使用 + colors << QColor(211, 78, 78) << QColor(29, 185, 242) << QColor(170, 162, 119) << QColor(255, 192, 1); + colors << QColor(0, 176, 180) << QColor(0, 113, 193) << QColor(255, 192, 0); + colors << QColor(72, 103, 149) << QColor(185, 87, 86) << QColor(0, 177, 125); + colors << QColor(214, 77, 84) << QColor(71, 164, 233) << QColor(34, 163, 169); + colors << QColor(59, 123, 156) << QColor(162, 121, 197) << QColor(72, 202, 245); + colors << QColor(0, 150, 121) << QColor(111, 9, 176) << QColor(250, 170, 20); + + ui->scrollArea->setFixedWidth(170); + ui->widgetLeft->setProperty("flag", "left"); +} + +//右侧可切换UI导入 +void InfoManageView::initWidget() +{ + ui->stackedWidget->addWidget(new Depar_Task); //部门任务 + ui->stackedWidget->addWidget(new My_Task); //我的任务 + ui->stackedWidget->addWidget(new Create_Task); //创建任务单 + ui->stackedWidget->addWidget(new Standard_DeviceItem); //标准设备管理 + ui->stackedWidget->addWidget(new BeExamined_DeviceItem); //被检设备管理 + ui->stackedWidget->addWidget(new TestDataItem); //检定数据管理 + ui->stackedWidget->addWidget(new InspectDataItem); //核查数据管理 + ui->stackedWidget->addWidget(new RuleFileItem); //技术文件管理 + + +} +//左侧列表信息导入 +void InfoManageView::initNav() +{ + //按钮文字集合 + QStringList names; + names << "部门任务" << "我的任务" << "创建任务单" << "标准设备管理" << "被检设备管理" + << "检定数据管理" << "核查数据管理" << "技术文件管理" ; + + //自动生成按钮 + for (int i = 0; i < names.count(); i++) { + QToolButton *btn = new QToolButton; + //设置按钮固定高度 + btn->setFixedHeight(35); + //设置按钮的文字 + //btn->setText(QString("%1. %2").arg(i + 1, 2, 10, QChar('0')).arg(names.at(i))); + btn->setText(QString("%1").arg(names.at(i))); + //设置按钮可选中按下类似复选框的功能 + btn->setCheckable(true); + //设置按钮图标在左侧文字在右侧 + // btn->setToolButtonStyle(Qt::ToolButtonTextBesideIcon); + //设置按钮拉伸策略为横向填充 + btn->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Preferred); + //关联按钮单击事件 + connect(btn, SIGNAL(clicked(bool)), this, SLOT(buttonClicked())); + //将按钮加入到布局 + ui->widgetLeft->layout()->addWidget(btn); + //可以指定不同的图标 + //icons << 0xf061; + btns << btn; + //设置按钮大小 + btn->setFixedSize(170, 70); + //设置鼠标经过和点击事件 + btn->setStyleSheet("QToolButton:hover " + "{ background-color: rgba(53, 91, 171, 1); }" + "QToolButton::checked { " + "background-color: rgba(53, 91, 171, 1)}"); + + //ui->widgetLeft->setFixedWidth(200); + } + + //底部加个弹簧 + QSpacerItem *verticalSpacer = new QSpacerItem(20, 40, QSizePolicy::Minimum, QSizePolicy::Expanding); + ui->widgetLeft->layout()->addItem(verticalSpacer); + btns.at(names.count() - 1)->click(); +} +//按钮点击切换UI事件 +void InfoManageView::buttonClicked() +{ + QAbstractButton *b = (QAbstractButton *)sender(); + int count = btns.count(); + int index = btns.indexOf(b); + ui->stackedWidget->setCurrentIndex(index); + + + // 获取当前在 QStackedWidget 中的部件 + QWidget* currentWidget = ui->stackedWidget->currentWidget(); + + // 尝试将当前部件转换为 InfoBase 类型 + InfoBase* currQWidget = qobject_cast(currentWidget); + // 检查转换是否成功 + if (currQWidget != nullptr) + { + // 如果转换成功,调用子类Load 方法 + currQWidget->Load(); + } + + for (int i = 0; i < count; i++) { + QAbstractButton *btn = btns.at(i); + btn->setChecked(btn == b); + } +} + +InfoManageView::~InfoManageView() +{ + delete ui; +} diff --git a/softwareDirectory/AutoVerScheme/infomanageview.h b/softwareDirectory/AutoVerScheme/infomanageview.h new file mode 100644 index 0000000..3c1463f --- /dev/null +++ b/softwareDirectory/AutoVerScheme/infomanageview.h @@ -0,0 +1,38 @@ +#ifndef INFOMANAGEVIEW_H +#define INFOMANAGEVIEW_H + +#include + +class QAbstractButton; + + +namespace Ui { +class InfoManageView; +} + +class InfoManageView : public QWidget +{ + Q_OBJECT + +public: + static QList colors; + + explicit InfoManageView(QWidget *parent = nullptr); + ~InfoManageView(); +private slots: + void initForm(); //初始化界面数据 + void initWidget(); //初始化子窗体 + void initNav(); //初始化导航按钮 + void initIcon(); //初始化导航按钮图标 + void buttonClicked(); //导航按钮单击事件 +protected: + void showEvent(QShowEvent *); +private: + Ui::InfoManageView *ui; + + //左侧导航栏图标+按钮集合 + QList icons; + QList btns; +}; + +#endif // INFOMANAGEVIEW_H diff --git a/softwareDirectory/AutoVerScheme/infomanageview.ui b/softwareDirectory/AutoVerScheme/infomanageview.ui new file mode 100644 index 0000000..4b39e7d --- /dev/null +++ b/softwareDirectory/AutoVerScheme/infomanageview.ui @@ -0,0 +1,109 @@ + + + InfoManageView + + + + 0 + 0 + 883 + 644 + + + + Form + + + + 0 + + + 0 + + + 0 + + + 0 + + + 0 + + + + + + 0 + 0 + + + + + 170 + 0 + + + + + 16777215 + 16777215 + + + + color:White; + font-weight: bold; + font-size: 16px; +background-color:rgba(10, 15, 92, 1); + + + true + + + + + 0 + 0 + 170 + 625 + + + + + 170 + 0 + + + + + 170 + 0 + + + + + 0 + + + 0 + + + 0 + + + 0 + + + 0 + + + + + + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/inspectdataitem.cpp b/softwareDirectory/AutoVerScheme/inspectdataitem.cpp new file mode 100644 index 0000000..e9c2adc --- /dev/null +++ b/softwareDirectory/AutoVerScheme/inspectdataitem.cpp @@ -0,0 +1,14 @@ +#include "inspectdataitem.h" +#include "ui_inspectdataitem.h" + +InspectDataItem::InspectDataItem(QWidget *parent) : + QWidget(parent), + ui(new Ui::InspectDataItem) +{ + ui->setupUi(this); +} + +InspectDataItem::~InspectDataItem() +{ + delete ui; +} diff --git a/softwareDirectory/AutoVerScheme/inspectdataitem.h b/softwareDirectory/AutoVerScheme/inspectdataitem.h new file mode 100644 index 0000000..57551bb --- /dev/null +++ b/softwareDirectory/AutoVerScheme/inspectdataitem.h @@ -0,0 +1,22 @@ +#ifndef INSPECTDATAITEM_H +#define INSPECTDATAITEM_H + +#include + +namespace Ui { +class InspectDataItem; +} + +class InspectDataItem : public QWidget +{ + Q_OBJECT + +public: + explicit InspectDataItem(QWidget *parent = nullptr); + ~InspectDataItem(); + +private: + Ui::InspectDataItem *ui; +}; + +#endif // INSPECTDATAITEM_H diff --git a/softwareDirectory/AutoVerScheme/inspectdataitem.ui b/softwareDirectory/AutoVerScheme/inspectdataitem.ui new file mode 100644 index 0000000..45f04e0 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/inspectdataitem.ui @@ -0,0 +1,32 @@ + + + InspectDataItem + + + + 0 + 0 + 400 + 300 + + + + Form + + + + + 120 + 130 + 89 + 24 + + + + 核查数据管理 + + + + + + diff --git a/softwareDirectory/AutoVerScheme/my_task.cpp b/softwareDirectory/AutoVerScheme/my_task.cpp new file mode 100644 index 0000000..40aceb2 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/my_task.cpp @@ -0,0 +1,42 @@ +#include "my_task.h" +#include "ui_my_task.h" +#include "QMessageBox" + +My_Task::My_Task(QWidget *parent) : + InfoBase(parent), + ui(new Ui::My_Task) +{ + ui->setupUi(this); + + this->initForm(); +} + +My_Task::~My_Task() +{ + delete ui; +} +void My_Task::initForm() +{ + + +} +void My_Task::ShowMessageBox(QString title,QString value) { + // 创建一个QMessageBox对象 + QMessageBox msgBox; + + // 设置消息框的标题 + msgBox.setWindowTitle(title); + + // 设置消息框的文本内容 + msgBox.setText(value); + + // 设置消息框的标准按钮,这里是“确定”按钮 + msgBox.setStandardButtons(QMessageBox::Ok); + + // 显示消息框 + msgBox.exec(); +} +void My_Task::Load() +{ + ShowMessageBox("我的任务页面","我的任务初始化完成"); +} diff --git a/softwareDirectory/AutoVerScheme/my_task.h b/softwareDirectory/AutoVerScheme/my_task.h new file mode 100644 index 0000000..d6600cb --- /dev/null +++ b/softwareDirectory/AutoVerScheme/my_task.h @@ -0,0 +1,28 @@ +#ifndef MY_TASK_H +#define MY_TASK_H + +#include +#include "InfoBase.h" + +namespace Ui { +class My_Task; +} + +class My_Task :public InfoBase +{ + Q_OBJECT + +public: + explicit My_Task(QWidget *parent = nullptr); + ~My_Task(); + + +private slots: + void initForm(); //初始化界面数据 + void ShowMessageBox(QString title,QString value); + void Load() override; +private: + Ui::My_Task *ui; +}; + +#endif // MY_TASK_H diff --git a/softwareDirectory/AutoVerScheme/my_task.ui b/softwareDirectory/AutoVerScheme/my_task.ui new file mode 100644 index 0000000..89245b8 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/my_task.ui @@ -0,0 +1,178 @@ + + + My_Task + + + + 0 + 0 + 857 + 511 + + + + Form + + + + + + + 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 + + + + 要求完成时间: + + + + + + + + + + 查询 + + + + + + + 重置 + + + + + + + + + + background-color:white; + + + + + + + + + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/rulefileitem.cpp b/softwareDirectory/AutoVerScheme/rulefileitem.cpp new file mode 100644 index 0000000..6f9ddd3 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/rulefileitem.cpp @@ -0,0 +1,14 @@ +#include "rulefileitem.h" +#include "ui_rulefileitem.h" + +RuleFileItem::RuleFileItem(QWidget *parent) : + QWidget(parent), + ui(new Ui::RuleFileItem) +{ + ui->setupUi(this); +} + +RuleFileItem::~RuleFileItem() +{ + delete ui; +} diff --git a/softwareDirectory/AutoVerScheme/rulefileitem.h b/softwareDirectory/AutoVerScheme/rulefileitem.h new file mode 100644 index 0000000..1fc81a1 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/rulefileitem.h @@ -0,0 +1,22 @@ +#ifndef RULEFILEITEM_H +#define RULEFILEITEM_H + +#include + +namespace Ui { +class RuleFileItem; +} + +class RuleFileItem : public QWidget +{ + Q_OBJECT + +public: + explicit RuleFileItem(QWidget *parent = nullptr); + ~RuleFileItem(); + +private: + Ui::RuleFileItem *ui; +}; + +#endif // RULEFILEITEM_H diff --git a/softwareDirectory/AutoVerScheme/rulefileitem.ui b/softwareDirectory/AutoVerScheme/rulefileitem.ui new file mode 100644 index 0000000..599e025 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/rulefileitem.ui @@ -0,0 +1,32 @@ + + + RuleFileItem + + + + 0 + 0 + 400 + 300 + + + + Form + + + + + 140 + 130 + 121 + 24 + + + + 规程文件管理 + + + + + + diff --git a/softwareDirectory/AutoVerScheme/standard_deviceitem.cpp b/softwareDirectory/AutoVerScheme/standard_deviceitem.cpp new file mode 100644 index 0000000..ed15b0a --- /dev/null +++ b/softwareDirectory/AutoVerScheme/standard_deviceitem.cpp @@ -0,0 +1,14 @@ +#include "standard_deviceitem.h" +#include "ui_standard_deviceitem.h" + +Standard_DeviceItem::Standard_DeviceItem(QWidget *parent) : + QWidget(parent), + ui(new Ui::Standard_DeviceItem) +{ + ui->setupUi(this); +} + +Standard_DeviceItem::~Standard_DeviceItem() +{ + delete ui; +} diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro index 5b8f852..fa0d8e5 100644 --- a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro @@ -1,5 +1,7 @@ QT += core gui QT += sql +QT += widgets + greaterThan(QT_MAJOR_VERSION, 4): QT += widgets CONFIG += c++11 @@ -16,22 +18,50 @@ #DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 SOURCES += \ + beexamined_deviceitem.cpp \ + create_task.cpp \ + depar_task.cpp \ indexwindow.cpp \ + infomanageview.cpp \ + inspectdataitem.cpp \ loginwindow.cpp \ main.cpp \ mainwindow.cpp \ + my_task.cpp \ + rulefileitem.cpp \ + standard_deviceitem.cpp \ + testdataitem.cpp \ testview.cpp HEADERS += \ + InfoBase.h \ + beexamined_deviceitem.h \ + create_task.h \ + depar_task.h \ indexwindow.h \ + infomanageview.h \ + inspectdataitem.h \ loginwindow.h \ mainwindow.h \ + my_task.h \ + rulefileitem.h \ + standard_deviceitem.h \ + testdataitem.h \ testview.h FORMS += \ + beexamined_deviceitem.ui \ + create_task.ui \ + depar_task.ui \ indexwindow.ui \ + infomanageview.ui \ + inspectdataitem.ui \ loginwindow.ui \ mainwindow.ui \ + my_task.ui \ + rulefileitem.ui \ + standard_deviceitem.ui \ + testdataitem.ui \ testview.ui # Default rules for deployment. diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user index 1f5ec64..32d22e9 100644 --- a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user @@ -1,6 +1,6 @@ - + EnvironmentId @@ -64,249 +64,6 @@ ProjectExplorer.Project.Target.0 - Desktop Qt 5.14.2 MinGW 64-bit - Desktop Qt 5.14.2 MinGW 64-bit - qt.qt5.5142.win64_mingw73_kit - 0 - 0 - 0 - - 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 - - Qt4ProjectManager.Qt4RunConfiguration:D:/Auto_verification_scheme/AutoVerScheme/AutoVerScheme.pro - D:/Auto_verification_scheme/AutoVerScheme/AutoVerScheme.pro - - false - - false - true - true - false - false - true - - D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Debug - - 1 - - - - ProjectExplorer.Project.Target.1 - Desktop Qt 5.14.2 MinGW 32-bit Desktop Qt 5.14.2 MinGW 32-bit qt.qt5.5142.win32_mingw73_kit @@ -530,8 +287,252 @@ 2 - Qt4ProjectManager.Qt4RunConfiguration:D:/Auto_verification_scheme/AutoVerScheme/AutoVerScheme.pro - D:/Auto_verification_scheme/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 + + 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 diff --git a/softwareDirectory/AutoVerScheme/InfoBase.cpp b/softwareDirectory/AutoVerScheme/InfoBase.cpp new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/InfoBase.cpp diff --git a/softwareDirectory/AutoVerScheme/InfoBase.h b/softwareDirectory/AutoVerScheme/InfoBase.h new file mode 100644 index 0000000..7fec63e --- /dev/null +++ b/softwareDirectory/AutoVerScheme/InfoBase.h @@ -0,0 +1,16 @@ +#ifndef INFOBASE_H +#define INFOBASE_H + +#include +///信号管理页面的基类 所有信息管理页面都继承于InfoBase +/// 便于统一管理 所有子类必须实现Load方法 +/// 每次按钮点击切换都会调用Load方法 用于每次页面的数据刷新 +class InfoBase : public QWidget { + Q_OBJECT +public: + InfoBase(QWidget *parent = nullptr): QWidget(parent){}; + // 纯虚函数 + virtual void Load()=0; +}; +#endif // INFOBASE_H + diff --git a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.cpp b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.cpp new file mode 100644 index 0000000..7ac1e87 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.cpp @@ -0,0 +1,14 @@ +#include "beexamined_deviceitem.h" +#include "ui_beexamined_deviceitem.h" + +BeExamined_DeviceItem::BeExamined_DeviceItem(QWidget *parent) : + QWidget(parent), + ui(new Ui::BeExamined_DeviceItem) +{ + ui->setupUi(this); +} + +BeExamined_DeviceItem::~BeExamined_DeviceItem() +{ + delete ui; +} diff --git a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.h b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.h new file mode 100644 index 0000000..76b061d --- /dev/null +++ b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.h @@ -0,0 +1,22 @@ +#ifndef BEEXAMINED_DEVICEITEM_H +#define BEEXAMINED_DEVICEITEM_H + +#include + +namespace Ui { +class BeExamined_DeviceItem; +} + +class BeExamined_DeviceItem : public QWidget +{ + Q_OBJECT + +public: + explicit BeExamined_DeviceItem(QWidget *parent = nullptr); + ~BeExamined_DeviceItem(); + +private: + Ui::BeExamined_DeviceItem *ui; +}; + +#endif // BEEXAMINED_DEVICEITEM_H diff --git a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.ui b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.ui new file mode 100644 index 0000000..af9f7bf --- /dev/null +++ b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.ui @@ -0,0 +1,32 @@ + + + BeExamined_DeviceItem + + + + 0 + 0 + 400 + 300 + + + + Form + + + + + 130 + 140 + 89 + 24 + + + + 被检设备管理 + + + + + + diff --git a/softwareDirectory/AutoVerScheme/create_task.cpp b/softwareDirectory/AutoVerScheme/create_task.cpp new file mode 100644 index 0000000..4193efc --- /dev/null +++ b/softwareDirectory/AutoVerScheme/create_task.cpp @@ -0,0 +1,14 @@ +#include "create_task.h" +#include "ui_create_task.h" + +Create_Task::Create_Task(QWidget *parent) : + QWidget(parent), + ui(new Ui::Create_Task) +{ + ui->setupUi(this); +} + +Create_Task::~Create_Task() +{ + delete ui; +} diff --git a/softwareDirectory/AutoVerScheme/create_task.h b/softwareDirectory/AutoVerScheme/create_task.h new file mode 100644 index 0000000..e2264de --- /dev/null +++ b/softwareDirectory/AutoVerScheme/create_task.h @@ -0,0 +1,22 @@ +#ifndef CREATE_TASK_H +#define CREATE_TASK_H + +#include + +namespace Ui { +class Create_Task; +} + +class Create_Task : public QWidget +{ + Q_OBJECT + +public: + explicit Create_Task(QWidget *parent = nullptr); + ~Create_Task(); + +private: + Ui::Create_Task *ui; +}; + +#endif // CREATE_TASK_H diff --git a/softwareDirectory/AutoVerScheme/create_task.ui b/softwareDirectory/AutoVerScheme/create_task.ui new file mode 100644 index 0000000..b79c6a1 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/create_task.ui @@ -0,0 +1,35 @@ + + + Create_Task + + + + 0 + 0 + 400 + 300 + + + + Form + + + background-color:red; + + + + + 140 + 120 + 89 + 24 + + + + 创建任务单 + + + + + + diff --git a/softwareDirectory/AutoVerScheme/depar_task.cpp b/softwareDirectory/AutoVerScheme/depar_task.cpp new file mode 100644 index 0000000..de39775 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/depar_task.cpp @@ -0,0 +1,42 @@ +#include "depar_task.h" +#include "ui_depar_task.h" +#include "QMessageBox" +#include "InfoBase.h" + +Depar_Task::Depar_Task(QWidget *parent) : + InfoBase(parent), + ui(new Ui::Depar_Task) +{ + ui->setupUi(this); + this->initForm(); +} + +Depar_Task::~Depar_Task() +{ + delete ui; +} +void Depar_Task::initForm() +{ + + //ShowMessageBox("标题","初始化完成"); +} +void Depar_Task::ShowMessageBox(QString title,QString value) { + // 创建一个QMessageBox对象 + QMessageBox msgBox; + + // 设置消息框的标题 + msgBox.setWindowTitle(title); + + // 设置消息框的文本内容 + msgBox.setText(value); + + // 设置消息框的标准按钮,这里是“确定”按钮 + msgBox.setStandardButtons(QMessageBox::Ok); + + // 显示消息框 + msgBox.exec(); +} +void Depar_Task::Load() +{ + ShowMessageBox("部门任务页面","部门任务初始化完成"); +} diff --git a/softwareDirectory/AutoVerScheme/depar_task.h b/softwareDirectory/AutoVerScheme/depar_task.h new file mode 100644 index 0000000..8716faf --- /dev/null +++ b/softwareDirectory/AutoVerScheme/depar_task.h @@ -0,0 +1,28 @@ +#ifndef DEPAR_TASK_H +#define DEPAR_TASK_H + + +#include "InfoBase.h" + +namespace Ui { +class Depar_Task; +} + +class Depar_Task :public InfoBase +{ + Q_OBJECT + +public: + Depar_Task(QWidget *parent = nullptr); + ~Depar_Task(); + + +private slots: + void initForm(); //初始化界面数据 + void ShowMessageBox(QString title,QString value); + void Load() override; +private: + Ui::Depar_Task *ui; +}; + +#endif // DEPAR_TASK_H diff --git a/softwareDirectory/AutoVerScheme/depar_task.ui b/softwareDirectory/AutoVerScheme/depar_task.ui new file mode 100644 index 0000000..ff3d44f --- /dev/null +++ b/softwareDirectory/AutoVerScheme/depar_task.ui @@ -0,0 +1,181 @@ + + + Depar_Task + + + + 0 + 0 + 1184 + 456 + + + + Form + + + color:black; + + + + + + + 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 + + + + 要求完成时间: + + + + + + + + + + 查询 + + + + + + + 重置 + + + + + + + + + + background-color:white; + + + + + + + + + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/indexwindow.cpp b/softwareDirectory/AutoVerScheme/indexwindow.cpp index 3e52c7b..9bd65b1 100644 --- a/softwareDirectory/AutoVerScheme/indexwindow.cpp +++ b/softwareDirectory/AutoVerScheme/indexwindow.cpp @@ -21,6 +21,7 @@ //调用样式 loadStyle(":/qss/Index.css"); + } void IndexWindow::loadStyle(const QString &qssFile) diff --git a/softwareDirectory/AutoVerScheme/infomanageview.cpp b/softwareDirectory/AutoVerScheme/infomanageview.cpp new file mode 100644 index 0000000..a206c6f --- /dev/null +++ b/softwareDirectory/AutoVerScheme/infomanageview.cpp @@ -0,0 +1,150 @@ +#include "infomanageview.h" +#include "ui_infomanageview.h" +#include +#include +//子窗体 +#include "depar_task.h" +#include "my_task.h" +#include "create_task.h" +#include "beexamined_deviceitem.h" +#include "inspectdataitem.h" +#include "rulefileitem.h" +#include "standard_deviceitem.h" +#include "testdataitem.h" +#include "InfoBase.h" + +InfoManageView::InfoManageView(QWidget *parent) : + QWidget(parent), + ui(new Ui::InfoManageView) +{ + ui->setupUi(this); + this->setWindowTitle("信息管理"); + //初始化调用所有函数 + this->initForm(); + this->initWidget(); + this->initNav(); + this->initIcon(); +} +//左侧滚动条事件 +void InfoManageView::showEvent(QShowEvent *) +{ + //滚动到底部 + QScrollBar *bar = ui->scrollArea->verticalScrollBar(); + bar->setValue(bar->maximum()); +} + +//左侧导航栏样式初始化 +void InfoManageView::initIcon() +{ + //左侧导航样式,可以设置各种牛逼的参数,超级棒 + // IconHelper::StyleColor styleColor; + //styleColor.defaultBorder = true; + // IconHelper::setStyle(ui->widgetLeft, btns, icons, styleColor); +} + +//颜色初始化设置 +QList InfoManageView::colors = QList(); +void InfoManageView::initForm() +{ + //颜色集合供其他界面使用 + colors << QColor(211, 78, 78) << QColor(29, 185, 242) << QColor(170, 162, 119) << QColor(255, 192, 1); + colors << QColor(0, 176, 180) << QColor(0, 113, 193) << QColor(255, 192, 0); + colors << QColor(72, 103, 149) << QColor(185, 87, 86) << QColor(0, 177, 125); + colors << QColor(214, 77, 84) << QColor(71, 164, 233) << QColor(34, 163, 169); + colors << QColor(59, 123, 156) << QColor(162, 121, 197) << QColor(72, 202, 245); + colors << QColor(0, 150, 121) << QColor(111, 9, 176) << QColor(250, 170, 20); + + ui->scrollArea->setFixedWidth(170); + ui->widgetLeft->setProperty("flag", "left"); +} + +//右侧可切换UI导入 +void InfoManageView::initWidget() +{ + ui->stackedWidget->addWidget(new Depar_Task); //部门任务 + ui->stackedWidget->addWidget(new My_Task); //我的任务 + ui->stackedWidget->addWidget(new Create_Task); //创建任务单 + ui->stackedWidget->addWidget(new Standard_DeviceItem); //标准设备管理 + ui->stackedWidget->addWidget(new BeExamined_DeviceItem); //被检设备管理 + ui->stackedWidget->addWidget(new TestDataItem); //检定数据管理 + ui->stackedWidget->addWidget(new InspectDataItem); //核查数据管理 + ui->stackedWidget->addWidget(new RuleFileItem); //技术文件管理 + + +} +//左侧列表信息导入 +void InfoManageView::initNav() +{ + //按钮文字集合 + QStringList names; + names << "部门任务" << "我的任务" << "创建任务单" << "标准设备管理" << "被检设备管理" + << "检定数据管理" << "核查数据管理" << "技术文件管理" ; + + //自动生成按钮 + for (int i = 0; i < names.count(); i++) { + QToolButton *btn = new QToolButton; + //设置按钮固定高度 + btn->setFixedHeight(35); + //设置按钮的文字 + //btn->setText(QString("%1. %2").arg(i + 1, 2, 10, QChar('0')).arg(names.at(i))); + btn->setText(QString("%1").arg(names.at(i))); + //设置按钮可选中按下类似复选框的功能 + btn->setCheckable(true); + //设置按钮图标在左侧文字在右侧 + // btn->setToolButtonStyle(Qt::ToolButtonTextBesideIcon); + //设置按钮拉伸策略为横向填充 + btn->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Preferred); + //关联按钮单击事件 + connect(btn, SIGNAL(clicked(bool)), this, SLOT(buttonClicked())); + //将按钮加入到布局 + ui->widgetLeft->layout()->addWidget(btn); + //可以指定不同的图标 + //icons << 0xf061; + btns << btn; + //设置按钮大小 + btn->setFixedSize(170, 70); + //设置鼠标经过和点击事件 + btn->setStyleSheet("QToolButton:hover " + "{ background-color: rgba(53, 91, 171, 1); }" + "QToolButton::checked { " + "background-color: rgba(53, 91, 171, 1)}"); + + //ui->widgetLeft->setFixedWidth(200); + } + + //底部加个弹簧 + QSpacerItem *verticalSpacer = new QSpacerItem(20, 40, QSizePolicy::Minimum, QSizePolicy::Expanding); + ui->widgetLeft->layout()->addItem(verticalSpacer); + btns.at(names.count() - 1)->click(); +} +//按钮点击切换UI事件 +void InfoManageView::buttonClicked() +{ + QAbstractButton *b = (QAbstractButton *)sender(); + int count = btns.count(); + int index = btns.indexOf(b); + ui->stackedWidget->setCurrentIndex(index); + + + // 获取当前在 QStackedWidget 中的部件 + QWidget* currentWidget = ui->stackedWidget->currentWidget(); + + // 尝试将当前部件转换为 InfoBase 类型 + InfoBase* currQWidget = qobject_cast(currentWidget); + // 检查转换是否成功 + if (currQWidget != nullptr) + { + // 如果转换成功,调用子类Load 方法 + currQWidget->Load(); + } + + for (int i = 0; i < count; i++) { + QAbstractButton *btn = btns.at(i); + btn->setChecked(btn == b); + } +} + +InfoManageView::~InfoManageView() +{ + delete ui; +} diff --git a/softwareDirectory/AutoVerScheme/infomanageview.h b/softwareDirectory/AutoVerScheme/infomanageview.h new file mode 100644 index 0000000..3c1463f --- /dev/null +++ b/softwareDirectory/AutoVerScheme/infomanageview.h @@ -0,0 +1,38 @@ +#ifndef INFOMANAGEVIEW_H +#define INFOMANAGEVIEW_H + +#include + +class QAbstractButton; + + +namespace Ui { +class InfoManageView; +} + +class InfoManageView : public QWidget +{ + Q_OBJECT + +public: + static QList colors; + + explicit InfoManageView(QWidget *parent = nullptr); + ~InfoManageView(); +private slots: + void initForm(); //初始化界面数据 + void initWidget(); //初始化子窗体 + void initNav(); //初始化导航按钮 + void initIcon(); //初始化导航按钮图标 + void buttonClicked(); //导航按钮单击事件 +protected: + void showEvent(QShowEvent *); +private: + Ui::InfoManageView *ui; + + //左侧导航栏图标+按钮集合 + QList icons; + QList btns; +}; + +#endif // INFOMANAGEVIEW_H diff --git a/softwareDirectory/AutoVerScheme/infomanageview.ui b/softwareDirectory/AutoVerScheme/infomanageview.ui new file mode 100644 index 0000000..4b39e7d --- /dev/null +++ b/softwareDirectory/AutoVerScheme/infomanageview.ui @@ -0,0 +1,109 @@ + + + InfoManageView + + + + 0 + 0 + 883 + 644 + + + + Form + + + + 0 + + + 0 + + + 0 + + + 0 + + + 0 + + + + + + 0 + 0 + + + + + 170 + 0 + + + + + 16777215 + 16777215 + + + + color:White; + font-weight: bold; + font-size: 16px; +background-color:rgba(10, 15, 92, 1); + + + true + + + + + 0 + 0 + 170 + 625 + + + + + 170 + 0 + + + + + 170 + 0 + + + + + 0 + + + 0 + + + 0 + + + 0 + + + 0 + + + + + + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/inspectdataitem.cpp b/softwareDirectory/AutoVerScheme/inspectdataitem.cpp new file mode 100644 index 0000000..e9c2adc --- /dev/null +++ b/softwareDirectory/AutoVerScheme/inspectdataitem.cpp @@ -0,0 +1,14 @@ +#include "inspectdataitem.h" +#include "ui_inspectdataitem.h" + +InspectDataItem::InspectDataItem(QWidget *parent) : + QWidget(parent), + ui(new Ui::InspectDataItem) +{ + ui->setupUi(this); +} + +InspectDataItem::~InspectDataItem() +{ + delete ui; +} diff --git a/softwareDirectory/AutoVerScheme/inspectdataitem.h b/softwareDirectory/AutoVerScheme/inspectdataitem.h new file mode 100644 index 0000000..57551bb --- /dev/null +++ b/softwareDirectory/AutoVerScheme/inspectdataitem.h @@ -0,0 +1,22 @@ +#ifndef INSPECTDATAITEM_H +#define INSPECTDATAITEM_H + +#include + +namespace Ui { +class InspectDataItem; +} + +class InspectDataItem : public QWidget +{ + Q_OBJECT + +public: + explicit InspectDataItem(QWidget *parent = nullptr); + ~InspectDataItem(); + +private: + Ui::InspectDataItem *ui; +}; + +#endif // INSPECTDATAITEM_H diff --git a/softwareDirectory/AutoVerScheme/inspectdataitem.ui b/softwareDirectory/AutoVerScheme/inspectdataitem.ui new file mode 100644 index 0000000..45f04e0 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/inspectdataitem.ui @@ -0,0 +1,32 @@ + + + InspectDataItem + + + + 0 + 0 + 400 + 300 + + + + Form + + + + + 120 + 130 + 89 + 24 + + + + 核查数据管理 + + + + + + diff --git a/softwareDirectory/AutoVerScheme/my_task.cpp b/softwareDirectory/AutoVerScheme/my_task.cpp new file mode 100644 index 0000000..40aceb2 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/my_task.cpp @@ -0,0 +1,42 @@ +#include "my_task.h" +#include "ui_my_task.h" +#include "QMessageBox" + +My_Task::My_Task(QWidget *parent) : + InfoBase(parent), + ui(new Ui::My_Task) +{ + ui->setupUi(this); + + this->initForm(); +} + +My_Task::~My_Task() +{ + delete ui; +} +void My_Task::initForm() +{ + + +} +void My_Task::ShowMessageBox(QString title,QString value) { + // 创建一个QMessageBox对象 + QMessageBox msgBox; + + // 设置消息框的标题 + msgBox.setWindowTitle(title); + + // 设置消息框的文本内容 + msgBox.setText(value); + + // 设置消息框的标准按钮,这里是“确定”按钮 + msgBox.setStandardButtons(QMessageBox::Ok); + + // 显示消息框 + msgBox.exec(); +} +void My_Task::Load() +{ + ShowMessageBox("我的任务页面","我的任务初始化完成"); +} diff --git a/softwareDirectory/AutoVerScheme/my_task.h b/softwareDirectory/AutoVerScheme/my_task.h new file mode 100644 index 0000000..d6600cb --- /dev/null +++ b/softwareDirectory/AutoVerScheme/my_task.h @@ -0,0 +1,28 @@ +#ifndef MY_TASK_H +#define MY_TASK_H + +#include +#include "InfoBase.h" + +namespace Ui { +class My_Task; +} + +class My_Task :public InfoBase +{ + Q_OBJECT + +public: + explicit My_Task(QWidget *parent = nullptr); + ~My_Task(); + + +private slots: + void initForm(); //初始化界面数据 + void ShowMessageBox(QString title,QString value); + void Load() override; +private: + Ui::My_Task *ui; +}; + +#endif // MY_TASK_H diff --git a/softwareDirectory/AutoVerScheme/my_task.ui b/softwareDirectory/AutoVerScheme/my_task.ui new file mode 100644 index 0000000..89245b8 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/my_task.ui @@ -0,0 +1,178 @@ + + + My_Task + + + + 0 + 0 + 857 + 511 + + + + Form + + + + + + + 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 + + + + 要求完成时间: + + + + + + + + + + 查询 + + + + + + + 重置 + + + + + + + + + + background-color:white; + + + + + + + + + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/rulefileitem.cpp b/softwareDirectory/AutoVerScheme/rulefileitem.cpp new file mode 100644 index 0000000..6f9ddd3 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/rulefileitem.cpp @@ -0,0 +1,14 @@ +#include "rulefileitem.h" +#include "ui_rulefileitem.h" + +RuleFileItem::RuleFileItem(QWidget *parent) : + QWidget(parent), + ui(new Ui::RuleFileItem) +{ + ui->setupUi(this); +} + +RuleFileItem::~RuleFileItem() +{ + delete ui; +} diff --git a/softwareDirectory/AutoVerScheme/rulefileitem.h b/softwareDirectory/AutoVerScheme/rulefileitem.h new file mode 100644 index 0000000..1fc81a1 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/rulefileitem.h @@ -0,0 +1,22 @@ +#ifndef RULEFILEITEM_H +#define RULEFILEITEM_H + +#include + +namespace Ui { +class RuleFileItem; +} + +class RuleFileItem : public QWidget +{ + Q_OBJECT + +public: + explicit RuleFileItem(QWidget *parent = nullptr); + ~RuleFileItem(); + +private: + Ui::RuleFileItem *ui; +}; + +#endif // RULEFILEITEM_H diff --git a/softwareDirectory/AutoVerScheme/rulefileitem.ui b/softwareDirectory/AutoVerScheme/rulefileitem.ui new file mode 100644 index 0000000..599e025 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/rulefileitem.ui @@ -0,0 +1,32 @@ + + + RuleFileItem + + + + 0 + 0 + 400 + 300 + + + + Form + + + + + 140 + 130 + 121 + 24 + + + + 规程文件管理 + + + + + + diff --git a/softwareDirectory/AutoVerScheme/standard_deviceitem.cpp b/softwareDirectory/AutoVerScheme/standard_deviceitem.cpp new file mode 100644 index 0000000..ed15b0a --- /dev/null +++ b/softwareDirectory/AutoVerScheme/standard_deviceitem.cpp @@ -0,0 +1,14 @@ +#include "standard_deviceitem.h" +#include "ui_standard_deviceitem.h" + +Standard_DeviceItem::Standard_DeviceItem(QWidget *parent) : + QWidget(parent), + ui(new Ui::Standard_DeviceItem) +{ + ui->setupUi(this); +} + +Standard_DeviceItem::~Standard_DeviceItem() +{ + delete ui; +} diff --git a/softwareDirectory/AutoVerScheme/standard_deviceitem.h b/softwareDirectory/AutoVerScheme/standard_deviceitem.h new file mode 100644 index 0000000..198c362 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/standard_deviceitem.h @@ -0,0 +1,22 @@ +#ifndef STANDARD_DEVICEITEM_H +#define STANDARD_DEVICEITEM_H + +#include + +namespace Ui { +class Standard_DeviceItem; +} + +class Standard_DeviceItem : public QWidget +{ + Q_OBJECT + +public: + explicit Standard_DeviceItem(QWidget *parent = nullptr); + ~Standard_DeviceItem(); + +private: + Ui::Standard_DeviceItem *ui; +}; + +#endif // STANDARD_DEVICEITEM_H diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro index 5b8f852..fa0d8e5 100644 --- a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro @@ -1,5 +1,7 @@ QT += core gui QT += sql +QT += widgets + greaterThan(QT_MAJOR_VERSION, 4): QT += widgets CONFIG += c++11 @@ -16,22 +18,50 @@ #DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 SOURCES += \ + beexamined_deviceitem.cpp \ + create_task.cpp \ + depar_task.cpp \ indexwindow.cpp \ + infomanageview.cpp \ + inspectdataitem.cpp \ loginwindow.cpp \ main.cpp \ mainwindow.cpp \ + my_task.cpp \ + rulefileitem.cpp \ + standard_deviceitem.cpp \ + testdataitem.cpp \ testview.cpp HEADERS += \ + InfoBase.h \ + beexamined_deviceitem.h \ + create_task.h \ + depar_task.h \ indexwindow.h \ + infomanageview.h \ + inspectdataitem.h \ loginwindow.h \ mainwindow.h \ + my_task.h \ + rulefileitem.h \ + standard_deviceitem.h \ + testdataitem.h \ testview.h FORMS += \ + beexamined_deviceitem.ui \ + create_task.ui \ + depar_task.ui \ indexwindow.ui \ + infomanageview.ui \ + inspectdataitem.ui \ loginwindow.ui \ mainwindow.ui \ + my_task.ui \ + rulefileitem.ui \ + standard_deviceitem.ui \ + testdataitem.ui \ testview.ui # Default rules for deployment. diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user index 1f5ec64..32d22e9 100644 --- a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user @@ -1,6 +1,6 @@ - + EnvironmentId @@ -64,249 +64,6 @@ ProjectExplorer.Project.Target.0 - Desktop Qt 5.14.2 MinGW 64-bit - Desktop Qt 5.14.2 MinGW 64-bit - qt.qt5.5142.win64_mingw73_kit - 0 - 0 - 0 - - 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 - - Qt4ProjectManager.Qt4RunConfiguration:D:/Auto_verification_scheme/AutoVerScheme/AutoVerScheme.pro - D:/Auto_verification_scheme/AutoVerScheme/AutoVerScheme.pro - - false - - false - true - true - false - false - true - - D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Debug - - 1 - - - - ProjectExplorer.Project.Target.1 - Desktop Qt 5.14.2 MinGW 32-bit Desktop Qt 5.14.2 MinGW 32-bit qt.qt5.5142.win32_mingw73_kit @@ -530,8 +287,252 @@ 2 - Qt4ProjectManager.Qt4RunConfiguration:D:/Auto_verification_scheme/AutoVerScheme/AutoVerScheme.pro - D:/Auto_verification_scheme/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 + + 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 diff --git a/softwareDirectory/AutoVerScheme/InfoBase.cpp b/softwareDirectory/AutoVerScheme/InfoBase.cpp new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/InfoBase.cpp diff --git a/softwareDirectory/AutoVerScheme/InfoBase.h b/softwareDirectory/AutoVerScheme/InfoBase.h new file mode 100644 index 0000000..7fec63e --- /dev/null +++ b/softwareDirectory/AutoVerScheme/InfoBase.h @@ -0,0 +1,16 @@ +#ifndef INFOBASE_H +#define INFOBASE_H + +#include +///信号管理页面的基类 所有信息管理页面都继承于InfoBase +/// 便于统一管理 所有子类必须实现Load方法 +/// 每次按钮点击切换都会调用Load方法 用于每次页面的数据刷新 +class InfoBase : public QWidget { + Q_OBJECT +public: + InfoBase(QWidget *parent = nullptr): QWidget(parent){}; + // 纯虚函数 + virtual void Load()=0; +}; +#endif // INFOBASE_H + diff --git a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.cpp b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.cpp new file mode 100644 index 0000000..7ac1e87 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.cpp @@ -0,0 +1,14 @@ +#include "beexamined_deviceitem.h" +#include "ui_beexamined_deviceitem.h" + +BeExamined_DeviceItem::BeExamined_DeviceItem(QWidget *parent) : + QWidget(parent), + ui(new Ui::BeExamined_DeviceItem) +{ + ui->setupUi(this); +} + +BeExamined_DeviceItem::~BeExamined_DeviceItem() +{ + delete ui; +} diff --git a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.h b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.h new file mode 100644 index 0000000..76b061d --- /dev/null +++ b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.h @@ -0,0 +1,22 @@ +#ifndef BEEXAMINED_DEVICEITEM_H +#define BEEXAMINED_DEVICEITEM_H + +#include + +namespace Ui { +class BeExamined_DeviceItem; +} + +class BeExamined_DeviceItem : public QWidget +{ + Q_OBJECT + +public: + explicit BeExamined_DeviceItem(QWidget *parent = nullptr); + ~BeExamined_DeviceItem(); + +private: + Ui::BeExamined_DeviceItem *ui; +}; + +#endif // BEEXAMINED_DEVICEITEM_H diff --git a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.ui b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.ui new file mode 100644 index 0000000..af9f7bf --- /dev/null +++ b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.ui @@ -0,0 +1,32 @@ + + + BeExamined_DeviceItem + + + + 0 + 0 + 400 + 300 + + + + Form + + + + + 130 + 140 + 89 + 24 + + + + 被检设备管理 + + + + + + diff --git a/softwareDirectory/AutoVerScheme/create_task.cpp b/softwareDirectory/AutoVerScheme/create_task.cpp new file mode 100644 index 0000000..4193efc --- /dev/null +++ b/softwareDirectory/AutoVerScheme/create_task.cpp @@ -0,0 +1,14 @@ +#include "create_task.h" +#include "ui_create_task.h" + +Create_Task::Create_Task(QWidget *parent) : + QWidget(parent), + ui(new Ui::Create_Task) +{ + ui->setupUi(this); +} + +Create_Task::~Create_Task() +{ + delete ui; +} diff --git a/softwareDirectory/AutoVerScheme/create_task.h b/softwareDirectory/AutoVerScheme/create_task.h new file mode 100644 index 0000000..e2264de --- /dev/null +++ b/softwareDirectory/AutoVerScheme/create_task.h @@ -0,0 +1,22 @@ +#ifndef CREATE_TASK_H +#define CREATE_TASK_H + +#include + +namespace Ui { +class Create_Task; +} + +class Create_Task : public QWidget +{ + Q_OBJECT + +public: + explicit Create_Task(QWidget *parent = nullptr); + ~Create_Task(); + +private: + Ui::Create_Task *ui; +}; + +#endif // CREATE_TASK_H diff --git a/softwareDirectory/AutoVerScheme/create_task.ui b/softwareDirectory/AutoVerScheme/create_task.ui new file mode 100644 index 0000000..b79c6a1 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/create_task.ui @@ -0,0 +1,35 @@ + + + Create_Task + + + + 0 + 0 + 400 + 300 + + + + Form + + + background-color:red; + + + + + 140 + 120 + 89 + 24 + + + + 创建任务单 + + + + + + diff --git a/softwareDirectory/AutoVerScheme/depar_task.cpp b/softwareDirectory/AutoVerScheme/depar_task.cpp new file mode 100644 index 0000000..de39775 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/depar_task.cpp @@ -0,0 +1,42 @@ +#include "depar_task.h" +#include "ui_depar_task.h" +#include "QMessageBox" +#include "InfoBase.h" + +Depar_Task::Depar_Task(QWidget *parent) : + InfoBase(parent), + ui(new Ui::Depar_Task) +{ + ui->setupUi(this); + this->initForm(); +} + +Depar_Task::~Depar_Task() +{ + delete ui; +} +void Depar_Task::initForm() +{ + + //ShowMessageBox("标题","初始化完成"); +} +void Depar_Task::ShowMessageBox(QString title,QString value) { + // 创建一个QMessageBox对象 + QMessageBox msgBox; + + // 设置消息框的标题 + msgBox.setWindowTitle(title); + + // 设置消息框的文本内容 + msgBox.setText(value); + + // 设置消息框的标准按钮,这里是“确定”按钮 + msgBox.setStandardButtons(QMessageBox::Ok); + + // 显示消息框 + msgBox.exec(); +} +void Depar_Task::Load() +{ + ShowMessageBox("部门任务页面","部门任务初始化完成"); +} diff --git a/softwareDirectory/AutoVerScheme/depar_task.h b/softwareDirectory/AutoVerScheme/depar_task.h new file mode 100644 index 0000000..8716faf --- /dev/null +++ b/softwareDirectory/AutoVerScheme/depar_task.h @@ -0,0 +1,28 @@ +#ifndef DEPAR_TASK_H +#define DEPAR_TASK_H + + +#include "InfoBase.h" + +namespace Ui { +class Depar_Task; +} + +class Depar_Task :public InfoBase +{ + Q_OBJECT + +public: + Depar_Task(QWidget *parent = nullptr); + ~Depar_Task(); + + +private slots: + void initForm(); //初始化界面数据 + void ShowMessageBox(QString title,QString value); + void Load() override; +private: + Ui::Depar_Task *ui; +}; + +#endif // DEPAR_TASK_H diff --git a/softwareDirectory/AutoVerScheme/depar_task.ui b/softwareDirectory/AutoVerScheme/depar_task.ui new file mode 100644 index 0000000..ff3d44f --- /dev/null +++ b/softwareDirectory/AutoVerScheme/depar_task.ui @@ -0,0 +1,181 @@ + + + Depar_Task + + + + 0 + 0 + 1184 + 456 + + + + Form + + + color:black; + + + + + + + 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 + + + + 要求完成时间: + + + + + + + + + + 查询 + + + + + + + 重置 + + + + + + + + + + background-color:white; + + + + + + + + + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/indexwindow.cpp b/softwareDirectory/AutoVerScheme/indexwindow.cpp index 3e52c7b..9bd65b1 100644 --- a/softwareDirectory/AutoVerScheme/indexwindow.cpp +++ b/softwareDirectory/AutoVerScheme/indexwindow.cpp @@ -21,6 +21,7 @@ //调用样式 loadStyle(":/qss/Index.css"); + } void IndexWindow::loadStyle(const QString &qssFile) diff --git a/softwareDirectory/AutoVerScheme/infomanageview.cpp b/softwareDirectory/AutoVerScheme/infomanageview.cpp new file mode 100644 index 0000000..a206c6f --- /dev/null +++ b/softwareDirectory/AutoVerScheme/infomanageview.cpp @@ -0,0 +1,150 @@ +#include "infomanageview.h" +#include "ui_infomanageview.h" +#include +#include +//子窗体 +#include "depar_task.h" +#include "my_task.h" +#include "create_task.h" +#include "beexamined_deviceitem.h" +#include "inspectdataitem.h" +#include "rulefileitem.h" +#include "standard_deviceitem.h" +#include "testdataitem.h" +#include "InfoBase.h" + +InfoManageView::InfoManageView(QWidget *parent) : + QWidget(parent), + ui(new Ui::InfoManageView) +{ + ui->setupUi(this); + this->setWindowTitle("信息管理"); + //初始化调用所有函数 + this->initForm(); + this->initWidget(); + this->initNav(); + this->initIcon(); +} +//左侧滚动条事件 +void InfoManageView::showEvent(QShowEvent *) +{ + //滚动到底部 + QScrollBar *bar = ui->scrollArea->verticalScrollBar(); + bar->setValue(bar->maximum()); +} + +//左侧导航栏样式初始化 +void InfoManageView::initIcon() +{ + //左侧导航样式,可以设置各种牛逼的参数,超级棒 + // IconHelper::StyleColor styleColor; + //styleColor.defaultBorder = true; + // IconHelper::setStyle(ui->widgetLeft, btns, icons, styleColor); +} + +//颜色初始化设置 +QList InfoManageView::colors = QList(); +void InfoManageView::initForm() +{ + //颜色集合供其他界面使用 + colors << QColor(211, 78, 78) << QColor(29, 185, 242) << QColor(170, 162, 119) << QColor(255, 192, 1); + colors << QColor(0, 176, 180) << QColor(0, 113, 193) << QColor(255, 192, 0); + colors << QColor(72, 103, 149) << QColor(185, 87, 86) << QColor(0, 177, 125); + colors << QColor(214, 77, 84) << QColor(71, 164, 233) << QColor(34, 163, 169); + colors << QColor(59, 123, 156) << QColor(162, 121, 197) << QColor(72, 202, 245); + colors << QColor(0, 150, 121) << QColor(111, 9, 176) << QColor(250, 170, 20); + + ui->scrollArea->setFixedWidth(170); + ui->widgetLeft->setProperty("flag", "left"); +} + +//右侧可切换UI导入 +void InfoManageView::initWidget() +{ + ui->stackedWidget->addWidget(new Depar_Task); //部门任务 + ui->stackedWidget->addWidget(new My_Task); //我的任务 + ui->stackedWidget->addWidget(new Create_Task); //创建任务单 + ui->stackedWidget->addWidget(new Standard_DeviceItem); //标准设备管理 + ui->stackedWidget->addWidget(new BeExamined_DeviceItem); //被检设备管理 + ui->stackedWidget->addWidget(new TestDataItem); //检定数据管理 + ui->stackedWidget->addWidget(new InspectDataItem); //核查数据管理 + ui->stackedWidget->addWidget(new RuleFileItem); //技术文件管理 + + +} +//左侧列表信息导入 +void InfoManageView::initNav() +{ + //按钮文字集合 + QStringList names; + names << "部门任务" << "我的任务" << "创建任务单" << "标准设备管理" << "被检设备管理" + << "检定数据管理" << "核查数据管理" << "技术文件管理" ; + + //自动生成按钮 + for (int i = 0; i < names.count(); i++) { + QToolButton *btn = new QToolButton; + //设置按钮固定高度 + btn->setFixedHeight(35); + //设置按钮的文字 + //btn->setText(QString("%1. %2").arg(i + 1, 2, 10, QChar('0')).arg(names.at(i))); + btn->setText(QString("%1").arg(names.at(i))); + //设置按钮可选中按下类似复选框的功能 + btn->setCheckable(true); + //设置按钮图标在左侧文字在右侧 + // btn->setToolButtonStyle(Qt::ToolButtonTextBesideIcon); + //设置按钮拉伸策略为横向填充 + btn->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Preferred); + //关联按钮单击事件 + connect(btn, SIGNAL(clicked(bool)), this, SLOT(buttonClicked())); + //将按钮加入到布局 + ui->widgetLeft->layout()->addWidget(btn); + //可以指定不同的图标 + //icons << 0xf061; + btns << btn; + //设置按钮大小 + btn->setFixedSize(170, 70); + //设置鼠标经过和点击事件 + btn->setStyleSheet("QToolButton:hover " + "{ background-color: rgba(53, 91, 171, 1); }" + "QToolButton::checked { " + "background-color: rgba(53, 91, 171, 1)}"); + + //ui->widgetLeft->setFixedWidth(200); + } + + //底部加个弹簧 + QSpacerItem *verticalSpacer = new QSpacerItem(20, 40, QSizePolicy::Minimum, QSizePolicy::Expanding); + ui->widgetLeft->layout()->addItem(verticalSpacer); + btns.at(names.count() - 1)->click(); +} +//按钮点击切换UI事件 +void InfoManageView::buttonClicked() +{ + QAbstractButton *b = (QAbstractButton *)sender(); + int count = btns.count(); + int index = btns.indexOf(b); + ui->stackedWidget->setCurrentIndex(index); + + + // 获取当前在 QStackedWidget 中的部件 + QWidget* currentWidget = ui->stackedWidget->currentWidget(); + + // 尝试将当前部件转换为 InfoBase 类型 + InfoBase* currQWidget = qobject_cast(currentWidget); + // 检查转换是否成功 + if (currQWidget != nullptr) + { + // 如果转换成功,调用子类Load 方法 + currQWidget->Load(); + } + + for (int i = 0; i < count; i++) { + QAbstractButton *btn = btns.at(i); + btn->setChecked(btn == b); + } +} + +InfoManageView::~InfoManageView() +{ + delete ui; +} diff --git a/softwareDirectory/AutoVerScheme/infomanageview.h b/softwareDirectory/AutoVerScheme/infomanageview.h new file mode 100644 index 0000000..3c1463f --- /dev/null +++ b/softwareDirectory/AutoVerScheme/infomanageview.h @@ -0,0 +1,38 @@ +#ifndef INFOMANAGEVIEW_H +#define INFOMANAGEVIEW_H + +#include + +class QAbstractButton; + + +namespace Ui { +class InfoManageView; +} + +class InfoManageView : public QWidget +{ + Q_OBJECT + +public: + static QList colors; + + explicit InfoManageView(QWidget *parent = nullptr); + ~InfoManageView(); +private slots: + void initForm(); //初始化界面数据 + void initWidget(); //初始化子窗体 + void initNav(); //初始化导航按钮 + void initIcon(); //初始化导航按钮图标 + void buttonClicked(); //导航按钮单击事件 +protected: + void showEvent(QShowEvent *); +private: + Ui::InfoManageView *ui; + + //左侧导航栏图标+按钮集合 + QList icons; + QList btns; +}; + +#endif // INFOMANAGEVIEW_H diff --git a/softwareDirectory/AutoVerScheme/infomanageview.ui b/softwareDirectory/AutoVerScheme/infomanageview.ui new file mode 100644 index 0000000..4b39e7d --- /dev/null +++ b/softwareDirectory/AutoVerScheme/infomanageview.ui @@ -0,0 +1,109 @@ + + + InfoManageView + + + + 0 + 0 + 883 + 644 + + + + Form + + + + 0 + + + 0 + + + 0 + + + 0 + + + 0 + + + + + + 0 + 0 + + + + + 170 + 0 + + + + + 16777215 + 16777215 + + + + color:White; + font-weight: bold; + font-size: 16px; +background-color:rgba(10, 15, 92, 1); + + + true + + + + + 0 + 0 + 170 + 625 + + + + + 170 + 0 + + + + + 170 + 0 + + + + + 0 + + + 0 + + + 0 + + + 0 + + + 0 + + + + + + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/inspectdataitem.cpp b/softwareDirectory/AutoVerScheme/inspectdataitem.cpp new file mode 100644 index 0000000..e9c2adc --- /dev/null +++ b/softwareDirectory/AutoVerScheme/inspectdataitem.cpp @@ -0,0 +1,14 @@ +#include "inspectdataitem.h" +#include "ui_inspectdataitem.h" + +InspectDataItem::InspectDataItem(QWidget *parent) : + QWidget(parent), + ui(new Ui::InspectDataItem) +{ + ui->setupUi(this); +} + +InspectDataItem::~InspectDataItem() +{ + delete ui; +} diff --git a/softwareDirectory/AutoVerScheme/inspectdataitem.h b/softwareDirectory/AutoVerScheme/inspectdataitem.h new file mode 100644 index 0000000..57551bb --- /dev/null +++ b/softwareDirectory/AutoVerScheme/inspectdataitem.h @@ -0,0 +1,22 @@ +#ifndef INSPECTDATAITEM_H +#define INSPECTDATAITEM_H + +#include + +namespace Ui { +class InspectDataItem; +} + +class InspectDataItem : public QWidget +{ + Q_OBJECT + +public: + explicit InspectDataItem(QWidget *parent = nullptr); + ~InspectDataItem(); + +private: + Ui::InspectDataItem *ui; +}; + +#endif // INSPECTDATAITEM_H diff --git a/softwareDirectory/AutoVerScheme/inspectdataitem.ui b/softwareDirectory/AutoVerScheme/inspectdataitem.ui new file mode 100644 index 0000000..45f04e0 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/inspectdataitem.ui @@ -0,0 +1,32 @@ + + + InspectDataItem + + + + 0 + 0 + 400 + 300 + + + + Form + + + + + 120 + 130 + 89 + 24 + + + + 核查数据管理 + + + + + + diff --git a/softwareDirectory/AutoVerScheme/my_task.cpp b/softwareDirectory/AutoVerScheme/my_task.cpp new file mode 100644 index 0000000..40aceb2 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/my_task.cpp @@ -0,0 +1,42 @@ +#include "my_task.h" +#include "ui_my_task.h" +#include "QMessageBox" + +My_Task::My_Task(QWidget *parent) : + InfoBase(parent), + ui(new Ui::My_Task) +{ + ui->setupUi(this); + + this->initForm(); +} + +My_Task::~My_Task() +{ + delete ui; +} +void My_Task::initForm() +{ + + +} +void My_Task::ShowMessageBox(QString title,QString value) { + // 创建一个QMessageBox对象 + QMessageBox msgBox; + + // 设置消息框的标题 + msgBox.setWindowTitle(title); + + // 设置消息框的文本内容 + msgBox.setText(value); + + // 设置消息框的标准按钮,这里是“确定”按钮 + msgBox.setStandardButtons(QMessageBox::Ok); + + // 显示消息框 + msgBox.exec(); +} +void My_Task::Load() +{ + ShowMessageBox("我的任务页面","我的任务初始化完成"); +} diff --git a/softwareDirectory/AutoVerScheme/my_task.h b/softwareDirectory/AutoVerScheme/my_task.h new file mode 100644 index 0000000..d6600cb --- /dev/null +++ b/softwareDirectory/AutoVerScheme/my_task.h @@ -0,0 +1,28 @@ +#ifndef MY_TASK_H +#define MY_TASK_H + +#include +#include "InfoBase.h" + +namespace Ui { +class My_Task; +} + +class My_Task :public InfoBase +{ + Q_OBJECT + +public: + explicit My_Task(QWidget *parent = nullptr); + ~My_Task(); + + +private slots: + void initForm(); //初始化界面数据 + void ShowMessageBox(QString title,QString value); + void Load() override; +private: + Ui::My_Task *ui; +}; + +#endif // MY_TASK_H diff --git a/softwareDirectory/AutoVerScheme/my_task.ui b/softwareDirectory/AutoVerScheme/my_task.ui new file mode 100644 index 0000000..89245b8 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/my_task.ui @@ -0,0 +1,178 @@ + + + My_Task + + + + 0 + 0 + 857 + 511 + + + + Form + + + + + + + 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 + + + + 要求完成时间: + + + + + + + + + + 查询 + + + + + + + 重置 + + + + + + + + + + background-color:white; + + + + + + + + + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/rulefileitem.cpp b/softwareDirectory/AutoVerScheme/rulefileitem.cpp new file mode 100644 index 0000000..6f9ddd3 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/rulefileitem.cpp @@ -0,0 +1,14 @@ +#include "rulefileitem.h" +#include "ui_rulefileitem.h" + +RuleFileItem::RuleFileItem(QWidget *parent) : + QWidget(parent), + ui(new Ui::RuleFileItem) +{ + ui->setupUi(this); +} + +RuleFileItem::~RuleFileItem() +{ + delete ui; +} diff --git a/softwareDirectory/AutoVerScheme/rulefileitem.h b/softwareDirectory/AutoVerScheme/rulefileitem.h new file mode 100644 index 0000000..1fc81a1 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/rulefileitem.h @@ -0,0 +1,22 @@ +#ifndef RULEFILEITEM_H +#define RULEFILEITEM_H + +#include + +namespace Ui { +class RuleFileItem; +} + +class RuleFileItem : public QWidget +{ + Q_OBJECT + +public: + explicit RuleFileItem(QWidget *parent = nullptr); + ~RuleFileItem(); + +private: + Ui::RuleFileItem *ui; +}; + +#endif // RULEFILEITEM_H diff --git a/softwareDirectory/AutoVerScheme/rulefileitem.ui b/softwareDirectory/AutoVerScheme/rulefileitem.ui new file mode 100644 index 0000000..599e025 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/rulefileitem.ui @@ -0,0 +1,32 @@ + + + RuleFileItem + + + + 0 + 0 + 400 + 300 + + + + Form + + + + + 140 + 130 + 121 + 24 + + + + 规程文件管理 + + + + + + diff --git a/softwareDirectory/AutoVerScheme/standard_deviceitem.cpp b/softwareDirectory/AutoVerScheme/standard_deviceitem.cpp new file mode 100644 index 0000000..ed15b0a --- /dev/null +++ b/softwareDirectory/AutoVerScheme/standard_deviceitem.cpp @@ -0,0 +1,14 @@ +#include "standard_deviceitem.h" +#include "ui_standard_deviceitem.h" + +Standard_DeviceItem::Standard_DeviceItem(QWidget *parent) : + QWidget(parent), + ui(new Ui::Standard_DeviceItem) +{ + ui->setupUi(this); +} + +Standard_DeviceItem::~Standard_DeviceItem() +{ + delete ui; +} diff --git a/softwareDirectory/AutoVerScheme/standard_deviceitem.h b/softwareDirectory/AutoVerScheme/standard_deviceitem.h new file mode 100644 index 0000000..198c362 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/standard_deviceitem.h @@ -0,0 +1,22 @@ +#ifndef STANDARD_DEVICEITEM_H +#define STANDARD_DEVICEITEM_H + +#include + +namespace Ui { +class Standard_DeviceItem; +} + +class Standard_DeviceItem : public QWidget +{ + Q_OBJECT + +public: + explicit Standard_DeviceItem(QWidget *parent = nullptr); + ~Standard_DeviceItem(); + +private: + Ui::Standard_DeviceItem *ui; +}; + +#endif // STANDARD_DEVICEITEM_H diff --git a/softwareDirectory/AutoVerScheme/standard_deviceitem.ui b/softwareDirectory/AutoVerScheme/standard_deviceitem.ui new file mode 100644 index 0000000..00070b7 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/standard_deviceitem.ui @@ -0,0 +1,32 @@ + + + Standard_DeviceItem + + + + 0 + 0 + 400 + 300 + + + + Form + + + + + 150 + 140 + 89 + 24 + + + + 标准设备管理 + + + + + + diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro index 5b8f852..fa0d8e5 100644 --- a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro @@ -1,5 +1,7 @@ QT += core gui QT += sql +QT += widgets + greaterThan(QT_MAJOR_VERSION, 4): QT += widgets CONFIG += c++11 @@ -16,22 +18,50 @@ #DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 SOURCES += \ + beexamined_deviceitem.cpp \ + create_task.cpp \ + depar_task.cpp \ indexwindow.cpp \ + infomanageview.cpp \ + inspectdataitem.cpp \ loginwindow.cpp \ main.cpp \ mainwindow.cpp \ + my_task.cpp \ + rulefileitem.cpp \ + standard_deviceitem.cpp \ + testdataitem.cpp \ testview.cpp HEADERS += \ + InfoBase.h \ + beexamined_deviceitem.h \ + create_task.h \ + depar_task.h \ indexwindow.h \ + infomanageview.h \ + inspectdataitem.h \ loginwindow.h \ mainwindow.h \ + my_task.h \ + rulefileitem.h \ + standard_deviceitem.h \ + testdataitem.h \ testview.h FORMS += \ + beexamined_deviceitem.ui \ + create_task.ui \ + depar_task.ui \ indexwindow.ui \ + infomanageview.ui \ + inspectdataitem.ui \ loginwindow.ui \ mainwindow.ui \ + my_task.ui \ + rulefileitem.ui \ + standard_deviceitem.ui \ + testdataitem.ui \ testview.ui # Default rules for deployment. diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user index 1f5ec64..32d22e9 100644 --- a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user @@ -1,6 +1,6 @@ - + EnvironmentId @@ -64,249 +64,6 @@ ProjectExplorer.Project.Target.0 - Desktop Qt 5.14.2 MinGW 64-bit - Desktop Qt 5.14.2 MinGW 64-bit - qt.qt5.5142.win64_mingw73_kit - 0 - 0 - 0 - - 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 - - Qt4ProjectManager.Qt4RunConfiguration:D:/Auto_verification_scheme/AutoVerScheme/AutoVerScheme.pro - D:/Auto_verification_scheme/AutoVerScheme/AutoVerScheme.pro - - false - - false - true - true - false - false - true - - D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Debug - - 1 - - - - ProjectExplorer.Project.Target.1 - Desktop Qt 5.14.2 MinGW 32-bit Desktop Qt 5.14.2 MinGW 32-bit qt.qt5.5142.win32_mingw73_kit @@ -530,8 +287,252 @@ 2 - Qt4ProjectManager.Qt4RunConfiguration:D:/Auto_verification_scheme/AutoVerScheme/AutoVerScheme.pro - D:/Auto_verification_scheme/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 + + 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 diff --git a/softwareDirectory/AutoVerScheme/InfoBase.cpp b/softwareDirectory/AutoVerScheme/InfoBase.cpp new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/InfoBase.cpp diff --git a/softwareDirectory/AutoVerScheme/InfoBase.h b/softwareDirectory/AutoVerScheme/InfoBase.h new file mode 100644 index 0000000..7fec63e --- /dev/null +++ b/softwareDirectory/AutoVerScheme/InfoBase.h @@ -0,0 +1,16 @@ +#ifndef INFOBASE_H +#define INFOBASE_H + +#include +///信号管理页面的基类 所有信息管理页面都继承于InfoBase +/// 便于统一管理 所有子类必须实现Load方法 +/// 每次按钮点击切换都会调用Load方法 用于每次页面的数据刷新 +class InfoBase : public QWidget { + Q_OBJECT +public: + InfoBase(QWidget *parent = nullptr): QWidget(parent){}; + // 纯虚函数 + virtual void Load()=0; +}; +#endif // INFOBASE_H + diff --git a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.cpp b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.cpp new file mode 100644 index 0000000..7ac1e87 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.cpp @@ -0,0 +1,14 @@ +#include "beexamined_deviceitem.h" +#include "ui_beexamined_deviceitem.h" + +BeExamined_DeviceItem::BeExamined_DeviceItem(QWidget *parent) : + QWidget(parent), + ui(new Ui::BeExamined_DeviceItem) +{ + ui->setupUi(this); +} + +BeExamined_DeviceItem::~BeExamined_DeviceItem() +{ + delete ui; +} diff --git a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.h b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.h new file mode 100644 index 0000000..76b061d --- /dev/null +++ b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.h @@ -0,0 +1,22 @@ +#ifndef BEEXAMINED_DEVICEITEM_H +#define BEEXAMINED_DEVICEITEM_H + +#include + +namespace Ui { +class BeExamined_DeviceItem; +} + +class BeExamined_DeviceItem : public QWidget +{ + Q_OBJECT + +public: + explicit BeExamined_DeviceItem(QWidget *parent = nullptr); + ~BeExamined_DeviceItem(); + +private: + Ui::BeExamined_DeviceItem *ui; +}; + +#endif // BEEXAMINED_DEVICEITEM_H diff --git a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.ui b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.ui new file mode 100644 index 0000000..af9f7bf --- /dev/null +++ b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.ui @@ -0,0 +1,32 @@ + + + BeExamined_DeviceItem + + + + 0 + 0 + 400 + 300 + + + + Form + + + + + 130 + 140 + 89 + 24 + + + + 被检设备管理 + + + + + + diff --git a/softwareDirectory/AutoVerScheme/create_task.cpp b/softwareDirectory/AutoVerScheme/create_task.cpp new file mode 100644 index 0000000..4193efc --- /dev/null +++ b/softwareDirectory/AutoVerScheme/create_task.cpp @@ -0,0 +1,14 @@ +#include "create_task.h" +#include "ui_create_task.h" + +Create_Task::Create_Task(QWidget *parent) : + QWidget(parent), + ui(new Ui::Create_Task) +{ + ui->setupUi(this); +} + +Create_Task::~Create_Task() +{ + delete ui; +} diff --git a/softwareDirectory/AutoVerScheme/create_task.h b/softwareDirectory/AutoVerScheme/create_task.h new file mode 100644 index 0000000..e2264de --- /dev/null +++ b/softwareDirectory/AutoVerScheme/create_task.h @@ -0,0 +1,22 @@ +#ifndef CREATE_TASK_H +#define CREATE_TASK_H + +#include + +namespace Ui { +class Create_Task; +} + +class Create_Task : public QWidget +{ + Q_OBJECT + +public: + explicit Create_Task(QWidget *parent = nullptr); + ~Create_Task(); + +private: + Ui::Create_Task *ui; +}; + +#endif // CREATE_TASK_H diff --git a/softwareDirectory/AutoVerScheme/create_task.ui b/softwareDirectory/AutoVerScheme/create_task.ui new file mode 100644 index 0000000..b79c6a1 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/create_task.ui @@ -0,0 +1,35 @@ + + + Create_Task + + + + 0 + 0 + 400 + 300 + + + + Form + + + background-color:red; + + + + + 140 + 120 + 89 + 24 + + + + 创建任务单 + + + + + + diff --git a/softwareDirectory/AutoVerScheme/depar_task.cpp b/softwareDirectory/AutoVerScheme/depar_task.cpp new file mode 100644 index 0000000..de39775 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/depar_task.cpp @@ -0,0 +1,42 @@ +#include "depar_task.h" +#include "ui_depar_task.h" +#include "QMessageBox" +#include "InfoBase.h" + +Depar_Task::Depar_Task(QWidget *parent) : + InfoBase(parent), + ui(new Ui::Depar_Task) +{ + ui->setupUi(this); + this->initForm(); +} + +Depar_Task::~Depar_Task() +{ + delete ui; +} +void Depar_Task::initForm() +{ + + //ShowMessageBox("标题","初始化完成"); +} +void Depar_Task::ShowMessageBox(QString title,QString value) { + // 创建一个QMessageBox对象 + QMessageBox msgBox; + + // 设置消息框的标题 + msgBox.setWindowTitle(title); + + // 设置消息框的文本内容 + msgBox.setText(value); + + // 设置消息框的标准按钮,这里是“确定”按钮 + msgBox.setStandardButtons(QMessageBox::Ok); + + // 显示消息框 + msgBox.exec(); +} +void Depar_Task::Load() +{ + ShowMessageBox("部门任务页面","部门任务初始化完成"); +} diff --git a/softwareDirectory/AutoVerScheme/depar_task.h b/softwareDirectory/AutoVerScheme/depar_task.h new file mode 100644 index 0000000..8716faf --- /dev/null +++ b/softwareDirectory/AutoVerScheme/depar_task.h @@ -0,0 +1,28 @@ +#ifndef DEPAR_TASK_H +#define DEPAR_TASK_H + + +#include "InfoBase.h" + +namespace Ui { +class Depar_Task; +} + +class Depar_Task :public InfoBase +{ + Q_OBJECT + +public: + Depar_Task(QWidget *parent = nullptr); + ~Depar_Task(); + + +private slots: + void initForm(); //初始化界面数据 + void ShowMessageBox(QString title,QString value); + void Load() override; +private: + Ui::Depar_Task *ui; +}; + +#endif // DEPAR_TASK_H diff --git a/softwareDirectory/AutoVerScheme/depar_task.ui b/softwareDirectory/AutoVerScheme/depar_task.ui new file mode 100644 index 0000000..ff3d44f --- /dev/null +++ b/softwareDirectory/AutoVerScheme/depar_task.ui @@ -0,0 +1,181 @@ + + + Depar_Task + + + + 0 + 0 + 1184 + 456 + + + + Form + + + color:black; + + + + + + + 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 + + + + 要求完成时间: + + + + + + + + + + 查询 + + + + + + + 重置 + + + + + + + + + + background-color:white; + + + + + + + + + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/indexwindow.cpp b/softwareDirectory/AutoVerScheme/indexwindow.cpp index 3e52c7b..9bd65b1 100644 --- a/softwareDirectory/AutoVerScheme/indexwindow.cpp +++ b/softwareDirectory/AutoVerScheme/indexwindow.cpp @@ -21,6 +21,7 @@ //调用样式 loadStyle(":/qss/Index.css"); + } void IndexWindow::loadStyle(const QString &qssFile) diff --git a/softwareDirectory/AutoVerScheme/infomanageview.cpp b/softwareDirectory/AutoVerScheme/infomanageview.cpp new file mode 100644 index 0000000..a206c6f --- /dev/null +++ b/softwareDirectory/AutoVerScheme/infomanageview.cpp @@ -0,0 +1,150 @@ +#include "infomanageview.h" +#include "ui_infomanageview.h" +#include +#include +//子窗体 +#include "depar_task.h" +#include "my_task.h" +#include "create_task.h" +#include "beexamined_deviceitem.h" +#include "inspectdataitem.h" +#include "rulefileitem.h" +#include "standard_deviceitem.h" +#include "testdataitem.h" +#include "InfoBase.h" + +InfoManageView::InfoManageView(QWidget *parent) : + QWidget(parent), + ui(new Ui::InfoManageView) +{ + ui->setupUi(this); + this->setWindowTitle("信息管理"); + //初始化调用所有函数 + this->initForm(); + this->initWidget(); + this->initNav(); + this->initIcon(); +} +//左侧滚动条事件 +void InfoManageView::showEvent(QShowEvent *) +{ + //滚动到底部 + QScrollBar *bar = ui->scrollArea->verticalScrollBar(); + bar->setValue(bar->maximum()); +} + +//左侧导航栏样式初始化 +void InfoManageView::initIcon() +{ + //左侧导航样式,可以设置各种牛逼的参数,超级棒 + // IconHelper::StyleColor styleColor; + //styleColor.defaultBorder = true; + // IconHelper::setStyle(ui->widgetLeft, btns, icons, styleColor); +} + +//颜色初始化设置 +QList InfoManageView::colors = QList(); +void InfoManageView::initForm() +{ + //颜色集合供其他界面使用 + colors << QColor(211, 78, 78) << QColor(29, 185, 242) << QColor(170, 162, 119) << QColor(255, 192, 1); + colors << QColor(0, 176, 180) << QColor(0, 113, 193) << QColor(255, 192, 0); + colors << QColor(72, 103, 149) << QColor(185, 87, 86) << QColor(0, 177, 125); + colors << QColor(214, 77, 84) << QColor(71, 164, 233) << QColor(34, 163, 169); + colors << QColor(59, 123, 156) << QColor(162, 121, 197) << QColor(72, 202, 245); + colors << QColor(0, 150, 121) << QColor(111, 9, 176) << QColor(250, 170, 20); + + ui->scrollArea->setFixedWidth(170); + ui->widgetLeft->setProperty("flag", "left"); +} + +//右侧可切换UI导入 +void InfoManageView::initWidget() +{ + ui->stackedWidget->addWidget(new Depar_Task); //部门任务 + ui->stackedWidget->addWidget(new My_Task); //我的任务 + ui->stackedWidget->addWidget(new Create_Task); //创建任务单 + ui->stackedWidget->addWidget(new Standard_DeviceItem); //标准设备管理 + ui->stackedWidget->addWidget(new BeExamined_DeviceItem); //被检设备管理 + ui->stackedWidget->addWidget(new TestDataItem); //检定数据管理 + ui->stackedWidget->addWidget(new InspectDataItem); //核查数据管理 + ui->stackedWidget->addWidget(new RuleFileItem); //技术文件管理 + + +} +//左侧列表信息导入 +void InfoManageView::initNav() +{ + //按钮文字集合 + QStringList names; + names << "部门任务" << "我的任务" << "创建任务单" << "标准设备管理" << "被检设备管理" + << "检定数据管理" << "核查数据管理" << "技术文件管理" ; + + //自动生成按钮 + for (int i = 0; i < names.count(); i++) { + QToolButton *btn = new QToolButton; + //设置按钮固定高度 + btn->setFixedHeight(35); + //设置按钮的文字 + //btn->setText(QString("%1. %2").arg(i + 1, 2, 10, QChar('0')).arg(names.at(i))); + btn->setText(QString("%1").arg(names.at(i))); + //设置按钮可选中按下类似复选框的功能 + btn->setCheckable(true); + //设置按钮图标在左侧文字在右侧 + // btn->setToolButtonStyle(Qt::ToolButtonTextBesideIcon); + //设置按钮拉伸策略为横向填充 + btn->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Preferred); + //关联按钮单击事件 + connect(btn, SIGNAL(clicked(bool)), this, SLOT(buttonClicked())); + //将按钮加入到布局 + ui->widgetLeft->layout()->addWidget(btn); + //可以指定不同的图标 + //icons << 0xf061; + btns << btn; + //设置按钮大小 + btn->setFixedSize(170, 70); + //设置鼠标经过和点击事件 + btn->setStyleSheet("QToolButton:hover " + "{ background-color: rgba(53, 91, 171, 1); }" + "QToolButton::checked { " + "background-color: rgba(53, 91, 171, 1)}"); + + //ui->widgetLeft->setFixedWidth(200); + } + + //底部加个弹簧 + QSpacerItem *verticalSpacer = new QSpacerItem(20, 40, QSizePolicy::Minimum, QSizePolicy::Expanding); + ui->widgetLeft->layout()->addItem(verticalSpacer); + btns.at(names.count() - 1)->click(); +} +//按钮点击切换UI事件 +void InfoManageView::buttonClicked() +{ + QAbstractButton *b = (QAbstractButton *)sender(); + int count = btns.count(); + int index = btns.indexOf(b); + ui->stackedWidget->setCurrentIndex(index); + + + // 获取当前在 QStackedWidget 中的部件 + QWidget* currentWidget = ui->stackedWidget->currentWidget(); + + // 尝试将当前部件转换为 InfoBase 类型 + InfoBase* currQWidget = qobject_cast(currentWidget); + // 检查转换是否成功 + if (currQWidget != nullptr) + { + // 如果转换成功,调用子类Load 方法 + currQWidget->Load(); + } + + for (int i = 0; i < count; i++) { + QAbstractButton *btn = btns.at(i); + btn->setChecked(btn == b); + } +} + +InfoManageView::~InfoManageView() +{ + delete ui; +} diff --git a/softwareDirectory/AutoVerScheme/infomanageview.h b/softwareDirectory/AutoVerScheme/infomanageview.h new file mode 100644 index 0000000..3c1463f --- /dev/null +++ b/softwareDirectory/AutoVerScheme/infomanageview.h @@ -0,0 +1,38 @@ +#ifndef INFOMANAGEVIEW_H +#define INFOMANAGEVIEW_H + +#include + +class QAbstractButton; + + +namespace Ui { +class InfoManageView; +} + +class InfoManageView : public QWidget +{ + Q_OBJECT + +public: + static QList colors; + + explicit InfoManageView(QWidget *parent = nullptr); + ~InfoManageView(); +private slots: + void initForm(); //初始化界面数据 + void initWidget(); //初始化子窗体 + void initNav(); //初始化导航按钮 + void initIcon(); //初始化导航按钮图标 + void buttonClicked(); //导航按钮单击事件 +protected: + void showEvent(QShowEvent *); +private: + Ui::InfoManageView *ui; + + //左侧导航栏图标+按钮集合 + QList icons; + QList btns; +}; + +#endif // INFOMANAGEVIEW_H diff --git a/softwareDirectory/AutoVerScheme/infomanageview.ui b/softwareDirectory/AutoVerScheme/infomanageview.ui new file mode 100644 index 0000000..4b39e7d --- /dev/null +++ b/softwareDirectory/AutoVerScheme/infomanageview.ui @@ -0,0 +1,109 @@ + + + InfoManageView + + + + 0 + 0 + 883 + 644 + + + + Form + + + + 0 + + + 0 + + + 0 + + + 0 + + + 0 + + + + + + 0 + 0 + + + + + 170 + 0 + + + + + 16777215 + 16777215 + + + + color:White; + font-weight: bold; + font-size: 16px; +background-color:rgba(10, 15, 92, 1); + + + true + + + + + 0 + 0 + 170 + 625 + + + + + 170 + 0 + + + + + 170 + 0 + + + + + 0 + + + 0 + + + 0 + + + 0 + + + 0 + + + + + + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/inspectdataitem.cpp b/softwareDirectory/AutoVerScheme/inspectdataitem.cpp new file mode 100644 index 0000000..e9c2adc --- /dev/null +++ b/softwareDirectory/AutoVerScheme/inspectdataitem.cpp @@ -0,0 +1,14 @@ +#include "inspectdataitem.h" +#include "ui_inspectdataitem.h" + +InspectDataItem::InspectDataItem(QWidget *parent) : + QWidget(parent), + ui(new Ui::InspectDataItem) +{ + ui->setupUi(this); +} + +InspectDataItem::~InspectDataItem() +{ + delete ui; +} diff --git a/softwareDirectory/AutoVerScheme/inspectdataitem.h b/softwareDirectory/AutoVerScheme/inspectdataitem.h new file mode 100644 index 0000000..57551bb --- /dev/null +++ b/softwareDirectory/AutoVerScheme/inspectdataitem.h @@ -0,0 +1,22 @@ +#ifndef INSPECTDATAITEM_H +#define INSPECTDATAITEM_H + +#include + +namespace Ui { +class InspectDataItem; +} + +class InspectDataItem : public QWidget +{ + Q_OBJECT + +public: + explicit InspectDataItem(QWidget *parent = nullptr); + ~InspectDataItem(); + +private: + Ui::InspectDataItem *ui; +}; + +#endif // INSPECTDATAITEM_H diff --git a/softwareDirectory/AutoVerScheme/inspectdataitem.ui b/softwareDirectory/AutoVerScheme/inspectdataitem.ui new file mode 100644 index 0000000..45f04e0 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/inspectdataitem.ui @@ -0,0 +1,32 @@ + + + InspectDataItem + + + + 0 + 0 + 400 + 300 + + + + Form + + + + + 120 + 130 + 89 + 24 + + + + 核查数据管理 + + + + + + diff --git a/softwareDirectory/AutoVerScheme/my_task.cpp b/softwareDirectory/AutoVerScheme/my_task.cpp new file mode 100644 index 0000000..40aceb2 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/my_task.cpp @@ -0,0 +1,42 @@ +#include "my_task.h" +#include "ui_my_task.h" +#include "QMessageBox" + +My_Task::My_Task(QWidget *parent) : + InfoBase(parent), + ui(new Ui::My_Task) +{ + ui->setupUi(this); + + this->initForm(); +} + +My_Task::~My_Task() +{ + delete ui; +} +void My_Task::initForm() +{ + + +} +void My_Task::ShowMessageBox(QString title,QString value) { + // 创建一个QMessageBox对象 + QMessageBox msgBox; + + // 设置消息框的标题 + msgBox.setWindowTitle(title); + + // 设置消息框的文本内容 + msgBox.setText(value); + + // 设置消息框的标准按钮,这里是“确定”按钮 + msgBox.setStandardButtons(QMessageBox::Ok); + + // 显示消息框 + msgBox.exec(); +} +void My_Task::Load() +{ + ShowMessageBox("我的任务页面","我的任务初始化完成"); +} diff --git a/softwareDirectory/AutoVerScheme/my_task.h b/softwareDirectory/AutoVerScheme/my_task.h new file mode 100644 index 0000000..d6600cb --- /dev/null +++ b/softwareDirectory/AutoVerScheme/my_task.h @@ -0,0 +1,28 @@ +#ifndef MY_TASK_H +#define MY_TASK_H + +#include +#include "InfoBase.h" + +namespace Ui { +class My_Task; +} + +class My_Task :public InfoBase +{ + Q_OBJECT + +public: + explicit My_Task(QWidget *parent = nullptr); + ~My_Task(); + + +private slots: + void initForm(); //初始化界面数据 + void ShowMessageBox(QString title,QString value); + void Load() override; +private: + Ui::My_Task *ui; +}; + +#endif // MY_TASK_H diff --git a/softwareDirectory/AutoVerScheme/my_task.ui b/softwareDirectory/AutoVerScheme/my_task.ui new file mode 100644 index 0000000..89245b8 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/my_task.ui @@ -0,0 +1,178 @@ + + + My_Task + + + + 0 + 0 + 857 + 511 + + + + Form + + + + + + + 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 + + + + 要求完成时间: + + + + + + + + + + 查询 + + + + + + + 重置 + + + + + + + + + + background-color:white; + + + + + + + + + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/rulefileitem.cpp b/softwareDirectory/AutoVerScheme/rulefileitem.cpp new file mode 100644 index 0000000..6f9ddd3 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/rulefileitem.cpp @@ -0,0 +1,14 @@ +#include "rulefileitem.h" +#include "ui_rulefileitem.h" + +RuleFileItem::RuleFileItem(QWidget *parent) : + QWidget(parent), + ui(new Ui::RuleFileItem) +{ + ui->setupUi(this); +} + +RuleFileItem::~RuleFileItem() +{ + delete ui; +} diff --git a/softwareDirectory/AutoVerScheme/rulefileitem.h b/softwareDirectory/AutoVerScheme/rulefileitem.h new file mode 100644 index 0000000..1fc81a1 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/rulefileitem.h @@ -0,0 +1,22 @@ +#ifndef RULEFILEITEM_H +#define RULEFILEITEM_H + +#include + +namespace Ui { +class RuleFileItem; +} + +class RuleFileItem : public QWidget +{ + Q_OBJECT + +public: + explicit RuleFileItem(QWidget *parent = nullptr); + ~RuleFileItem(); + +private: + Ui::RuleFileItem *ui; +}; + +#endif // RULEFILEITEM_H diff --git a/softwareDirectory/AutoVerScheme/rulefileitem.ui b/softwareDirectory/AutoVerScheme/rulefileitem.ui new file mode 100644 index 0000000..599e025 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/rulefileitem.ui @@ -0,0 +1,32 @@ + + + RuleFileItem + + + + 0 + 0 + 400 + 300 + + + + Form + + + + + 140 + 130 + 121 + 24 + + + + 规程文件管理 + + + + + + diff --git a/softwareDirectory/AutoVerScheme/standard_deviceitem.cpp b/softwareDirectory/AutoVerScheme/standard_deviceitem.cpp new file mode 100644 index 0000000..ed15b0a --- /dev/null +++ b/softwareDirectory/AutoVerScheme/standard_deviceitem.cpp @@ -0,0 +1,14 @@ +#include "standard_deviceitem.h" +#include "ui_standard_deviceitem.h" + +Standard_DeviceItem::Standard_DeviceItem(QWidget *parent) : + QWidget(parent), + ui(new Ui::Standard_DeviceItem) +{ + ui->setupUi(this); +} + +Standard_DeviceItem::~Standard_DeviceItem() +{ + delete ui; +} diff --git a/softwareDirectory/AutoVerScheme/standard_deviceitem.h b/softwareDirectory/AutoVerScheme/standard_deviceitem.h new file mode 100644 index 0000000..198c362 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/standard_deviceitem.h @@ -0,0 +1,22 @@ +#ifndef STANDARD_DEVICEITEM_H +#define STANDARD_DEVICEITEM_H + +#include + +namespace Ui { +class Standard_DeviceItem; +} + +class Standard_DeviceItem : public QWidget +{ + Q_OBJECT + +public: + explicit Standard_DeviceItem(QWidget *parent = nullptr); + ~Standard_DeviceItem(); + +private: + Ui::Standard_DeviceItem *ui; +}; + +#endif // STANDARD_DEVICEITEM_H diff --git a/softwareDirectory/AutoVerScheme/standard_deviceitem.ui b/softwareDirectory/AutoVerScheme/standard_deviceitem.ui new file mode 100644 index 0000000..00070b7 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/standard_deviceitem.ui @@ -0,0 +1,32 @@ + + + Standard_DeviceItem + + + + 0 + 0 + 400 + 300 + + + + Form + + + + + 150 + 140 + 89 + 24 + + + + 标准设备管理 + + + + + + diff --git a/softwareDirectory/AutoVerScheme/testdataitem.cpp b/softwareDirectory/AutoVerScheme/testdataitem.cpp new file mode 100644 index 0000000..4fde9cf --- /dev/null +++ b/softwareDirectory/AutoVerScheme/testdataitem.cpp @@ -0,0 +1,14 @@ +#include "testdataitem.h" +#include "ui_testdataitem.h" + +TestDataItem::TestDataItem(QWidget *parent) : + QWidget(parent), + ui(new Ui::TestDataItem) +{ + ui->setupUi(this); +} + +TestDataItem::~TestDataItem() +{ + delete ui; +} diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro index 5b8f852..fa0d8e5 100644 --- a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro @@ -1,5 +1,7 @@ QT += core gui QT += sql +QT += widgets + greaterThan(QT_MAJOR_VERSION, 4): QT += widgets CONFIG += c++11 @@ -16,22 +18,50 @@ #DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 SOURCES += \ + beexamined_deviceitem.cpp \ + create_task.cpp \ + depar_task.cpp \ indexwindow.cpp \ + infomanageview.cpp \ + inspectdataitem.cpp \ loginwindow.cpp \ main.cpp \ mainwindow.cpp \ + my_task.cpp \ + rulefileitem.cpp \ + standard_deviceitem.cpp \ + testdataitem.cpp \ testview.cpp HEADERS += \ + InfoBase.h \ + beexamined_deviceitem.h \ + create_task.h \ + depar_task.h \ indexwindow.h \ + infomanageview.h \ + inspectdataitem.h \ loginwindow.h \ mainwindow.h \ + my_task.h \ + rulefileitem.h \ + standard_deviceitem.h \ + testdataitem.h \ testview.h FORMS += \ + beexamined_deviceitem.ui \ + create_task.ui \ + depar_task.ui \ indexwindow.ui \ + infomanageview.ui \ + inspectdataitem.ui \ loginwindow.ui \ mainwindow.ui \ + my_task.ui \ + rulefileitem.ui \ + standard_deviceitem.ui \ + testdataitem.ui \ testview.ui # Default rules for deployment. diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user index 1f5ec64..32d22e9 100644 --- a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user @@ -1,6 +1,6 @@ - + EnvironmentId @@ -64,249 +64,6 @@ ProjectExplorer.Project.Target.0 - Desktop Qt 5.14.2 MinGW 64-bit - Desktop Qt 5.14.2 MinGW 64-bit - qt.qt5.5142.win64_mingw73_kit - 0 - 0 - 0 - - 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 - - Qt4ProjectManager.Qt4RunConfiguration:D:/Auto_verification_scheme/AutoVerScheme/AutoVerScheme.pro - D:/Auto_verification_scheme/AutoVerScheme/AutoVerScheme.pro - - false - - false - true - true - false - false - true - - D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Debug - - 1 - - - - ProjectExplorer.Project.Target.1 - Desktop Qt 5.14.2 MinGW 32-bit Desktop Qt 5.14.2 MinGW 32-bit qt.qt5.5142.win32_mingw73_kit @@ -530,8 +287,252 @@ 2 - Qt4ProjectManager.Qt4RunConfiguration:D:/Auto_verification_scheme/AutoVerScheme/AutoVerScheme.pro - D:/Auto_verification_scheme/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 + + 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 diff --git a/softwareDirectory/AutoVerScheme/InfoBase.cpp b/softwareDirectory/AutoVerScheme/InfoBase.cpp new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/InfoBase.cpp diff --git a/softwareDirectory/AutoVerScheme/InfoBase.h b/softwareDirectory/AutoVerScheme/InfoBase.h new file mode 100644 index 0000000..7fec63e --- /dev/null +++ b/softwareDirectory/AutoVerScheme/InfoBase.h @@ -0,0 +1,16 @@ +#ifndef INFOBASE_H +#define INFOBASE_H + +#include +///信号管理页面的基类 所有信息管理页面都继承于InfoBase +/// 便于统一管理 所有子类必须实现Load方法 +/// 每次按钮点击切换都会调用Load方法 用于每次页面的数据刷新 +class InfoBase : public QWidget { + Q_OBJECT +public: + InfoBase(QWidget *parent = nullptr): QWidget(parent){}; + // 纯虚函数 + virtual void Load()=0; +}; +#endif // INFOBASE_H + diff --git a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.cpp b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.cpp new file mode 100644 index 0000000..7ac1e87 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.cpp @@ -0,0 +1,14 @@ +#include "beexamined_deviceitem.h" +#include "ui_beexamined_deviceitem.h" + +BeExamined_DeviceItem::BeExamined_DeviceItem(QWidget *parent) : + QWidget(parent), + ui(new Ui::BeExamined_DeviceItem) +{ + ui->setupUi(this); +} + +BeExamined_DeviceItem::~BeExamined_DeviceItem() +{ + delete ui; +} diff --git a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.h b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.h new file mode 100644 index 0000000..76b061d --- /dev/null +++ b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.h @@ -0,0 +1,22 @@ +#ifndef BEEXAMINED_DEVICEITEM_H +#define BEEXAMINED_DEVICEITEM_H + +#include + +namespace Ui { +class BeExamined_DeviceItem; +} + +class BeExamined_DeviceItem : public QWidget +{ + Q_OBJECT + +public: + explicit BeExamined_DeviceItem(QWidget *parent = nullptr); + ~BeExamined_DeviceItem(); + +private: + Ui::BeExamined_DeviceItem *ui; +}; + +#endif // BEEXAMINED_DEVICEITEM_H diff --git a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.ui b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.ui new file mode 100644 index 0000000..af9f7bf --- /dev/null +++ b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.ui @@ -0,0 +1,32 @@ + + + BeExamined_DeviceItem + + + + 0 + 0 + 400 + 300 + + + + Form + + + + + 130 + 140 + 89 + 24 + + + + 被检设备管理 + + + + + + diff --git a/softwareDirectory/AutoVerScheme/create_task.cpp b/softwareDirectory/AutoVerScheme/create_task.cpp new file mode 100644 index 0000000..4193efc --- /dev/null +++ b/softwareDirectory/AutoVerScheme/create_task.cpp @@ -0,0 +1,14 @@ +#include "create_task.h" +#include "ui_create_task.h" + +Create_Task::Create_Task(QWidget *parent) : + QWidget(parent), + ui(new Ui::Create_Task) +{ + ui->setupUi(this); +} + +Create_Task::~Create_Task() +{ + delete ui; +} diff --git a/softwareDirectory/AutoVerScheme/create_task.h b/softwareDirectory/AutoVerScheme/create_task.h new file mode 100644 index 0000000..e2264de --- /dev/null +++ b/softwareDirectory/AutoVerScheme/create_task.h @@ -0,0 +1,22 @@ +#ifndef CREATE_TASK_H +#define CREATE_TASK_H + +#include + +namespace Ui { +class Create_Task; +} + +class Create_Task : public QWidget +{ + Q_OBJECT + +public: + explicit Create_Task(QWidget *parent = nullptr); + ~Create_Task(); + +private: + Ui::Create_Task *ui; +}; + +#endif // CREATE_TASK_H diff --git a/softwareDirectory/AutoVerScheme/create_task.ui b/softwareDirectory/AutoVerScheme/create_task.ui new file mode 100644 index 0000000..b79c6a1 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/create_task.ui @@ -0,0 +1,35 @@ + + + Create_Task + + + + 0 + 0 + 400 + 300 + + + + Form + + + background-color:red; + + + + + 140 + 120 + 89 + 24 + + + + 创建任务单 + + + + + + diff --git a/softwareDirectory/AutoVerScheme/depar_task.cpp b/softwareDirectory/AutoVerScheme/depar_task.cpp new file mode 100644 index 0000000..de39775 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/depar_task.cpp @@ -0,0 +1,42 @@ +#include "depar_task.h" +#include "ui_depar_task.h" +#include "QMessageBox" +#include "InfoBase.h" + +Depar_Task::Depar_Task(QWidget *parent) : + InfoBase(parent), + ui(new Ui::Depar_Task) +{ + ui->setupUi(this); + this->initForm(); +} + +Depar_Task::~Depar_Task() +{ + delete ui; +} +void Depar_Task::initForm() +{ + + //ShowMessageBox("标题","初始化完成"); +} +void Depar_Task::ShowMessageBox(QString title,QString value) { + // 创建一个QMessageBox对象 + QMessageBox msgBox; + + // 设置消息框的标题 + msgBox.setWindowTitle(title); + + // 设置消息框的文本内容 + msgBox.setText(value); + + // 设置消息框的标准按钮,这里是“确定”按钮 + msgBox.setStandardButtons(QMessageBox::Ok); + + // 显示消息框 + msgBox.exec(); +} +void Depar_Task::Load() +{ + ShowMessageBox("部门任务页面","部门任务初始化完成"); +} diff --git a/softwareDirectory/AutoVerScheme/depar_task.h b/softwareDirectory/AutoVerScheme/depar_task.h new file mode 100644 index 0000000..8716faf --- /dev/null +++ b/softwareDirectory/AutoVerScheme/depar_task.h @@ -0,0 +1,28 @@ +#ifndef DEPAR_TASK_H +#define DEPAR_TASK_H + + +#include "InfoBase.h" + +namespace Ui { +class Depar_Task; +} + +class Depar_Task :public InfoBase +{ + Q_OBJECT + +public: + Depar_Task(QWidget *parent = nullptr); + ~Depar_Task(); + + +private slots: + void initForm(); //初始化界面数据 + void ShowMessageBox(QString title,QString value); + void Load() override; +private: + Ui::Depar_Task *ui; +}; + +#endif // DEPAR_TASK_H diff --git a/softwareDirectory/AutoVerScheme/depar_task.ui b/softwareDirectory/AutoVerScheme/depar_task.ui new file mode 100644 index 0000000..ff3d44f --- /dev/null +++ b/softwareDirectory/AutoVerScheme/depar_task.ui @@ -0,0 +1,181 @@ + + + Depar_Task + + + + 0 + 0 + 1184 + 456 + + + + Form + + + color:black; + + + + + + + 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 + + + + 要求完成时间: + + + + + + + + + + 查询 + + + + + + + 重置 + + + + + + + + + + background-color:white; + + + + + + + + + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/indexwindow.cpp b/softwareDirectory/AutoVerScheme/indexwindow.cpp index 3e52c7b..9bd65b1 100644 --- a/softwareDirectory/AutoVerScheme/indexwindow.cpp +++ b/softwareDirectory/AutoVerScheme/indexwindow.cpp @@ -21,6 +21,7 @@ //调用样式 loadStyle(":/qss/Index.css"); + } void IndexWindow::loadStyle(const QString &qssFile) diff --git a/softwareDirectory/AutoVerScheme/infomanageview.cpp b/softwareDirectory/AutoVerScheme/infomanageview.cpp new file mode 100644 index 0000000..a206c6f --- /dev/null +++ b/softwareDirectory/AutoVerScheme/infomanageview.cpp @@ -0,0 +1,150 @@ +#include "infomanageview.h" +#include "ui_infomanageview.h" +#include +#include +//子窗体 +#include "depar_task.h" +#include "my_task.h" +#include "create_task.h" +#include "beexamined_deviceitem.h" +#include "inspectdataitem.h" +#include "rulefileitem.h" +#include "standard_deviceitem.h" +#include "testdataitem.h" +#include "InfoBase.h" + +InfoManageView::InfoManageView(QWidget *parent) : + QWidget(parent), + ui(new Ui::InfoManageView) +{ + ui->setupUi(this); + this->setWindowTitle("信息管理"); + //初始化调用所有函数 + this->initForm(); + this->initWidget(); + this->initNav(); + this->initIcon(); +} +//左侧滚动条事件 +void InfoManageView::showEvent(QShowEvent *) +{ + //滚动到底部 + QScrollBar *bar = ui->scrollArea->verticalScrollBar(); + bar->setValue(bar->maximum()); +} + +//左侧导航栏样式初始化 +void InfoManageView::initIcon() +{ + //左侧导航样式,可以设置各种牛逼的参数,超级棒 + // IconHelper::StyleColor styleColor; + //styleColor.defaultBorder = true; + // IconHelper::setStyle(ui->widgetLeft, btns, icons, styleColor); +} + +//颜色初始化设置 +QList InfoManageView::colors = QList(); +void InfoManageView::initForm() +{ + //颜色集合供其他界面使用 + colors << QColor(211, 78, 78) << QColor(29, 185, 242) << QColor(170, 162, 119) << QColor(255, 192, 1); + colors << QColor(0, 176, 180) << QColor(0, 113, 193) << QColor(255, 192, 0); + colors << QColor(72, 103, 149) << QColor(185, 87, 86) << QColor(0, 177, 125); + colors << QColor(214, 77, 84) << QColor(71, 164, 233) << QColor(34, 163, 169); + colors << QColor(59, 123, 156) << QColor(162, 121, 197) << QColor(72, 202, 245); + colors << QColor(0, 150, 121) << QColor(111, 9, 176) << QColor(250, 170, 20); + + ui->scrollArea->setFixedWidth(170); + ui->widgetLeft->setProperty("flag", "left"); +} + +//右侧可切换UI导入 +void InfoManageView::initWidget() +{ + ui->stackedWidget->addWidget(new Depar_Task); //部门任务 + ui->stackedWidget->addWidget(new My_Task); //我的任务 + ui->stackedWidget->addWidget(new Create_Task); //创建任务单 + ui->stackedWidget->addWidget(new Standard_DeviceItem); //标准设备管理 + ui->stackedWidget->addWidget(new BeExamined_DeviceItem); //被检设备管理 + ui->stackedWidget->addWidget(new TestDataItem); //检定数据管理 + ui->stackedWidget->addWidget(new InspectDataItem); //核查数据管理 + ui->stackedWidget->addWidget(new RuleFileItem); //技术文件管理 + + +} +//左侧列表信息导入 +void InfoManageView::initNav() +{ + //按钮文字集合 + QStringList names; + names << "部门任务" << "我的任务" << "创建任务单" << "标准设备管理" << "被检设备管理" + << "检定数据管理" << "核查数据管理" << "技术文件管理" ; + + //自动生成按钮 + for (int i = 0; i < names.count(); i++) { + QToolButton *btn = new QToolButton; + //设置按钮固定高度 + btn->setFixedHeight(35); + //设置按钮的文字 + //btn->setText(QString("%1. %2").arg(i + 1, 2, 10, QChar('0')).arg(names.at(i))); + btn->setText(QString("%1").arg(names.at(i))); + //设置按钮可选中按下类似复选框的功能 + btn->setCheckable(true); + //设置按钮图标在左侧文字在右侧 + // btn->setToolButtonStyle(Qt::ToolButtonTextBesideIcon); + //设置按钮拉伸策略为横向填充 + btn->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Preferred); + //关联按钮单击事件 + connect(btn, SIGNAL(clicked(bool)), this, SLOT(buttonClicked())); + //将按钮加入到布局 + ui->widgetLeft->layout()->addWidget(btn); + //可以指定不同的图标 + //icons << 0xf061; + btns << btn; + //设置按钮大小 + btn->setFixedSize(170, 70); + //设置鼠标经过和点击事件 + btn->setStyleSheet("QToolButton:hover " + "{ background-color: rgba(53, 91, 171, 1); }" + "QToolButton::checked { " + "background-color: rgba(53, 91, 171, 1)}"); + + //ui->widgetLeft->setFixedWidth(200); + } + + //底部加个弹簧 + QSpacerItem *verticalSpacer = new QSpacerItem(20, 40, QSizePolicy::Minimum, QSizePolicy::Expanding); + ui->widgetLeft->layout()->addItem(verticalSpacer); + btns.at(names.count() - 1)->click(); +} +//按钮点击切换UI事件 +void InfoManageView::buttonClicked() +{ + QAbstractButton *b = (QAbstractButton *)sender(); + int count = btns.count(); + int index = btns.indexOf(b); + ui->stackedWidget->setCurrentIndex(index); + + + // 获取当前在 QStackedWidget 中的部件 + QWidget* currentWidget = ui->stackedWidget->currentWidget(); + + // 尝试将当前部件转换为 InfoBase 类型 + InfoBase* currQWidget = qobject_cast(currentWidget); + // 检查转换是否成功 + if (currQWidget != nullptr) + { + // 如果转换成功,调用子类Load 方法 + currQWidget->Load(); + } + + for (int i = 0; i < count; i++) { + QAbstractButton *btn = btns.at(i); + btn->setChecked(btn == b); + } +} + +InfoManageView::~InfoManageView() +{ + delete ui; +} diff --git a/softwareDirectory/AutoVerScheme/infomanageview.h b/softwareDirectory/AutoVerScheme/infomanageview.h new file mode 100644 index 0000000..3c1463f --- /dev/null +++ b/softwareDirectory/AutoVerScheme/infomanageview.h @@ -0,0 +1,38 @@ +#ifndef INFOMANAGEVIEW_H +#define INFOMANAGEVIEW_H + +#include + +class QAbstractButton; + + +namespace Ui { +class InfoManageView; +} + +class InfoManageView : public QWidget +{ + Q_OBJECT + +public: + static QList colors; + + explicit InfoManageView(QWidget *parent = nullptr); + ~InfoManageView(); +private slots: + void initForm(); //初始化界面数据 + void initWidget(); //初始化子窗体 + void initNav(); //初始化导航按钮 + void initIcon(); //初始化导航按钮图标 + void buttonClicked(); //导航按钮单击事件 +protected: + void showEvent(QShowEvent *); +private: + Ui::InfoManageView *ui; + + //左侧导航栏图标+按钮集合 + QList icons; + QList btns; +}; + +#endif // INFOMANAGEVIEW_H diff --git a/softwareDirectory/AutoVerScheme/infomanageview.ui b/softwareDirectory/AutoVerScheme/infomanageview.ui new file mode 100644 index 0000000..4b39e7d --- /dev/null +++ b/softwareDirectory/AutoVerScheme/infomanageview.ui @@ -0,0 +1,109 @@ + + + InfoManageView + + + + 0 + 0 + 883 + 644 + + + + Form + + + + 0 + + + 0 + + + 0 + + + 0 + + + 0 + + + + + + 0 + 0 + + + + + 170 + 0 + + + + + 16777215 + 16777215 + + + + color:White; + font-weight: bold; + font-size: 16px; +background-color:rgba(10, 15, 92, 1); + + + true + + + + + 0 + 0 + 170 + 625 + + + + + 170 + 0 + + + + + 170 + 0 + + + + + 0 + + + 0 + + + 0 + + + 0 + + + 0 + + + + + + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/inspectdataitem.cpp b/softwareDirectory/AutoVerScheme/inspectdataitem.cpp new file mode 100644 index 0000000..e9c2adc --- /dev/null +++ b/softwareDirectory/AutoVerScheme/inspectdataitem.cpp @@ -0,0 +1,14 @@ +#include "inspectdataitem.h" +#include "ui_inspectdataitem.h" + +InspectDataItem::InspectDataItem(QWidget *parent) : + QWidget(parent), + ui(new Ui::InspectDataItem) +{ + ui->setupUi(this); +} + +InspectDataItem::~InspectDataItem() +{ + delete ui; +} diff --git a/softwareDirectory/AutoVerScheme/inspectdataitem.h b/softwareDirectory/AutoVerScheme/inspectdataitem.h new file mode 100644 index 0000000..57551bb --- /dev/null +++ b/softwareDirectory/AutoVerScheme/inspectdataitem.h @@ -0,0 +1,22 @@ +#ifndef INSPECTDATAITEM_H +#define INSPECTDATAITEM_H + +#include + +namespace Ui { +class InspectDataItem; +} + +class InspectDataItem : public QWidget +{ + Q_OBJECT + +public: + explicit InspectDataItem(QWidget *parent = nullptr); + ~InspectDataItem(); + +private: + Ui::InspectDataItem *ui; +}; + +#endif // INSPECTDATAITEM_H diff --git a/softwareDirectory/AutoVerScheme/inspectdataitem.ui b/softwareDirectory/AutoVerScheme/inspectdataitem.ui new file mode 100644 index 0000000..45f04e0 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/inspectdataitem.ui @@ -0,0 +1,32 @@ + + + InspectDataItem + + + + 0 + 0 + 400 + 300 + + + + Form + + + + + 120 + 130 + 89 + 24 + + + + 核查数据管理 + + + + + + diff --git a/softwareDirectory/AutoVerScheme/my_task.cpp b/softwareDirectory/AutoVerScheme/my_task.cpp new file mode 100644 index 0000000..40aceb2 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/my_task.cpp @@ -0,0 +1,42 @@ +#include "my_task.h" +#include "ui_my_task.h" +#include "QMessageBox" + +My_Task::My_Task(QWidget *parent) : + InfoBase(parent), + ui(new Ui::My_Task) +{ + ui->setupUi(this); + + this->initForm(); +} + +My_Task::~My_Task() +{ + delete ui; +} +void My_Task::initForm() +{ + + +} +void My_Task::ShowMessageBox(QString title,QString value) { + // 创建一个QMessageBox对象 + QMessageBox msgBox; + + // 设置消息框的标题 + msgBox.setWindowTitle(title); + + // 设置消息框的文本内容 + msgBox.setText(value); + + // 设置消息框的标准按钮,这里是“确定”按钮 + msgBox.setStandardButtons(QMessageBox::Ok); + + // 显示消息框 + msgBox.exec(); +} +void My_Task::Load() +{ + ShowMessageBox("我的任务页面","我的任务初始化完成"); +} diff --git a/softwareDirectory/AutoVerScheme/my_task.h b/softwareDirectory/AutoVerScheme/my_task.h new file mode 100644 index 0000000..d6600cb --- /dev/null +++ b/softwareDirectory/AutoVerScheme/my_task.h @@ -0,0 +1,28 @@ +#ifndef MY_TASK_H +#define MY_TASK_H + +#include +#include "InfoBase.h" + +namespace Ui { +class My_Task; +} + +class My_Task :public InfoBase +{ + Q_OBJECT + +public: + explicit My_Task(QWidget *parent = nullptr); + ~My_Task(); + + +private slots: + void initForm(); //初始化界面数据 + void ShowMessageBox(QString title,QString value); + void Load() override; +private: + Ui::My_Task *ui; +}; + +#endif // MY_TASK_H diff --git a/softwareDirectory/AutoVerScheme/my_task.ui b/softwareDirectory/AutoVerScheme/my_task.ui new file mode 100644 index 0000000..89245b8 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/my_task.ui @@ -0,0 +1,178 @@ + + + My_Task + + + + 0 + 0 + 857 + 511 + + + + Form + + + + + + + 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 + + + + 要求完成时间: + + + + + + + + + + 查询 + + + + + + + 重置 + + + + + + + + + + background-color:white; + + + + + + + + + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/rulefileitem.cpp b/softwareDirectory/AutoVerScheme/rulefileitem.cpp new file mode 100644 index 0000000..6f9ddd3 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/rulefileitem.cpp @@ -0,0 +1,14 @@ +#include "rulefileitem.h" +#include "ui_rulefileitem.h" + +RuleFileItem::RuleFileItem(QWidget *parent) : + QWidget(parent), + ui(new Ui::RuleFileItem) +{ + ui->setupUi(this); +} + +RuleFileItem::~RuleFileItem() +{ + delete ui; +} diff --git a/softwareDirectory/AutoVerScheme/rulefileitem.h b/softwareDirectory/AutoVerScheme/rulefileitem.h new file mode 100644 index 0000000..1fc81a1 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/rulefileitem.h @@ -0,0 +1,22 @@ +#ifndef RULEFILEITEM_H +#define RULEFILEITEM_H + +#include + +namespace Ui { +class RuleFileItem; +} + +class RuleFileItem : public QWidget +{ + Q_OBJECT + +public: + explicit RuleFileItem(QWidget *parent = nullptr); + ~RuleFileItem(); + +private: + Ui::RuleFileItem *ui; +}; + +#endif // RULEFILEITEM_H diff --git a/softwareDirectory/AutoVerScheme/rulefileitem.ui b/softwareDirectory/AutoVerScheme/rulefileitem.ui new file mode 100644 index 0000000..599e025 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/rulefileitem.ui @@ -0,0 +1,32 @@ + + + RuleFileItem + + + + 0 + 0 + 400 + 300 + + + + Form + + + + + 140 + 130 + 121 + 24 + + + + 规程文件管理 + + + + + + diff --git a/softwareDirectory/AutoVerScheme/standard_deviceitem.cpp b/softwareDirectory/AutoVerScheme/standard_deviceitem.cpp new file mode 100644 index 0000000..ed15b0a --- /dev/null +++ b/softwareDirectory/AutoVerScheme/standard_deviceitem.cpp @@ -0,0 +1,14 @@ +#include "standard_deviceitem.h" +#include "ui_standard_deviceitem.h" + +Standard_DeviceItem::Standard_DeviceItem(QWidget *parent) : + QWidget(parent), + ui(new Ui::Standard_DeviceItem) +{ + ui->setupUi(this); +} + +Standard_DeviceItem::~Standard_DeviceItem() +{ + delete ui; +} diff --git a/softwareDirectory/AutoVerScheme/standard_deviceitem.h b/softwareDirectory/AutoVerScheme/standard_deviceitem.h new file mode 100644 index 0000000..198c362 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/standard_deviceitem.h @@ -0,0 +1,22 @@ +#ifndef STANDARD_DEVICEITEM_H +#define STANDARD_DEVICEITEM_H + +#include + +namespace Ui { +class Standard_DeviceItem; +} + +class Standard_DeviceItem : public QWidget +{ + Q_OBJECT + +public: + explicit Standard_DeviceItem(QWidget *parent = nullptr); + ~Standard_DeviceItem(); + +private: + Ui::Standard_DeviceItem *ui; +}; + +#endif // STANDARD_DEVICEITEM_H diff --git a/softwareDirectory/AutoVerScheme/standard_deviceitem.ui b/softwareDirectory/AutoVerScheme/standard_deviceitem.ui new file mode 100644 index 0000000..00070b7 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/standard_deviceitem.ui @@ -0,0 +1,32 @@ + + + Standard_DeviceItem + + + + 0 + 0 + 400 + 300 + + + + Form + + + + + 150 + 140 + 89 + 24 + + + + 标准设备管理 + + + + + + diff --git a/softwareDirectory/AutoVerScheme/testdataitem.cpp b/softwareDirectory/AutoVerScheme/testdataitem.cpp new file mode 100644 index 0000000..4fde9cf --- /dev/null +++ b/softwareDirectory/AutoVerScheme/testdataitem.cpp @@ -0,0 +1,14 @@ +#include "testdataitem.h" +#include "ui_testdataitem.h" + +TestDataItem::TestDataItem(QWidget *parent) : + QWidget(parent), + ui(new Ui::TestDataItem) +{ + ui->setupUi(this); +} + +TestDataItem::~TestDataItem() +{ + delete ui; +} diff --git a/softwareDirectory/AutoVerScheme/testdataitem.h b/softwareDirectory/AutoVerScheme/testdataitem.h new file mode 100644 index 0000000..81ca7fa --- /dev/null +++ b/softwareDirectory/AutoVerScheme/testdataitem.h @@ -0,0 +1,22 @@ +#ifndef TESTDATAITEM_H +#define TESTDATAITEM_H + +#include + +namespace Ui { +class TestDataItem; +} + +class TestDataItem : public QWidget +{ + Q_OBJECT + +public: + explicit TestDataItem(QWidget *parent = nullptr); + ~TestDataItem(); + +private: + Ui::TestDataItem *ui; +}; + +#endif // TESTDATAITEM_H diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro index 5b8f852..fa0d8e5 100644 --- a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro @@ -1,5 +1,7 @@ QT += core gui QT += sql +QT += widgets + greaterThan(QT_MAJOR_VERSION, 4): QT += widgets CONFIG += c++11 @@ -16,22 +18,50 @@ #DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 SOURCES += \ + beexamined_deviceitem.cpp \ + create_task.cpp \ + depar_task.cpp \ indexwindow.cpp \ + infomanageview.cpp \ + inspectdataitem.cpp \ loginwindow.cpp \ main.cpp \ mainwindow.cpp \ + my_task.cpp \ + rulefileitem.cpp \ + standard_deviceitem.cpp \ + testdataitem.cpp \ testview.cpp HEADERS += \ + InfoBase.h \ + beexamined_deviceitem.h \ + create_task.h \ + depar_task.h \ indexwindow.h \ + infomanageview.h \ + inspectdataitem.h \ loginwindow.h \ mainwindow.h \ + my_task.h \ + rulefileitem.h \ + standard_deviceitem.h \ + testdataitem.h \ testview.h FORMS += \ + beexamined_deviceitem.ui \ + create_task.ui \ + depar_task.ui \ indexwindow.ui \ + infomanageview.ui \ + inspectdataitem.ui \ loginwindow.ui \ mainwindow.ui \ + my_task.ui \ + rulefileitem.ui \ + standard_deviceitem.ui \ + testdataitem.ui \ testview.ui # Default rules for deployment. diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user index 1f5ec64..32d22e9 100644 --- a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user @@ -1,6 +1,6 @@ - + EnvironmentId @@ -64,249 +64,6 @@ ProjectExplorer.Project.Target.0 - Desktop Qt 5.14.2 MinGW 64-bit - Desktop Qt 5.14.2 MinGW 64-bit - qt.qt5.5142.win64_mingw73_kit - 0 - 0 - 0 - - 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 - - Qt4ProjectManager.Qt4RunConfiguration:D:/Auto_verification_scheme/AutoVerScheme/AutoVerScheme.pro - D:/Auto_verification_scheme/AutoVerScheme/AutoVerScheme.pro - - false - - false - true - true - false - false - true - - D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Debug - - 1 - - - - ProjectExplorer.Project.Target.1 - Desktop Qt 5.14.2 MinGW 32-bit Desktop Qt 5.14.2 MinGW 32-bit qt.qt5.5142.win32_mingw73_kit @@ -530,8 +287,252 @@ 2 - Qt4ProjectManager.Qt4RunConfiguration:D:/Auto_verification_scheme/AutoVerScheme/AutoVerScheme.pro - D:/Auto_verification_scheme/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 + + 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 diff --git a/softwareDirectory/AutoVerScheme/InfoBase.cpp b/softwareDirectory/AutoVerScheme/InfoBase.cpp new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/InfoBase.cpp diff --git a/softwareDirectory/AutoVerScheme/InfoBase.h b/softwareDirectory/AutoVerScheme/InfoBase.h new file mode 100644 index 0000000..7fec63e --- /dev/null +++ b/softwareDirectory/AutoVerScheme/InfoBase.h @@ -0,0 +1,16 @@ +#ifndef INFOBASE_H +#define INFOBASE_H + +#include +///信号管理页面的基类 所有信息管理页面都继承于InfoBase +/// 便于统一管理 所有子类必须实现Load方法 +/// 每次按钮点击切换都会调用Load方法 用于每次页面的数据刷新 +class InfoBase : public QWidget { + Q_OBJECT +public: + InfoBase(QWidget *parent = nullptr): QWidget(parent){}; + // 纯虚函数 + virtual void Load()=0; +}; +#endif // INFOBASE_H + diff --git a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.cpp b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.cpp new file mode 100644 index 0000000..7ac1e87 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.cpp @@ -0,0 +1,14 @@ +#include "beexamined_deviceitem.h" +#include "ui_beexamined_deviceitem.h" + +BeExamined_DeviceItem::BeExamined_DeviceItem(QWidget *parent) : + QWidget(parent), + ui(new Ui::BeExamined_DeviceItem) +{ + ui->setupUi(this); +} + +BeExamined_DeviceItem::~BeExamined_DeviceItem() +{ + delete ui; +} diff --git a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.h b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.h new file mode 100644 index 0000000..76b061d --- /dev/null +++ b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.h @@ -0,0 +1,22 @@ +#ifndef BEEXAMINED_DEVICEITEM_H +#define BEEXAMINED_DEVICEITEM_H + +#include + +namespace Ui { +class BeExamined_DeviceItem; +} + +class BeExamined_DeviceItem : public QWidget +{ + Q_OBJECT + +public: + explicit BeExamined_DeviceItem(QWidget *parent = nullptr); + ~BeExamined_DeviceItem(); + +private: + Ui::BeExamined_DeviceItem *ui; +}; + +#endif // BEEXAMINED_DEVICEITEM_H diff --git a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.ui b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.ui new file mode 100644 index 0000000..af9f7bf --- /dev/null +++ b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.ui @@ -0,0 +1,32 @@ + + + BeExamined_DeviceItem + + + + 0 + 0 + 400 + 300 + + + + Form + + + + + 130 + 140 + 89 + 24 + + + + 被检设备管理 + + + + + + diff --git a/softwareDirectory/AutoVerScheme/create_task.cpp b/softwareDirectory/AutoVerScheme/create_task.cpp new file mode 100644 index 0000000..4193efc --- /dev/null +++ b/softwareDirectory/AutoVerScheme/create_task.cpp @@ -0,0 +1,14 @@ +#include "create_task.h" +#include "ui_create_task.h" + +Create_Task::Create_Task(QWidget *parent) : + QWidget(parent), + ui(new Ui::Create_Task) +{ + ui->setupUi(this); +} + +Create_Task::~Create_Task() +{ + delete ui; +} diff --git a/softwareDirectory/AutoVerScheme/create_task.h b/softwareDirectory/AutoVerScheme/create_task.h new file mode 100644 index 0000000..e2264de --- /dev/null +++ b/softwareDirectory/AutoVerScheme/create_task.h @@ -0,0 +1,22 @@ +#ifndef CREATE_TASK_H +#define CREATE_TASK_H + +#include + +namespace Ui { +class Create_Task; +} + +class Create_Task : public QWidget +{ + Q_OBJECT + +public: + explicit Create_Task(QWidget *parent = nullptr); + ~Create_Task(); + +private: + Ui::Create_Task *ui; +}; + +#endif // CREATE_TASK_H diff --git a/softwareDirectory/AutoVerScheme/create_task.ui b/softwareDirectory/AutoVerScheme/create_task.ui new file mode 100644 index 0000000..b79c6a1 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/create_task.ui @@ -0,0 +1,35 @@ + + + Create_Task + + + + 0 + 0 + 400 + 300 + + + + Form + + + background-color:red; + + + + + 140 + 120 + 89 + 24 + + + + 创建任务单 + + + + + + diff --git a/softwareDirectory/AutoVerScheme/depar_task.cpp b/softwareDirectory/AutoVerScheme/depar_task.cpp new file mode 100644 index 0000000..de39775 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/depar_task.cpp @@ -0,0 +1,42 @@ +#include "depar_task.h" +#include "ui_depar_task.h" +#include "QMessageBox" +#include "InfoBase.h" + +Depar_Task::Depar_Task(QWidget *parent) : + InfoBase(parent), + ui(new Ui::Depar_Task) +{ + ui->setupUi(this); + this->initForm(); +} + +Depar_Task::~Depar_Task() +{ + delete ui; +} +void Depar_Task::initForm() +{ + + //ShowMessageBox("标题","初始化完成"); +} +void Depar_Task::ShowMessageBox(QString title,QString value) { + // 创建一个QMessageBox对象 + QMessageBox msgBox; + + // 设置消息框的标题 + msgBox.setWindowTitle(title); + + // 设置消息框的文本内容 + msgBox.setText(value); + + // 设置消息框的标准按钮,这里是“确定”按钮 + msgBox.setStandardButtons(QMessageBox::Ok); + + // 显示消息框 + msgBox.exec(); +} +void Depar_Task::Load() +{ + ShowMessageBox("部门任务页面","部门任务初始化完成"); +} diff --git a/softwareDirectory/AutoVerScheme/depar_task.h b/softwareDirectory/AutoVerScheme/depar_task.h new file mode 100644 index 0000000..8716faf --- /dev/null +++ b/softwareDirectory/AutoVerScheme/depar_task.h @@ -0,0 +1,28 @@ +#ifndef DEPAR_TASK_H +#define DEPAR_TASK_H + + +#include "InfoBase.h" + +namespace Ui { +class Depar_Task; +} + +class Depar_Task :public InfoBase +{ + Q_OBJECT + +public: + Depar_Task(QWidget *parent = nullptr); + ~Depar_Task(); + + +private slots: + void initForm(); //初始化界面数据 + void ShowMessageBox(QString title,QString value); + void Load() override; +private: + Ui::Depar_Task *ui; +}; + +#endif // DEPAR_TASK_H diff --git a/softwareDirectory/AutoVerScheme/depar_task.ui b/softwareDirectory/AutoVerScheme/depar_task.ui new file mode 100644 index 0000000..ff3d44f --- /dev/null +++ b/softwareDirectory/AutoVerScheme/depar_task.ui @@ -0,0 +1,181 @@ + + + Depar_Task + + + + 0 + 0 + 1184 + 456 + + + + Form + + + color:black; + + + + + + + 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 + + + + 要求完成时间: + + + + + + + + + + 查询 + + + + + + + 重置 + + + + + + + + + + background-color:white; + + + + + + + + + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/indexwindow.cpp b/softwareDirectory/AutoVerScheme/indexwindow.cpp index 3e52c7b..9bd65b1 100644 --- a/softwareDirectory/AutoVerScheme/indexwindow.cpp +++ b/softwareDirectory/AutoVerScheme/indexwindow.cpp @@ -21,6 +21,7 @@ //调用样式 loadStyle(":/qss/Index.css"); + } void IndexWindow::loadStyle(const QString &qssFile) diff --git a/softwareDirectory/AutoVerScheme/infomanageview.cpp b/softwareDirectory/AutoVerScheme/infomanageview.cpp new file mode 100644 index 0000000..a206c6f --- /dev/null +++ b/softwareDirectory/AutoVerScheme/infomanageview.cpp @@ -0,0 +1,150 @@ +#include "infomanageview.h" +#include "ui_infomanageview.h" +#include +#include +//子窗体 +#include "depar_task.h" +#include "my_task.h" +#include "create_task.h" +#include "beexamined_deviceitem.h" +#include "inspectdataitem.h" +#include "rulefileitem.h" +#include "standard_deviceitem.h" +#include "testdataitem.h" +#include "InfoBase.h" + +InfoManageView::InfoManageView(QWidget *parent) : + QWidget(parent), + ui(new Ui::InfoManageView) +{ + ui->setupUi(this); + this->setWindowTitle("信息管理"); + //初始化调用所有函数 + this->initForm(); + this->initWidget(); + this->initNav(); + this->initIcon(); +} +//左侧滚动条事件 +void InfoManageView::showEvent(QShowEvent *) +{ + //滚动到底部 + QScrollBar *bar = ui->scrollArea->verticalScrollBar(); + bar->setValue(bar->maximum()); +} + +//左侧导航栏样式初始化 +void InfoManageView::initIcon() +{ + //左侧导航样式,可以设置各种牛逼的参数,超级棒 + // IconHelper::StyleColor styleColor; + //styleColor.defaultBorder = true; + // IconHelper::setStyle(ui->widgetLeft, btns, icons, styleColor); +} + +//颜色初始化设置 +QList InfoManageView::colors = QList(); +void InfoManageView::initForm() +{ + //颜色集合供其他界面使用 + colors << QColor(211, 78, 78) << QColor(29, 185, 242) << QColor(170, 162, 119) << QColor(255, 192, 1); + colors << QColor(0, 176, 180) << QColor(0, 113, 193) << QColor(255, 192, 0); + colors << QColor(72, 103, 149) << QColor(185, 87, 86) << QColor(0, 177, 125); + colors << QColor(214, 77, 84) << QColor(71, 164, 233) << QColor(34, 163, 169); + colors << QColor(59, 123, 156) << QColor(162, 121, 197) << QColor(72, 202, 245); + colors << QColor(0, 150, 121) << QColor(111, 9, 176) << QColor(250, 170, 20); + + ui->scrollArea->setFixedWidth(170); + ui->widgetLeft->setProperty("flag", "left"); +} + +//右侧可切换UI导入 +void InfoManageView::initWidget() +{ + ui->stackedWidget->addWidget(new Depar_Task); //部门任务 + ui->stackedWidget->addWidget(new My_Task); //我的任务 + ui->stackedWidget->addWidget(new Create_Task); //创建任务单 + ui->stackedWidget->addWidget(new Standard_DeviceItem); //标准设备管理 + ui->stackedWidget->addWidget(new BeExamined_DeviceItem); //被检设备管理 + ui->stackedWidget->addWidget(new TestDataItem); //检定数据管理 + ui->stackedWidget->addWidget(new InspectDataItem); //核查数据管理 + ui->stackedWidget->addWidget(new RuleFileItem); //技术文件管理 + + +} +//左侧列表信息导入 +void InfoManageView::initNav() +{ + //按钮文字集合 + QStringList names; + names << "部门任务" << "我的任务" << "创建任务单" << "标准设备管理" << "被检设备管理" + << "检定数据管理" << "核查数据管理" << "技术文件管理" ; + + //自动生成按钮 + for (int i = 0; i < names.count(); i++) { + QToolButton *btn = new QToolButton; + //设置按钮固定高度 + btn->setFixedHeight(35); + //设置按钮的文字 + //btn->setText(QString("%1. %2").arg(i + 1, 2, 10, QChar('0')).arg(names.at(i))); + btn->setText(QString("%1").arg(names.at(i))); + //设置按钮可选中按下类似复选框的功能 + btn->setCheckable(true); + //设置按钮图标在左侧文字在右侧 + // btn->setToolButtonStyle(Qt::ToolButtonTextBesideIcon); + //设置按钮拉伸策略为横向填充 + btn->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Preferred); + //关联按钮单击事件 + connect(btn, SIGNAL(clicked(bool)), this, SLOT(buttonClicked())); + //将按钮加入到布局 + ui->widgetLeft->layout()->addWidget(btn); + //可以指定不同的图标 + //icons << 0xf061; + btns << btn; + //设置按钮大小 + btn->setFixedSize(170, 70); + //设置鼠标经过和点击事件 + btn->setStyleSheet("QToolButton:hover " + "{ background-color: rgba(53, 91, 171, 1); }" + "QToolButton::checked { " + "background-color: rgba(53, 91, 171, 1)}"); + + //ui->widgetLeft->setFixedWidth(200); + } + + //底部加个弹簧 + QSpacerItem *verticalSpacer = new QSpacerItem(20, 40, QSizePolicy::Minimum, QSizePolicy::Expanding); + ui->widgetLeft->layout()->addItem(verticalSpacer); + btns.at(names.count() - 1)->click(); +} +//按钮点击切换UI事件 +void InfoManageView::buttonClicked() +{ + QAbstractButton *b = (QAbstractButton *)sender(); + int count = btns.count(); + int index = btns.indexOf(b); + ui->stackedWidget->setCurrentIndex(index); + + + // 获取当前在 QStackedWidget 中的部件 + QWidget* currentWidget = ui->stackedWidget->currentWidget(); + + // 尝试将当前部件转换为 InfoBase 类型 + InfoBase* currQWidget = qobject_cast(currentWidget); + // 检查转换是否成功 + if (currQWidget != nullptr) + { + // 如果转换成功,调用子类Load 方法 + currQWidget->Load(); + } + + for (int i = 0; i < count; i++) { + QAbstractButton *btn = btns.at(i); + btn->setChecked(btn == b); + } +} + +InfoManageView::~InfoManageView() +{ + delete ui; +} diff --git a/softwareDirectory/AutoVerScheme/infomanageview.h b/softwareDirectory/AutoVerScheme/infomanageview.h new file mode 100644 index 0000000..3c1463f --- /dev/null +++ b/softwareDirectory/AutoVerScheme/infomanageview.h @@ -0,0 +1,38 @@ +#ifndef INFOMANAGEVIEW_H +#define INFOMANAGEVIEW_H + +#include + +class QAbstractButton; + + +namespace Ui { +class InfoManageView; +} + +class InfoManageView : public QWidget +{ + Q_OBJECT + +public: + static QList colors; + + explicit InfoManageView(QWidget *parent = nullptr); + ~InfoManageView(); +private slots: + void initForm(); //初始化界面数据 + void initWidget(); //初始化子窗体 + void initNav(); //初始化导航按钮 + void initIcon(); //初始化导航按钮图标 + void buttonClicked(); //导航按钮单击事件 +protected: + void showEvent(QShowEvent *); +private: + Ui::InfoManageView *ui; + + //左侧导航栏图标+按钮集合 + QList icons; + QList btns; +}; + +#endif // INFOMANAGEVIEW_H diff --git a/softwareDirectory/AutoVerScheme/infomanageview.ui b/softwareDirectory/AutoVerScheme/infomanageview.ui new file mode 100644 index 0000000..4b39e7d --- /dev/null +++ b/softwareDirectory/AutoVerScheme/infomanageview.ui @@ -0,0 +1,109 @@ + + + InfoManageView + + + + 0 + 0 + 883 + 644 + + + + Form + + + + 0 + + + 0 + + + 0 + + + 0 + + + 0 + + + + + + 0 + 0 + + + + + 170 + 0 + + + + + 16777215 + 16777215 + + + + color:White; + font-weight: bold; + font-size: 16px; +background-color:rgba(10, 15, 92, 1); + + + true + + + + + 0 + 0 + 170 + 625 + + + + + 170 + 0 + + + + + 170 + 0 + + + + + 0 + + + 0 + + + 0 + + + 0 + + + 0 + + + + + + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/inspectdataitem.cpp b/softwareDirectory/AutoVerScheme/inspectdataitem.cpp new file mode 100644 index 0000000..e9c2adc --- /dev/null +++ b/softwareDirectory/AutoVerScheme/inspectdataitem.cpp @@ -0,0 +1,14 @@ +#include "inspectdataitem.h" +#include "ui_inspectdataitem.h" + +InspectDataItem::InspectDataItem(QWidget *parent) : + QWidget(parent), + ui(new Ui::InspectDataItem) +{ + ui->setupUi(this); +} + +InspectDataItem::~InspectDataItem() +{ + delete ui; +} diff --git a/softwareDirectory/AutoVerScheme/inspectdataitem.h b/softwareDirectory/AutoVerScheme/inspectdataitem.h new file mode 100644 index 0000000..57551bb --- /dev/null +++ b/softwareDirectory/AutoVerScheme/inspectdataitem.h @@ -0,0 +1,22 @@ +#ifndef INSPECTDATAITEM_H +#define INSPECTDATAITEM_H + +#include + +namespace Ui { +class InspectDataItem; +} + +class InspectDataItem : public QWidget +{ + Q_OBJECT + +public: + explicit InspectDataItem(QWidget *parent = nullptr); + ~InspectDataItem(); + +private: + Ui::InspectDataItem *ui; +}; + +#endif // INSPECTDATAITEM_H diff --git a/softwareDirectory/AutoVerScheme/inspectdataitem.ui b/softwareDirectory/AutoVerScheme/inspectdataitem.ui new file mode 100644 index 0000000..45f04e0 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/inspectdataitem.ui @@ -0,0 +1,32 @@ + + + InspectDataItem + + + + 0 + 0 + 400 + 300 + + + + Form + + + + + 120 + 130 + 89 + 24 + + + + 核查数据管理 + + + + + + diff --git a/softwareDirectory/AutoVerScheme/my_task.cpp b/softwareDirectory/AutoVerScheme/my_task.cpp new file mode 100644 index 0000000..40aceb2 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/my_task.cpp @@ -0,0 +1,42 @@ +#include "my_task.h" +#include "ui_my_task.h" +#include "QMessageBox" + +My_Task::My_Task(QWidget *parent) : + InfoBase(parent), + ui(new Ui::My_Task) +{ + ui->setupUi(this); + + this->initForm(); +} + +My_Task::~My_Task() +{ + delete ui; +} +void My_Task::initForm() +{ + + +} +void My_Task::ShowMessageBox(QString title,QString value) { + // 创建一个QMessageBox对象 + QMessageBox msgBox; + + // 设置消息框的标题 + msgBox.setWindowTitle(title); + + // 设置消息框的文本内容 + msgBox.setText(value); + + // 设置消息框的标准按钮,这里是“确定”按钮 + msgBox.setStandardButtons(QMessageBox::Ok); + + // 显示消息框 + msgBox.exec(); +} +void My_Task::Load() +{ + ShowMessageBox("我的任务页面","我的任务初始化完成"); +} diff --git a/softwareDirectory/AutoVerScheme/my_task.h b/softwareDirectory/AutoVerScheme/my_task.h new file mode 100644 index 0000000..d6600cb --- /dev/null +++ b/softwareDirectory/AutoVerScheme/my_task.h @@ -0,0 +1,28 @@ +#ifndef MY_TASK_H +#define MY_TASK_H + +#include +#include "InfoBase.h" + +namespace Ui { +class My_Task; +} + +class My_Task :public InfoBase +{ + Q_OBJECT + +public: + explicit My_Task(QWidget *parent = nullptr); + ~My_Task(); + + +private slots: + void initForm(); //初始化界面数据 + void ShowMessageBox(QString title,QString value); + void Load() override; +private: + Ui::My_Task *ui; +}; + +#endif // MY_TASK_H diff --git a/softwareDirectory/AutoVerScheme/my_task.ui b/softwareDirectory/AutoVerScheme/my_task.ui new file mode 100644 index 0000000..89245b8 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/my_task.ui @@ -0,0 +1,178 @@ + + + My_Task + + + + 0 + 0 + 857 + 511 + + + + Form + + + + + + + 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 + + + + 要求完成时间: + + + + + + + + + + 查询 + + + + + + + 重置 + + + + + + + + + + background-color:white; + + + + + + + + + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/rulefileitem.cpp b/softwareDirectory/AutoVerScheme/rulefileitem.cpp new file mode 100644 index 0000000..6f9ddd3 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/rulefileitem.cpp @@ -0,0 +1,14 @@ +#include "rulefileitem.h" +#include "ui_rulefileitem.h" + +RuleFileItem::RuleFileItem(QWidget *parent) : + QWidget(parent), + ui(new Ui::RuleFileItem) +{ + ui->setupUi(this); +} + +RuleFileItem::~RuleFileItem() +{ + delete ui; +} diff --git a/softwareDirectory/AutoVerScheme/rulefileitem.h b/softwareDirectory/AutoVerScheme/rulefileitem.h new file mode 100644 index 0000000..1fc81a1 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/rulefileitem.h @@ -0,0 +1,22 @@ +#ifndef RULEFILEITEM_H +#define RULEFILEITEM_H + +#include + +namespace Ui { +class RuleFileItem; +} + +class RuleFileItem : public QWidget +{ + Q_OBJECT + +public: + explicit RuleFileItem(QWidget *parent = nullptr); + ~RuleFileItem(); + +private: + Ui::RuleFileItem *ui; +}; + +#endif // RULEFILEITEM_H diff --git a/softwareDirectory/AutoVerScheme/rulefileitem.ui b/softwareDirectory/AutoVerScheme/rulefileitem.ui new file mode 100644 index 0000000..599e025 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/rulefileitem.ui @@ -0,0 +1,32 @@ + + + RuleFileItem + + + + 0 + 0 + 400 + 300 + + + + Form + + + + + 140 + 130 + 121 + 24 + + + + 规程文件管理 + + + + + + diff --git a/softwareDirectory/AutoVerScheme/standard_deviceitem.cpp b/softwareDirectory/AutoVerScheme/standard_deviceitem.cpp new file mode 100644 index 0000000..ed15b0a --- /dev/null +++ b/softwareDirectory/AutoVerScheme/standard_deviceitem.cpp @@ -0,0 +1,14 @@ +#include "standard_deviceitem.h" +#include "ui_standard_deviceitem.h" + +Standard_DeviceItem::Standard_DeviceItem(QWidget *parent) : + QWidget(parent), + ui(new Ui::Standard_DeviceItem) +{ + ui->setupUi(this); +} + +Standard_DeviceItem::~Standard_DeviceItem() +{ + delete ui; +} diff --git a/softwareDirectory/AutoVerScheme/standard_deviceitem.h b/softwareDirectory/AutoVerScheme/standard_deviceitem.h new file mode 100644 index 0000000..198c362 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/standard_deviceitem.h @@ -0,0 +1,22 @@ +#ifndef STANDARD_DEVICEITEM_H +#define STANDARD_DEVICEITEM_H + +#include + +namespace Ui { +class Standard_DeviceItem; +} + +class Standard_DeviceItem : public QWidget +{ + Q_OBJECT + +public: + explicit Standard_DeviceItem(QWidget *parent = nullptr); + ~Standard_DeviceItem(); + +private: + Ui::Standard_DeviceItem *ui; +}; + +#endif // STANDARD_DEVICEITEM_H diff --git a/softwareDirectory/AutoVerScheme/standard_deviceitem.ui b/softwareDirectory/AutoVerScheme/standard_deviceitem.ui new file mode 100644 index 0000000..00070b7 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/standard_deviceitem.ui @@ -0,0 +1,32 @@ + + + Standard_DeviceItem + + + + 0 + 0 + 400 + 300 + + + + Form + + + + + 150 + 140 + 89 + 24 + + + + 标准设备管理 + + + + + + diff --git a/softwareDirectory/AutoVerScheme/testdataitem.cpp b/softwareDirectory/AutoVerScheme/testdataitem.cpp new file mode 100644 index 0000000..4fde9cf --- /dev/null +++ b/softwareDirectory/AutoVerScheme/testdataitem.cpp @@ -0,0 +1,14 @@ +#include "testdataitem.h" +#include "ui_testdataitem.h" + +TestDataItem::TestDataItem(QWidget *parent) : + QWidget(parent), + ui(new Ui::TestDataItem) +{ + ui->setupUi(this); +} + +TestDataItem::~TestDataItem() +{ + delete ui; +} diff --git a/softwareDirectory/AutoVerScheme/testdataitem.h b/softwareDirectory/AutoVerScheme/testdataitem.h new file mode 100644 index 0000000..81ca7fa --- /dev/null +++ b/softwareDirectory/AutoVerScheme/testdataitem.h @@ -0,0 +1,22 @@ +#ifndef TESTDATAITEM_H +#define TESTDATAITEM_H + +#include + +namespace Ui { +class TestDataItem; +} + +class TestDataItem : public QWidget +{ + Q_OBJECT + +public: + explicit TestDataItem(QWidget *parent = nullptr); + ~TestDataItem(); + +private: + Ui::TestDataItem *ui; +}; + +#endif // TESTDATAITEM_H diff --git a/softwareDirectory/AutoVerScheme/testdataitem.ui b/softwareDirectory/AutoVerScheme/testdataitem.ui new file mode 100644 index 0000000..76d23de --- /dev/null +++ b/softwareDirectory/AutoVerScheme/testdataitem.ui @@ -0,0 +1,32 @@ + + + TestDataItem + + + + 0 + 0 + 400 + 300 + + + + Form + + + + + 120 + 150 + 89 + 24 + + + + 检定数据管理 + + + + + + diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro index 5b8f852..fa0d8e5 100644 --- a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro @@ -1,5 +1,7 @@ QT += core gui QT += sql +QT += widgets + greaterThan(QT_MAJOR_VERSION, 4): QT += widgets CONFIG += c++11 @@ -16,22 +18,50 @@ #DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 SOURCES += \ + beexamined_deviceitem.cpp \ + create_task.cpp \ + depar_task.cpp \ indexwindow.cpp \ + infomanageview.cpp \ + inspectdataitem.cpp \ loginwindow.cpp \ main.cpp \ mainwindow.cpp \ + my_task.cpp \ + rulefileitem.cpp \ + standard_deviceitem.cpp \ + testdataitem.cpp \ testview.cpp HEADERS += \ + InfoBase.h \ + beexamined_deviceitem.h \ + create_task.h \ + depar_task.h \ indexwindow.h \ + infomanageview.h \ + inspectdataitem.h \ loginwindow.h \ mainwindow.h \ + my_task.h \ + rulefileitem.h \ + standard_deviceitem.h \ + testdataitem.h \ testview.h FORMS += \ + beexamined_deviceitem.ui \ + create_task.ui \ + depar_task.ui \ indexwindow.ui \ + infomanageview.ui \ + inspectdataitem.ui \ loginwindow.ui \ mainwindow.ui \ + my_task.ui \ + rulefileitem.ui \ + standard_deviceitem.ui \ + testdataitem.ui \ testview.ui # Default rules for deployment. diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user index 1f5ec64..32d22e9 100644 --- a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user @@ -1,6 +1,6 @@ - + EnvironmentId @@ -64,249 +64,6 @@ ProjectExplorer.Project.Target.0 - Desktop Qt 5.14.2 MinGW 64-bit - Desktop Qt 5.14.2 MinGW 64-bit - qt.qt5.5142.win64_mingw73_kit - 0 - 0 - 0 - - 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 - - Qt4ProjectManager.Qt4RunConfiguration:D:/Auto_verification_scheme/AutoVerScheme/AutoVerScheme.pro - D:/Auto_verification_scheme/AutoVerScheme/AutoVerScheme.pro - - false - - false - true - true - false - false - true - - D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Debug - - 1 - - - - ProjectExplorer.Project.Target.1 - Desktop Qt 5.14.2 MinGW 32-bit Desktop Qt 5.14.2 MinGW 32-bit qt.qt5.5142.win32_mingw73_kit @@ -530,8 +287,252 @@ 2 - Qt4ProjectManager.Qt4RunConfiguration:D:/Auto_verification_scheme/AutoVerScheme/AutoVerScheme.pro - D:/Auto_verification_scheme/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 + + 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 diff --git a/softwareDirectory/AutoVerScheme/InfoBase.cpp b/softwareDirectory/AutoVerScheme/InfoBase.cpp new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/InfoBase.cpp diff --git a/softwareDirectory/AutoVerScheme/InfoBase.h b/softwareDirectory/AutoVerScheme/InfoBase.h new file mode 100644 index 0000000..7fec63e --- /dev/null +++ b/softwareDirectory/AutoVerScheme/InfoBase.h @@ -0,0 +1,16 @@ +#ifndef INFOBASE_H +#define INFOBASE_H + +#include +///信号管理页面的基类 所有信息管理页面都继承于InfoBase +/// 便于统一管理 所有子类必须实现Load方法 +/// 每次按钮点击切换都会调用Load方法 用于每次页面的数据刷新 +class InfoBase : public QWidget { + Q_OBJECT +public: + InfoBase(QWidget *parent = nullptr): QWidget(parent){}; + // 纯虚函数 + virtual void Load()=0; +}; +#endif // INFOBASE_H + diff --git a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.cpp b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.cpp new file mode 100644 index 0000000..7ac1e87 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.cpp @@ -0,0 +1,14 @@ +#include "beexamined_deviceitem.h" +#include "ui_beexamined_deviceitem.h" + +BeExamined_DeviceItem::BeExamined_DeviceItem(QWidget *parent) : + QWidget(parent), + ui(new Ui::BeExamined_DeviceItem) +{ + ui->setupUi(this); +} + +BeExamined_DeviceItem::~BeExamined_DeviceItem() +{ + delete ui; +} diff --git a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.h b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.h new file mode 100644 index 0000000..76b061d --- /dev/null +++ b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.h @@ -0,0 +1,22 @@ +#ifndef BEEXAMINED_DEVICEITEM_H +#define BEEXAMINED_DEVICEITEM_H + +#include + +namespace Ui { +class BeExamined_DeviceItem; +} + +class BeExamined_DeviceItem : public QWidget +{ + Q_OBJECT + +public: + explicit BeExamined_DeviceItem(QWidget *parent = nullptr); + ~BeExamined_DeviceItem(); + +private: + Ui::BeExamined_DeviceItem *ui; +}; + +#endif // BEEXAMINED_DEVICEITEM_H diff --git a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.ui b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.ui new file mode 100644 index 0000000..af9f7bf --- /dev/null +++ b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.ui @@ -0,0 +1,32 @@ + + + BeExamined_DeviceItem + + + + 0 + 0 + 400 + 300 + + + + Form + + + + + 130 + 140 + 89 + 24 + + + + 被检设备管理 + + + + + + diff --git a/softwareDirectory/AutoVerScheme/create_task.cpp b/softwareDirectory/AutoVerScheme/create_task.cpp new file mode 100644 index 0000000..4193efc --- /dev/null +++ b/softwareDirectory/AutoVerScheme/create_task.cpp @@ -0,0 +1,14 @@ +#include "create_task.h" +#include "ui_create_task.h" + +Create_Task::Create_Task(QWidget *parent) : + QWidget(parent), + ui(new Ui::Create_Task) +{ + ui->setupUi(this); +} + +Create_Task::~Create_Task() +{ + delete ui; +} diff --git a/softwareDirectory/AutoVerScheme/create_task.h b/softwareDirectory/AutoVerScheme/create_task.h new file mode 100644 index 0000000..e2264de --- /dev/null +++ b/softwareDirectory/AutoVerScheme/create_task.h @@ -0,0 +1,22 @@ +#ifndef CREATE_TASK_H +#define CREATE_TASK_H + +#include + +namespace Ui { +class Create_Task; +} + +class Create_Task : public QWidget +{ + Q_OBJECT + +public: + explicit Create_Task(QWidget *parent = nullptr); + ~Create_Task(); + +private: + Ui::Create_Task *ui; +}; + +#endif // CREATE_TASK_H diff --git a/softwareDirectory/AutoVerScheme/create_task.ui b/softwareDirectory/AutoVerScheme/create_task.ui new file mode 100644 index 0000000..b79c6a1 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/create_task.ui @@ -0,0 +1,35 @@ + + + Create_Task + + + + 0 + 0 + 400 + 300 + + + + Form + + + background-color:red; + + + + + 140 + 120 + 89 + 24 + + + + 创建任务单 + + + + + + diff --git a/softwareDirectory/AutoVerScheme/depar_task.cpp b/softwareDirectory/AutoVerScheme/depar_task.cpp new file mode 100644 index 0000000..de39775 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/depar_task.cpp @@ -0,0 +1,42 @@ +#include "depar_task.h" +#include "ui_depar_task.h" +#include "QMessageBox" +#include "InfoBase.h" + +Depar_Task::Depar_Task(QWidget *parent) : + InfoBase(parent), + ui(new Ui::Depar_Task) +{ + ui->setupUi(this); + this->initForm(); +} + +Depar_Task::~Depar_Task() +{ + delete ui; +} +void Depar_Task::initForm() +{ + + //ShowMessageBox("标题","初始化完成"); +} +void Depar_Task::ShowMessageBox(QString title,QString value) { + // 创建一个QMessageBox对象 + QMessageBox msgBox; + + // 设置消息框的标题 + msgBox.setWindowTitle(title); + + // 设置消息框的文本内容 + msgBox.setText(value); + + // 设置消息框的标准按钮,这里是“确定”按钮 + msgBox.setStandardButtons(QMessageBox::Ok); + + // 显示消息框 + msgBox.exec(); +} +void Depar_Task::Load() +{ + ShowMessageBox("部门任务页面","部门任务初始化完成"); +} diff --git a/softwareDirectory/AutoVerScheme/depar_task.h b/softwareDirectory/AutoVerScheme/depar_task.h new file mode 100644 index 0000000..8716faf --- /dev/null +++ b/softwareDirectory/AutoVerScheme/depar_task.h @@ -0,0 +1,28 @@ +#ifndef DEPAR_TASK_H +#define DEPAR_TASK_H + + +#include "InfoBase.h" + +namespace Ui { +class Depar_Task; +} + +class Depar_Task :public InfoBase +{ + Q_OBJECT + +public: + Depar_Task(QWidget *parent = nullptr); + ~Depar_Task(); + + +private slots: + void initForm(); //初始化界面数据 + void ShowMessageBox(QString title,QString value); + void Load() override; +private: + Ui::Depar_Task *ui; +}; + +#endif // DEPAR_TASK_H diff --git a/softwareDirectory/AutoVerScheme/depar_task.ui b/softwareDirectory/AutoVerScheme/depar_task.ui new file mode 100644 index 0000000..ff3d44f --- /dev/null +++ b/softwareDirectory/AutoVerScheme/depar_task.ui @@ -0,0 +1,181 @@ + + + Depar_Task + + + + 0 + 0 + 1184 + 456 + + + + Form + + + color:black; + + + + + + + 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 + + + + 要求完成时间: + + + + + + + + + + 查询 + + + + + + + 重置 + + + + + + + + + + background-color:white; + + + + + + + + + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/indexwindow.cpp b/softwareDirectory/AutoVerScheme/indexwindow.cpp index 3e52c7b..9bd65b1 100644 --- a/softwareDirectory/AutoVerScheme/indexwindow.cpp +++ b/softwareDirectory/AutoVerScheme/indexwindow.cpp @@ -21,6 +21,7 @@ //调用样式 loadStyle(":/qss/Index.css"); + } void IndexWindow::loadStyle(const QString &qssFile) diff --git a/softwareDirectory/AutoVerScheme/infomanageview.cpp b/softwareDirectory/AutoVerScheme/infomanageview.cpp new file mode 100644 index 0000000..a206c6f --- /dev/null +++ b/softwareDirectory/AutoVerScheme/infomanageview.cpp @@ -0,0 +1,150 @@ +#include "infomanageview.h" +#include "ui_infomanageview.h" +#include +#include +//子窗体 +#include "depar_task.h" +#include "my_task.h" +#include "create_task.h" +#include "beexamined_deviceitem.h" +#include "inspectdataitem.h" +#include "rulefileitem.h" +#include "standard_deviceitem.h" +#include "testdataitem.h" +#include "InfoBase.h" + +InfoManageView::InfoManageView(QWidget *parent) : + QWidget(parent), + ui(new Ui::InfoManageView) +{ + ui->setupUi(this); + this->setWindowTitle("信息管理"); + //初始化调用所有函数 + this->initForm(); + this->initWidget(); + this->initNav(); + this->initIcon(); +} +//左侧滚动条事件 +void InfoManageView::showEvent(QShowEvent *) +{ + //滚动到底部 + QScrollBar *bar = ui->scrollArea->verticalScrollBar(); + bar->setValue(bar->maximum()); +} + +//左侧导航栏样式初始化 +void InfoManageView::initIcon() +{ + //左侧导航样式,可以设置各种牛逼的参数,超级棒 + // IconHelper::StyleColor styleColor; + //styleColor.defaultBorder = true; + // IconHelper::setStyle(ui->widgetLeft, btns, icons, styleColor); +} + +//颜色初始化设置 +QList InfoManageView::colors = QList(); +void InfoManageView::initForm() +{ + //颜色集合供其他界面使用 + colors << QColor(211, 78, 78) << QColor(29, 185, 242) << QColor(170, 162, 119) << QColor(255, 192, 1); + colors << QColor(0, 176, 180) << QColor(0, 113, 193) << QColor(255, 192, 0); + colors << QColor(72, 103, 149) << QColor(185, 87, 86) << QColor(0, 177, 125); + colors << QColor(214, 77, 84) << QColor(71, 164, 233) << QColor(34, 163, 169); + colors << QColor(59, 123, 156) << QColor(162, 121, 197) << QColor(72, 202, 245); + colors << QColor(0, 150, 121) << QColor(111, 9, 176) << QColor(250, 170, 20); + + ui->scrollArea->setFixedWidth(170); + ui->widgetLeft->setProperty("flag", "left"); +} + +//右侧可切换UI导入 +void InfoManageView::initWidget() +{ + ui->stackedWidget->addWidget(new Depar_Task); //部门任务 + ui->stackedWidget->addWidget(new My_Task); //我的任务 + ui->stackedWidget->addWidget(new Create_Task); //创建任务单 + ui->stackedWidget->addWidget(new Standard_DeviceItem); //标准设备管理 + ui->stackedWidget->addWidget(new BeExamined_DeviceItem); //被检设备管理 + ui->stackedWidget->addWidget(new TestDataItem); //检定数据管理 + ui->stackedWidget->addWidget(new InspectDataItem); //核查数据管理 + ui->stackedWidget->addWidget(new RuleFileItem); //技术文件管理 + + +} +//左侧列表信息导入 +void InfoManageView::initNav() +{ + //按钮文字集合 + QStringList names; + names << "部门任务" << "我的任务" << "创建任务单" << "标准设备管理" << "被检设备管理" + << "检定数据管理" << "核查数据管理" << "技术文件管理" ; + + //自动生成按钮 + for (int i = 0; i < names.count(); i++) { + QToolButton *btn = new QToolButton; + //设置按钮固定高度 + btn->setFixedHeight(35); + //设置按钮的文字 + //btn->setText(QString("%1. %2").arg(i + 1, 2, 10, QChar('0')).arg(names.at(i))); + btn->setText(QString("%1").arg(names.at(i))); + //设置按钮可选中按下类似复选框的功能 + btn->setCheckable(true); + //设置按钮图标在左侧文字在右侧 + // btn->setToolButtonStyle(Qt::ToolButtonTextBesideIcon); + //设置按钮拉伸策略为横向填充 + btn->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Preferred); + //关联按钮单击事件 + connect(btn, SIGNAL(clicked(bool)), this, SLOT(buttonClicked())); + //将按钮加入到布局 + ui->widgetLeft->layout()->addWidget(btn); + //可以指定不同的图标 + //icons << 0xf061; + btns << btn; + //设置按钮大小 + btn->setFixedSize(170, 70); + //设置鼠标经过和点击事件 + btn->setStyleSheet("QToolButton:hover " + "{ background-color: rgba(53, 91, 171, 1); }" + "QToolButton::checked { " + "background-color: rgba(53, 91, 171, 1)}"); + + //ui->widgetLeft->setFixedWidth(200); + } + + //底部加个弹簧 + QSpacerItem *verticalSpacer = new QSpacerItem(20, 40, QSizePolicy::Minimum, QSizePolicy::Expanding); + ui->widgetLeft->layout()->addItem(verticalSpacer); + btns.at(names.count() - 1)->click(); +} +//按钮点击切换UI事件 +void InfoManageView::buttonClicked() +{ + QAbstractButton *b = (QAbstractButton *)sender(); + int count = btns.count(); + int index = btns.indexOf(b); + ui->stackedWidget->setCurrentIndex(index); + + + // 获取当前在 QStackedWidget 中的部件 + QWidget* currentWidget = ui->stackedWidget->currentWidget(); + + // 尝试将当前部件转换为 InfoBase 类型 + InfoBase* currQWidget = qobject_cast(currentWidget); + // 检查转换是否成功 + if (currQWidget != nullptr) + { + // 如果转换成功,调用子类Load 方法 + currQWidget->Load(); + } + + for (int i = 0; i < count; i++) { + QAbstractButton *btn = btns.at(i); + btn->setChecked(btn == b); + } +} + +InfoManageView::~InfoManageView() +{ + delete ui; +} diff --git a/softwareDirectory/AutoVerScheme/infomanageview.h b/softwareDirectory/AutoVerScheme/infomanageview.h new file mode 100644 index 0000000..3c1463f --- /dev/null +++ b/softwareDirectory/AutoVerScheme/infomanageview.h @@ -0,0 +1,38 @@ +#ifndef INFOMANAGEVIEW_H +#define INFOMANAGEVIEW_H + +#include + +class QAbstractButton; + + +namespace Ui { +class InfoManageView; +} + +class InfoManageView : public QWidget +{ + Q_OBJECT + +public: + static QList colors; + + explicit InfoManageView(QWidget *parent = nullptr); + ~InfoManageView(); +private slots: + void initForm(); //初始化界面数据 + void initWidget(); //初始化子窗体 + void initNav(); //初始化导航按钮 + void initIcon(); //初始化导航按钮图标 + void buttonClicked(); //导航按钮单击事件 +protected: + void showEvent(QShowEvent *); +private: + Ui::InfoManageView *ui; + + //左侧导航栏图标+按钮集合 + QList icons; + QList btns; +}; + +#endif // INFOMANAGEVIEW_H diff --git a/softwareDirectory/AutoVerScheme/infomanageview.ui b/softwareDirectory/AutoVerScheme/infomanageview.ui new file mode 100644 index 0000000..4b39e7d --- /dev/null +++ b/softwareDirectory/AutoVerScheme/infomanageview.ui @@ -0,0 +1,109 @@ + + + InfoManageView + + + + 0 + 0 + 883 + 644 + + + + Form + + + + 0 + + + 0 + + + 0 + + + 0 + + + 0 + + + + + + 0 + 0 + + + + + 170 + 0 + + + + + 16777215 + 16777215 + + + + color:White; + font-weight: bold; + font-size: 16px; +background-color:rgba(10, 15, 92, 1); + + + true + + + + + 0 + 0 + 170 + 625 + + + + + 170 + 0 + + + + + 170 + 0 + + + + + 0 + + + 0 + + + 0 + + + 0 + + + 0 + + + + + + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/inspectdataitem.cpp b/softwareDirectory/AutoVerScheme/inspectdataitem.cpp new file mode 100644 index 0000000..e9c2adc --- /dev/null +++ b/softwareDirectory/AutoVerScheme/inspectdataitem.cpp @@ -0,0 +1,14 @@ +#include "inspectdataitem.h" +#include "ui_inspectdataitem.h" + +InspectDataItem::InspectDataItem(QWidget *parent) : + QWidget(parent), + ui(new Ui::InspectDataItem) +{ + ui->setupUi(this); +} + +InspectDataItem::~InspectDataItem() +{ + delete ui; +} diff --git a/softwareDirectory/AutoVerScheme/inspectdataitem.h b/softwareDirectory/AutoVerScheme/inspectdataitem.h new file mode 100644 index 0000000..57551bb --- /dev/null +++ b/softwareDirectory/AutoVerScheme/inspectdataitem.h @@ -0,0 +1,22 @@ +#ifndef INSPECTDATAITEM_H +#define INSPECTDATAITEM_H + +#include + +namespace Ui { +class InspectDataItem; +} + +class InspectDataItem : public QWidget +{ + Q_OBJECT + +public: + explicit InspectDataItem(QWidget *parent = nullptr); + ~InspectDataItem(); + +private: + Ui::InspectDataItem *ui; +}; + +#endif // INSPECTDATAITEM_H diff --git a/softwareDirectory/AutoVerScheme/inspectdataitem.ui b/softwareDirectory/AutoVerScheme/inspectdataitem.ui new file mode 100644 index 0000000..45f04e0 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/inspectdataitem.ui @@ -0,0 +1,32 @@ + + + InspectDataItem + + + + 0 + 0 + 400 + 300 + + + + Form + + + + + 120 + 130 + 89 + 24 + + + + 核查数据管理 + + + + + + diff --git a/softwareDirectory/AutoVerScheme/my_task.cpp b/softwareDirectory/AutoVerScheme/my_task.cpp new file mode 100644 index 0000000..40aceb2 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/my_task.cpp @@ -0,0 +1,42 @@ +#include "my_task.h" +#include "ui_my_task.h" +#include "QMessageBox" + +My_Task::My_Task(QWidget *parent) : + InfoBase(parent), + ui(new Ui::My_Task) +{ + ui->setupUi(this); + + this->initForm(); +} + +My_Task::~My_Task() +{ + delete ui; +} +void My_Task::initForm() +{ + + +} +void My_Task::ShowMessageBox(QString title,QString value) { + // 创建一个QMessageBox对象 + QMessageBox msgBox; + + // 设置消息框的标题 + msgBox.setWindowTitle(title); + + // 设置消息框的文本内容 + msgBox.setText(value); + + // 设置消息框的标准按钮,这里是“确定”按钮 + msgBox.setStandardButtons(QMessageBox::Ok); + + // 显示消息框 + msgBox.exec(); +} +void My_Task::Load() +{ + ShowMessageBox("我的任务页面","我的任务初始化完成"); +} diff --git a/softwareDirectory/AutoVerScheme/my_task.h b/softwareDirectory/AutoVerScheme/my_task.h new file mode 100644 index 0000000..d6600cb --- /dev/null +++ b/softwareDirectory/AutoVerScheme/my_task.h @@ -0,0 +1,28 @@ +#ifndef MY_TASK_H +#define MY_TASK_H + +#include +#include "InfoBase.h" + +namespace Ui { +class My_Task; +} + +class My_Task :public InfoBase +{ + Q_OBJECT + +public: + explicit My_Task(QWidget *parent = nullptr); + ~My_Task(); + + +private slots: + void initForm(); //初始化界面数据 + void ShowMessageBox(QString title,QString value); + void Load() override; +private: + Ui::My_Task *ui; +}; + +#endif // MY_TASK_H diff --git a/softwareDirectory/AutoVerScheme/my_task.ui b/softwareDirectory/AutoVerScheme/my_task.ui new file mode 100644 index 0000000..89245b8 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/my_task.ui @@ -0,0 +1,178 @@ + + + My_Task + + + + 0 + 0 + 857 + 511 + + + + Form + + + + + + + 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 + + + + 要求完成时间: + + + + + + + + + + 查询 + + + + + + + 重置 + + + + + + + + + + background-color:white; + + + + + + + + + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/rulefileitem.cpp b/softwareDirectory/AutoVerScheme/rulefileitem.cpp new file mode 100644 index 0000000..6f9ddd3 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/rulefileitem.cpp @@ -0,0 +1,14 @@ +#include "rulefileitem.h" +#include "ui_rulefileitem.h" + +RuleFileItem::RuleFileItem(QWidget *parent) : + QWidget(parent), + ui(new Ui::RuleFileItem) +{ + ui->setupUi(this); +} + +RuleFileItem::~RuleFileItem() +{ + delete ui; +} diff --git a/softwareDirectory/AutoVerScheme/rulefileitem.h b/softwareDirectory/AutoVerScheme/rulefileitem.h new file mode 100644 index 0000000..1fc81a1 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/rulefileitem.h @@ -0,0 +1,22 @@ +#ifndef RULEFILEITEM_H +#define RULEFILEITEM_H + +#include + +namespace Ui { +class RuleFileItem; +} + +class RuleFileItem : public QWidget +{ + Q_OBJECT + +public: + explicit RuleFileItem(QWidget *parent = nullptr); + ~RuleFileItem(); + +private: + Ui::RuleFileItem *ui; +}; + +#endif // RULEFILEITEM_H diff --git a/softwareDirectory/AutoVerScheme/rulefileitem.ui b/softwareDirectory/AutoVerScheme/rulefileitem.ui new file mode 100644 index 0000000..599e025 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/rulefileitem.ui @@ -0,0 +1,32 @@ + + + RuleFileItem + + + + 0 + 0 + 400 + 300 + + + + Form + + + + + 140 + 130 + 121 + 24 + + + + 规程文件管理 + + + + + + diff --git a/softwareDirectory/AutoVerScheme/standard_deviceitem.cpp b/softwareDirectory/AutoVerScheme/standard_deviceitem.cpp new file mode 100644 index 0000000..ed15b0a --- /dev/null +++ b/softwareDirectory/AutoVerScheme/standard_deviceitem.cpp @@ -0,0 +1,14 @@ +#include "standard_deviceitem.h" +#include "ui_standard_deviceitem.h" + +Standard_DeviceItem::Standard_DeviceItem(QWidget *parent) : + QWidget(parent), + ui(new Ui::Standard_DeviceItem) +{ + ui->setupUi(this); +} + +Standard_DeviceItem::~Standard_DeviceItem() +{ + delete ui; +} diff --git a/softwareDirectory/AutoVerScheme/standard_deviceitem.h b/softwareDirectory/AutoVerScheme/standard_deviceitem.h new file mode 100644 index 0000000..198c362 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/standard_deviceitem.h @@ -0,0 +1,22 @@ +#ifndef STANDARD_DEVICEITEM_H +#define STANDARD_DEVICEITEM_H + +#include + +namespace Ui { +class Standard_DeviceItem; +} + +class Standard_DeviceItem : public QWidget +{ + Q_OBJECT + +public: + explicit Standard_DeviceItem(QWidget *parent = nullptr); + ~Standard_DeviceItem(); + +private: + Ui::Standard_DeviceItem *ui; +}; + +#endif // STANDARD_DEVICEITEM_H diff --git a/softwareDirectory/AutoVerScheme/standard_deviceitem.ui b/softwareDirectory/AutoVerScheme/standard_deviceitem.ui new file mode 100644 index 0000000..00070b7 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/standard_deviceitem.ui @@ -0,0 +1,32 @@ + + + Standard_DeviceItem + + + + 0 + 0 + 400 + 300 + + + + Form + + + + + 150 + 140 + 89 + 24 + + + + 标准设备管理 + + + + + + diff --git a/softwareDirectory/AutoVerScheme/testdataitem.cpp b/softwareDirectory/AutoVerScheme/testdataitem.cpp new file mode 100644 index 0000000..4fde9cf --- /dev/null +++ b/softwareDirectory/AutoVerScheme/testdataitem.cpp @@ -0,0 +1,14 @@ +#include "testdataitem.h" +#include "ui_testdataitem.h" + +TestDataItem::TestDataItem(QWidget *parent) : + QWidget(parent), + ui(new Ui::TestDataItem) +{ + ui->setupUi(this); +} + +TestDataItem::~TestDataItem() +{ + delete ui; +} diff --git a/softwareDirectory/AutoVerScheme/testdataitem.h b/softwareDirectory/AutoVerScheme/testdataitem.h new file mode 100644 index 0000000..81ca7fa --- /dev/null +++ b/softwareDirectory/AutoVerScheme/testdataitem.h @@ -0,0 +1,22 @@ +#ifndef TESTDATAITEM_H +#define TESTDATAITEM_H + +#include + +namespace Ui { +class TestDataItem; +} + +class TestDataItem : public QWidget +{ + Q_OBJECT + +public: + explicit TestDataItem(QWidget *parent = nullptr); + ~TestDataItem(); + +private: + Ui::TestDataItem *ui; +}; + +#endif // TESTDATAITEM_H diff --git a/softwareDirectory/AutoVerScheme/testdataitem.ui b/softwareDirectory/AutoVerScheme/testdataitem.ui new file mode 100644 index 0000000..76d23de --- /dev/null +++ b/softwareDirectory/AutoVerScheme/testdataitem.ui @@ -0,0 +1,32 @@ + + + TestDataItem + + + + 0 + 0 + 400 + 300 + + + + Form + + + + + 120 + 150 + 89 + 24 + + + + 检定数据管理 + + + + + + diff --git a/softwareDirectory/AutoVerScheme/testview.cpp b/softwareDirectory/AutoVerScheme/testview.cpp index 466134d..3f1c2c0 100644 --- a/softwareDirectory/AutoVerScheme/testview.cpp +++ b/softwareDirectory/AutoVerScheme/testview.cpp @@ -1,5 +1,8 @@ #include "testview.h" #include "ui_testview.h" +#include "QDialog" + + TestView::TestView(QWidget *parent) : QMainWindow(parent), @@ -7,6 +10,37 @@ { ui->setupUi(this); this->initForm(); + + ui->textEdit->installEventFilter(this); //它负责在相应部件上安装事件过滤器 + + thread=new mythread; //定义⼀个线程对象 + thread->setObjectName(QString("okk"));//设置线程对象的名字,注意在启动前设置 + connect(thread,&mythread::over,this,&TestView::start_two_tree);//连接槽函数 + + //调色板 + //获取 pushButton 的调⾊板 + QPalette palette1 = ui->pushButton->palette(); + //设置按钮⽂本颜⾊为红⾊ + palette1.setColor(QPalette::ButtonText,Qt::red); + //设置按钮背景⾊为绿⾊ + palette1.setColor(QPalette::Button,Qt::green); + //pushButton 使⽤修改后的调⾊板 + ui->pushButton->setPalette(palette1); + //设置 lineEdit 不可⽤ + ui->lineEdit->setDisabled(true); + QPalette palette2 = ui->lineEdit->palette(); + //设置⾏编辑器不可⽤时的背景颜⾊为蓝⾊ + palette2.setColor(QPalette::Disabled,QPalette::Base,Qt::red); + ui->lineEdit->setPalette(palette2); + + //设置背景图片 + //设置背景图标,但是不能让背景图⽚⾃适应 + QPalette pt=this->palette(); + QImage img(":/image/index/u15.png"); + QImage myimg=img.scaled(this->width(),this->height()); //设置⽐例 + pt.setBrush(QPalette::Window,QBrush(myimg)); //设置画笔 + this->setPalette(pt); + } TestView::~TestView() @@ -27,3 +61,80 @@ this->setWindowFlag(Qt::CustomizeWindowHint,true); this->setWindowFlag(Qt::WindowSystemMenuHint,true); } + +void TestView::on_pushButton_clicked() +{ + QDialog dialog(this); + QLabel* lb1 =new QLabel("kkkk",&dialog); //向对话框中添加内容 + dialog.exec(); +} + +void TestView::on_pushButton_6_clicked() +{ + QDialog *dialog =new QDialog(this); //在构造⽅法中创建⼀个⾮模态对话框 + dialog->show(); +} + + +void TestView::keyPressEvent(QKeyEvent *ev) +{ + //重写键盘按下事件 + ui->label_5->clear(); + if(ev->key() == Qt::Key_0) + { + ui->label_5->setText("1被按下了"); + return; + }else if(ev->key() == Qt::Key_Q) + ui->label_5->setText("Q被按下了"); + + QWidget::keyPressEvent(ev); + +} +bool TestView::eventFilter(QObject *obj, QEvent *event) //此函数中实现事件过滤器。 +{ + if(obj==ui->textEdit) //textEdit控件 + { + if(event->type()==QEvent::Wheel) + { + QWheelEvent * w=static_cast(event); + if(w->delta()>0) + ui->label_5->setText(QString::number(count++)); + else + ui->label_5->setText(QString::number(count--)); + return true; + } + else + return false; + } + else + return QWidget::eventFilter(obj, event); +} +//主线程要调⽤的任务函数 +void TestView::start_two_tree() +{ + //ui->label_5->setText(QString::number(QThread::currentThreadId())); + + for(int i=0; i<5;i++) + { + ui->label_5->setText("开始采摘第"+QString::number(i+1)+"苹果"); + // qDebug()<<"$$$$$$开始采摘第"<label_5->setText("采摘完成"); + //ui->label_5->setText(thread->objectName()); + +} + +//⼦线程的任务函数 通过重新run虚函数实现 +void mythread::run () +{ + + // qDebug()<<"开始采摘苹果"< - + EnvironmentId @@ -64,249 +64,6 @@ ProjectExplorer.Project.Target.0 - Desktop Qt 5.14.2 MinGW 64-bit - Desktop Qt 5.14.2 MinGW 64-bit - qt.qt5.5142.win64_mingw73_kit - 0 - 0 - 0 - - 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 - - Qt4ProjectManager.Qt4RunConfiguration:D:/Auto_verification_scheme/AutoVerScheme/AutoVerScheme.pro - D:/Auto_verification_scheme/AutoVerScheme/AutoVerScheme.pro - - false - - false - true - true - false - false - true - - D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Debug - - 1 - - - - ProjectExplorer.Project.Target.1 - Desktop Qt 5.14.2 MinGW 32-bit Desktop Qt 5.14.2 MinGW 32-bit qt.qt5.5142.win32_mingw73_kit @@ -530,8 +287,252 @@ 2 - Qt4ProjectManager.Qt4RunConfiguration:D:/Auto_verification_scheme/AutoVerScheme/AutoVerScheme.pro - D:/Auto_verification_scheme/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 + + 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 diff --git a/softwareDirectory/AutoVerScheme/InfoBase.cpp b/softwareDirectory/AutoVerScheme/InfoBase.cpp new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/InfoBase.cpp diff --git a/softwareDirectory/AutoVerScheme/InfoBase.h b/softwareDirectory/AutoVerScheme/InfoBase.h new file mode 100644 index 0000000..7fec63e --- /dev/null +++ b/softwareDirectory/AutoVerScheme/InfoBase.h @@ -0,0 +1,16 @@ +#ifndef INFOBASE_H +#define INFOBASE_H + +#include +///信号管理页面的基类 所有信息管理页面都继承于InfoBase +/// 便于统一管理 所有子类必须实现Load方法 +/// 每次按钮点击切换都会调用Load方法 用于每次页面的数据刷新 +class InfoBase : public QWidget { + Q_OBJECT +public: + InfoBase(QWidget *parent = nullptr): QWidget(parent){}; + // 纯虚函数 + virtual void Load()=0; +}; +#endif // INFOBASE_H + diff --git a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.cpp b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.cpp new file mode 100644 index 0000000..7ac1e87 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.cpp @@ -0,0 +1,14 @@ +#include "beexamined_deviceitem.h" +#include "ui_beexamined_deviceitem.h" + +BeExamined_DeviceItem::BeExamined_DeviceItem(QWidget *parent) : + QWidget(parent), + ui(new Ui::BeExamined_DeviceItem) +{ + ui->setupUi(this); +} + +BeExamined_DeviceItem::~BeExamined_DeviceItem() +{ + delete ui; +} diff --git a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.h b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.h new file mode 100644 index 0000000..76b061d --- /dev/null +++ b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.h @@ -0,0 +1,22 @@ +#ifndef BEEXAMINED_DEVICEITEM_H +#define BEEXAMINED_DEVICEITEM_H + +#include + +namespace Ui { +class BeExamined_DeviceItem; +} + +class BeExamined_DeviceItem : public QWidget +{ + Q_OBJECT + +public: + explicit BeExamined_DeviceItem(QWidget *parent = nullptr); + ~BeExamined_DeviceItem(); + +private: + Ui::BeExamined_DeviceItem *ui; +}; + +#endif // BEEXAMINED_DEVICEITEM_H diff --git a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.ui b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.ui new file mode 100644 index 0000000..af9f7bf --- /dev/null +++ b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.ui @@ -0,0 +1,32 @@ + + + BeExamined_DeviceItem + + + + 0 + 0 + 400 + 300 + + + + Form + + + + + 130 + 140 + 89 + 24 + + + + 被检设备管理 + + + + + + diff --git a/softwareDirectory/AutoVerScheme/create_task.cpp b/softwareDirectory/AutoVerScheme/create_task.cpp new file mode 100644 index 0000000..4193efc --- /dev/null +++ b/softwareDirectory/AutoVerScheme/create_task.cpp @@ -0,0 +1,14 @@ +#include "create_task.h" +#include "ui_create_task.h" + +Create_Task::Create_Task(QWidget *parent) : + QWidget(parent), + ui(new Ui::Create_Task) +{ + ui->setupUi(this); +} + +Create_Task::~Create_Task() +{ + delete ui; +} diff --git a/softwareDirectory/AutoVerScheme/create_task.h b/softwareDirectory/AutoVerScheme/create_task.h new file mode 100644 index 0000000..e2264de --- /dev/null +++ b/softwareDirectory/AutoVerScheme/create_task.h @@ -0,0 +1,22 @@ +#ifndef CREATE_TASK_H +#define CREATE_TASK_H + +#include + +namespace Ui { +class Create_Task; +} + +class Create_Task : public QWidget +{ + Q_OBJECT + +public: + explicit Create_Task(QWidget *parent = nullptr); + ~Create_Task(); + +private: + Ui::Create_Task *ui; +}; + +#endif // CREATE_TASK_H diff --git a/softwareDirectory/AutoVerScheme/create_task.ui b/softwareDirectory/AutoVerScheme/create_task.ui new file mode 100644 index 0000000..b79c6a1 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/create_task.ui @@ -0,0 +1,35 @@ + + + Create_Task + + + + 0 + 0 + 400 + 300 + + + + Form + + + background-color:red; + + + + + 140 + 120 + 89 + 24 + + + + 创建任务单 + + + + + + diff --git a/softwareDirectory/AutoVerScheme/depar_task.cpp b/softwareDirectory/AutoVerScheme/depar_task.cpp new file mode 100644 index 0000000..de39775 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/depar_task.cpp @@ -0,0 +1,42 @@ +#include "depar_task.h" +#include "ui_depar_task.h" +#include "QMessageBox" +#include "InfoBase.h" + +Depar_Task::Depar_Task(QWidget *parent) : + InfoBase(parent), + ui(new Ui::Depar_Task) +{ + ui->setupUi(this); + this->initForm(); +} + +Depar_Task::~Depar_Task() +{ + delete ui; +} +void Depar_Task::initForm() +{ + + //ShowMessageBox("标题","初始化完成"); +} +void Depar_Task::ShowMessageBox(QString title,QString value) { + // 创建一个QMessageBox对象 + QMessageBox msgBox; + + // 设置消息框的标题 + msgBox.setWindowTitle(title); + + // 设置消息框的文本内容 + msgBox.setText(value); + + // 设置消息框的标准按钮,这里是“确定”按钮 + msgBox.setStandardButtons(QMessageBox::Ok); + + // 显示消息框 + msgBox.exec(); +} +void Depar_Task::Load() +{ + ShowMessageBox("部门任务页面","部门任务初始化完成"); +} diff --git a/softwareDirectory/AutoVerScheme/depar_task.h b/softwareDirectory/AutoVerScheme/depar_task.h new file mode 100644 index 0000000..8716faf --- /dev/null +++ b/softwareDirectory/AutoVerScheme/depar_task.h @@ -0,0 +1,28 @@ +#ifndef DEPAR_TASK_H +#define DEPAR_TASK_H + + +#include "InfoBase.h" + +namespace Ui { +class Depar_Task; +} + +class Depar_Task :public InfoBase +{ + Q_OBJECT + +public: + Depar_Task(QWidget *parent = nullptr); + ~Depar_Task(); + + +private slots: + void initForm(); //初始化界面数据 + void ShowMessageBox(QString title,QString value); + void Load() override; +private: + Ui::Depar_Task *ui; +}; + +#endif // DEPAR_TASK_H diff --git a/softwareDirectory/AutoVerScheme/depar_task.ui b/softwareDirectory/AutoVerScheme/depar_task.ui new file mode 100644 index 0000000..ff3d44f --- /dev/null +++ b/softwareDirectory/AutoVerScheme/depar_task.ui @@ -0,0 +1,181 @@ + + + Depar_Task + + + + 0 + 0 + 1184 + 456 + + + + Form + + + color:black; + + + + + + + 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 + + + + 要求完成时间: + + + + + + + + + + 查询 + + + + + + + 重置 + + + + + + + + + + background-color:white; + + + + + + + + + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/indexwindow.cpp b/softwareDirectory/AutoVerScheme/indexwindow.cpp index 3e52c7b..9bd65b1 100644 --- a/softwareDirectory/AutoVerScheme/indexwindow.cpp +++ b/softwareDirectory/AutoVerScheme/indexwindow.cpp @@ -21,6 +21,7 @@ //调用样式 loadStyle(":/qss/Index.css"); + } void IndexWindow::loadStyle(const QString &qssFile) diff --git a/softwareDirectory/AutoVerScheme/infomanageview.cpp b/softwareDirectory/AutoVerScheme/infomanageview.cpp new file mode 100644 index 0000000..a206c6f --- /dev/null +++ b/softwareDirectory/AutoVerScheme/infomanageview.cpp @@ -0,0 +1,150 @@ +#include "infomanageview.h" +#include "ui_infomanageview.h" +#include +#include +//子窗体 +#include "depar_task.h" +#include "my_task.h" +#include "create_task.h" +#include "beexamined_deviceitem.h" +#include "inspectdataitem.h" +#include "rulefileitem.h" +#include "standard_deviceitem.h" +#include "testdataitem.h" +#include "InfoBase.h" + +InfoManageView::InfoManageView(QWidget *parent) : + QWidget(parent), + ui(new Ui::InfoManageView) +{ + ui->setupUi(this); + this->setWindowTitle("信息管理"); + //初始化调用所有函数 + this->initForm(); + this->initWidget(); + this->initNav(); + this->initIcon(); +} +//左侧滚动条事件 +void InfoManageView::showEvent(QShowEvent *) +{ + //滚动到底部 + QScrollBar *bar = ui->scrollArea->verticalScrollBar(); + bar->setValue(bar->maximum()); +} + +//左侧导航栏样式初始化 +void InfoManageView::initIcon() +{ + //左侧导航样式,可以设置各种牛逼的参数,超级棒 + // IconHelper::StyleColor styleColor; + //styleColor.defaultBorder = true; + // IconHelper::setStyle(ui->widgetLeft, btns, icons, styleColor); +} + +//颜色初始化设置 +QList InfoManageView::colors = QList(); +void InfoManageView::initForm() +{ + //颜色集合供其他界面使用 + colors << QColor(211, 78, 78) << QColor(29, 185, 242) << QColor(170, 162, 119) << QColor(255, 192, 1); + colors << QColor(0, 176, 180) << QColor(0, 113, 193) << QColor(255, 192, 0); + colors << QColor(72, 103, 149) << QColor(185, 87, 86) << QColor(0, 177, 125); + colors << QColor(214, 77, 84) << QColor(71, 164, 233) << QColor(34, 163, 169); + colors << QColor(59, 123, 156) << QColor(162, 121, 197) << QColor(72, 202, 245); + colors << QColor(0, 150, 121) << QColor(111, 9, 176) << QColor(250, 170, 20); + + ui->scrollArea->setFixedWidth(170); + ui->widgetLeft->setProperty("flag", "left"); +} + +//右侧可切换UI导入 +void InfoManageView::initWidget() +{ + ui->stackedWidget->addWidget(new Depar_Task); //部门任务 + ui->stackedWidget->addWidget(new My_Task); //我的任务 + ui->stackedWidget->addWidget(new Create_Task); //创建任务单 + ui->stackedWidget->addWidget(new Standard_DeviceItem); //标准设备管理 + ui->stackedWidget->addWidget(new BeExamined_DeviceItem); //被检设备管理 + ui->stackedWidget->addWidget(new TestDataItem); //检定数据管理 + ui->stackedWidget->addWidget(new InspectDataItem); //核查数据管理 + ui->stackedWidget->addWidget(new RuleFileItem); //技术文件管理 + + +} +//左侧列表信息导入 +void InfoManageView::initNav() +{ + //按钮文字集合 + QStringList names; + names << "部门任务" << "我的任务" << "创建任务单" << "标准设备管理" << "被检设备管理" + << "检定数据管理" << "核查数据管理" << "技术文件管理" ; + + //自动生成按钮 + for (int i = 0; i < names.count(); i++) { + QToolButton *btn = new QToolButton; + //设置按钮固定高度 + btn->setFixedHeight(35); + //设置按钮的文字 + //btn->setText(QString("%1. %2").arg(i + 1, 2, 10, QChar('0')).arg(names.at(i))); + btn->setText(QString("%1").arg(names.at(i))); + //设置按钮可选中按下类似复选框的功能 + btn->setCheckable(true); + //设置按钮图标在左侧文字在右侧 + // btn->setToolButtonStyle(Qt::ToolButtonTextBesideIcon); + //设置按钮拉伸策略为横向填充 + btn->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Preferred); + //关联按钮单击事件 + connect(btn, SIGNAL(clicked(bool)), this, SLOT(buttonClicked())); + //将按钮加入到布局 + ui->widgetLeft->layout()->addWidget(btn); + //可以指定不同的图标 + //icons << 0xf061; + btns << btn; + //设置按钮大小 + btn->setFixedSize(170, 70); + //设置鼠标经过和点击事件 + btn->setStyleSheet("QToolButton:hover " + "{ background-color: rgba(53, 91, 171, 1); }" + "QToolButton::checked { " + "background-color: rgba(53, 91, 171, 1)}"); + + //ui->widgetLeft->setFixedWidth(200); + } + + //底部加个弹簧 + QSpacerItem *verticalSpacer = new QSpacerItem(20, 40, QSizePolicy::Minimum, QSizePolicy::Expanding); + ui->widgetLeft->layout()->addItem(verticalSpacer); + btns.at(names.count() - 1)->click(); +} +//按钮点击切换UI事件 +void InfoManageView::buttonClicked() +{ + QAbstractButton *b = (QAbstractButton *)sender(); + int count = btns.count(); + int index = btns.indexOf(b); + ui->stackedWidget->setCurrentIndex(index); + + + // 获取当前在 QStackedWidget 中的部件 + QWidget* currentWidget = ui->stackedWidget->currentWidget(); + + // 尝试将当前部件转换为 InfoBase 类型 + InfoBase* currQWidget = qobject_cast(currentWidget); + // 检查转换是否成功 + if (currQWidget != nullptr) + { + // 如果转换成功,调用子类Load 方法 + currQWidget->Load(); + } + + for (int i = 0; i < count; i++) { + QAbstractButton *btn = btns.at(i); + btn->setChecked(btn == b); + } +} + +InfoManageView::~InfoManageView() +{ + delete ui; +} diff --git a/softwareDirectory/AutoVerScheme/infomanageview.h b/softwareDirectory/AutoVerScheme/infomanageview.h new file mode 100644 index 0000000..3c1463f --- /dev/null +++ b/softwareDirectory/AutoVerScheme/infomanageview.h @@ -0,0 +1,38 @@ +#ifndef INFOMANAGEVIEW_H +#define INFOMANAGEVIEW_H + +#include + +class QAbstractButton; + + +namespace Ui { +class InfoManageView; +} + +class InfoManageView : public QWidget +{ + Q_OBJECT + +public: + static QList colors; + + explicit InfoManageView(QWidget *parent = nullptr); + ~InfoManageView(); +private slots: + void initForm(); //初始化界面数据 + void initWidget(); //初始化子窗体 + void initNav(); //初始化导航按钮 + void initIcon(); //初始化导航按钮图标 + void buttonClicked(); //导航按钮单击事件 +protected: + void showEvent(QShowEvent *); +private: + Ui::InfoManageView *ui; + + //左侧导航栏图标+按钮集合 + QList icons; + QList btns; +}; + +#endif // INFOMANAGEVIEW_H diff --git a/softwareDirectory/AutoVerScheme/infomanageview.ui b/softwareDirectory/AutoVerScheme/infomanageview.ui new file mode 100644 index 0000000..4b39e7d --- /dev/null +++ b/softwareDirectory/AutoVerScheme/infomanageview.ui @@ -0,0 +1,109 @@ + + + InfoManageView + + + + 0 + 0 + 883 + 644 + + + + Form + + + + 0 + + + 0 + + + 0 + + + 0 + + + 0 + + + + + + 0 + 0 + + + + + 170 + 0 + + + + + 16777215 + 16777215 + + + + color:White; + font-weight: bold; + font-size: 16px; +background-color:rgba(10, 15, 92, 1); + + + true + + + + + 0 + 0 + 170 + 625 + + + + + 170 + 0 + + + + + 170 + 0 + + + + + 0 + + + 0 + + + 0 + + + 0 + + + 0 + + + + + + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/inspectdataitem.cpp b/softwareDirectory/AutoVerScheme/inspectdataitem.cpp new file mode 100644 index 0000000..e9c2adc --- /dev/null +++ b/softwareDirectory/AutoVerScheme/inspectdataitem.cpp @@ -0,0 +1,14 @@ +#include "inspectdataitem.h" +#include "ui_inspectdataitem.h" + +InspectDataItem::InspectDataItem(QWidget *parent) : + QWidget(parent), + ui(new Ui::InspectDataItem) +{ + ui->setupUi(this); +} + +InspectDataItem::~InspectDataItem() +{ + delete ui; +} diff --git a/softwareDirectory/AutoVerScheme/inspectdataitem.h b/softwareDirectory/AutoVerScheme/inspectdataitem.h new file mode 100644 index 0000000..57551bb --- /dev/null +++ b/softwareDirectory/AutoVerScheme/inspectdataitem.h @@ -0,0 +1,22 @@ +#ifndef INSPECTDATAITEM_H +#define INSPECTDATAITEM_H + +#include + +namespace Ui { +class InspectDataItem; +} + +class InspectDataItem : public QWidget +{ + Q_OBJECT + +public: + explicit InspectDataItem(QWidget *parent = nullptr); + ~InspectDataItem(); + +private: + Ui::InspectDataItem *ui; +}; + +#endif // INSPECTDATAITEM_H diff --git a/softwareDirectory/AutoVerScheme/inspectdataitem.ui b/softwareDirectory/AutoVerScheme/inspectdataitem.ui new file mode 100644 index 0000000..45f04e0 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/inspectdataitem.ui @@ -0,0 +1,32 @@ + + + InspectDataItem + + + + 0 + 0 + 400 + 300 + + + + Form + + + + + 120 + 130 + 89 + 24 + + + + 核查数据管理 + + + + + + diff --git a/softwareDirectory/AutoVerScheme/my_task.cpp b/softwareDirectory/AutoVerScheme/my_task.cpp new file mode 100644 index 0000000..40aceb2 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/my_task.cpp @@ -0,0 +1,42 @@ +#include "my_task.h" +#include "ui_my_task.h" +#include "QMessageBox" + +My_Task::My_Task(QWidget *parent) : + InfoBase(parent), + ui(new Ui::My_Task) +{ + ui->setupUi(this); + + this->initForm(); +} + +My_Task::~My_Task() +{ + delete ui; +} +void My_Task::initForm() +{ + + +} +void My_Task::ShowMessageBox(QString title,QString value) { + // 创建一个QMessageBox对象 + QMessageBox msgBox; + + // 设置消息框的标题 + msgBox.setWindowTitle(title); + + // 设置消息框的文本内容 + msgBox.setText(value); + + // 设置消息框的标准按钮,这里是“确定”按钮 + msgBox.setStandardButtons(QMessageBox::Ok); + + // 显示消息框 + msgBox.exec(); +} +void My_Task::Load() +{ + ShowMessageBox("我的任务页面","我的任务初始化完成"); +} diff --git a/softwareDirectory/AutoVerScheme/my_task.h b/softwareDirectory/AutoVerScheme/my_task.h new file mode 100644 index 0000000..d6600cb --- /dev/null +++ b/softwareDirectory/AutoVerScheme/my_task.h @@ -0,0 +1,28 @@ +#ifndef MY_TASK_H +#define MY_TASK_H + +#include +#include "InfoBase.h" + +namespace Ui { +class My_Task; +} + +class My_Task :public InfoBase +{ + Q_OBJECT + +public: + explicit My_Task(QWidget *parent = nullptr); + ~My_Task(); + + +private slots: + void initForm(); //初始化界面数据 + void ShowMessageBox(QString title,QString value); + void Load() override; +private: + Ui::My_Task *ui; +}; + +#endif // MY_TASK_H diff --git a/softwareDirectory/AutoVerScheme/my_task.ui b/softwareDirectory/AutoVerScheme/my_task.ui new file mode 100644 index 0000000..89245b8 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/my_task.ui @@ -0,0 +1,178 @@ + + + My_Task + + + + 0 + 0 + 857 + 511 + + + + Form + + + + + + + 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 + + + + 要求完成时间: + + + + + + + + + + 查询 + + + + + + + 重置 + + + + + + + + + + background-color:white; + + + + + + + + + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/rulefileitem.cpp b/softwareDirectory/AutoVerScheme/rulefileitem.cpp new file mode 100644 index 0000000..6f9ddd3 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/rulefileitem.cpp @@ -0,0 +1,14 @@ +#include "rulefileitem.h" +#include "ui_rulefileitem.h" + +RuleFileItem::RuleFileItem(QWidget *parent) : + QWidget(parent), + ui(new Ui::RuleFileItem) +{ + ui->setupUi(this); +} + +RuleFileItem::~RuleFileItem() +{ + delete ui; +} diff --git a/softwareDirectory/AutoVerScheme/rulefileitem.h b/softwareDirectory/AutoVerScheme/rulefileitem.h new file mode 100644 index 0000000..1fc81a1 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/rulefileitem.h @@ -0,0 +1,22 @@ +#ifndef RULEFILEITEM_H +#define RULEFILEITEM_H + +#include + +namespace Ui { +class RuleFileItem; +} + +class RuleFileItem : public QWidget +{ + Q_OBJECT + +public: + explicit RuleFileItem(QWidget *parent = nullptr); + ~RuleFileItem(); + +private: + Ui::RuleFileItem *ui; +}; + +#endif // RULEFILEITEM_H diff --git a/softwareDirectory/AutoVerScheme/rulefileitem.ui b/softwareDirectory/AutoVerScheme/rulefileitem.ui new file mode 100644 index 0000000..599e025 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/rulefileitem.ui @@ -0,0 +1,32 @@ + + + RuleFileItem + + + + 0 + 0 + 400 + 300 + + + + Form + + + + + 140 + 130 + 121 + 24 + + + + 规程文件管理 + + + + + + diff --git a/softwareDirectory/AutoVerScheme/standard_deviceitem.cpp b/softwareDirectory/AutoVerScheme/standard_deviceitem.cpp new file mode 100644 index 0000000..ed15b0a --- /dev/null +++ b/softwareDirectory/AutoVerScheme/standard_deviceitem.cpp @@ -0,0 +1,14 @@ +#include "standard_deviceitem.h" +#include "ui_standard_deviceitem.h" + +Standard_DeviceItem::Standard_DeviceItem(QWidget *parent) : + QWidget(parent), + ui(new Ui::Standard_DeviceItem) +{ + ui->setupUi(this); +} + +Standard_DeviceItem::~Standard_DeviceItem() +{ + delete ui; +} diff --git a/softwareDirectory/AutoVerScheme/standard_deviceitem.h b/softwareDirectory/AutoVerScheme/standard_deviceitem.h new file mode 100644 index 0000000..198c362 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/standard_deviceitem.h @@ -0,0 +1,22 @@ +#ifndef STANDARD_DEVICEITEM_H +#define STANDARD_DEVICEITEM_H + +#include + +namespace Ui { +class Standard_DeviceItem; +} + +class Standard_DeviceItem : public QWidget +{ + Q_OBJECT + +public: + explicit Standard_DeviceItem(QWidget *parent = nullptr); + ~Standard_DeviceItem(); + +private: + Ui::Standard_DeviceItem *ui; +}; + +#endif // STANDARD_DEVICEITEM_H diff --git a/softwareDirectory/AutoVerScheme/standard_deviceitem.ui b/softwareDirectory/AutoVerScheme/standard_deviceitem.ui new file mode 100644 index 0000000..00070b7 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/standard_deviceitem.ui @@ -0,0 +1,32 @@ + + + Standard_DeviceItem + + + + 0 + 0 + 400 + 300 + + + + Form + + + + + 150 + 140 + 89 + 24 + + + + 标准设备管理 + + + + + + diff --git a/softwareDirectory/AutoVerScheme/testdataitem.cpp b/softwareDirectory/AutoVerScheme/testdataitem.cpp new file mode 100644 index 0000000..4fde9cf --- /dev/null +++ b/softwareDirectory/AutoVerScheme/testdataitem.cpp @@ -0,0 +1,14 @@ +#include "testdataitem.h" +#include "ui_testdataitem.h" + +TestDataItem::TestDataItem(QWidget *parent) : + QWidget(parent), + ui(new Ui::TestDataItem) +{ + ui->setupUi(this); +} + +TestDataItem::~TestDataItem() +{ + delete ui; +} diff --git a/softwareDirectory/AutoVerScheme/testdataitem.h b/softwareDirectory/AutoVerScheme/testdataitem.h new file mode 100644 index 0000000..81ca7fa --- /dev/null +++ b/softwareDirectory/AutoVerScheme/testdataitem.h @@ -0,0 +1,22 @@ +#ifndef TESTDATAITEM_H +#define TESTDATAITEM_H + +#include + +namespace Ui { +class TestDataItem; +} + +class TestDataItem : public QWidget +{ + Q_OBJECT + +public: + explicit TestDataItem(QWidget *parent = nullptr); + ~TestDataItem(); + +private: + Ui::TestDataItem *ui; +}; + +#endif // TESTDATAITEM_H diff --git a/softwareDirectory/AutoVerScheme/testdataitem.ui b/softwareDirectory/AutoVerScheme/testdataitem.ui new file mode 100644 index 0000000..76d23de --- /dev/null +++ b/softwareDirectory/AutoVerScheme/testdataitem.ui @@ -0,0 +1,32 @@ + + + TestDataItem + + + + 0 + 0 + 400 + 300 + + + + Form + + + + + 120 + 150 + 89 + 24 + + + + 检定数据管理 + + + + + + diff --git a/softwareDirectory/AutoVerScheme/testview.cpp b/softwareDirectory/AutoVerScheme/testview.cpp index 466134d..3f1c2c0 100644 --- a/softwareDirectory/AutoVerScheme/testview.cpp +++ b/softwareDirectory/AutoVerScheme/testview.cpp @@ -1,5 +1,8 @@ #include "testview.h" #include "ui_testview.h" +#include "QDialog" + + TestView::TestView(QWidget *parent) : QMainWindow(parent), @@ -7,6 +10,37 @@ { ui->setupUi(this); this->initForm(); + + ui->textEdit->installEventFilter(this); //它负责在相应部件上安装事件过滤器 + + thread=new mythread; //定义⼀个线程对象 + thread->setObjectName(QString("okk"));//设置线程对象的名字,注意在启动前设置 + connect(thread,&mythread::over,this,&TestView::start_two_tree);//连接槽函数 + + //调色板 + //获取 pushButton 的调⾊板 + QPalette palette1 = ui->pushButton->palette(); + //设置按钮⽂本颜⾊为红⾊ + palette1.setColor(QPalette::ButtonText,Qt::red); + //设置按钮背景⾊为绿⾊ + palette1.setColor(QPalette::Button,Qt::green); + //pushButton 使⽤修改后的调⾊板 + ui->pushButton->setPalette(palette1); + //设置 lineEdit 不可⽤ + ui->lineEdit->setDisabled(true); + QPalette palette2 = ui->lineEdit->palette(); + //设置⾏编辑器不可⽤时的背景颜⾊为蓝⾊ + palette2.setColor(QPalette::Disabled,QPalette::Base,Qt::red); + ui->lineEdit->setPalette(palette2); + + //设置背景图片 + //设置背景图标,但是不能让背景图⽚⾃适应 + QPalette pt=this->palette(); + QImage img(":/image/index/u15.png"); + QImage myimg=img.scaled(this->width(),this->height()); //设置⽐例 + pt.setBrush(QPalette::Window,QBrush(myimg)); //设置画笔 + this->setPalette(pt); + } TestView::~TestView() @@ -27,3 +61,80 @@ this->setWindowFlag(Qt::CustomizeWindowHint,true); this->setWindowFlag(Qt::WindowSystemMenuHint,true); } + +void TestView::on_pushButton_clicked() +{ + QDialog dialog(this); + QLabel* lb1 =new QLabel("kkkk",&dialog); //向对话框中添加内容 + dialog.exec(); +} + +void TestView::on_pushButton_6_clicked() +{ + QDialog *dialog =new QDialog(this); //在构造⽅法中创建⼀个⾮模态对话框 + dialog->show(); +} + + +void TestView::keyPressEvent(QKeyEvent *ev) +{ + //重写键盘按下事件 + ui->label_5->clear(); + if(ev->key() == Qt::Key_0) + { + ui->label_5->setText("1被按下了"); + return; + }else if(ev->key() == Qt::Key_Q) + ui->label_5->setText("Q被按下了"); + + QWidget::keyPressEvent(ev); + +} +bool TestView::eventFilter(QObject *obj, QEvent *event) //此函数中实现事件过滤器。 +{ + if(obj==ui->textEdit) //textEdit控件 + { + if(event->type()==QEvent::Wheel) + { + QWheelEvent * w=static_cast(event); + if(w->delta()>0) + ui->label_5->setText(QString::number(count++)); + else + ui->label_5->setText(QString::number(count--)); + return true; + } + else + return false; + } + else + return QWidget::eventFilter(obj, event); +} +//主线程要调⽤的任务函数 +void TestView::start_two_tree() +{ + //ui->label_5->setText(QString::number(QThread::currentThreadId())); + + for(int i=0; i<5;i++) + { + ui->label_5->setText("开始采摘第"+QString::number(i+1)+"苹果"); + // qDebug()<<"$$$$$$开始采摘第"<label_5->setText("采摘完成"); + //ui->label_5->setText(thread->objectName()); + +} + +//⼦线程的任务函数 通过重新run虚函数实现 +void mythread::run () +{ + + // qDebug()<<"开始采摘苹果"< +#include +#include namespace Ui { class TestView; } +//继承线程类,定义1个信号关联1个槽函数 +class mythread : public QThread +{ + Q_OBJECT +private: + void run(); + +signals: //声明1个信号 + void over(); +}; + + class TestView : public QMainWindow { Q_OBJECT @@ -14,12 +28,30 @@ public: explicit TestView(QWidget *parent = nullptr); ~TestView(); + private slots: void initForm(); + void on_pushButton_clicked(); + + void on_pushButton_6_clicked(); + + void start_two_tree(); +public: + void keyPressEvent(QKeyEvent *event); //键盘按下事件 此声明必须实现 不然会报错 + //void keyReleaseEvent(QKeyEvent *event); //键盘松开事件 + + //bool installEventFilter(QObject *filterObj); //它负责在相应部件上安装事件过滤器 + bool eventFilter(QObject *watched, QEvent *event); ////它负责在相应部件上安装事件过滤器 + qint8 count=0; + //线程 + mythread *thread; //定义⼀个线程对象 private: Ui::TestView *ui; + }; + + #endif // TESTVIEW_H diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro index 5b8f852..fa0d8e5 100644 --- a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro @@ -1,5 +1,7 @@ QT += core gui QT += sql +QT += widgets + greaterThan(QT_MAJOR_VERSION, 4): QT += widgets CONFIG += c++11 @@ -16,22 +18,50 @@ #DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 SOURCES += \ + beexamined_deviceitem.cpp \ + create_task.cpp \ + depar_task.cpp \ indexwindow.cpp \ + infomanageview.cpp \ + inspectdataitem.cpp \ loginwindow.cpp \ main.cpp \ mainwindow.cpp \ + my_task.cpp \ + rulefileitem.cpp \ + standard_deviceitem.cpp \ + testdataitem.cpp \ testview.cpp HEADERS += \ + InfoBase.h \ + beexamined_deviceitem.h \ + create_task.h \ + depar_task.h \ indexwindow.h \ + infomanageview.h \ + inspectdataitem.h \ loginwindow.h \ mainwindow.h \ + my_task.h \ + rulefileitem.h \ + standard_deviceitem.h \ + testdataitem.h \ testview.h FORMS += \ + beexamined_deviceitem.ui \ + create_task.ui \ + depar_task.ui \ indexwindow.ui \ + infomanageview.ui \ + inspectdataitem.ui \ loginwindow.ui \ mainwindow.ui \ + my_task.ui \ + rulefileitem.ui \ + standard_deviceitem.ui \ + testdataitem.ui \ testview.ui # Default rules for deployment. diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user index 1f5ec64..32d22e9 100644 --- a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user @@ -1,6 +1,6 @@ - + EnvironmentId @@ -64,249 +64,6 @@ ProjectExplorer.Project.Target.0 - Desktop Qt 5.14.2 MinGW 64-bit - Desktop Qt 5.14.2 MinGW 64-bit - qt.qt5.5142.win64_mingw73_kit - 0 - 0 - 0 - - 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 - - Qt4ProjectManager.Qt4RunConfiguration:D:/Auto_verification_scheme/AutoVerScheme/AutoVerScheme.pro - D:/Auto_verification_scheme/AutoVerScheme/AutoVerScheme.pro - - false - - false - true - true - false - false - true - - D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Debug - - 1 - - - - ProjectExplorer.Project.Target.1 - Desktop Qt 5.14.2 MinGW 32-bit Desktop Qt 5.14.2 MinGW 32-bit qt.qt5.5142.win32_mingw73_kit @@ -530,8 +287,252 @@ 2 - Qt4ProjectManager.Qt4RunConfiguration:D:/Auto_verification_scheme/AutoVerScheme/AutoVerScheme.pro - D:/Auto_verification_scheme/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 + + 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 diff --git a/softwareDirectory/AutoVerScheme/InfoBase.cpp b/softwareDirectory/AutoVerScheme/InfoBase.cpp new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/InfoBase.cpp diff --git a/softwareDirectory/AutoVerScheme/InfoBase.h b/softwareDirectory/AutoVerScheme/InfoBase.h new file mode 100644 index 0000000..7fec63e --- /dev/null +++ b/softwareDirectory/AutoVerScheme/InfoBase.h @@ -0,0 +1,16 @@ +#ifndef INFOBASE_H +#define INFOBASE_H + +#include +///信号管理页面的基类 所有信息管理页面都继承于InfoBase +/// 便于统一管理 所有子类必须实现Load方法 +/// 每次按钮点击切换都会调用Load方法 用于每次页面的数据刷新 +class InfoBase : public QWidget { + Q_OBJECT +public: + InfoBase(QWidget *parent = nullptr): QWidget(parent){}; + // 纯虚函数 + virtual void Load()=0; +}; +#endif // INFOBASE_H + diff --git a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.cpp b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.cpp new file mode 100644 index 0000000..7ac1e87 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.cpp @@ -0,0 +1,14 @@ +#include "beexamined_deviceitem.h" +#include "ui_beexamined_deviceitem.h" + +BeExamined_DeviceItem::BeExamined_DeviceItem(QWidget *parent) : + QWidget(parent), + ui(new Ui::BeExamined_DeviceItem) +{ + ui->setupUi(this); +} + +BeExamined_DeviceItem::~BeExamined_DeviceItem() +{ + delete ui; +} diff --git a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.h b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.h new file mode 100644 index 0000000..76b061d --- /dev/null +++ b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.h @@ -0,0 +1,22 @@ +#ifndef BEEXAMINED_DEVICEITEM_H +#define BEEXAMINED_DEVICEITEM_H + +#include + +namespace Ui { +class BeExamined_DeviceItem; +} + +class BeExamined_DeviceItem : public QWidget +{ + Q_OBJECT + +public: + explicit BeExamined_DeviceItem(QWidget *parent = nullptr); + ~BeExamined_DeviceItem(); + +private: + Ui::BeExamined_DeviceItem *ui; +}; + +#endif // BEEXAMINED_DEVICEITEM_H diff --git a/softwareDirectory/AutoVerScheme/beexamined_deviceitem.ui b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.ui new file mode 100644 index 0000000..af9f7bf --- /dev/null +++ b/softwareDirectory/AutoVerScheme/beexamined_deviceitem.ui @@ -0,0 +1,32 @@ + + + BeExamined_DeviceItem + + + + 0 + 0 + 400 + 300 + + + + Form + + + + + 130 + 140 + 89 + 24 + + + + 被检设备管理 + + + + + + diff --git a/softwareDirectory/AutoVerScheme/create_task.cpp b/softwareDirectory/AutoVerScheme/create_task.cpp new file mode 100644 index 0000000..4193efc --- /dev/null +++ b/softwareDirectory/AutoVerScheme/create_task.cpp @@ -0,0 +1,14 @@ +#include "create_task.h" +#include "ui_create_task.h" + +Create_Task::Create_Task(QWidget *parent) : + QWidget(parent), + ui(new Ui::Create_Task) +{ + ui->setupUi(this); +} + +Create_Task::~Create_Task() +{ + delete ui; +} diff --git a/softwareDirectory/AutoVerScheme/create_task.h b/softwareDirectory/AutoVerScheme/create_task.h new file mode 100644 index 0000000..e2264de --- /dev/null +++ b/softwareDirectory/AutoVerScheme/create_task.h @@ -0,0 +1,22 @@ +#ifndef CREATE_TASK_H +#define CREATE_TASK_H + +#include + +namespace Ui { +class Create_Task; +} + +class Create_Task : public QWidget +{ + Q_OBJECT + +public: + explicit Create_Task(QWidget *parent = nullptr); + ~Create_Task(); + +private: + Ui::Create_Task *ui; +}; + +#endif // CREATE_TASK_H diff --git a/softwareDirectory/AutoVerScheme/create_task.ui b/softwareDirectory/AutoVerScheme/create_task.ui new file mode 100644 index 0000000..b79c6a1 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/create_task.ui @@ -0,0 +1,35 @@ + + + Create_Task + + + + 0 + 0 + 400 + 300 + + + + Form + + + background-color:red; + + + + + 140 + 120 + 89 + 24 + + + + 创建任务单 + + + + + + diff --git a/softwareDirectory/AutoVerScheme/depar_task.cpp b/softwareDirectory/AutoVerScheme/depar_task.cpp new file mode 100644 index 0000000..de39775 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/depar_task.cpp @@ -0,0 +1,42 @@ +#include "depar_task.h" +#include "ui_depar_task.h" +#include "QMessageBox" +#include "InfoBase.h" + +Depar_Task::Depar_Task(QWidget *parent) : + InfoBase(parent), + ui(new Ui::Depar_Task) +{ + ui->setupUi(this); + this->initForm(); +} + +Depar_Task::~Depar_Task() +{ + delete ui; +} +void Depar_Task::initForm() +{ + + //ShowMessageBox("标题","初始化完成"); +} +void Depar_Task::ShowMessageBox(QString title,QString value) { + // 创建一个QMessageBox对象 + QMessageBox msgBox; + + // 设置消息框的标题 + msgBox.setWindowTitle(title); + + // 设置消息框的文本内容 + msgBox.setText(value); + + // 设置消息框的标准按钮,这里是“确定”按钮 + msgBox.setStandardButtons(QMessageBox::Ok); + + // 显示消息框 + msgBox.exec(); +} +void Depar_Task::Load() +{ + ShowMessageBox("部门任务页面","部门任务初始化完成"); +} diff --git a/softwareDirectory/AutoVerScheme/depar_task.h b/softwareDirectory/AutoVerScheme/depar_task.h new file mode 100644 index 0000000..8716faf --- /dev/null +++ b/softwareDirectory/AutoVerScheme/depar_task.h @@ -0,0 +1,28 @@ +#ifndef DEPAR_TASK_H +#define DEPAR_TASK_H + + +#include "InfoBase.h" + +namespace Ui { +class Depar_Task; +} + +class Depar_Task :public InfoBase +{ + Q_OBJECT + +public: + Depar_Task(QWidget *parent = nullptr); + ~Depar_Task(); + + +private slots: + void initForm(); //初始化界面数据 + void ShowMessageBox(QString title,QString value); + void Load() override; +private: + Ui::Depar_Task *ui; +}; + +#endif // DEPAR_TASK_H diff --git a/softwareDirectory/AutoVerScheme/depar_task.ui b/softwareDirectory/AutoVerScheme/depar_task.ui new file mode 100644 index 0000000..ff3d44f --- /dev/null +++ b/softwareDirectory/AutoVerScheme/depar_task.ui @@ -0,0 +1,181 @@ + + + Depar_Task + + + + 0 + 0 + 1184 + 456 + + + + Form + + + color:black; + + + + + + + 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 + + + + 要求完成时间: + + + + + + + + + + 查询 + + + + + + + 重置 + + + + + + + + + + background-color:white; + + + + + + + + + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/indexwindow.cpp b/softwareDirectory/AutoVerScheme/indexwindow.cpp index 3e52c7b..9bd65b1 100644 --- a/softwareDirectory/AutoVerScheme/indexwindow.cpp +++ b/softwareDirectory/AutoVerScheme/indexwindow.cpp @@ -21,6 +21,7 @@ //调用样式 loadStyle(":/qss/Index.css"); + } void IndexWindow::loadStyle(const QString &qssFile) diff --git a/softwareDirectory/AutoVerScheme/infomanageview.cpp b/softwareDirectory/AutoVerScheme/infomanageview.cpp new file mode 100644 index 0000000..a206c6f --- /dev/null +++ b/softwareDirectory/AutoVerScheme/infomanageview.cpp @@ -0,0 +1,150 @@ +#include "infomanageview.h" +#include "ui_infomanageview.h" +#include +#include +//子窗体 +#include "depar_task.h" +#include "my_task.h" +#include "create_task.h" +#include "beexamined_deviceitem.h" +#include "inspectdataitem.h" +#include "rulefileitem.h" +#include "standard_deviceitem.h" +#include "testdataitem.h" +#include "InfoBase.h" + +InfoManageView::InfoManageView(QWidget *parent) : + QWidget(parent), + ui(new Ui::InfoManageView) +{ + ui->setupUi(this); + this->setWindowTitle("信息管理"); + //初始化调用所有函数 + this->initForm(); + this->initWidget(); + this->initNav(); + this->initIcon(); +} +//左侧滚动条事件 +void InfoManageView::showEvent(QShowEvent *) +{ + //滚动到底部 + QScrollBar *bar = ui->scrollArea->verticalScrollBar(); + bar->setValue(bar->maximum()); +} + +//左侧导航栏样式初始化 +void InfoManageView::initIcon() +{ + //左侧导航样式,可以设置各种牛逼的参数,超级棒 + // IconHelper::StyleColor styleColor; + //styleColor.defaultBorder = true; + // IconHelper::setStyle(ui->widgetLeft, btns, icons, styleColor); +} + +//颜色初始化设置 +QList InfoManageView::colors = QList(); +void InfoManageView::initForm() +{ + //颜色集合供其他界面使用 + colors << QColor(211, 78, 78) << QColor(29, 185, 242) << QColor(170, 162, 119) << QColor(255, 192, 1); + colors << QColor(0, 176, 180) << QColor(0, 113, 193) << QColor(255, 192, 0); + colors << QColor(72, 103, 149) << QColor(185, 87, 86) << QColor(0, 177, 125); + colors << QColor(214, 77, 84) << QColor(71, 164, 233) << QColor(34, 163, 169); + colors << QColor(59, 123, 156) << QColor(162, 121, 197) << QColor(72, 202, 245); + colors << QColor(0, 150, 121) << QColor(111, 9, 176) << QColor(250, 170, 20); + + ui->scrollArea->setFixedWidth(170); + ui->widgetLeft->setProperty("flag", "left"); +} + +//右侧可切换UI导入 +void InfoManageView::initWidget() +{ + ui->stackedWidget->addWidget(new Depar_Task); //部门任务 + ui->stackedWidget->addWidget(new My_Task); //我的任务 + ui->stackedWidget->addWidget(new Create_Task); //创建任务单 + ui->stackedWidget->addWidget(new Standard_DeviceItem); //标准设备管理 + ui->stackedWidget->addWidget(new BeExamined_DeviceItem); //被检设备管理 + ui->stackedWidget->addWidget(new TestDataItem); //检定数据管理 + ui->stackedWidget->addWidget(new InspectDataItem); //核查数据管理 + ui->stackedWidget->addWidget(new RuleFileItem); //技术文件管理 + + +} +//左侧列表信息导入 +void InfoManageView::initNav() +{ + //按钮文字集合 + QStringList names; + names << "部门任务" << "我的任务" << "创建任务单" << "标准设备管理" << "被检设备管理" + << "检定数据管理" << "核查数据管理" << "技术文件管理" ; + + //自动生成按钮 + for (int i = 0; i < names.count(); i++) { + QToolButton *btn = new QToolButton; + //设置按钮固定高度 + btn->setFixedHeight(35); + //设置按钮的文字 + //btn->setText(QString("%1. %2").arg(i + 1, 2, 10, QChar('0')).arg(names.at(i))); + btn->setText(QString("%1").arg(names.at(i))); + //设置按钮可选中按下类似复选框的功能 + btn->setCheckable(true); + //设置按钮图标在左侧文字在右侧 + // btn->setToolButtonStyle(Qt::ToolButtonTextBesideIcon); + //设置按钮拉伸策略为横向填充 + btn->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Preferred); + //关联按钮单击事件 + connect(btn, SIGNAL(clicked(bool)), this, SLOT(buttonClicked())); + //将按钮加入到布局 + ui->widgetLeft->layout()->addWidget(btn); + //可以指定不同的图标 + //icons << 0xf061; + btns << btn; + //设置按钮大小 + btn->setFixedSize(170, 70); + //设置鼠标经过和点击事件 + btn->setStyleSheet("QToolButton:hover " + "{ background-color: rgba(53, 91, 171, 1); }" + "QToolButton::checked { " + "background-color: rgba(53, 91, 171, 1)}"); + + //ui->widgetLeft->setFixedWidth(200); + } + + //底部加个弹簧 + QSpacerItem *verticalSpacer = new QSpacerItem(20, 40, QSizePolicy::Minimum, QSizePolicy::Expanding); + ui->widgetLeft->layout()->addItem(verticalSpacer); + btns.at(names.count() - 1)->click(); +} +//按钮点击切换UI事件 +void InfoManageView::buttonClicked() +{ + QAbstractButton *b = (QAbstractButton *)sender(); + int count = btns.count(); + int index = btns.indexOf(b); + ui->stackedWidget->setCurrentIndex(index); + + + // 获取当前在 QStackedWidget 中的部件 + QWidget* currentWidget = ui->stackedWidget->currentWidget(); + + // 尝试将当前部件转换为 InfoBase 类型 + InfoBase* currQWidget = qobject_cast(currentWidget); + // 检查转换是否成功 + if (currQWidget != nullptr) + { + // 如果转换成功,调用子类Load 方法 + currQWidget->Load(); + } + + for (int i = 0; i < count; i++) { + QAbstractButton *btn = btns.at(i); + btn->setChecked(btn == b); + } +} + +InfoManageView::~InfoManageView() +{ + delete ui; +} diff --git a/softwareDirectory/AutoVerScheme/infomanageview.h b/softwareDirectory/AutoVerScheme/infomanageview.h new file mode 100644 index 0000000..3c1463f --- /dev/null +++ b/softwareDirectory/AutoVerScheme/infomanageview.h @@ -0,0 +1,38 @@ +#ifndef INFOMANAGEVIEW_H +#define INFOMANAGEVIEW_H + +#include + +class QAbstractButton; + + +namespace Ui { +class InfoManageView; +} + +class InfoManageView : public QWidget +{ + Q_OBJECT + +public: + static QList colors; + + explicit InfoManageView(QWidget *parent = nullptr); + ~InfoManageView(); +private slots: + void initForm(); //初始化界面数据 + void initWidget(); //初始化子窗体 + void initNav(); //初始化导航按钮 + void initIcon(); //初始化导航按钮图标 + void buttonClicked(); //导航按钮单击事件 +protected: + void showEvent(QShowEvent *); +private: + Ui::InfoManageView *ui; + + //左侧导航栏图标+按钮集合 + QList icons; + QList btns; +}; + +#endif // INFOMANAGEVIEW_H diff --git a/softwareDirectory/AutoVerScheme/infomanageview.ui b/softwareDirectory/AutoVerScheme/infomanageview.ui new file mode 100644 index 0000000..4b39e7d --- /dev/null +++ b/softwareDirectory/AutoVerScheme/infomanageview.ui @@ -0,0 +1,109 @@ + + + InfoManageView + + + + 0 + 0 + 883 + 644 + + + + Form + + + + 0 + + + 0 + + + 0 + + + 0 + + + 0 + + + + + + 0 + 0 + + + + + 170 + 0 + + + + + 16777215 + 16777215 + + + + color:White; + font-weight: bold; + font-size: 16px; +background-color:rgba(10, 15, 92, 1); + + + true + + + + + 0 + 0 + 170 + 625 + + + + + 170 + 0 + + + + + 170 + 0 + + + + + 0 + + + 0 + + + 0 + + + 0 + + + 0 + + + + + + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/inspectdataitem.cpp b/softwareDirectory/AutoVerScheme/inspectdataitem.cpp new file mode 100644 index 0000000..e9c2adc --- /dev/null +++ b/softwareDirectory/AutoVerScheme/inspectdataitem.cpp @@ -0,0 +1,14 @@ +#include "inspectdataitem.h" +#include "ui_inspectdataitem.h" + +InspectDataItem::InspectDataItem(QWidget *parent) : + QWidget(parent), + ui(new Ui::InspectDataItem) +{ + ui->setupUi(this); +} + +InspectDataItem::~InspectDataItem() +{ + delete ui; +} diff --git a/softwareDirectory/AutoVerScheme/inspectdataitem.h b/softwareDirectory/AutoVerScheme/inspectdataitem.h new file mode 100644 index 0000000..57551bb --- /dev/null +++ b/softwareDirectory/AutoVerScheme/inspectdataitem.h @@ -0,0 +1,22 @@ +#ifndef INSPECTDATAITEM_H +#define INSPECTDATAITEM_H + +#include + +namespace Ui { +class InspectDataItem; +} + +class InspectDataItem : public QWidget +{ + Q_OBJECT + +public: + explicit InspectDataItem(QWidget *parent = nullptr); + ~InspectDataItem(); + +private: + Ui::InspectDataItem *ui; +}; + +#endif // INSPECTDATAITEM_H diff --git a/softwareDirectory/AutoVerScheme/inspectdataitem.ui b/softwareDirectory/AutoVerScheme/inspectdataitem.ui new file mode 100644 index 0000000..45f04e0 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/inspectdataitem.ui @@ -0,0 +1,32 @@ + + + InspectDataItem + + + + 0 + 0 + 400 + 300 + + + + Form + + + + + 120 + 130 + 89 + 24 + + + + 核查数据管理 + + + + + + diff --git a/softwareDirectory/AutoVerScheme/my_task.cpp b/softwareDirectory/AutoVerScheme/my_task.cpp new file mode 100644 index 0000000..40aceb2 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/my_task.cpp @@ -0,0 +1,42 @@ +#include "my_task.h" +#include "ui_my_task.h" +#include "QMessageBox" + +My_Task::My_Task(QWidget *parent) : + InfoBase(parent), + ui(new Ui::My_Task) +{ + ui->setupUi(this); + + this->initForm(); +} + +My_Task::~My_Task() +{ + delete ui; +} +void My_Task::initForm() +{ + + +} +void My_Task::ShowMessageBox(QString title,QString value) { + // 创建一个QMessageBox对象 + QMessageBox msgBox; + + // 设置消息框的标题 + msgBox.setWindowTitle(title); + + // 设置消息框的文本内容 + msgBox.setText(value); + + // 设置消息框的标准按钮,这里是“确定”按钮 + msgBox.setStandardButtons(QMessageBox::Ok); + + // 显示消息框 + msgBox.exec(); +} +void My_Task::Load() +{ + ShowMessageBox("我的任务页面","我的任务初始化完成"); +} diff --git a/softwareDirectory/AutoVerScheme/my_task.h b/softwareDirectory/AutoVerScheme/my_task.h new file mode 100644 index 0000000..d6600cb --- /dev/null +++ b/softwareDirectory/AutoVerScheme/my_task.h @@ -0,0 +1,28 @@ +#ifndef MY_TASK_H +#define MY_TASK_H + +#include +#include "InfoBase.h" + +namespace Ui { +class My_Task; +} + +class My_Task :public InfoBase +{ + Q_OBJECT + +public: + explicit My_Task(QWidget *parent = nullptr); + ~My_Task(); + + +private slots: + void initForm(); //初始化界面数据 + void ShowMessageBox(QString title,QString value); + void Load() override; +private: + Ui::My_Task *ui; +}; + +#endif // MY_TASK_H diff --git a/softwareDirectory/AutoVerScheme/my_task.ui b/softwareDirectory/AutoVerScheme/my_task.ui new file mode 100644 index 0000000..89245b8 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/my_task.ui @@ -0,0 +1,178 @@ + + + My_Task + + + + 0 + 0 + 857 + 511 + + + + Form + + + + + + + 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 + + + + 要求完成时间: + + + + + + + + + + 查询 + + + + + + + 重置 + + + + + + + + + + background-color:white; + + + + + + + + + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/rulefileitem.cpp b/softwareDirectory/AutoVerScheme/rulefileitem.cpp new file mode 100644 index 0000000..6f9ddd3 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/rulefileitem.cpp @@ -0,0 +1,14 @@ +#include "rulefileitem.h" +#include "ui_rulefileitem.h" + +RuleFileItem::RuleFileItem(QWidget *parent) : + QWidget(parent), + ui(new Ui::RuleFileItem) +{ + ui->setupUi(this); +} + +RuleFileItem::~RuleFileItem() +{ + delete ui; +} diff --git a/softwareDirectory/AutoVerScheme/rulefileitem.h b/softwareDirectory/AutoVerScheme/rulefileitem.h new file mode 100644 index 0000000..1fc81a1 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/rulefileitem.h @@ -0,0 +1,22 @@ +#ifndef RULEFILEITEM_H +#define RULEFILEITEM_H + +#include + +namespace Ui { +class RuleFileItem; +} + +class RuleFileItem : public QWidget +{ + Q_OBJECT + +public: + explicit RuleFileItem(QWidget *parent = nullptr); + ~RuleFileItem(); + +private: + Ui::RuleFileItem *ui; +}; + +#endif // RULEFILEITEM_H diff --git a/softwareDirectory/AutoVerScheme/rulefileitem.ui b/softwareDirectory/AutoVerScheme/rulefileitem.ui new file mode 100644 index 0000000..599e025 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/rulefileitem.ui @@ -0,0 +1,32 @@ + + + RuleFileItem + + + + 0 + 0 + 400 + 300 + + + + Form + + + + + 140 + 130 + 121 + 24 + + + + 规程文件管理 + + + + + + diff --git a/softwareDirectory/AutoVerScheme/standard_deviceitem.cpp b/softwareDirectory/AutoVerScheme/standard_deviceitem.cpp new file mode 100644 index 0000000..ed15b0a --- /dev/null +++ b/softwareDirectory/AutoVerScheme/standard_deviceitem.cpp @@ -0,0 +1,14 @@ +#include "standard_deviceitem.h" +#include "ui_standard_deviceitem.h" + +Standard_DeviceItem::Standard_DeviceItem(QWidget *parent) : + QWidget(parent), + ui(new Ui::Standard_DeviceItem) +{ + ui->setupUi(this); +} + +Standard_DeviceItem::~Standard_DeviceItem() +{ + delete ui; +} diff --git a/softwareDirectory/AutoVerScheme/standard_deviceitem.h b/softwareDirectory/AutoVerScheme/standard_deviceitem.h new file mode 100644 index 0000000..198c362 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/standard_deviceitem.h @@ -0,0 +1,22 @@ +#ifndef STANDARD_DEVICEITEM_H +#define STANDARD_DEVICEITEM_H + +#include + +namespace Ui { +class Standard_DeviceItem; +} + +class Standard_DeviceItem : public QWidget +{ + Q_OBJECT + +public: + explicit Standard_DeviceItem(QWidget *parent = nullptr); + ~Standard_DeviceItem(); + +private: + Ui::Standard_DeviceItem *ui; +}; + +#endif // STANDARD_DEVICEITEM_H diff --git a/softwareDirectory/AutoVerScheme/standard_deviceitem.ui b/softwareDirectory/AutoVerScheme/standard_deviceitem.ui new file mode 100644 index 0000000..00070b7 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/standard_deviceitem.ui @@ -0,0 +1,32 @@ + + + Standard_DeviceItem + + + + 0 + 0 + 400 + 300 + + + + Form + + + + + 150 + 140 + 89 + 24 + + + + 标准设备管理 + + + + + + diff --git a/softwareDirectory/AutoVerScheme/testdataitem.cpp b/softwareDirectory/AutoVerScheme/testdataitem.cpp new file mode 100644 index 0000000..4fde9cf --- /dev/null +++ b/softwareDirectory/AutoVerScheme/testdataitem.cpp @@ -0,0 +1,14 @@ +#include "testdataitem.h" +#include "ui_testdataitem.h" + +TestDataItem::TestDataItem(QWidget *parent) : + QWidget(parent), + ui(new Ui::TestDataItem) +{ + ui->setupUi(this); +} + +TestDataItem::~TestDataItem() +{ + delete ui; +} diff --git a/softwareDirectory/AutoVerScheme/testdataitem.h b/softwareDirectory/AutoVerScheme/testdataitem.h new file mode 100644 index 0000000..81ca7fa --- /dev/null +++ b/softwareDirectory/AutoVerScheme/testdataitem.h @@ -0,0 +1,22 @@ +#ifndef TESTDATAITEM_H +#define TESTDATAITEM_H + +#include + +namespace Ui { +class TestDataItem; +} + +class TestDataItem : public QWidget +{ + Q_OBJECT + +public: + explicit TestDataItem(QWidget *parent = nullptr); + ~TestDataItem(); + +private: + Ui::TestDataItem *ui; +}; + +#endif // TESTDATAITEM_H diff --git a/softwareDirectory/AutoVerScheme/testdataitem.ui b/softwareDirectory/AutoVerScheme/testdataitem.ui new file mode 100644 index 0000000..76d23de --- /dev/null +++ b/softwareDirectory/AutoVerScheme/testdataitem.ui @@ -0,0 +1,32 @@ + + + TestDataItem + + + + 0 + 0 + 400 + 300 + + + + Form + + + + + 120 + 150 + 89 + 24 + + + + 检定数据管理 + + + + + + diff --git a/softwareDirectory/AutoVerScheme/testview.cpp b/softwareDirectory/AutoVerScheme/testview.cpp index 466134d..3f1c2c0 100644 --- a/softwareDirectory/AutoVerScheme/testview.cpp +++ b/softwareDirectory/AutoVerScheme/testview.cpp @@ -1,5 +1,8 @@ #include "testview.h" #include "ui_testview.h" +#include "QDialog" + + TestView::TestView(QWidget *parent) : QMainWindow(parent), @@ -7,6 +10,37 @@ { ui->setupUi(this); this->initForm(); + + ui->textEdit->installEventFilter(this); //它负责在相应部件上安装事件过滤器 + + thread=new mythread; //定义⼀个线程对象 + thread->setObjectName(QString("okk"));//设置线程对象的名字,注意在启动前设置 + connect(thread,&mythread::over,this,&TestView::start_two_tree);//连接槽函数 + + //调色板 + //获取 pushButton 的调⾊板 + QPalette palette1 = ui->pushButton->palette(); + //设置按钮⽂本颜⾊为红⾊ + palette1.setColor(QPalette::ButtonText,Qt::red); + //设置按钮背景⾊为绿⾊ + palette1.setColor(QPalette::Button,Qt::green); + //pushButton 使⽤修改后的调⾊板 + ui->pushButton->setPalette(palette1); + //设置 lineEdit 不可⽤ + ui->lineEdit->setDisabled(true); + QPalette palette2 = ui->lineEdit->palette(); + //设置⾏编辑器不可⽤时的背景颜⾊为蓝⾊ + palette2.setColor(QPalette::Disabled,QPalette::Base,Qt::red); + ui->lineEdit->setPalette(palette2); + + //设置背景图片 + //设置背景图标,但是不能让背景图⽚⾃适应 + QPalette pt=this->palette(); + QImage img(":/image/index/u15.png"); + QImage myimg=img.scaled(this->width(),this->height()); //设置⽐例 + pt.setBrush(QPalette::Window,QBrush(myimg)); //设置画笔 + this->setPalette(pt); + } TestView::~TestView() @@ -27,3 +61,80 @@ this->setWindowFlag(Qt::CustomizeWindowHint,true); this->setWindowFlag(Qt::WindowSystemMenuHint,true); } + +void TestView::on_pushButton_clicked() +{ + QDialog dialog(this); + QLabel* lb1 =new QLabel("kkkk",&dialog); //向对话框中添加内容 + dialog.exec(); +} + +void TestView::on_pushButton_6_clicked() +{ + QDialog *dialog =new QDialog(this); //在构造⽅法中创建⼀个⾮模态对话框 + dialog->show(); +} + + +void TestView::keyPressEvent(QKeyEvent *ev) +{ + //重写键盘按下事件 + ui->label_5->clear(); + if(ev->key() == Qt::Key_0) + { + ui->label_5->setText("1被按下了"); + return; + }else if(ev->key() == Qt::Key_Q) + ui->label_5->setText("Q被按下了"); + + QWidget::keyPressEvent(ev); + +} +bool TestView::eventFilter(QObject *obj, QEvent *event) //此函数中实现事件过滤器。 +{ + if(obj==ui->textEdit) //textEdit控件 + { + if(event->type()==QEvent::Wheel) + { + QWheelEvent * w=static_cast(event); + if(w->delta()>0) + ui->label_5->setText(QString::number(count++)); + else + ui->label_5->setText(QString::number(count--)); + return true; + } + else + return false; + } + else + return QWidget::eventFilter(obj, event); +} +//主线程要调⽤的任务函数 +void TestView::start_two_tree() +{ + //ui->label_5->setText(QString::number(QThread::currentThreadId())); + + for(int i=0; i<5;i++) + { + ui->label_5->setText("开始采摘第"+QString::number(i+1)+"苹果"); + // qDebug()<<"$$$$$$开始采摘第"<label_5->setText("采摘完成"); + //ui->label_5->setText(thread->objectName()); + +} + +//⼦线程的任务函数 通过重新run虚函数实现 +void mythread::run () +{ + + // qDebug()<<"开始采摘苹果"< +#include +#include namespace Ui { class TestView; } +//继承线程类,定义1个信号关联1个槽函数 +class mythread : public QThread +{ + Q_OBJECT +private: + void run(); + +signals: //声明1个信号 + void over(); +}; + + class TestView : public QMainWindow { Q_OBJECT @@ -14,12 +28,30 @@ public: explicit TestView(QWidget *parent = nullptr); ~TestView(); + private slots: void initForm(); + void on_pushButton_clicked(); + + void on_pushButton_6_clicked(); + + void start_two_tree(); +public: + void keyPressEvent(QKeyEvent *event); //键盘按下事件 此声明必须实现 不然会报错 + //void keyReleaseEvent(QKeyEvent *event); //键盘松开事件 + + //bool installEventFilter(QObject *filterObj); //它负责在相应部件上安装事件过滤器 + bool eventFilter(QObject *watched, QEvent *event); ////它负责在相应部件上安装事件过滤器 + qint8 count=0; + //线程 + mythread *thread; //定义⼀个线程对象 private: Ui::TestView *ui; + }; + + #endif // TESTVIEW_H diff --git a/softwareDirectory/AutoVerScheme/testview.ui b/softwareDirectory/AutoVerScheme/testview.ui index 4541c23..053e475 100644 --- a/softwareDirectory/AutoVerScheme/testview.ui +++ b/softwareDirectory/AutoVerScheme/testview.ui @@ -49,6 +49,32 @@ 0 + + + + 0 + 0 + + + + + 0 + 100 + + + + + + + + + 50 + 50 + + + + +