diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro new file mode 100644 index 0000000..5b8f852 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro @@ -0,0 +1,48 @@ +QT += core gui +QT += sql +greaterThan(QT_MAJOR_VERSION, 4): QT += widgets + +CONFIG += c++11 + +# The following define makes your compiler emit warnings if you use +# any Qt feature that has been marked deprecated (the exact warnings +# depend on your compiler). Please consult the documentation of the +# deprecated API in order to know how to port your code away from it. +DEFINES += QT_DEPRECATED_WARNINGS + +# You can also make your code fail to compile if it uses deprecated APIs. +# In order to do so, uncomment the following line. +# You can also select to disable deprecated APIs only up to a certain version of Qt. +#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 + +SOURCES += \ + indexwindow.cpp \ + loginwindow.cpp \ + main.cpp \ + mainwindow.cpp \ + testview.cpp + +HEADERS += \ + indexwindow.h \ + loginwindow.h \ + mainwindow.h \ + testview.h + +FORMS += \ + indexwindow.ui \ + loginwindow.ui \ + mainwindow.ui \ + testview.ui + +# Default rules for deployment. +qnx: target.path = /tmp/$${TARGET}/bin +else: unix:!android: target.path = /opt/$${TARGET}/bin +!isEmpty(target.path): INSTALLS += target + +RESOURCES += \ + res/qss.qrc \ + res/res.qrc + +DISTFILES += \ + res/image/u2.png + diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro new file mode 100644 index 0000000..5b8f852 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro @@ -0,0 +1,48 @@ +QT += core gui +QT += sql +greaterThan(QT_MAJOR_VERSION, 4): QT += widgets + +CONFIG += c++11 + +# The following define makes your compiler emit warnings if you use +# any Qt feature that has been marked deprecated (the exact warnings +# depend on your compiler). Please consult the documentation of the +# deprecated API in order to know how to port your code away from it. +DEFINES += QT_DEPRECATED_WARNINGS + +# You can also make your code fail to compile if it uses deprecated APIs. +# In order to do so, uncomment the following line. +# You can also select to disable deprecated APIs only up to a certain version of Qt. +#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 + +SOURCES += \ + indexwindow.cpp \ + loginwindow.cpp \ + main.cpp \ + mainwindow.cpp \ + testview.cpp + +HEADERS += \ + indexwindow.h \ + loginwindow.h \ + mainwindow.h \ + testview.h + +FORMS += \ + indexwindow.ui \ + loginwindow.ui \ + mainwindow.ui \ + testview.ui + +# Default rules for deployment. +qnx: target.path = /tmp/$${TARGET}/bin +else: unix:!android: target.path = /opt/$${TARGET}/bin +!isEmpty(target.path): INSTALLS += target + +RESOURCES += \ + res/qss.qrc \ + res/res.qrc + +DISTFILES += \ + res/image/u2.png + diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user new file mode 100644 index 0000000..1f5ec64 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user @@ -0,0 +1,562 @@ + + + + + + EnvironmentId + {c08df58c-84a7-4965-bca6-e98789474efa} + + + ProjectExplorer.Project.ActiveTarget + 0 + + + ProjectExplorer.Project.EditorSettings + + true + false + true + + Cpp + + CppGlobal + + + + QmlJS + + QmlJSGlobal + + + 2 + UTF-8 + false + 4 + false + 80 + true + true + 1 + true + false + 0 + true + true + 0 + 8 + true + 1 + true + true + true + false + + + + ProjectExplorer.Project.PluginSettings + + + -fno-delayed-template-parsing + + true + + + + ProjectExplorer.Project.Target.0 + + Desktop Qt 5.14.2 MinGW 64-bit + Desktop Qt 5.14.2 MinGW 64-bit + qt.qt5.5142.win64_mingw73_kit + 0 + 0 + 0 + + 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 + 0 + 0 + 0 + + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug + + + true + QtProjectManager.QMakeBuildStep + true + + false + false + false + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Debug + Qt4ProjectManager.Qt4BuildConfiguration + 2 + + + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Release + + + true + QtProjectManager.QMakeBuildStep + false + + false + false + true + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Release + Qt4ProjectManager.Qt4BuildConfiguration + 0 + + + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Profile + + + true + QtProjectManager.QMakeBuildStep + true + + false + true + true + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Profile + Qt4ProjectManager.Qt4BuildConfiguration + 0 + + 3 + + + 0 + Deploy + Deploy + ProjectExplorer.BuildSteps.Deploy + + 1 + ProjectExplorer.DefaultDeployConfiguration + + 1 + + + dwarf + + cpu-cycles + + + 250 + + -e + cpu-cycles + --call-graph + dwarf,4096 + -F + 250 + + -F + true + 4096 + false + false + 1000 + + true + + false + false + false + false + true + 0.01 + 10 + true + kcachegrind + 1 + 25 + + 1 + true + false + true + valgrind + + 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + + 2 + + Qt4ProjectManager.Qt4RunConfiguration:D:/Auto_verification_scheme/AutoVerScheme/AutoVerScheme.pro + D:/Auto_verification_scheme/AutoVerScheme/AutoVerScheme.pro + + false + + false + true + true + false + false + true + + + + 1 + + + + ProjectExplorer.Project.TargetCount + 2 + + + ProjectExplorer.Project.Updater.FileVersion + 22 + + + Version + 22 + + diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro new file mode 100644 index 0000000..5b8f852 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro @@ -0,0 +1,48 @@ +QT += core gui +QT += sql +greaterThan(QT_MAJOR_VERSION, 4): QT += widgets + +CONFIG += c++11 + +# The following define makes your compiler emit warnings if you use +# any Qt feature that has been marked deprecated (the exact warnings +# depend on your compiler). Please consult the documentation of the +# deprecated API in order to know how to port your code away from it. +DEFINES += QT_DEPRECATED_WARNINGS + +# You can also make your code fail to compile if it uses deprecated APIs. +# In order to do so, uncomment the following line. +# You can also select to disable deprecated APIs only up to a certain version of Qt. +#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 + +SOURCES += \ + indexwindow.cpp \ + loginwindow.cpp \ + main.cpp \ + mainwindow.cpp \ + testview.cpp + +HEADERS += \ + indexwindow.h \ + loginwindow.h \ + mainwindow.h \ + testview.h + +FORMS += \ + indexwindow.ui \ + loginwindow.ui \ + mainwindow.ui \ + testview.ui + +# Default rules for deployment. +qnx: target.path = /tmp/$${TARGET}/bin +else: unix:!android: target.path = /opt/$${TARGET}/bin +!isEmpty(target.path): INSTALLS += target + +RESOURCES += \ + res/qss.qrc \ + res/res.qrc + +DISTFILES += \ + res/image/u2.png + diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user new file mode 100644 index 0000000..1f5ec64 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user @@ -0,0 +1,562 @@ + + + + + + EnvironmentId + {c08df58c-84a7-4965-bca6-e98789474efa} + + + ProjectExplorer.Project.ActiveTarget + 0 + + + ProjectExplorer.Project.EditorSettings + + true + false + true + + Cpp + + CppGlobal + + + + QmlJS + + QmlJSGlobal + + + 2 + UTF-8 + false + 4 + false + 80 + true + true + 1 + true + false + 0 + true + true + 0 + 8 + true + 1 + true + true + true + false + + + + ProjectExplorer.Project.PluginSettings + + + -fno-delayed-template-parsing + + true + + + + ProjectExplorer.Project.Target.0 + + Desktop Qt 5.14.2 MinGW 64-bit + Desktop Qt 5.14.2 MinGW 64-bit + qt.qt5.5142.win64_mingw73_kit + 0 + 0 + 0 + + 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 + 0 + 0 + 0 + + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug + + + true + QtProjectManager.QMakeBuildStep + true + + false + false + false + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Debug + Qt4ProjectManager.Qt4BuildConfiguration + 2 + + + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Release + + + true + QtProjectManager.QMakeBuildStep + false + + false + false + true + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Release + Qt4ProjectManager.Qt4BuildConfiguration + 0 + + + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Profile + + + true + QtProjectManager.QMakeBuildStep + true + + false + true + true + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Profile + Qt4ProjectManager.Qt4BuildConfiguration + 0 + + 3 + + + 0 + Deploy + Deploy + ProjectExplorer.BuildSteps.Deploy + + 1 + ProjectExplorer.DefaultDeployConfiguration + + 1 + + + dwarf + + cpu-cycles + + + 250 + + -e + cpu-cycles + --call-graph + dwarf,4096 + -F + 250 + + -F + true + 4096 + false + false + 1000 + + true + + false + false + false + false + true + 0.01 + 10 + true + kcachegrind + 1 + 25 + + 1 + true + false + true + valgrind + + 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + + 2 + + Qt4ProjectManager.Qt4RunConfiguration:D:/Auto_verification_scheme/AutoVerScheme/AutoVerScheme.pro + D:/Auto_verification_scheme/AutoVerScheme/AutoVerScheme.pro + + false + + false + true + true + false + false + true + + + + 1 + + + + ProjectExplorer.Project.TargetCount + 2 + + + ProjectExplorer.Project.Updater.FileVersion + 22 + + + Version + 22 + + diff --git a/softwareDirectory/AutoVerScheme/indexwindow.cpp b/softwareDirectory/AutoVerScheme/indexwindow.cpp new file mode 100644 index 0000000..3e52c7b --- /dev/null +++ b/softwareDirectory/AutoVerScheme/indexwindow.cpp @@ -0,0 +1,55 @@ +#include "indexwindow.h" +#include "ui_indexwindow.h" +#include "QFile" +#include "QTextStream" + +IndexWindow::IndexWindow(QWidget *parent) : + QMainWindow(parent), + ui(new Ui::IndexWindow) +{ + ui->setupUi(this); + this->initForm(); +} + +IndexWindow::~IndexWindow() +{ + delete ui; +} +void IndexWindow::initForm() +{ + //this->setWindowFlags(Qt::FramelessWindowHint); + //调用样式 + loadStyle(":/qss/Index.css"); + +} + +void IndexWindow::loadStyle(const QString &qssFile) +{ + //加载样式表 + QString qss; + + QFile file(qssFile); + + if (file.open(QFile::ReadOnly)) { + //用QTextStream读取样式文件不用区分文件编码 带bom也行 + QStringList list; + QTextStream in(&file); + //in.setCodec("utf-8"); + while (!in.atEnd()) { + QString line; + in >> line; + list << line; + } + + file.close(); + qss = list.join("\n"); + QString paletteColor = qss.mid(20, 7); + qApp->setPalette(QPalette(paletteColor)); + //用时主要在下面这句 + qApp->setStyleSheet(qss); + } + + +} + + diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro new file mode 100644 index 0000000..5b8f852 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro @@ -0,0 +1,48 @@ +QT += core gui +QT += sql +greaterThan(QT_MAJOR_VERSION, 4): QT += widgets + +CONFIG += c++11 + +# The following define makes your compiler emit warnings if you use +# any Qt feature that has been marked deprecated (the exact warnings +# depend on your compiler). Please consult the documentation of the +# deprecated API in order to know how to port your code away from it. +DEFINES += QT_DEPRECATED_WARNINGS + +# You can also make your code fail to compile if it uses deprecated APIs. +# In order to do so, uncomment the following line. +# You can also select to disable deprecated APIs only up to a certain version of Qt. +#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 + +SOURCES += \ + indexwindow.cpp \ + loginwindow.cpp \ + main.cpp \ + mainwindow.cpp \ + testview.cpp + +HEADERS += \ + indexwindow.h \ + loginwindow.h \ + mainwindow.h \ + testview.h + +FORMS += \ + indexwindow.ui \ + loginwindow.ui \ + mainwindow.ui \ + testview.ui + +# Default rules for deployment. +qnx: target.path = /tmp/$${TARGET}/bin +else: unix:!android: target.path = /opt/$${TARGET}/bin +!isEmpty(target.path): INSTALLS += target + +RESOURCES += \ + res/qss.qrc \ + res/res.qrc + +DISTFILES += \ + res/image/u2.png + diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user new file mode 100644 index 0000000..1f5ec64 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user @@ -0,0 +1,562 @@ + + + + + + EnvironmentId + {c08df58c-84a7-4965-bca6-e98789474efa} + + + ProjectExplorer.Project.ActiveTarget + 0 + + + ProjectExplorer.Project.EditorSettings + + true + false + true + + Cpp + + CppGlobal + + + + QmlJS + + QmlJSGlobal + + + 2 + UTF-8 + false + 4 + false + 80 + true + true + 1 + true + false + 0 + true + true + 0 + 8 + true + 1 + true + true + true + false + + + + ProjectExplorer.Project.PluginSettings + + + -fno-delayed-template-parsing + + true + + + + ProjectExplorer.Project.Target.0 + + Desktop Qt 5.14.2 MinGW 64-bit + Desktop Qt 5.14.2 MinGW 64-bit + qt.qt5.5142.win64_mingw73_kit + 0 + 0 + 0 + + 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 + 0 + 0 + 0 + + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug + + + true + QtProjectManager.QMakeBuildStep + true + + false + false + false + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Debug + Qt4ProjectManager.Qt4BuildConfiguration + 2 + + + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Release + + + true + QtProjectManager.QMakeBuildStep + false + + false + false + true + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Release + Qt4ProjectManager.Qt4BuildConfiguration + 0 + + + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Profile + + + true + QtProjectManager.QMakeBuildStep + true + + false + true + true + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Profile + Qt4ProjectManager.Qt4BuildConfiguration + 0 + + 3 + + + 0 + Deploy + Deploy + ProjectExplorer.BuildSteps.Deploy + + 1 + ProjectExplorer.DefaultDeployConfiguration + + 1 + + + dwarf + + cpu-cycles + + + 250 + + -e + cpu-cycles + --call-graph + dwarf,4096 + -F + 250 + + -F + true + 4096 + false + false + 1000 + + true + + false + false + false + false + true + 0.01 + 10 + true + kcachegrind + 1 + 25 + + 1 + true + false + true + valgrind + + 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + + 2 + + Qt4ProjectManager.Qt4RunConfiguration:D:/Auto_verification_scheme/AutoVerScheme/AutoVerScheme.pro + D:/Auto_verification_scheme/AutoVerScheme/AutoVerScheme.pro + + false + + false + true + true + false + false + true + + + + 1 + + + + ProjectExplorer.Project.TargetCount + 2 + + + ProjectExplorer.Project.Updater.FileVersion + 22 + + + Version + 22 + + diff --git a/softwareDirectory/AutoVerScheme/indexwindow.cpp b/softwareDirectory/AutoVerScheme/indexwindow.cpp new file mode 100644 index 0000000..3e52c7b --- /dev/null +++ b/softwareDirectory/AutoVerScheme/indexwindow.cpp @@ -0,0 +1,55 @@ +#include "indexwindow.h" +#include "ui_indexwindow.h" +#include "QFile" +#include "QTextStream" + +IndexWindow::IndexWindow(QWidget *parent) : + QMainWindow(parent), + ui(new Ui::IndexWindow) +{ + ui->setupUi(this); + this->initForm(); +} + +IndexWindow::~IndexWindow() +{ + delete ui; +} +void IndexWindow::initForm() +{ + //this->setWindowFlags(Qt::FramelessWindowHint); + //调用样式 + loadStyle(":/qss/Index.css"); + +} + +void IndexWindow::loadStyle(const QString &qssFile) +{ + //加载样式表 + QString qss; + + QFile file(qssFile); + + if (file.open(QFile::ReadOnly)) { + //用QTextStream读取样式文件不用区分文件编码 带bom也行 + QStringList list; + QTextStream in(&file); + //in.setCodec("utf-8"); + while (!in.atEnd()) { + QString line; + in >> line; + list << line; + } + + file.close(); + qss = list.join("\n"); + QString paletteColor = qss.mid(20, 7); + qApp->setPalette(QPalette(paletteColor)); + //用时主要在下面这句 + qApp->setStyleSheet(qss); + } + + +} + + diff --git a/softwareDirectory/AutoVerScheme/indexwindow.h b/softwareDirectory/AutoVerScheme/indexwindow.h new file mode 100644 index 0000000..2aee958 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/indexwindow.h @@ -0,0 +1,26 @@ +#ifndef INDEXWINDOW_H +#define INDEXWINDOW_H + +#include + +namespace Ui { +class IndexWindow; +} + +class IndexWindow : public QMainWindow +{ + Q_OBJECT + +public: + explicit IndexWindow(QWidget *parent = nullptr); + ~IndexWindow(); +private slots: + void initForm(); + void loadStyle(const QString &qssFile); + + +private: + Ui::IndexWindow *ui; +}; + +#endif // INDEXWINDOW_H diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro new file mode 100644 index 0000000..5b8f852 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro @@ -0,0 +1,48 @@ +QT += core gui +QT += sql +greaterThan(QT_MAJOR_VERSION, 4): QT += widgets + +CONFIG += c++11 + +# The following define makes your compiler emit warnings if you use +# any Qt feature that has been marked deprecated (the exact warnings +# depend on your compiler). Please consult the documentation of the +# deprecated API in order to know how to port your code away from it. +DEFINES += QT_DEPRECATED_WARNINGS + +# You can also make your code fail to compile if it uses deprecated APIs. +# In order to do so, uncomment the following line. +# You can also select to disable deprecated APIs only up to a certain version of Qt. +#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 + +SOURCES += \ + indexwindow.cpp \ + loginwindow.cpp \ + main.cpp \ + mainwindow.cpp \ + testview.cpp + +HEADERS += \ + indexwindow.h \ + loginwindow.h \ + mainwindow.h \ + testview.h + +FORMS += \ + indexwindow.ui \ + loginwindow.ui \ + mainwindow.ui \ + testview.ui + +# Default rules for deployment. +qnx: target.path = /tmp/$${TARGET}/bin +else: unix:!android: target.path = /opt/$${TARGET}/bin +!isEmpty(target.path): INSTALLS += target + +RESOURCES += \ + res/qss.qrc \ + res/res.qrc + +DISTFILES += \ + res/image/u2.png + diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user new file mode 100644 index 0000000..1f5ec64 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user @@ -0,0 +1,562 @@ + + + + + + EnvironmentId + {c08df58c-84a7-4965-bca6-e98789474efa} + + + ProjectExplorer.Project.ActiveTarget + 0 + + + ProjectExplorer.Project.EditorSettings + + true + false + true + + Cpp + + CppGlobal + + + + QmlJS + + QmlJSGlobal + + + 2 + UTF-8 + false + 4 + false + 80 + true + true + 1 + true + false + 0 + true + true + 0 + 8 + true + 1 + true + true + true + false + + + + ProjectExplorer.Project.PluginSettings + + + -fno-delayed-template-parsing + + true + + + + ProjectExplorer.Project.Target.0 + + Desktop Qt 5.14.2 MinGW 64-bit + Desktop Qt 5.14.2 MinGW 64-bit + qt.qt5.5142.win64_mingw73_kit + 0 + 0 + 0 + + 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 + 0 + 0 + 0 + + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug + + + true + QtProjectManager.QMakeBuildStep + true + + false + false + false + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Debug + Qt4ProjectManager.Qt4BuildConfiguration + 2 + + + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Release + + + true + QtProjectManager.QMakeBuildStep + false + + false + false + true + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Release + Qt4ProjectManager.Qt4BuildConfiguration + 0 + + + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Profile + + + true + QtProjectManager.QMakeBuildStep + true + + false + true + true + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Profile + Qt4ProjectManager.Qt4BuildConfiguration + 0 + + 3 + + + 0 + Deploy + Deploy + ProjectExplorer.BuildSteps.Deploy + + 1 + ProjectExplorer.DefaultDeployConfiguration + + 1 + + + dwarf + + cpu-cycles + + + 250 + + -e + cpu-cycles + --call-graph + dwarf,4096 + -F + 250 + + -F + true + 4096 + false + false + 1000 + + true + + false + false + false + false + true + 0.01 + 10 + true + kcachegrind + 1 + 25 + + 1 + true + false + true + valgrind + + 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + + 2 + + Qt4ProjectManager.Qt4RunConfiguration:D:/Auto_verification_scheme/AutoVerScheme/AutoVerScheme.pro + D:/Auto_verification_scheme/AutoVerScheme/AutoVerScheme.pro + + false + + false + true + true + false + false + true + + + + 1 + + + + ProjectExplorer.Project.TargetCount + 2 + + + ProjectExplorer.Project.Updater.FileVersion + 22 + + + Version + 22 + + diff --git a/softwareDirectory/AutoVerScheme/indexwindow.cpp b/softwareDirectory/AutoVerScheme/indexwindow.cpp new file mode 100644 index 0000000..3e52c7b --- /dev/null +++ b/softwareDirectory/AutoVerScheme/indexwindow.cpp @@ -0,0 +1,55 @@ +#include "indexwindow.h" +#include "ui_indexwindow.h" +#include "QFile" +#include "QTextStream" + +IndexWindow::IndexWindow(QWidget *parent) : + QMainWindow(parent), + ui(new Ui::IndexWindow) +{ + ui->setupUi(this); + this->initForm(); +} + +IndexWindow::~IndexWindow() +{ + delete ui; +} +void IndexWindow::initForm() +{ + //this->setWindowFlags(Qt::FramelessWindowHint); + //调用样式 + loadStyle(":/qss/Index.css"); + +} + +void IndexWindow::loadStyle(const QString &qssFile) +{ + //加载样式表 + QString qss; + + QFile file(qssFile); + + if (file.open(QFile::ReadOnly)) { + //用QTextStream读取样式文件不用区分文件编码 带bom也行 + QStringList list; + QTextStream in(&file); + //in.setCodec("utf-8"); + while (!in.atEnd()) { + QString line; + in >> line; + list << line; + } + + file.close(); + qss = list.join("\n"); + QString paletteColor = qss.mid(20, 7); + qApp->setPalette(QPalette(paletteColor)); + //用时主要在下面这句 + qApp->setStyleSheet(qss); + } + + +} + + diff --git a/softwareDirectory/AutoVerScheme/indexwindow.h b/softwareDirectory/AutoVerScheme/indexwindow.h new file mode 100644 index 0000000..2aee958 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/indexwindow.h @@ -0,0 +1,26 @@ +#ifndef INDEXWINDOW_H +#define INDEXWINDOW_H + +#include + +namespace Ui { +class IndexWindow; +} + +class IndexWindow : public QMainWindow +{ + Q_OBJECT + +public: + explicit IndexWindow(QWidget *parent = nullptr); + ~IndexWindow(); +private slots: + void initForm(); + void loadStyle(const QString &qssFile); + + +private: + Ui::IndexWindow *ui; +}; + +#endif // INDEXWINDOW_H diff --git a/softwareDirectory/AutoVerScheme/indexwindow.ui b/softwareDirectory/AutoVerScheme/indexwindow.ui new file mode 100644 index 0000000..d7153e0 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/indexwindow.ui @@ -0,0 +1,539 @@ + + + IndexWindow + + + Qt::NonModal + + + + 0 + 0 + 1334 + 789 + + + + + 0 + 0 + + + + MainWindow + + + + + + + 100 + 100 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + 6 + + + QLayout::SetFixedSize + + + 0 + + + 0 + + + + + Qt::Horizontal + + + QSizePolicy::Fixed + + + + 120 + 13 + + + + + + + + + 0 + 0 + + + + + 560 + 0 + + + + Qt::DefaultContextMenu + + + color: white; +font-weight: bold; +font-size: 24pt; + + + + + QFrame::NoFrame + + + QFrame::Plain + + + 自动检定系统 + + + Qt::AutoText + + + false + + + Qt::AlignCenter + + + + + + + Qt::Horizontal + + + QSizePolicy::Fixed + + + + 40 + 13 + + + + + + + + + + Qt::Vertical + + + QSizePolicy::Fixed + + + + 50 + 80 + + + + + + + + + + Qt::Vertical + + + QSizePolicy::Fixed + + + + 20 + 120 + + + + + + + + Qt::Horizontal + + + + 100 + 20 + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + 0 + 0 + + + + + 310 + 190 + + + + OpenHandCursor + + + margin-right: 0px; + + + 信息管理 + + + + 60 + 60 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + Qt::Horizontal + + + + 327 + 20 + + + + + + + + + 0 + 0 + + + + + 490 + 190 + + + + OpenHandCursor + + + + + + 自动核查 + + + + 60 + 60 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + + 0 + 0 + + + + + 490 + 190 + + + + OpenHandCursor + + + + + + 自动检定 + + + + 60 + 60 + + + + false + + + false + + + Qt::ToolButtonTextUnderIcon + + + + + + + + 0 + 0 + + + + + 490 + 190 + + + + OpenHandCursor + + + + + + 核查程序管理 + + + + 60 + 60 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + Qt::Horizontal + + + + 327 + 20 + + + + + + + + + 0 + 0 + + + + + 310 + 190 + + + + OpenHandCursor + + + margin-right: 0px; + + + 数据同步 + + + + 60 + 60 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + Qt::Vertical + + + QSizePolicy::Fixed + + + + 20 + 120 + + + + + + + + Qt::Vertical + + + QSizePolicy::Fixed + + + + 20 + 120 + + + + + + + + + 0 + 0 + + + + + 490 + 190 + + + + OpenHandCursor + + + + + + 检定程序管理 + + + + 60 + 60 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + + + + + + 0 + 0 + + + + + 10 + 10 + + + + color: white; +font-weight: bold; +font-size: 14pt; + + + 欢迎您! 用户: admin + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + Qt::Horizontal + + + QSizePolicy::Fixed + + + + 270 + 20 + + + + + + + + + + + btnConfig + btnData + tbtnMain1 + tbtnMain2 + tbtnMain3 + tbtnConfig1 + tbtnConfig2 + tbtnConfig3 + tbtnConfig4 + tbtnConfig5 + tbtnConfig6 + btnMain + btnHelp + btnExit + + + + diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro new file mode 100644 index 0000000..5b8f852 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro @@ -0,0 +1,48 @@ +QT += core gui +QT += sql +greaterThan(QT_MAJOR_VERSION, 4): QT += widgets + +CONFIG += c++11 + +# The following define makes your compiler emit warnings if you use +# any Qt feature that has been marked deprecated (the exact warnings +# depend on your compiler). Please consult the documentation of the +# deprecated API in order to know how to port your code away from it. +DEFINES += QT_DEPRECATED_WARNINGS + +# You can also make your code fail to compile if it uses deprecated APIs. +# In order to do so, uncomment the following line. +# You can also select to disable deprecated APIs only up to a certain version of Qt. +#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 + +SOURCES += \ + indexwindow.cpp \ + loginwindow.cpp \ + main.cpp \ + mainwindow.cpp \ + testview.cpp + +HEADERS += \ + indexwindow.h \ + loginwindow.h \ + mainwindow.h \ + testview.h + +FORMS += \ + indexwindow.ui \ + loginwindow.ui \ + mainwindow.ui \ + testview.ui + +# Default rules for deployment. +qnx: target.path = /tmp/$${TARGET}/bin +else: unix:!android: target.path = /opt/$${TARGET}/bin +!isEmpty(target.path): INSTALLS += target + +RESOURCES += \ + res/qss.qrc \ + res/res.qrc + +DISTFILES += \ + res/image/u2.png + diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user new file mode 100644 index 0000000..1f5ec64 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user @@ -0,0 +1,562 @@ + + + + + + EnvironmentId + {c08df58c-84a7-4965-bca6-e98789474efa} + + + ProjectExplorer.Project.ActiveTarget + 0 + + + ProjectExplorer.Project.EditorSettings + + true + false + true + + Cpp + + CppGlobal + + + + QmlJS + + QmlJSGlobal + + + 2 + UTF-8 + false + 4 + false + 80 + true + true + 1 + true + false + 0 + true + true + 0 + 8 + true + 1 + true + true + true + false + + + + ProjectExplorer.Project.PluginSettings + + + -fno-delayed-template-parsing + + true + + + + ProjectExplorer.Project.Target.0 + + Desktop Qt 5.14.2 MinGW 64-bit + Desktop Qt 5.14.2 MinGW 64-bit + qt.qt5.5142.win64_mingw73_kit + 0 + 0 + 0 + + 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 + 0 + 0 + 0 + + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug + + + true + QtProjectManager.QMakeBuildStep + true + + false + false + false + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Debug + Qt4ProjectManager.Qt4BuildConfiguration + 2 + + + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Release + + + true + QtProjectManager.QMakeBuildStep + false + + false + false + true + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Release + Qt4ProjectManager.Qt4BuildConfiguration + 0 + + + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Profile + + + true + QtProjectManager.QMakeBuildStep + true + + false + true + true + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Profile + Qt4ProjectManager.Qt4BuildConfiguration + 0 + + 3 + + + 0 + Deploy + Deploy + ProjectExplorer.BuildSteps.Deploy + + 1 + ProjectExplorer.DefaultDeployConfiguration + + 1 + + + dwarf + + cpu-cycles + + + 250 + + -e + cpu-cycles + --call-graph + dwarf,4096 + -F + 250 + + -F + true + 4096 + false + false + 1000 + + true + + false + false + false + false + true + 0.01 + 10 + true + kcachegrind + 1 + 25 + + 1 + true + false + true + valgrind + + 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + + 2 + + Qt4ProjectManager.Qt4RunConfiguration:D:/Auto_verification_scheme/AutoVerScheme/AutoVerScheme.pro + D:/Auto_verification_scheme/AutoVerScheme/AutoVerScheme.pro + + false + + false + true + true + false + false + true + + + + 1 + + + + ProjectExplorer.Project.TargetCount + 2 + + + ProjectExplorer.Project.Updater.FileVersion + 22 + + + Version + 22 + + diff --git a/softwareDirectory/AutoVerScheme/indexwindow.cpp b/softwareDirectory/AutoVerScheme/indexwindow.cpp new file mode 100644 index 0000000..3e52c7b --- /dev/null +++ b/softwareDirectory/AutoVerScheme/indexwindow.cpp @@ -0,0 +1,55 @@ +#include "indexwindow.h" +#include "ui_indexwindow.h" +#include "QFile" +#include "QTextStream" + +IndexWindow::IndexWindow(QWidget *parent) : + QMainWindow(parent), + ui(new Ui::IndexWindow) +{ + ui->setupUi(this); + this->initForm(); +} + +IndexWindow::~IndexWindow() +{ + delete ui; +} +void IndexWindow::initForm() +{ + //this->setWindowFlags(Qt::FramelessWindowHint); + //调用样式 + loadStyle(":/qss/Index.css"); + +} + +void IndexWindow::loadStyle(const QString &qssFile) +{ + //加载样式表 + QString qss; + + QFile file(qssFile); + + if (file.open(QFile::ReadOnly)) { + //用QTextStream读取样式文件不用区分文件编码 带bom也行 + QStringList list; + QTextStream in(&file); + //in.setCodec("utf-8"); + while (!in.atEnd()) { + QString line; + in >> line; + list << line; + } + + file.close(); + qss = list.join("\n"); + QString paletteColor = qss.mid(20, 7); + qApp->setPalette(QPalette(paletteColor)); + //用时主要在下面这句 + qApp->setStyleSheet(qss); + } + + +} + + diff --git a/softwareDirectory/AutoVerScheme/indexwindow.h b/softwareDirectory/AutoVerScheme/indexwindow.h new file mode 100644 index 0000000..2aee958 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/indexwindow.h @@ -0,0 +1,26 @@ +#ifndef INDEXWINDOW_H +#define INDEXWINDOW_H + +#include + +namespace Ui { +class IndexWindow; +} + +class IndexWindow : public QMainWindow +{ + Q_OBJECT + +public: + explicit IndexWindow(QWidget *parent = nullptr); + ~IndexWindow(); +private slots: + void initForm(); + void loadStyle(const QString &qssFile); + + +private: + Ui::IndexWindow *ui; +}; + +#endif // INDEXWINDOW_H diff --git a/softwareDirectory/AutoVerScheme/indexwindow.ui b/softwareDirectory/AutoVerScheme/indexwindow.ui new file mode 100644 index 0000000..d7153e0 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/indexwindow.ui @@ -0,0 +1,539 @@ + + + IndexWindow + + + Qt::NonModal + + + + 0 + 0 + 1334 + 789 + + + + + 0 + 0 + + + + MainWindow + + + + + + + 100 + 100 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + 6 + + + QLayout::SetFixedSize + + + 0 + + + 0 + + + + + Qt::Horizontal + + + QSizePolicy::Fixed + + + + 120 + 13 + + + + + + + + + 0 + 0 + + + + + 560 + 0 + + + + Qt::DefaultContextMenu + + + color: white; +font-weight: bold; +font-size: 24pt; + + + + + QFrame::NoFrame + + + QFrame::Plain + + + 自动检定系统 + + + Qt::AutoText + + + false + + + Qt::AlignCenter + + + + + + + Qt::Horizontal + + + QSizePolicy::Fixed + + + + 40 + 13 + + + + + + + + + + Qt::Vertical + + + QSizePolicy::Fixed + + + + 50 + 80 + + + + + + + + + + Qt::Vertical + + + QSizePolicy::Fixed + + + + 20 + 120 + + + + + + + + Qt::Horizontal + + + + 100 + 20 + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + 0 + 0 + + + + + 310 + 190 + + + + OpenHandCursor + + + margin-right: 0px; + + + 信息管理 + + + + 60 + 60 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + Qt::Horizontal + + + + 327 + 20 + + + + + + + + + 0 + 0 + + + + + 490 + 190 + + + + OpenHandCursor + + + + + + 自动核查 + + + + 60 + 60 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + + 0 + 0 + + + + + 490 + 190 + + + + OpenHandCursor + + + + + + 自动检定 + + + + 60 + 60 + + + + false + + + false + + + Qt::ToolButtonTextUnderIcon + + + + + + + + 0 + 0 + + + + + 490 + 190 + + + + OpenHandCursor + + + + + + 核查程序管理 + + + + 60 + 60 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + Qt::Horizontal + + + + 327 + 20 + + + + + + + + + 0 + 0 + + + + + 310 + 190 + + + + OpenHandCursor + + + margin-right: 0px; + + + 数据同步 + + + + 60 + 60 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + Qt::Vertical + + + QSizePolicy::Fixed + + + + 20 + 120 + + + + + + + + Qt::Vertical + + + QSizePolicy::Fixed + + + + 20 + 120 + + + + + + + + + 0 + 0 + + + + + 490 + 190 + + + + OpenHandCursor + + + + + + 检定程序管理 + + + + 60 + 60 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + + + + + + 0 + 0 + + + + + 10 + 10 + + + + color: white; +font-weight: bold; +font-size: 14pt; + + + 欢迎您! 用户: admin + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + Qt::Horizontal + + + QSizePolicy::Fixed + + + + 270 + 20 + + + + + + + + + + + btnConfig + btnData + tbtnMain1 + tbtnMain2 + tbtnMain3 + tbtnConfig1 + tbtnConfig2 + tbtnConfig3 + tbtnConfig4 + tbtnConfig5 + tbtnConfig6 + btnMain + btnHelp + btnExit + + + + diff --git a/softwareDirectory/AutoVerScheme/loginwindow.cpp b/softwareDirectory/AutoVerScheme/loginwindow.cpp new file mode 100644 index 0000000..155988a --- /dev/null +++ b/softwareDirectory/AutoVerScheme/loginwindow.cpp @@ -0,0 +1,68 @@ +#include "loginwindow.h" +#include "ui_loginwindow.h" +#include +#include +#include + +#include "indexwindow.h" + +loginWindow::loginWindow(QWidget *parent): QMainWindow(parent), ui(new Ui::loginWindow) +{ + ui->setupUi(this); + this->initForm(); + ui->label->styleSheet(); + +} + +loginWindow::~loginWindow() +{ + delete ui; +} +void loginWindow::initForm() +{ + //this->setWindowFlags(Qt::FramelessWindowHint); + //调用样式 + loadStyle(":/qss/login.css"); +} + +void loginWindow::loadStyle(const QString &qssFile) +{ + //加载样式表 + QString qss; + + QFile file(qssFile); + + if (file.open(QFile::ReadOnly)) { + //用QTextStream读取样式文件不用区分文件编码 带bom也行 + QStringList list; + QTextStream in(&file); + //in.setCodec("utf-8"); + while (!in.atEnd()) { + QString line; + in >> line; + list << line; + } + + file.close(); + qss = list.join("\n"); + QString paletteColor = qss.mid(20, 7); + qApp->setPalette(QPalette(paletteColor)); + //用时主要在下面这句 + qApp->setStyleSheet(qss); + } + + +} + + +void loginWindow::on_Button_login_clicked() +{ + QMessageBox::information(this, "提示", "登录成功!"); + //查询数据库内是否有账号 + IndexWindow *indexWindow = new IndexWindow; + indexWindow->setWindowState(Qt::WindowMaximized); + indexWindow->show(); + this->close(); + +} + diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro new file mode 100644 index 0000000..5b8f852 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro @@ -0,0 +1,48 @@ +QT += core gui +QT += sql +greaterThan(QT_MAJOR_VERSION, 4): QT += widgets + +CONFIG += c++11 + +# The following define makes your compiler emit warnings if you use +# any Qt feature that has been marked deprecated (the exact warnings +# depend on your compiler). Please consult the documentation of the +# deprecated API in order to know how to port your code away from it. +DEFINES += QT_DEPRECATED_WARNINGS + +# You can also make your code fail to compile if it uses deprecated APIs. +# In order to do so, uncomment the following line. +# You can also select to disable deprecated APIs only up to a certain version of Qt. +#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 + +SOURCES += \ + indexwindow.cpp \ + loginwindow.cpp \ + main.cpp \ + mainwindow.cpp \ + testview.cpp + +HEADERS += \ + indexwindow.h \ + loginwindow.h \ + mainwindow.h \ + testview.h + +FORMS += \ + indexwindow.ui \ + loginwindow.ui \ + mainwindow.ui \ + testview.ui + +# Default rules for deployment. +qnx: target.path = /tmp/$${TARGET}/bin +else: unix:!android: target.path = /opt/$${TARGET}/bin +!isEmpty(target.path): INSTALLS += target + +RESOURCES += \ + res/qss.qrc \ + res/res.qrc + +DISTFILES += \ + res/image/u2.png + diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user new file mode 100644 index 0000000..1f5ec64 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user @@ -0,0 +1,562 @@ + + + + + + EnvironmentId + {c08df58c-84a7-4965-bca6-e98789474efa} + + + ProjectExplorer.Project.ActiveTarget + 0 + + + ProjectExplorer.Project.EditorSettings + + true + false + true + + Cpp + + CppGlobal + + + + QmlJS + + QmlJSGlobal + + + 2 + UTF-8 + false + 4 + false + 80 + true + true + 1 + true + false + 0 + true + true + 0 + 8 + true + 1 + true + true + true + false + + + + ProjectExplorer.Project.PluginSettings + + + -fno-delayed-template-parsing + + true + + + + ProjectExplorer.Project.Target.0 + + Desktop Qt 5.14.2 MinGW 64-bit + Desktop Qt 5.14.2 MinGW 64-bit + qt.qt5.5142.win64_mingw73_kit + 0 + 0 + 0 + + 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 + 0 + 0 + 0 + + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug + + + true + QtProjectManager.QMakeBuildStep + true + + false + false + false + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Debug + Qt4ProjectManager.Qt4BuildConfiguration + 2 + + + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Release + + + true + QtProjectManager.QMakeBuildStep + false + + false + false + true + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Release + Qt4ProjectManager.Qt4BuildConfiguration + 0 + + + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Profile + + + true + QtProjectManager.QMakeBuildStep + true + + false + true + true + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Profile + Qt4ProjectManager.Qt4BuildConfiguration + 0 + + 3 + + + 0 + Deploy + Deploy + ProjectExplorer.BuildSteps.Deploy + + 1 + ProjectExplorer.DefaultDeployConfiguration + + 1 + + + dwarf + + cpu-cycles + + + 250 + + -e + cpu-cycles + --call-graph + dwarf,4096 + -F + 250 + + -F + true + 4096 + false + false + 1000 + + true + + false + false + false + false + true + 0.01 + 10 + true + kcachegrind + 1 + 25 + + 1 + true + false + true + valgrind + + 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + + 2 + + Qt4ProjectManager.Qt4RunConfiguration:D:/Auto_verification_scheme/AutoVerScheme/AutoVerScheme.pro + D:/Auto_verification_scheme/AutoVerScheme/AutoVerScheme.pro + + false + + false + true + true + false + false + true + + + + 1 + + + + ProjectExplorer.Project.TargetCount + 2 + + + ProjectExplorer.Project.Updater.FileVersion + 22 + + + Version + 22 + + diff --git a/softwareDirectory/AutoVerScheme/indexwindow.cpp b/softwareDirectory/AutoVerScheme/indexwindow.cpp new file mode 100644 index 0000000..3e52c7b --- /dev/null +++ b/softwareDirectory/AutoVerScheme/indexwindow.cpp @@ -0,0 +1,55 @@ +#include "indexwindow.h" +#include "ui_indexwindow.h" +#include "QFile" +#include "QTextStream" + +IndexWindow::IndexWindow(QWidget *parent) : + QMainWindow(parent), + ui(new Ui::IndexWindow) +{ + ui->setupUi(this); + this->initForm(); +} + +IndexWindow::~IndexWindow() +{ + delete ui; +} +void IndexWindow::initForm() +{ + //this->setWindowFlags(Qt::FramelessWindowHint); + //调用样式 + loadStyle(":/qss/Index.css"); + +} + +void IndexWindow::loadStyle(const QString &qssFile) +{ + //加载样式表 + QString qss; + + QFile file(qssFile); + + if (file.open(QFile::ReadOnly)) { + //用QTextStream读取样式文件不用区分文件编码 带bom也行 + QStringList list; + QTextStream in(&file); + //in.setCodec("utf-8"); + while (!in.atEnd()) { + QString line; + in >> line; + list << line; + } + + file.close(); + qss = list.join("\n"); + QString paletteColor = qss.mid(20, 7); + qApp->setPalette(QPalette(paletteColor)); + //用时主要在下面这句 + qApp->setStyleSheet(qss); + } + + +} + + diff --git a/softwareDirectory/AutoVerScheme/indexwindow.h b/softwareDirectory/AutoVerScheme/indexwindow.h new file mode 100644 index 0000000..2aee958 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/indexwindow.h @@ -0,0 +1,26 @@ +#ifndef INDEXWINDOW_H +#define INDEXWINDOW_H + +#include + +namespace Ui { +class IndexWindow; +} + +class IndexWindow : public QMainWindow +{ + Q_OBJECT + +public: + explicit IndexWindow(QWidget *parent = nullptr); + ~IndexWindow(); +private slots: + void initForm(); + void loadStyle(const QString &qssFile); + + +private: + Ui::IndexWindow *ui; +}; + +#endif // INDEXWINDOW_H diff --git a/softwareDirectory/AutoVerScheme/indexwindow.ui b/softwareDirectory/AutoVerScheme/indexwindow.ui new file mode 100644 index 0000000..d7153e0 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/indexwindow.ui @@ -0,0 +1,539 @@ + + + IndexWindow + + + Qt::NonModal + + + + 0 + 0 + 1334 + 789 + + + + + 0 + 0 + + + + MainWindow + + + + + + + 100 + 100 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + 6 + + + QLayout::SetFixedSize + + + 0 + + + 0 + + + + + Qt::Horizontal + + + QSizePolicy::Fixed + + + + 120 + 13 + + + + + + + + + 0 + 0 + + + + + 560 + 0 + + + + Qt::DefaultContextMenu + + + color: white; +font-weight: bold; +font-size: 24pt; + + + + + QFrame::NoFrame + + + QFrame::Plain + + + 自动检定系统 + + + Qt::AutoText + + + false + + + Qt::AlignCenter + + + + + + + Qt::Horizontal + + + QSizePolicy::Fixed + + + + 40 + 13 + + + + + + + + + + Qt::Vertical + + + QSizePolicy::Fixed + + + + 50 + 80 + + + + + + + + + + Qt::Vertical + + + QSizePolicy::Fixed + + + + 20 + 120 + + + + + + + + Qt::Horizontal + + + + 100 + 20 + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + 0 + 0 + + + + + 310 + 190 + + + + OpenHandCursor + + + margin-right: 0px; + + + 信息管理 + + + + 60 + 60 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + Qt::Horizontal + + + + 327 + 20 + + + + + + + + + 0 + 0 + + + + + 490 + 190 + + + + OpenHandCursor + + + + + + 自动核查 + + + + 60 + 60 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + + 0 + 0 + + + + + 490 + 190 + + + + OpenHandCursor + + + + + + 自动检定 + + + + 60 + 60 + + + + false + + + false + + + Qt::ToolButtonTextUnderIcon + + + + + + + + 0 + 0 + + + + + 490 + 190 + + + + OpenHandCursor + + + + + + 核查程序管理 + + + + 60 + 60 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + Qt::Horizontal + + + + 327 + 20 + + + + + + + + + 0 + 0 + + + + + 310 + 190 + + + + OpenHandCursor + + + margin-right: 0px; + + + 数据同步 + + + + 60 + 60 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + Qt::Vertical + + + QSizePolicy::Fixed + + + + 20 + 120 + + + + + + + + Qt::Vertical + + + QSizePolicy::Fixed + + + + 20 + 120 + + + + + + + + + 0 + 0 + + + + + 490 + 190 + + + + OpenHandCursor + + + + + + 检定程序管理 + + + + 60 + 60 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + + + + + + 0 + 0 + + + + + 10 + 10 + + + + color: white; +font-weight: bold; +font-size: 14pt; + + + 欢迎您! 用户: admin + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + Qt::Horizontal + + + QSizePolicy::Fixed + + + + 270 + 20 + + + + + + + + + + + btnConfig + btnData + tbtnMain1 + tbtnMain2 + tbtnMain3 + tbtnConfig1 + tbtnConfig2 + tbtnConfig3 + tbtnConfig4 + tbtnConfig5 + tbtnConfig6 + btnMain + btnHelp + btnExit + + + + diff --git a/softwareDirectory/AutoVerScheme/loginwindow.cpp b/softwareDirectory/AutoVerScheme/loginwindow.cpp new file mode 100644 index 0000000..155988a --- /dev/null +++ b/softwareDirectory/AutoVerScheme/loginwindow.cpp @@ -0,0 +1,68 @@ +#include "loginwindow.h" +#include "ui_loginwindow.h" +#include +#include +#include + +#include "indexwindow.h" + +loginWindow::loginWindow(QWidget *parent): QMainWindow(parent), ui(new Ui::loginWindow) +{ + ui->setupUi(this); + this->initForm(); + ui->label->styleSheet(); + +} + +loginWindow::~loginWindow() +{ + delete ui; +} +void loginWindow::initForm() +{ + //this->setWindowFlags(Qt::FramelessWindowHint); + //调用样式 + loadStyle(":/qss/login.css"); +} + +void loginWindow::loadStyle(const QString &qssFile) +{ + //加载样式表 + QString qss; + + QFile file(qssFile); + + if (file.open(QFile::ReadOnly)) { + //用QTextStream读取样式文件不用区分文件编码 带bom也行 + QStringList list; + QTextStream in(&file); + //in.setCodec("utf-8"); + while (!in.atEnd()) { + QString line; + in >> line; + list << line; + } + + file.close(); + qss = list.join("\n"); + QString paletteColor = qss.mid(20, 7); + qApp->setPalette(QPalette(paletteColor)); + //用时主要在下面这句 + qApp->setStyleSheet(qss); + } + + +} + + +void loginWindow::on_Button_login_clicked() +{ + QMessageBox::information(this, "提示", "登录成功!"); + //查询数据库内是否有账号 + IndexWindow *indexWindow = new IndexWindow; + indexWindow->setWindowState(Qt::WindowMaximized); + indexWindow->show(); + this->close(); + +} + diff --git a/softwareDirectory/AutoVerScheme/loginwindow.h b/softwareDirectory/AutoVerScheme/loginwindow.h new file mode 100644 index 0000000..2695bc3 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/loginwindow.h @@ -0,0 +1,31 @@ +#ifndef MAINWINDOW_H +#define MAINWINDOW_H + +#include +#include + + + +namespace Ui { +class loginWindow; +} + +class loginWindow : public QMainWindow +{ + Q_OBJECT + +public: + explicit loginWindow(QWidget *parent = 0); + ~loginWindow(); +private slots: + void initForm(); + void loadStyle(const QString &qssFile); + void on_Button_login_clicked(); + + +private: + Ui::loginWindow *ui; +private: + QSqlQuery query; +}; +#endif // MAINWINDOW_H diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro new file mode 100644 index 0000000..5b8f852 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro @@ -0,0 +1,48 @@ +QT += core gui +QT += sql +greaterThan(QT_MAJOR_VERSION, 4): QT += widgets + +CONFIG += c++11 + +# The following define makes your compiler emit warnings if you use +# any Qt feature that has been marked deprecated (the exact warnings +# depend on your compiler). Please consult the documentation of the +# deprecated API in order to know how to port your code away from it. +DEFINES += QT_DEPRECATED_WARNINGS + +# You can also make your code fail to compile if it uses deprecated APIs. +# In order to do so, uncomment the following line. +# You can also select to disable deprecated APIs only up to a certain version of Qt. +#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 + +SOURCES += \ + indexwindow.cpp \ + loginwindow.cpp \ + main.cpp \ + mainwindow.cpp \ + testview.cpp + +HEADERS += \ + indexwindow.h \ + loginwindow.h \ + mainwindow.h \ + testview.h + +FORMS += \ + indexwindow.ui \ + loginwindow.ui \ + mainwindow.ui \ + testview.ui + +# Default rules for deployment. +qnx: target.path = /tmp/$${TARGET}/bin +else: unix:!android: target.path = /opt/$${TARGET}/bin +!isEmpty(target.path): INSTALLS += target + +RESOURCES += \ + res/qss.qrc \ + res/res.qrc + +DISTFILES += \ + res/image/u2.png + diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user new file mode 100644 index 0000000..1f5ec64 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user @@ -0,0 +1,562 @@ + + + + + + EnvironmentId + {c08df58c-84a7-4965-bca6-e98789474efa} + + + ProjectExplorer.Project.ActiveTarget + 0 + + + ProjectExplorer.Project.EditorSettings + + true + false + true + + Cpp + + CppGlobal + + + + QmlJS + + QmlJSGlobal + + + 2 + UTF-8 + false + 4 + false + 80 + true + true + 1 + true + false + 0 + true + true + 0 + 8 + true + 1 + true + true + true + false + + + + ProjectExplorer.Project.PluginSettings + + + -fno-delayed-template-parsing + + true + + + + ProjectExplorer.Project.Target.0 + + Desktop Qt 5.14.2 MinGW 64-bit + Desktop Qt 5.14.2 MinGW 64-bit + qt.qt5.5142.win64_mingw73_kit + 0 + 0 + 0 + + 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 + 0 + 0 + 0 + + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug + + + true + QtProjectManager.QMakeBuildStep + true + + false + false + false + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Debug + Qt4ProjectManager.Qt4BuildConfiguration + 2 + + + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Release + + + true + QtProjectManager.QMakeBuildStep + false + + false + false + true + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Release + Qt4ProjectManager.Qt4BuildConfiguration + 0 + + + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Profile + + + true + QtProjectManager.QMakeBuildStep + true + + false + true + true + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Profile + Qt4ProjectManager.Qt4BuildConfiguration + 0 + + 3 + + + 0 + Deploy + Deploy + ProjectExplorer.BuildSteps.Deploy + + 1 + ProjectExplorer.DefaultDeployConfiguration + + 1 + + + dwarf + + cpu-cycles + + + 250 + + -e + cpu-cycles + --call-graph + dwarf,4096 + -F + 250 + + -F + true + 4096 + false + false + 1000 + + true + + false + false + false + false + true + 0.01 + 10 + true + kcachegrind + 1 + 25 + + 1 + true + false + true + valgrind + + 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + + 2 + + Qt4ProjectManager.Qt4RunConfiguration:D:/Auto_verification_scheme/AutoVerScheme/AutoVerScheme.pro + D:/Auto_verification_scheme/AutoVerScheme/AutoVerScheme.pro + + false + + false + true + true + false + false + true + + + + 1 + + + + ProjectExplorer.Project.TargetCount + 2 + + + ProjectExplorer.Project.Updater.FileVersion + 22 + + + Version + 22 + + diff --git a/softwareDirectory/AutoVerScheme/indexwindow.cpp b/softwareDirectory/AutoVerScheme/indexwindow.cpp new file mode 100644 index 0000000..3e52c7b --- /dev/null +++ b/softwareDirectory/AutoVerScheme/indexwindow.cpp @@ -0,0 +1,55 @@ +#include "indexwindow.h" +#include "ui_indexwindow.h" +#include "QFile" +#include "QTextStream" + +IndexWindow::IndexWindow(QWidget *parent) : + QMainWindow(parent), + ui(new Ui::IndexWindow) +{ + ui->setupUi(this); + this->initForm(); +} + +IndexWindow::~IndexWindow() +{ + delete ui; +} +void IndexWindow::initForm() +{ + //this->setWindowFlags(Qt::FramelessWindowHint); + //调用样式 + loadStyle(":/qss/Index.css"); + +} + +void IndexWindow::loadStyle(const QString &qssFile) +{ + //加载样式表 + QString qss; + + QFile file(qssFile); + + if (file.open(QFile::ReadOnly)) { + //用QTextStream读取样式文件不用区分文件编码 带bom也行 + QStringList list; + QTextStream in(&file); + //in.setCodec("utf-8"); + while (!in.atEnd()) { + QString line; + in >> line; + list << line; + } + + file.close(); + qss = list.join("\n"); + QString paletteColor = qss.mid(20, 7); + qApp->setPalette(QPalette(paletteColor)); + //用时主要在下面这句 + qApp->setStyleSheet(qss); + } + + +} + + diff --git a/softwareDirectory/AutoVerScheme/indexwindow.h b/softwareDirectory/AutoVerScheme/indexwindow.h new file mode 100644 index 0000000..2aee958 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/indexwindow.h @@ -0,0 +1,26 @@ +#ifndef INDEXWINDOW_H +#define INDEXWINDOW_H + +#include + +namespace Ui { +class IndexWindow; +} + +class IndexWindow : public QMainWindow +{ + Q_OBJECT + +public: + explicit IndexWindow(QWidget *parent = nullptr); + ~IndexWindow(); +private slots: + void initForm(); + void loadStyle(const QString &qssFile); + + +private: + Ui::IndexWindow *ui; +}; + +#endif // INDEXWINDOW_H diff --git a/softwareDirectory/AutoVerScheme/indexwindow.ui b/softwareDirectory/AutoVerScheme/indexwindow.ui new file mode 100644 index 0000000..d7153e0 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/indexwindow.ui @@ -0,0 +1,539 @@ + + + IndexWindow + + + Qt::NonModal + + + + 0 + 0 + 1334 + 789 + + + + + 0 + 0 + + + + MainWindow + + + + + + + 100 + 100 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + 6 + + + QLayout::SetFixedSize + + + 0 + + + 0 + + + + + Qt::Horizontal + + + QSizePolicy::Fixed + + + + 120 + 13 + + + + + + + + + 0 + 0 + + + + + 560 + 0 + + + + Qt::DefaultContextMenu + + + color: white; +font-weight: bold; +font-size: 24pt; + + + + + QFrame::NoFrame + + + QFrame::Plain + + + 自动检定系统 + + + Qt::AutoText + + + false + + + Qt::AlignCenter + + + + + + + Qt::Horizontal + + + QSizePolicy::Fixed + + + + 40 + 13 + + + + + + + + + + Qt::Vertical + + + QSizePolicy::Fixed + + + + 50 + 80 + + + + + + + + + + Qt::Vertical + + + QSizePolicy::Fixed + + + + 20 + 120 + + + + + + + + Qt::Horizontal + + + + 100 + 20 + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + 0 + 0 + + + + + 310 + 190 + + + + OpenHandCursor + + + margin-right: 0px; + + + 信息管理 + + + + 60 + 60 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + Qt::Horizontal + + + + 327 + 20 + + + + + + + + + 0 + 0 + + + + + 490 + 190 + + + + OpenHandCursor + + + + + + 自动核查 + + + + 60 + 60 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + + 0 + 0 + + + + + 490 + 190 + + + + OpenHandCursor + + + + + + 自动检定 + + + + 60 + 60 + + + + false + + + false + + + Qt::ToolButtonTextUnderIcon + + + + + + + + 0 + 0 + + + + + 490 + 190 + + + + OpenHandCursor + + + + + + 核查程序管理 + + + + 60 + 60 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + Qt::Horizontal + + + + 327 + 20 + + + + + + + + + 0 + 0 + + + + + 310 + 190 + + + + OpenHandCursor + + + margin-right: 0px; + + + 数据同步 + + + + 60 + 60 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + Qt::Vertical + + + QSizePolicy::Fixed + + + + 20 + 120 + + + + + + + + Qt::Vertical + + + QSizePolicy::Fixed + + + + 20 + 120 + + + + + + + + + 0 + 0 + + + + + 490 + 190 + + + + OpenHandCursor + + + + + + 检定程序管理 + + + + 60 + 60 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + + + + + + 0 + 0 + + + + + 10 + 10 + + + + color: white; +font-weight: bold; +font-size: 14pt; + + + 欢迎您! 用户: admin + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + Qt::Horizontal + + + QSizePolicy::Fixed + + + + 270 + 20 + + + + + + + + + + + btnConfig + btnData + tbtnMain1 + tbtnMain2 + tbtnMain3 + tbtnConfig1 + tbtnConfig2 + tbtnConfig3 + tbtnConfig4 + tbtnConfig5 + tbtnConfig6 + btnMain + btnHelp + btnExit + + + + diff --git a/softwareDirectory/AutoVerScheme/loginwindow.cpp b/softwareDirectory/AutoVerScheme/loginwindow.cpp new file mode 100644 index 0000000..155988a --- /dev/null +++ b/softwareDirectory/AutoVerScheme/loginwindow.cpp @@ -0,0 +1,68 @@ +#include "loginwindow.h" +#include "ui_loginwindow.h" +#include +#include +#include + +#include "indexwindow.h" + +loginWindow::loginWindow(QWidget *parent): QMainWindow(parent), ui(new Ui::loginWindow) +{ + ui->setupUi(this); + this->initForm(); + ui->label->styleSheet(); + +} + +loginWindow::~loginWindow() +{ + delete ui; +} +void loginWindow::initForm() +{ + //this->setWindowFlags(Qt::FramelessWindowHint); + //调用样式 + loadStyle(":/qss/login.css"); +} + +void loginWindow::loadStyle(const QString &qssFile) +{ + //加载样式表 + QString qss; + + QFile file(qssFile); + + if (file.open(QFile::ReadOnly)) { + //用QTextStream读取样式文件不用区分文件编码 带bom也行 + QStringList list; + QTextStream in(&file); + //in.setCodec("utf-8"); + while (!in.atEnd()) { + QString line; + in >> line; + list << line; + } + + file.close(); + qss = list.join("\n"); + QString paletteColor = qss.mid(20, 7); + qApp->setPalette(QPalette(paletteColor)); + //用时主要在下面这句 + qApp->setStyleSheet(qss); + } + + +} + + +void loginWindow::on_Button_login_clicked() +{ + QMessageBox::information(this, "提示", "登录成功!"); + //查询数据库内是否有账号 + IndexWindow *indexWindow = new IndexWindow; + indexWindow->setWindowState(Qt::WindowMaximized); + indexWindow->show(); + this->close(); + +} + diff --git a/softwareDirectory/AutoVerScheme/loginwindow.h b/softwareDirectory/AutoVerScheme/loginwindow.h new file mode 100644 index 0000000..2695bc3 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/loginwindow.h @@ -0,0 +1,31 @@ +#ifndef MAINWINDOW_H +#define MAINWINDOW_H + +#include +#include + + + +namespace Ui { +class loginWindow; +} + +class loginWindow : public QMainWindow +{ + Q_OBJECT + +public: + explicit loginWindow(QWidget *parent = 0); + ~loginWindow(); +private slots: + void initForm(); + void loadStyle(const QString &qssFile); + void on_Button_login_clicked(); + + +private: + Ui::loginWindow *ui; +private: + QSqlQuery query; +}; +#endif // MAINWINDOW_H diff --git a/softwareDirectory/AutoVerScheme/loginwindow.ui b/softwareDirectory/AutoVerScheme/loginwindow.ui new file mode 100644 index 0000000..ca04751 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/loginwindow.ui @@ -0,0 +1,234 @@ + + + loginWindow + + + + 0 + 0 + 954 + 603 + + + + MainWindow + + + background-color: rgb(255, 255, 255) + + + + + + 110 + 110 + 271 + 231 + + + + background-image: url(:/image/login/u9.png); +background-repeat: no-repeat; background-position: center; +background-color: transparent; + + + + + + + + + 0 + 10 + 491 + 601 + + + + background-image: url(:/image/login/u2.png); +background-repeat: no-repeat; +background-color: transparent; +background-repeat: no-repeat; +background-position: center; +background-size: 100%; + + + + + + + + + 5 + 10 + 491 + 569 + + + + background-image: url(:/image/login/u0.png); +background-repeat: no-repeat; background-position: center; + + + + + + 170 + 350 + 241 + 51 + + + + background-color: transparent; + + + Metrology + + + + + + 490 + 10 + 471 + 571 + + + + + + + 610 + 70 + 271 + 61 + + + + 自动检定软件 + + + + + + 540 + 200 + 61 + 61 + + + + + + + + + + 490 + 10 + 461 + 571 + + + + + + + 540 + 290 + 61 + 61 + + + + + + + + + + 540 + 430 + 341 + 81 + + + + OpenHandCursor + + + + + + 登 录 + + + + + + 610 + 210 + 221 + 41 + + + + 请输入账号 + + + + + + 610 + 300 + 221 + 41 + + + + 请输入账号 + + + + + + 507 + 1 + 72 + 16 + + + + + + + label_4 + graphicsView + label_2 + label_3 + graphicsView_2 + textBrowser + lab_title + textBrowser_2 + textBrowser_3 + Button_login + textEdit_acc + textEdit_pass + label + + + + + 0 + 0 + 954 + 25 + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro new file mode 100644 index 0000000..5b8f852 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro @@ -0,0 +1,48 @@ +QT += core gui +QT += sql +greaterThan(QT_MAJOR_VERSION, 4): QT += widgets + +CONFIG += c++11 + +# The following define makes your compiler emit warnings if you use +# any Qt feature that has been marked deprecated (the exact warnings +# depend on your compiler). Please consult the documentation of the +# deprecated API in order to know how to port your code away from it. +DEFINES += QT_DEPRECATED_WARNINGS + +# You can also make your code fail to compile if it uses deprecated APIs. +# In order to do so, uncomment the following line. +# You can also select to disable deprecated APIs only up to a certain version of Qt. +#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 + +SOURCES += \ + indexwindow.cpp \ + loginwindow.cpp \ + main.cpp \ + mainwindow.cpp \ + testview.cpp + +HEADERS += \ + indexwindow.h \ + loginwindow.h \ + mainwindow.h \ + testview.h + +FORMS += \ + indexwindow.ui \ + loginwindow.ui \ + mainwindow.ui \ + testview.ui + +# Default rules for deployment. +qnx: target.path = /tmp/$${TARGET}/bin +else: unix:!android: target.path = /opt/$${TARGET}/bin +!isEmpty(target.path): INSTALLS += target + +RESOURCES += \ + res/qss.qrc \ + res/res.qrc + +DISTFILES += \ + res/image/u2.png + diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user new file mode 100644 index 0000000..1f5ec64 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user @@ -0,0 +1,562 @@ + + + + + + EnvironmentId + {c08df58c-84a7-4965-bca6-e98789474efa} + + + ProjectExplorer.Project.ActiveTarget + 0 + + + ProjectExplorer.Project.EditorSettings + + true + false + true + + Cpp + + CppGlobal + + + + QmlJS + + QmlJSGlobal + + + 2 + UTF-8 + false + 4 + false + 80 + true + true + 1 + true + false + 0 + true + true + 0 + 8 + true + 1 + true + true + true + false + + + + ProjectExplorer.Project.PluginSettings + + + -fno-delayed-template-parsing + + true + + + + ProjectExplorer.Project.Target.0 + + Desktop Qt 5.14.2 MinGW 64-bit + Desktop Qt 5.14.2 MinGW 64-bit + qt.qt5.5142.win64_mingw73_kit + 0 + 0 + 0 + + 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 + 0 + 0 + 0 + + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug + + + true + QtProjectManager.QMakeBuildStep + true + + false + false + false + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Debug + Qt4ProjectManager.Qt4BuildConfiguration + 2 + + + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Release + + + true + QtProjectManager.QMakeBuildStep + false + + false + false + true + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Release + Qt4ProjectManager.Qt4BuildConfiguration + 0 + + + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Profile + + + true + QtProjectManager.QMakeBuildStep + true + + false + true + true + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Profile + Qt4ProjectManager.Qt4BuildConfiguration + 0 + + 3 + + + 0 + Deploy + Deploy + ProjectExplorer.BuildSteps.Deploy + + 1 + ProjectExplorer.DefaultDeployConfiguration + + 1 + + + dwarf + + cpu-cycles + + + 250 + + -e + cpu-cycles + --call-graph + dwarf,4096 + -F + 250 + + -F + true + 4096 + false + false + 1000 + + true + + false + false + false + false + true + 0.01 + 10 + true + kcachegrind + 1 + 25 + + 1 + true + false + true + valgrind + + 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + + 2 + + Qt4ProjectManager.Qt4RunConfiguration:D:/Auto_verification_scheme/AutoVerScheme/AutoVerScheme.pro + D:/Auto_verification_scheme/AutoVerScheme/AutoVerScheme.pro + + false + + false + true + true + false + false + true + + + + 1 + + + + ProjectExplorer.Project.TargetCount + 2 + + + ProjectExplorer.Project.Updater.FileVersion + 22 + + + Version + 22 + + diff --git a/softwareDirectory/AutoVerScheme/indexwindow.cpp b/softwareDirectory/AutoVerScheme/indexwindow.cpp new file mode 100644 index 0000000..3e52c7b --- /dev/null +++ b/softwareDirectory/AutoVerScheme/indexwindow.cpp @@ -0,0 +1,55 @@ +#include "indexwindow.h" +#include "ui_indexwindow.h" +#include "QFile" +#include "QTextStream" + +IndexWindow::IndexWindow(QWidget *parent) : + QMainWindow(parent), + ui(new Ui::IndexWindow) +{ + ui->setupUi(this); + this->initForm(); +} + +IndexWindow::~IndexWindow() +{ + delete ui; +} +void IndexWindow::initForm() +{ + //this->setWindowFlags(Qt::FramelessWindowHint); + //调用样式 + loadStyle(":/qss/Index.css"); + +} + +void IndexWindow::loadStyle(const QString &qssFile) +{ + //加载样式表 + QString qss; + + QFile file(qssFile); + + if (file.open(QFile::ReadOnly)) { + //用QTextStream读取样式文件不用区分文件编码 带bom也行 + QStringList list; + QTextStream in(&file); + //in.setCodec("utf-8"); + while (!in.atEnd()) { + QString line; + in >> line; + list << line; + } + + file.close(); + qss = list.join("\n"); + QString paletteColor = qss.mid(20, 7); + qApp->setPalette(QPalette(paletteColor)); + //用时主要在下面这句 + qApp->setStyleSheet(qss); + } + + +} + + diff --git a/softwareDirectory/AutoVerScheme/indexwindow.h b/softwareDirectory/AutoVerScheme/indexwindow.h new file mode 100644 index 0000000..2aee958 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/indexwindow.h @@ -0,0 +1,26 @@ +#ifndef INDEXWINDOW_H +#define INDEXWINDOW_H + +#include + +namespace Ui { +class IndexWindow; +} + +class IndexWindow : public QMainWindow +{ + Q_OBJECT + +public: + explicit IndexWindow(QWidget *parent = nullptr); + ~IndexWindow(); +private slots: + void initForm(); + void loadStyle(const QString &qssFile); + + +private: + Ui::IndexWindow *ui; +}; + +#endif // INDEXWINDOW_H diff --git a/softwareDirectory/AutoVerScheme/indexwindow.ui b/softwareDirectory/AutoVerScheme/indexwindow.ui new file mode 100644 index 0000000..d7153e0 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/indexwindow.ui @@ -0,0 +1,539 @@ + + + IndexWindow + + + Qt::NonModal + + + + 0 + 0 + 1334 + 789 + + + + + 0 + 0 + + + + MainWindow + + + + + + + 100 + 100 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + 6 + + + QLayout::SetFixedSize + + + 0 + + + 0 + + + + + Qt::Horizontal + + + QSizePolicy::Fixed + + + + 120 + 13 + + + + + + + + + 0 + 0 + + + + + 560 + 0 + + + + Qt::DefaultContextMenu + + + color: white; +font-weight: bold; +font-size: 24pt; + + + + + QFrame::NoFrame + + + QFrame::Plain + + + 自动检定系统 + + + Qt::AutoText + + + false + + + Qt::AlignCenter + + + + + + + Qt::Horizontal + + + QSizePolicy::Fixed + + + + 40 + 13 + + + + + + + + + + Qt::Vertical + + + QSizePolicy::Fixed + + + + 50 + 80 + + + + + + + + + + Qt::Vertical + + + QSizePolicy::Fixed + + + + 20 + 120 + + + + + + + + Qt::Horizontal + + + + 100 + 20 + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + 0 + 0 + + + + + 310 + 190 + + + + OpenHandCursor + + + margin-right: 0px; + + + 信息管理 + + + + 60 + 60 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + Qt::Horizontal + + + + 327 + 20 + + + + + + + + + 0 + 0 + + + + + 490 + 190 + + + + OpenHandCursor + + + + + + 自动核查 + + + + 60 + 60 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + + 0 + 0 + + + + + 490 + 190 + + + + OpenHandCursor + + + + + + 自动检定 + + + + 60 + 60 + + + + false + + + false + + + Qt::ToolButtonTextUnderIcon + + + + + + + + 0 + 0 + + + + + 490 + 190 + + + + OpenHandCursor + + + + + + 核查程序管理 + + + + 60 + 60 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + Qt::Horizontal + + + + 327 + 20 + + + + + + + + + 0 + 0 + + + + + 310 + 190 + + + + OpenHandCursor + + + margin-right: 0px; + + + 数据同步 + + + + 60 + 60 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + Qt::Vertical + + + QSizePolicy::Fixed + + + + 20 + 120 + + + + + + + + Qt::Vertical + + + QSizePolicy::Fixed + + + + 20 + 120 + + + + + + + + + 0 + 0 + + + + + 490 + 190 + + + + OpenHandCursor + + + + + + 检定程序管理 + + + + 60 + 60 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + + + + + + 0 + 0 + + + + + 10 + 10 + + + + color: white; +font-weight: bold; +font-size: 14pt; + + + 欢迎您! 用户: admin + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + Qt::Horizontal + + + QSizePolicy::Fixed + + + + 270 + 20 + + + + + + + + + + + btnConfig + btnData + tbtnMain1 + tbtnMain2 + tbtnMain3 + tbtnConfig1 + tbtnConfig2 + tbtnConfig3 + tbtnConfig4 + tbtnConfig5 + tbtnConfig6 + btnMain + btnHelp + btnExit + + + + diff --git a/softwareDirectory/AutoVerScheme/loginwindow.cpp b/softwareDirectory/AutoVerScheme/loginwindow.cpp new file mode 100644 index 0000000..155988a --- /dev/null +++ b/softwareDirectory/AutoVerScheme/loginwindow.cpp @@ -0,0 +1,68 @@ +#include "loginwindow.h" +#include "ui_loginwindow.h" +#include +#include +#include + +#include "indexwindow.h" + +loginWindow::loginWindow(QWidget *parent): QMainWindow(parent), ui(new Ui::loginWindow) +{ + ui->setupUi(this); + this->initForm(); + ui->label->styleSheet(); + +} + +loginWindow::~loginWindow() +{ + delete ui; +} +void loginWindow::initForm() +{ + //this->setWindowFlags(Qt::FramelessWindowHint); + //调用样式 + loadStyle(":/qss/login.css"); +} + +void loginWindow::loadStyle(const QString &qssFile) +{ + //加载样式表 + QString qss; + + QFile file(qssFile); + + if (file.open(QFile::ReadOnly)) { + //用QTextStream读取样式文件不用区分文件编码 带bom也行 + QStringList list; + QTextStream in(&file); + //in.setCodec("utf-8"); + while (!in.atEnd()) { + QString line; + in >> line; + list << line; + } + + file.close(); + qss = list.join("\n"); + QString paletteColor = qss.mid(20, 7); + qApp->setPalette(QPalette(paletteColor)); + //用时主要在下面这句 + qApp->setStyleSheet(qss); + } + + +} + + +void loginWindow::on_Button_login_clicked() +{ + QMessageBox::information(this, "提示", "登录成功!"); + //查询数据库内是否有账号 + IndexWindow *indexWindow = new IndexWindow; + indexWindow->setWindowState(Qt::WindowMaximized); + indexWindow->show(); + this->close(); + +} + diff --git a/softwareDirectory/AutoVerScheme/loginwindow.h b/softwareDirectory/AutoVerScheme/loginwindow.h new file mode 100644 index 0000000..2695bc3 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/loginwindow.h @@ -0,0 +1,31 @@ +#ifndef MAINWINDOW_H +#define MAINWINDOW_H + +#include +#include + + + +namespace Ui { +class loginWindow; +} + +class loginWindow : public QMainWindow +{ + Q_OBJECT + +public: + explicit loginWindow(QWidget *parent = 0); + ~loginWindow(); +private slots: + void initForm(); + void loadStyle(const QString &qssFile); + void on_Button_login_clicked(); + + +private: + Ui::loginWindow *ui; +private: + QSqlQuery query; +}; +#endif // MAINWINDOW_H diff --git a/softwareDirectory/AutoVerScheme/loginwindow.ui b/softwareDirectory/AutoVerScheme/loginwindow.ui new file mode 100644 index 0000000..ca04751 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/loginwindow.ui @@ -0,0 +1,234 @@ + + + loginWindow + + + + 0 + 0 + 954 + 603 + + + + MainWindow + + + background-color: rgb(255, 255, 255) + + + + + + 110 + 110 + 271 + 231 + + + + background-image: url(:/image/login/u9.png); +background-repeat: no-repeat; background-position: center; +background-color: transparent; + + + + + + + + + 0 + 10 + 491 + 601 + + + + background-image: url(:/image/login/u2.png); +background-repeat: no-repeat; +background-color: transparent; +background-repeat: no-repeat; +background-position: center; +background-size: 100%; + + + + + + + + + 5 + 10 + 491 + 569 + + + + background-image: url(:/image/login/u0.png); +background-repeat: no-repeat; background-position: center; + + + + + + 170 + 350 + 241 + 51 + + + + background-color: transparent; + + + Metrology + + + + + + 490 + 10 + 471 + 571 + + + + + + + 610 + 70 + 271 + 61 + + + + 自动检定软件 + + + + + + 540 + 200 + 61 + 61 + + + + + + + + + + 490 + 10 + 461 + 571 + + + + + + + 540 + 290 + 61 + 61 + + + + + + + + + + 540 + 430 + 341 + 81 + + + + OpenHandCursor + + + + + + 登 录 + + + + + + 610 + 210 + 221 + 41 + + + + 请输入账号 + + + + + + 610 + 300 + 221 + 41 + + + + 请输入账号 + + + + + + 507 + 1 + 72 + 16 + + + + + + + label_4 + graphicsView + label_2 + label_3 + graphicsView_2 + textBrowser + lab_title + textBrowser_2 + textBrowser_3 + Button_login + textEdit_acc + textEdit_pass + label + + + + + 0 + 0 + 954 + 25 + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/main.cpp b/softwareDirectory/AutoVerScheme/main.cpp new file mode 100644 index 0000000..16b6d3f --- /dev/null +++ b/softwareDirectory/AutoVerScheme/main.cpp @@ -0,0 +1,23 @@ +#include "loginwindow.h" +#include "mainwindow.h" +#include +#include "indexWindow.h" +#include "testview.h" + +int main(int argc, char *argv[]) +{ + QApplication a(argc, argv); + // 加载外部的CSS文件 + a.setStyleSheet("file:///path/to/styles.css"); + //设置字体 + QFont font; + font.setFamily("Microsoft Yahei"); + font.setPixelSize(13); + a.setFont(font); + + //TestView s; + //s.show(); + loginWindow w; + w.show(); + return a.exec(); +} diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro new file mode 100644 index 0000000..5b8f852 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro @@ -0,0 +1,48 @@ +QT += core gui +QT += sql +greaterThan(QT_MAJOR_VERSION, 4): QT += widgets + +CONFIG += c++11 + +# The following define makes your compiler emit warnings if you use +# any Qt feature that has been marked deprecated (the exact warnings +# depend on your compiler). Please consult the documentation of the +# deprecated API in order to know how to port your code away from it. +DEFINES += QT_DEPRECATED_WARNINGS + +# You can also make your code fail to compile if it uses deprecated APIs. +# In order to do so, uncomment the following line. +# You can also select to disable deprecated APIs only up to a certain version of Qt. +#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 + +SOURCES += \ + indexwindow.cpp \ + loginwindow.cpp \ + main.cpp \ + mainwindow.cpp \ + testview.cpp + +HEADERS += \ + indexwindow.h \ + loginwindow.h \ + mainwindow.h \ + testview.h + +FORMS += \ + indexwindow.ui \ + loginwindow.ui \ + mainwindow.ui \ + testview.ui + +# Default rules for deployment. +qnx: target.path = /tmp/$${TARGET}/bin +else: unix:!android: target.path = /opt/$${TARGET}/bin +!isEmpty(target.path): INSTALLS += target + +RESOURCES += \ + res/qss.qrc \ + res/res.qrc + +DISTFILES += \ + res/image/u2.png + diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user new file mode 100644 index 0000000..1f5ec64 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user @@ -0,0 +1,562 @@ + + + + + + EnvironmentId + {c08df58c-84a7-4965-bca6-e98789474efa} + + + ProjectExplorer.Project.ActiveTarget + 0 + + + ProjectExplorer.Project.EditorSettings + + true + false + true + + Cpp + + CppGlobal + + + + QmlJS + + QmlJSGlobal + + + 2 + UTF-8 + false + 4 + false + 80 + true + true + 1 + true + false + 0 + true + true + 0 + 8 + true + 1 + true + true + true + false + + + + ProjectExplorer.Project.PluginSettings + + + -fno-delayed-template-parsing + + true + + + + ProjectExplorer.Project.Target.0 + + Desktop Qt 5.14.2 MinGW 64-bit + Desktop Qt 5.14.2 MinGW 64-bit + qt.qt5.5142.win64_mingw73_kit + 0 + 0 + 0 + + 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 + 0 + 0 + 0 + + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug + + + true + QtProjectManager.QMakeBuildStep + true + + false + false + false + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Debug + Qt4ProjectManager.Qt4BuildConfiguration + 2 + + + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Release + + + true + QtProjectManager.QMakeBuildStep + false + + false + false + true + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Release + Qt4ProjectManager.Qt4BuildConfiguration + 0 + + + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Profile + + + true + QtProjectManager.QMakeBuildStep + true + + false + true + true + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Profile + Qt4ProjectManager.Qt4BuildConfiguration + 0 + + 3 + + + 0 + Deploy + Deploy + ProjectExplorer.BuildSteps.Deploy + + 1 + ProjectExplorer.DefaultDeployConfiguration + + 1 + + + dwarf + + cpu-cycles + + + 250 + + -e + cpu-cycles + --call-graph + dwarf,4096 + -F + 250 + + -F + true + 4096 + false + false + 1000 + + true + + false + false + false + false + true + 0.01 + 10 + true + kcachegrind + 1 + 25 + + 1 + true + false + true + valgrind + + 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + + 2 + + Qt4ProjectManager.Qt4RunConfiguration:D:/Auto_verification_scheme/AutoVerScheme/AutoVerScheme.pro + D:/Auto_verification_scheme/AutoVerScheme/AutoVerScheme.pro + + false + + false + true + true + false + false + true + + + + 1 + + + + ProjectExplorer.Project.TargetCount + 2 + + + ProjectExplorer.Project.Updater.FileVersion + 22 + + + Version + 22 + + diff --git a/softwareDirectory/AutoVerScheme/indexwindow.cpp b/softwareDirectory/AutoVerScheme/indexwindow.cpp new file mode 100644 index 0000000..3e52c7b --- /dev/null +++ b/softwareDirectory/AutoVerScheme/indexwindow.cpp @@ -0,0 +1,55 @@ +#include "indexwindow.h" +#include "ui_indexwindow.h" +#include "QFile" +#include "QTextStream" + +IndexWindow::IndexWindow(QWidget *parent) : + QMainWindow(parent), + ui(new Ui::IndexWindow) +{ + ui->setupUi(this); + this->initForm(); +} + +IndexWindow::~IndexWindow() +{ + delete ui; +} +void IndexWindow::initForm() +{ + //this->setWindowFlags(Qt::FramelessWindowHint); + //调用样式 + loadStyle(":/qss/Index.css"); + +} + +void IndexWindow::loadStyle(const QString &qssFile) +{ + //加载样式表 + QString qss; + + QFile file(qssFile); + + if (file.open(QFile::ReadOnly)) { + //用QTextStream读取样式文件不用区分文件编码 带bom也行 + QStringList list; + QTextStream in(&file); + //in.setCodec("utf-8"); + while (!in.atEnd()) { + QString line; + in >> line; + list << line; + } + + file.close(); + qss = list.join("\n"); + QString paletteColor = qss.mid(20, 7); + qApp->setPalette(QPalette(paletteColor)); + //用时主要在下面这句 + qApp->setStyleSheet(qss); + } + + +} + + diff --git a/softwareDirectory/AutoVerScheme/indexwindow.h b/softwareDirectory/AutoVerScheme/indexwindow.h new file mode 100644 index 0000000..2aee958 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/indexwindow.h @@ -0,0 +1,26 @@ +#ifndef INDEXWINDOW_H +#define INDEXWINDOW_H + +#include + +namespace Ui { +class IndexWindow; +} + +class IndexWindow : public QMainWindow +{ + Q_OBJECT + +public: + explicit IndexWindow(QWidget *parent = nullptr); + ~IndexWindow(); +private slots: + void initForm(); + void loadStyle(const QString &qssFile); + + +private: + Ui::IndexWindow *ui; +}; + +#endif // INDEXWINDOW_H diff --git a/softwareDirectory/AutoVerScheme/indexwindow.ui b/softwareDirectory/AutoVerScheme/indexwindow.ui new file mode 100644 index 0000000..d7153e0 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/indexwindow.ui @@ -0,0 +1,539 @@ + + + IndexWindow + + + Qt::NonModal + + + + 0 + 0 + 1334 + 789 + + + + + 0 + 0 + + + + MainWindow + + + + + + + 100 + 100 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + 6 + + + QLayout::SetFixedSize + + + 0 + + + 0 + + + + + Qt::Horizontal + + + QSizePolicy::Fixed + + + + 120 + 13 + + + + + + + + + 0 + 0 + + + + + 560 + 0 + + + + Qt::DefaultContextMenu + + + color: white; +font-weight: bold; +font-size: 24pt; + + + + + QFrame::NoFrame + + + QFrame::Plain + + + 自动检定系统 + + + Qt::AutoText + + + false + + + Qt::AlignCenter + + + + + + + Qt::Horizontal + + + QSizePolicy::Fixed + + + + 40 + 13 + + + + + + + + + + Qt::Vertical + + + QSizePolicy::Fixed + + + + 50 + 80 + + + + + + + + + + Qt::Vertical + + + QSizePolicy::Fixed + + + + 20 + 120 + + + + + + + + Qt::Horizontal + + + + 100 + 20 + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + 0 + 0 + + + + + 310 + 190 + + + + OpenHandCursor + + + margin-right: 0px; + + + 信息管理 + + + + 60 + 60 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + Qt::Horizontal + + + + 327 + 20 + + + + + + + + + 0 + 0 + + + + + 490 + 190 + + + + OpenHandCursor + + + + + + 自动核查 + + + + 60 + 60 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + + 0 + 0 + + + + + 490 + 190 + + + + OpenHandCursor + + + + + + 自动检定 + + + + 60 + 60 + + + + false + + + false + + + Qt::ToolButtonTextUnderIcon + + + + + + + + 0 + 0 + + + + + 490 + 190 + + + + OpenHandCursor + + + + + + 核查程序管理 + + + + 60 + 60 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + Qt::Horizontal + + + + 327 + 20 + + + + + + + + + 0 + 0 + + + + + 310 + 190 + + + + OpenHandCursor + + + margin-right: 0px; + + + 数据同步 + + + + 60 + 60 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + Qt::Vertical + + + QSizePolicy::Fixed + + + + 20 + 120 + + + + + + + + Qt::Vertical + + + QSizePolicy::Fixed + + + + 20 + 120 + + + + + + + + + 0 + 0 + + + + + 490 + 190 + + + + OpenHandCursor + + + + + + 检定程序管理 + + + + 60 + 60 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + + + + + + 0 + 0 + + + + + 10 + 10 + + + + color: white; +font-weight: bold; +font-size: 14pt; + + + 欢迎您! 用户: admin + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + Qt::Horizontal + + + QSizePolicy::Fixed + + + + 270 + 20 + + + + + + + + + + + btnConfig + btnData + tbtnMain1 + tbtnMain2 + tbtnMain3 + tbtnConfig1 + tbtnConfig2 + tbtnConfig3 + tbtnConfig4 + tbtnConfig5 + tbtnConfig6 + btnMain + btnHelp + btnExit + + + + diff --git a/softwareDirectory/AutoVerScheme/loginwindow.cpp b/softwareDirectory/AutoVerScheme/loginwindow.cpp new file mode 100644 index 0000000..155988a --- /dev/null +++ b/softwareDirectory/AutoVerScheme/loginwindow.cpp @@ -0,0 +1,68 @@ +#include "loginwindow.h" +#include "ui_loginwindow.h" +#include +#include +#include + +#include "indexwindow.h" + +loginWindow::loginWindow(QWidget *parent): QMainWindow(parent), ui(new Ui::loginWindow) +{ + ui->setupUi(this); + this->initForm(); + ui->label->styleSheet(); + +} + +loginWindow::~loginWindow() +{ + delete ui; +} +void loginWindow::initForm() +{ + //this->setWindowFlags(Qt::FramelessWindowHint); + //调用样式 + loadStyle(":/qss/login.css"); +} + +void loginWindow::loadStyle(const QString &qssFile) +{ + //加载样式表 + QString qss; + + QFile file(qssFile); + + if (file.open(QFile::ReadOnly)) { + //用QTextStream读取样式文件不用区分文件编码 带bom也行 + QStringList list; + QTextStream in(&file); + //in.setCodec("utf-8"); + while (!in.atEnd()) { + QString line; + in >> line; + list << line; + } + + file.close(); + qss = list.join("\n"); + QString paletteColor = qss.mid(20, 7); + qApp->setPalette(QPalette(paletteColor)); + //用时主要在下面这句 + qApp->setStyleSheet(qss); + } + + +} + + +void loginWindow::on_Button_login_clicked() +{ + QMessageBox::information(this, "提示", "登录成功!"); + //查询数据库内是否有账号 + IndexWindow *indexWindow = new IndexWindow; + indexWindow->setWindowState(Qt::WindowMaximized); + indexWindow->show(); + this->close(); + +} + diff --git a/softwareDirectory/AutoVerScheme/loginwindow.h b/softwareDirectory/AutoVerScheme/loginwindow.h new file mode 100644 index 0000000..2695bc3 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/loginwindow.h @@ -0,0 +1,31 @@ +#ifndef MAINWINDOW_H +#define MAINWINDOW_H + +#include +#include + + + +namespace Ui { +class loginWindow; +} + +class loginWindow : public QMainWindow +{ + Q_OBJECT + +public: + explicit loginWindow(QWidget *parent = 0); + ~loginWindow(); +private slots: + void initForm(); + void loadStyle(const QString &qssFile); + void on_Button_login_clicked(); + + +private: + Ui::loginWindow *ui; +private: + QSqlQuery query; +}; +#endif // MAINWINDOW_H diff --git a/softwareDirectory/AutoVerScheme/loginwindow.ui b/softwareDirectory/AutoVerScheme/loginwindow.ui new file mode 100644 index 0000000..ca04751 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/loginwindow.ui @@ -0,0 +1,234 @@ + + + loginWindow + + + + 0 + 0 + 954 + 603 + + + + MainWindow + + + background-color: rgb(255, 255, 255) + + + + + + 110 + 110 + 271 + 231 + + + + background-image: url(:/image/login/u9.png); +background-repeat: no-repeat; background-position: center; +background-color: transparent; + + + + + + + + + 0 + 10 + 491 + 601 + + + + background-image: url(:/image/login/u2.png); +background-repeat: no-repeat; +background-color: transparent; +background-repeat: no-repeat; +background-position: center; +background-size: 100%; + + + + + + + + + 5 + 10 + 491 + 569 + + + + background-image: url(:/image/login/u0.png); +background-repeat: no-repeat; background-position: center; + + + + + + 170 + 350 + 241 + 51 + + + + background-color: transparent; + + + Metrology + + + + + + 490 + 10 + 471 + 571 + + + + + + + 610 + 70 + 271 + 61 + + + + 自动检定软件 + + + + + + 540 + 200 + 61 + 61 + + + + + + + + + + 490 + 10 + 461 + 571 + + + + + + + 540 + 290 + 61 + 61 + + + + + + + + + + 540 + 430 + 341 + 81 + + + + OpenHandCursor + + + + + + 登 录 + + + + + + 610 + 210 + 221 + 41 + + + + 请输入账号 + + + + + + 610 + 300 + 221 + 41 + + + + 请输入账号 + + + + + + 507 + 1 + 72 + 16 + + + + + + + label_4 + graphicsView + label_2 + label_3 + graphicsView_2 + textBrowser + lab_title + textBrowser_2 + textBrowser_3 + Button_login + textEdit_acc + textEdit_pass + label + + + + + 0 + 0 + 954 + 25 + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/main.cpp b/softwareDirectory/AutoVerScheme/main.cpp new file mode 100644 index 0000000..16b6d3f --- /dev/null +++ b/softwareDirectory/AutoVerScheme/main.cpp @@ -0,0 +1,23 @@ +#include "loginwindow.h" +#include "mainwindow.h" +#include +#include "indexWindow.h" +#include "testview.h" + +int main(int argc, char *argv[]) +{ + QApplication a(argc, argv); + // 加载外部的CSS文件 + a.setStyleSheet("file:///path/to/styles.css"); + //设置字体 + QFont font; + font.setFamily("Microsoft Yahei"); + font.setPixelSize(13); + a.setFont(font); + + //TestView s; + //s.show(); + loginWindow w; + w.show(); + return a.exec(); +} diff --git a/softwareDirectory/AutoVerScheme/mainwindow.cpp b/softwareDirectory/AutoVerScheme/mainwindow.cpp new file mode 100644 index 0000000..12d07c0 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/mainwindow.cpp @@ -0,0 +1,14 @@ +#include "mainwindow.h" +#include "ui_mainwindow.h" + +MainWindow::MainWindow(QWidget *parent) : + QMainWindow(parent), + ui(new Ui::MainWindow) +{ + ui->setupUi(this); +} + +MainWindow::~MainWindow() +{ + delete ui; +} diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro new file mode 100644 index 0000000..5b8f852 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro @@ -0,0 +1,48 @@ +QT += core gui +QT += sql +greaterThan(QT_MAJOR_VERSION, 4): QT += widgets + +CONFIG += c++11 + +# The following define makes your compiler emit warnings if you use +# any Qt feature that has been marked deprecated (the exact warnings +# depend on your compiler). Please consult the documentation of the +# deprecated API in order to know how to port your code away from it. +DEFINES += QT_DEPRECATED_WARNINGS + +# You can also make your code fail to compile if it uses deprecated APIs. +# In order to do so, uncomment the following line. +# You can also select to disable deprecated APIs only up to a certain version of Qt. +#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 + +SOURCES += \ + indexwindow.cpp \ + loginwindow.cpp \ + main.cpp \ + mainwindow.cpp \ + testview.cpp + +HEADERS += \ + indexwindow.h \ + loginwindow.h \ + mainwindow.h \ + testview.h + +FORMS += \ + indexwindow.ui \ + loginwindow.ui \ + mainwindow.ui \ + testview.ui + +# Default rules for deployment. +qnx: target.path = /tmp/$${TARGET}/bin +else: unix:!android: target.path = /opt/$${TARGET}/bin +!isEmpty(target.path): INSTALLS += target + +RESOURCES += \ + res/qss.qrc \ + res/res.qrc + +DISTFILES += \ + res/image/u2.png + diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user new file mode 100644 index 0000000..1f5ec64 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user @@ -0,0 +1,562 @@ + + + + + + EnvironmentId + {c08df58c-84a7-4965-bca6-e98789474efa} + + + ProjectExplorer.Project.ActiveTarget + 0 + + + ProjectExplorer.Project.EditorSettings + + true + false + true + + Cpp + + CppGlobal + + + + QmlJS + + QmlJSGlobal + + + 2 + UTF-8 + false + 4 + false + 80 + true + true + 1 + true + false + 0 + true + true + 0 + 8 + true + 1 + true + true + true + false + + + + ProjectExplorer.Project.PluginSettings + + + -fno-delayed-template-parsing + + true + + + + ProjectExplorer.Project.Target.0 + + Desktop Qt 5.14.2 MinGW 64-bit + Desktop Qt 5.14.2 MinGW 64-bit + qt.qt5.5142.win64_mingw73_kit + 0 + 0 + 0 + + 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 + 0 + 0 + 0 + + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug + + + true + QtProjectManager.QMakeBuildStep + true + + false + false + false + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Debug + Qt4ProjectManager.Qt4BuildConfiguration + 2 + + + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Release + + + true + QtProjectManager.QMakeBuildStep + false + + false + false + true + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Release + Qt4ProjectManager.Qt4BuildConfiguration + 0 + + + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Profile + + + true + QtProjectManager.QMakeBuildStep + true + + false + true + true + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Profile + Qt4ProjectManager.Qt4BuildConfiguration + 0 + + 3 + + + 0 + Deploy + Deploy + ProjectExplorer.BuildSteps.Deploy + + 1 + ProjectExplorer.DefaultDeployConfiguration + + 1 + + + dwarf + + cpu-cycles + + + 250 + + -e + cpu-cycles + --call-graph + dwarf,4096 + -F + 250 + + -F + true + 4096 + false + false + 1000 + + true + + false + false + false + false + true + 0.01 + 10 + true + kcachegrind + 1 + 25 + + 1 + true + false + true + valgrind + + 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + + 2 + + Qt4ProjectManager.Qt4RunConfiguration:D:/Auto_verification_scheme/AutoVerScheme/AutoVerScheme.pro + D:/Auto_verification_scheme/AutoVerScheme/AutoVerScheme.pro + + false + + false + true + true + false + false + true + + + + 1 + + + + ProjectExplorer.Project.TargetCount + 2 + + + ProjectExplorer.Project.Updater.FileVersion + 22 + + + Version + 22 + + diff --git a/softwareDirectory/AutoVerScheme/indexwindow.cpp b/softwareDirectory/AutoVerScheme/indexwindow.cpp new file mode 100644 index 0000000..3e52c7b --- /dev/null +++ b/softwareDirectory/AutoVerScheme/indexwindow.cpp @@ -0,0 +1,55 @@ +#include "indexwindow.h" +#include "ui_indexwindow.h" +#include "QFile" +#include "QTextStream" + +IndexWindow::IndexWindow(QWidget *parent) : + QMainWindow(parent), + ui(new Ui::IndexWindow) +{ + ui->setupUi(this); + this->initForm(); +} + +IndexWindow::~IndexWindow() +{ + delete ui; +} +void IndexWindow::initForm() +{ + //this->setWindowFlags(Qt::FramelessWindowHint); + //调用样式 + loadStyle(":/qss/Index.css"); + +} + +void IndexWindow::loadStyle(const QString &qssFile) +{ + //加载样式表 + QString qss; + + QFile file(qssFile); + + if (file.open(QFile::ReadOnly)) { + //用QTextStream读取样式文件不用区分文件编码 带bom也行 + QStringList list; + QTextStream in(&file); + //in.setCodec("utf-8"); + while (!in.atEnd()) { + QString line; + in >> line; + list << line; + } + + file.close(); + qss = list.join("\n"); + QString paletteColor = qss.mid(20, 7); + qApp->setPalette(QPalette(paletteColor)); + //用时主要在下面这句 + qApp->setStyleSheet(qss); + } + + +} + + diff --git a/softwareDirectory/AutoVerScheme/indexwindow.h b/softwareDirectory/AutoVerScheme/indexwindow.h new file mode 100644 index 0000000..2aee958 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/indexwindow.h @@ -0,0 +1,26 @@ +#ifndef INDEXWINDOW_H +#define INDEXWINDOW_H + +#include + +namespace Ui { +class IndexWindow; +} + +class IndexWindow : public QMainWindow +{ + Q_OBJECT + +public: + explicit IndexWindow(QWidget *parent = nullptr); + ~IndexWindow(); +private slots: + void initForm(); + void loadStyle(const QString &qssFile); + + +private: + Ui::IndexWindow *ui; +}; + +#endif // INDEXWINDOW_H diff --git a/softwareDirectory/AutoVerScheme/indexwindow.ui b/softwareDirectory/AutoVerScheme/indexwindow.ui new file mode 100644 index 0000000..d7153e0 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/indexwindow.ui @@ -0,0 +1,539 @@ + + + IndexWindow + + + Qt::NonModal + + + + 0 + 0 + 1334 + 789 + + + + + 0 + 0 + + + + MainWindow + + + + + + + 100 + 100 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + 6 + + + QLayout::SetFixedSize + + + 0 + + + 0 + + + + + Qt::Horizontal + + + QSizePolicy::Fixed + + + + 120 + 13 + + + + + + + + + 0 + 0 + + + + + 560 + 0 + + + + Qt::DefaultContextMenu + + + color: white; +font-weight: bold; +font-size: 24pt; + + + + + QFrame::NoFrame + + + QFrame::Plain + + + 自动检定系统 + + + Qt::AutoText + + + false + + + Qt::AlignCenter + + + + + + + Qt::Horizontal + + + QSizePolicy::Fixed + + + + 40 + 13 + + + + + + + + + + Qt::Vertical + + + QSizePolicy::Fixed + + + + 50 + 80 + + + + + + + + + + Qt::Vertical + + + QSizePolicy::Fixed + + + + 20 + 120 + + + + + + + + Qt::Horizontal + + + + 100 + 20 + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + 0 + 0 + + + + + 310 + 190 + + + + OpenHandCursor + + + margin-right: 0px; + + + 信息管理 + + + + 60 + 60 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + Qt::Horizontal + + + + 327 + 20 + + + + + + + + + 0 + 0 + + + + + 490 + 190 + + + + OpenHandCursor + + + + + + 自动核查 + + + + 60 + 60 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + + 0 + 0 + + + + + 490 + 190 + + + + OpenHandCursor + + + + + + 自动检定 + + + + 60 + 60 + + + + false + + + false + + + Qt::ToolButtonTextUnderIcon + + + + + + + + 0 + 0 + + + + + 490 + 190 + + + + OpenHandCursor + + + + + + 核查程序管理 + + + + 60 + 60 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + Qt::Horizontal + + + + 327 + 20 + + + + + + + + + 0 + 0 + + + + + 310 + 190 + + + + OpenHandCursor + + + margin-right: 0px; + + + 数据同步 + + + + 60 + 60 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + Qt::Vertical + + + QSizePolicy::Fixed + + + + 20 + 120 + + + + + + + + Qt::Vertical + + + QSizePolicy::Fixed + + + + 20 + 120 + + + + + + + + + 0 + 0 + + + + + 490 + 190 + + + + OpenHandCursor + + + + + + 检定程序管理 + + + + 60 + 60 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + + + + + + 0 + 0 + + + + + 10 + 10 + + + + color: white; +font-weight: bold; +font-size: 14pt; + + + 欢迎您! 用户: admin + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + Qt::Horizontal + + + QSizePolicy::Fixed + + + + 270 + 20 + + + + + + + + + + + btnConfig + btnData + tbtnMain1 + tbtnMain2 + tbtnMain3 + tbtnConfig1 + tbtnConfig2 + tbtnConfig3 + tbtnConfig4 + tbtnConfig5 + tbtnConfig6 + btnMain + btnHelp + btnExit + + + + diff --git a/softwareDirectory/AutoVerScheme/loginwindow.cpp b/softwareDirectory/AutoVerScheme/loginwindow.cpp new file mode 100644 index 0000000..155988a --- /dev/null +++ b/softwareDirectory/AutoVerScheme/loginwindow.cpp @@ -0,0 +1,68 @@ +#include "loginwindow.h" +#include "ui_loginwindow.h" +#include +#include +#include + +#include "indexwindow.h" + +loginWindow::loginWindow(QWidget *parent): QMainWindow(parent), ui(new Ui::loginWindow) +{ + ui->setupUi(this); + this->initForm(); + ui->label->styleSheet(); + +} + +loginWindow::~loginWindow() +{ + delete ui; +} +void loginWindow::initForm() +{ + //this->setWindowFlags(Qt::FramelessWindowHint); + //调用样式 + loadStyle(":/qss/login.css"); +} + +void loginWindow::loadStyle(const QString &qssFile) +{ + //加载样式表 + QString qss; + + QFile file(qssFile); + + if (file.open(QFile::ReadOnly)) { + //用QTextStream读取样式文件不用区分文件编码 带bom也行 + QStringList list; + QTextStream in(&file); + //in.setCodec("utf-8"); + while (!in.atEnd()) { + QString line; + in >> line; + list << line; + } + + file.close(); + qss = list.join("\n"); + QString paletteColor = qss.mid(20, 7); + qApp->setPalette(QPalette(paletteColor)); + //用时主要在下面这句 + qApp->setStyleSheet(qss); + } + + +} + + +void loginWindow::on_Button_login_clicked() +{ + QMessageBox::information(this, "提示", "登录成功!"); + //查询数据库内是否有账号 + IndexWindow *indexWindow = new IndexWindow; + indexWindow->setWindowState(Qt::WindowMaximized); + indexWindow->show(); + this->close(); + +} + diff --git a/softwareDirectory/AutoVerScheme/loginwindow.h b/softwareDirectory/AutoVerScheme/loginwindow.h new file mode 100644 index 0000000..2695bc3 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/loginwindow.h @@ -0,0 +1,31 @@ +#ifndef MAINWINDOW_H +#define MAINWINDOW_H + +#include +#include + + + +namespace Ui { +class loginWindow; +} + +class loginWindow : public QMainWindow +{ + Q_OBJECT + +public: + explicit loginWindow(QWidget *parent = 0); + ~loginWindow(); +private slots: + void initForm(); + void loadStyle(const QString &qssFile); + void on_Button_login_clicked(); + + +private: + Ui::loginWindow *ui; +private: + QSqlQuery query; +}; +#endif // MAINWINDOW_H diff --git a/softwareDirectory/AutoVerScheme/loginwindow.ui b/softwareDirectory/AutoVerScheme/loginwindow.ui new file mode 100644 index 0000000..ca04751 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/loginwindow.ui @@ -0,0 +1,234 @@ + + + loginWindow + + + + 0 + 0 + 954 + 603 + + + + MainWindow + + + background-color: rgb(255, 255, 255) + + + + + + 110 + 110 + 271 + 231 + + + + background-image: url(:/image/login/u9.png); +background-repeat: no-repeat; background-position: center; +background-color: transparent; + + + + + + + + + 0 + 10 + 491 + 601 + + + + background-image: url(:/image/login/u2.png); +background-repeat: no-repeat; +background-color: transparent; +background-repeat: no-repeat; +background-position: center; +background-size: 100%; + + + + + + + + + 5 + 10 + 491 + 569 + + + + background-image: url(:/image/login/u0.png); +background-repeat: no-repeat; background-position: center; + + + + + + 170 + 350 + 241 + 51 + + + + background-color: transparent; + + + Metrology + + + + + + 490 + 10 + 471 + 571 + + + + + + + 610 + 70 + 271 + 61 + + + + 自动检定软件 + + + + + + 540 + 200 + 61 + 61 + + + + + + + + + + 490 + 10 + 461 + 571 + + + + + + + 540 + 290 + 61 + 61 + + + + + + + + + + 540 + 430 + 341 + 81 + + + + OpenHandCursor + + + + + + 登 录 + + + + + + 610 + 210 + 221 + 41 + + + + 请输入账号 + + + + + + 610 + 300 + 221 + 41 + + + + 请输入账号 + + + + + + 507 + 1 + 72 + 16 + + + + + + + label_4 + graphicsView + label_2 + label_3 + graphicsView_2 + textBrowser + lab_title + textBrowser_2 + textBrowser_3 + Button_login + textEdit_acc + textEdit_pass + label + + + + + 0 + 0 + 954 + 25 + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/main.cpp b/softwareDirectory/AutoVerScheme/main.cpp new file mode 100644 index 0000000..16b6d3f --- /dev/null +++ b/softwareDirectory/AutoVerScheme/main.cpp @@ -0,0 +1,23 @@ +#include "loginwindow.h" +#include "mainwindow.h" +#include +#include "indexWindow.h" +#include "testview.h" + +int main(int argc, char *argv[]) +{ + QApplication a(argc, argv); + // 加载外部的CSS文件 + a.setStyleSheet("file:///path/to/styles.css"); + //设置字体 + QFont font; + font.setFamily("Microsoft Yahei"); + font.setPixelSize(13); + a.setFont(font); + + //TestView s; + //s.show(); + loginWindow w; + w.show(); + return a.exec(); +} diff --git a/softwareDirectory/AutoVerScheme/mainwindow.cpp b/softwareDirectory/AutoVerScheme/mainwindow.cpp new file mode 100644 index 0000000..12d07c0 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/mainwindow.cpp @@ -0,0 +1,14 @@ +#include "mainwindow.h" +#include "ui_mainwindow.h" + +MainWindow::MainWindow(QWidget *parent) : + QMainWindow(parent), + ui(new Ui::MainWindow) +{ + ui->setupUi(this); +} + +MainWindow::~MainWindow() +{ + delete ui; +} diff --git a/softwareDirectory/AutoVerScheme/mainwindow.h b/softwareDirectory/AutoVerScheme/mainwindow.h new file mode 100644 index 0000000..40fd472 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/mainwindow.h @@ -0,0 +1,22 @@ +#ifndef MAINWINDOW_H +#define MAINWINDOW_H + +#include + +namespace Ui { +class MainWindow; +} + +class MainWindow : public QMainWindow +{ + Q_OBJECT + +public: + explicit MainWindow(QWidget *parent = nullptr); + ~MainWindow(); + +private: + Ui::MainWindow *ui; +}; + +#endif // MAINWINDOW_H diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro new file mode 100644 index 0000000..5b8f852 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro @@ -0,0 +1,48 @@ +QT += core gui +QT += sql +greaterThan(QT_MAJOR_VERSION, 4): QT += widgets + +CONFIG += c++11 + +# The following define makes your compiler emit warnings if you use +# any Qt feature that has been marked deprecated (the exact warnings +# depend on your compiler). Please consult the documentation of the +# deprecated API in order to know how to port your code away from it. +DEFINES += QT_DEPRECATED_WARNINGS + +# You can also make your code fail to compile if it uses deprecated APIs. +# In order to do so, uncomment the following line. +# You can also select to disable deprecated APIs only up to a certain version of Qt. +#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 + +SOURCES += \ + indexwindow.cpp \ + loginwindow.cpp \ + main.cpp \ + mainwindow.cpp \ + testview.cpp + +HEADERS += \ + indexwindow.h \ + loginwindow.h \ + mainwindow.h \ + testview.h + +FORMS += \ + indexwindow.ui \ + loginwindow.ui \ + mainwindow.ui \ + testview.ui + +# Default rules for deployment. +qnx: target.path = /tmp/$${TARGET}/bin +else: unix:!android: target.path = /opt/$${TARGET}/bin +!isEmpty(target.path): INSTALLS += target + +RESOURCES += \ + res/qss.qrc \ + res/res.qrc + +DISTFILES += \ + res/image/u2.png + diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user new file mode 100644 index 0000000..1f5ec64 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user @@ -0,0 +1,562 @@ + + + + + + EnvironmentId + {c08df58c-84a7-4965-bca6-e98789474efa} + + + ProjectExplorer.Project.ActiveTarget + 0 + + + ProjectExplorer.Project.EditorSettings + + true + false + true + + Cpp + + CppGlobal + + + + QmlJS + + QmlJSGlobal + + + 2 + UTF-8 + false + 4 + false + 80 + true + true + 1 + true + false + 0 + true + true + 0 + 8 + true + 1 + true + true + true + false + + + + ProjectExplorer.Project.PluginSettings + + + -fno-delayed-template-parsing + + true + + + + ProjectExplorer.Project.Target.0 + + Desktop Qt 5.14.2 MinGW 64-bit + Desktop Qt 5.14.2 MinGW 64-bit + qt.qt5.5142.win64_mingw73_kit + 0 + 0 + 0 + + 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 + 0 + 0 + 0 + + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug + + + true + QtProjectManager.QMakeBuildStep + true + + false + false + false + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Debug + Qt4ProjectManager.Qt4BuildConfiguration + 2 + + + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Release + + + true + QtProjectManager.QMakeBuildStep + false + + false + false + true + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Release + Qt4ProjectManager.Qt4BuildConfiguration + 0 + + + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Profile + + + true + QtProjectManager.QMakeBuildStep + true + + false + true + true + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Profile + Qt4ProjectManager.Qt4BuildConfiguration + 0 + + 3 + + + 0 + Deploy + Deploy + ProjectExplorer.BuildSteps.Deploy + + 1 + ProjectExplorer.DefaultDeployConfiguration + + 1 + + + dwarf + + cpu-cycles + + + 250 + + -e + cpu-cycles + --call-graph + dwarf,4096 + -F + 250 + + -F + true + 4096 + false + false + 1000 + + true + + false + false + false + false + true + 0.01 + 10 + true + kcachegrind + 1 + 25 + + 1 + true + false + true + valgrind + + 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + + 2 + + Qt4ProjectManager.Qt4RunConfiguration:D:/Auto_verification_scheme/AutoVerScheme/AutoVerScheme.pro + D:/Auto_verification_scheme/AutoVerScheme/AutoVerScheme.pro + + false + + false + true + true + false + false + true + + + + 1 + + + + ProjectExplorer.Project.TargetCount + 2 + + + ProjectExplorer.Project.Updater.FileVersion + 22 + + + Version + 22 + + diff --git a/softwareDirectory/AutoVerScheme/indexwindow.cpp b/softwareDirectory/AutoVerScheme/indexwindow.cpp new file mode 100644 index 0000000..3e52c7b --- /dev/null +++ b/softwareDirectory/AutoVerScheme/indexwindow.cpp @@ -0,0 +1,55 @@ +#include "indexwindow.h" +#include "ui_indexwindow.h" +#include "QFile" +#include "QTextStream" + +IndexWindow::IndexWindow(QWidget *parent) : + QMainWindow(parent), + ui(new Ui::IndexWindow) +{ + ui->setupUi(this); + this->initForm(); +} + +IndexWindow::~IndexWindow() +{ + delete ui; +} +void IndexWindow::initForm() +{ + //this->setWindowFlags(Qt::FramelessWindowHint); + //调用样式 + loadStyle(":/qss/Index.css"); + +} + +void IndexWindow::loadStyle(const QString &qssFile) +{ + //加载样式表 + QString qss; + + QFile file(qssFile); + + if (file.open(QFile::ReadOnly)) { + //用QTextStream读取样式文件不用区分文件编码 带bom也行 + QStringList list; + QTextStream in(&file); + //in.setCodec("utf-8"); + while (!in.atEnd()) { + QString line; + in >> line; + list << line; + } + + file.close(); + qss = list.join("\n"); + QString paletteColor = qss.mid(20, 7); + qApp->setPalette(QPalette(paletteColor)); + //用时主要在下面这句 + qApp->setStyleSheet(qss); + } + + +} + + diff --git a/softwareDirectory/AutoVerScheme/indexwindow.h b/softwareDirectory/AutoVerScheme/indexwindow.h new file mode 100644 index 0000000..2aee958 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/indexwindow.h @@ -0,0 +1,26 @@ +#ifndef INDEXWINDOW_H +#define INDEXWINDOW_H + +#include + +namespace Ui { +class IndexWindow; +} + +class IndexWindow : public QMainWindow +{ + Q_OBJECT + +public: + explicit IndexWindow(QWidget *parent = nullptr); + ~IndexWindow(); +private slots: + void initForm(); + void loadStyle(const QString &qssFile); + + +private: + Ui::IndexWindow *ui; +}; + +#endif // INDEXWINDOW_H diff --git a/softwareDirectory/AutoVerScheme/indexwindow.ui b/softwareDirectory/AutoVerScheme/indexwindow.ui new file mode 100644 index 0000000..d7153e0 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/indexwindow.ui @@ -0,0 +1,539 @@ + + + IndexWindow + + + Qt::NonModal + + + + 0 + 0 + 1334 + 789 + + + + + 0 + 0 + + + + MainWindow + + + + + + + 100 + 100 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + 6 + + + QLayout::SetFixedSize + + + 0 + + + 0 + + + + + Qt::Horizontal + + + QSizePolicy::Fixed + + + + 120 + 13 + + + + + + + + + 0 + 0 + + + + + 560 + 0 + + + + Qt::DefaultContextMenu + + + color: white; +font-weight: bold; +font-size: 24pt; + + + + + QFrame::NoFrame + + + QFrame::Plain + + + 自动检定系统 + + + Qt::AutoText + + + false + + + Qt::AlignCenter + + + + + + + Qt::Horizontal + + + QSizePolicy::Fixed + + + + 40 + 13 + + + + + + + + + + Qt::Vertical + + + QSizePolicy::Fixed + + + + 50 + 80 + + + + + + + + + + Qt::Vertical + + + QSizePolicy::Fixed + + + + 20 + 120 + + + + + + + + Qt::Horizontal + + + + 100 + 20 + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + 0 + 0 + + + + + 310 + 190 + + + + OpenHandCursor + + + margin-right: 0px; + + + 信息管理 + + + + 60 + 60 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + Qt::Horizontal + + + + 327 + 20 + + + + + + + + + 0 + 0 + + + + + 490 + 190 + + + + OpenHandCursor + + + + + + 自动核查 + + + + 60 + 60 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + + 0 + 0 + + + + + 490 + 190 + + + + OpenHandCursor + + + + + + 自动检定 + + + + 60 + 60 + + + + false + + + false + + + Qt::ToolButtonTextUnderIcon + + + + + + + + 0 + 0 + + + + + 490 + 190 + + + + OpenHandCursor + + + + + + 核查程序管理 + + + + 60 + 60 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + Qt::Horizontal + + + + 327 + 20 + + + + + + + + + 0 + 0 + + + + + 310 + 190 + + + + OpenHandCursor + + + margin-right: 0px; + + + 数据同步 + + + + 60 + 60 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + Qt::Vertical + + + QSizePolicy::Fixed + + + + 20 + 120 + + + + + + + + Qt::Vertical + + + QSizePolicy::Fixed + + + + 20 + 120 + + + + + + + + + 0 + 0 + + + + + 490 + 190 + + + + OpenHandCursor + + + + + + 检定程序管理 + + + + 60 + 60 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + + + + + + 0 + 0 + + + + + 10 + 10 + + + + color: white; +font-weight: bold; +font-size: 14pt; + + + 欢迎您! 用户: admin + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + Qt::Horizontal + + + QSizePolicy::Fixed + + + + 270 + 20 + + + + + + + + + + + btnConfig + btnData + tbtnMain1 + tbtnMain2 + tbtnMain3 + tbtnConfig1 + tbtnConfig2 + tbtnConfig3 + tbtnConfig4 + tbtnConfig5 + tbtnConfig6 + btnMain + btnHelp + btnExit + + + + diff --git a/softwareDirectory/AutoVerScheme/loginwindow.cpp b/softwareDirectory/AutoVerScheme/loginwindow.cpp new file mode 100644 index 0000000..155988a --- /dev/null +++ b/softwareDirectory/AutoVerScheme/loginwindow.cpp @@ -0,0 +1,68 @@ +#include "loginwindow.h" +#include "ui_loginwindow.h" +#include +#include +#include + +#include "indexwindow.h" + +loginWindow::loginWindow(QWidget *parent): QMainWindow(parent), ui(new Ui::loginWindow) +{ + ui->setupUi(this); + this->initForm(); + ui->label->styleSheet(); + +} + +loginWindow::~loginWindow() +{ + delete ui; +} +void loginWindow::initForm() +{ + //this->setWindowFlags(Qt::FramelessWindowHint); + //调用样式 + loadStyle(":/qss/login.css"); +} + +void loginWindow::loadStyle(const QString &qssFile) +{ + //加载样式表 + QString qss; + + QFile file(qssFile); + + if (file.open(QFile::ReadOnly)) { + //用QTextStream读取样式文件不用区分文件编码 带bom也行 + QStringList list; + QTextStream in(&file); + //in.setCodec("utf-8"); + while (!in.atEnd()) { + QString line; + in >> line; + list << line; + } + + file.close(); + qss = list.join("\n"); + QString paletteColor = qss.mid(20, 7); + qApp->setPalette(QPalette(paletteColor)); + //用时主要在下面这句 + qApp->setStyleSheet(qss); + } + + +} + + +void loginWindow::on_Button_login_clicked() +{ + QMessageBox::information(this, "提示", "登录成功!"); + //查询数据库内是否有账号 + IndexWindow *indexWindow = new IndexWindow; + indexWindow->setWindowState(Qt::WindowMaximized); + indexWindow->show(); + this->close(); + +} + diff --git a/softwareDirectory/AutoVerScheme/loginwindow.h b/softwareDirectory/AutoVerScheme/loginwindow.h new file mode 100644 index 0000000..2695bc3 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/loginwindow.h @@ -0,0 +1,31 @@ +#ifndef MAINWINDOW_H +#define MAINWINDOW_H + +#include +#include + + + +namespace Ui { +class loginWindow; +} + +class loginWindow : public QMainWindow +{ + Q_OBJECT + +public: + explicit loginWindow(QWidget *parent = 0); + ~loginWindow(); +private slots: + void initForm(); + void loadStyle(const QString &qssFile); + void on_Button_login_clicked(); + + +private: + Ui::loginWindow *ui; +private: + QSqlQuery query; +}; +#endif // MAINWINDOW_H diff --git a/softwareDirectory/AutoVerScheme/loginwindow.ui b/softwareDirectory/AutoVerScheme/loginwindow.ui new file mode 100644 index 0000000..ca04751 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/loginwindow.ui @@ -0,0 +1,234 @@ + + + loginWindow + + + + 0 + 0 + 954 + 603 + + + + MainWindow + + + background-color: rgb(255, 255, 255) + + + + + + 110 + 110 + 271 + 231 + + + + background-image: url(:/image/login/u9.png); +background-repeat: no-repeat; background-position: center; +background-color: transparent; + + + + + + + + + 0 + 10 + 491 + 601 + + + + background-image: url(:/image/login/u2.png); +background-repeat: no-repeat; +background-color: transparent; +background-repeat: no-repeat; +background-position: center; +background-size: 100%; + + + + + + + + + 5 + 10 + 491 + 569 + + + + background-image: url(:/image/login/u0.png); +background-repeat: no-repeat; background-position: center; + + + + + + 170 + 350 + 241 + 51 + + + + background-color: transparent; + + + Metrology + + + + + + 490 + 10 + 471 + 571 + + + + + + + 610 + 70 + 271 + 61 + + + + 自动检定软件 + + + + + + 540 + 200 + 61 + 61 + + + + + + + + + + 490 + 10 + 461 + 571 + + + + + + + 540 + 290 + 61 + 61 + + + + + + + + + + 540 + 430 + 341 + 81 + + + + OpenHandCursor + + + + + + 登 录 + + + + + + 610 + 210 + 221 + 41 + + + + 请输入账号 + + + + + + 610 + 300 + 221 + 41 + + + + 请输入账号 + + + + + + 507 + 1 + 72 + 16 + + + + + + + label_4 + graphicsView + label_2 + label_3 + graphicsView_2 + textBrowser + lab_title + textBrowser_2 + textBrowser_3 + Button_login + textEdit_acc + textEdit_pass + label + + + + + 0 + 0 + 954 + 25 + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/main.cpp b/softwareDirectory/AutoVerScheme/main.cpp new file mode 100644 index 0000000..16b6d3f --- /dev/null +++ b/softwareDirectory/AutoVerScheme/main.cpp @@ -0,0 +1,23 @@ +#include "loginwindow.h" +#include "mainwindow.h" +#include +#include "indexWindow.h" +#include "testview.h" + +int main(int argc, char *argv[]) +{ + QApplication a(argc, argv); + // 加载外部的CSS文件 + a.setStyleSheet("file:///path/to/styles.css"); + //设置字体 + QFont font; + font.setFamily("Microsoft Yahei"); + font.setPixelSize(13); + a.setFont(font); + + //TestView s; + //s.show(); + loginWindow w; + w.show(); + return a.exec(); +} diff --git a/softwareDirectory/AutoVerScheme/mainwindow.cpp b/softwareDirectory/AutoVerScheme/mainwindow.cpp new file mode 100644 index 0000000..12d07c0 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/mainwindow.cpp @@ -0,0 +1,14 @@ +#include "mainwindow.h" +#include "ui_mainwindow.h" + +MainWindow::MainWindow(QWidget *parent) : + QMainWindow(parent), + ui(new Ui::MainWindow) +{ + ui->setupUi(this); +} + +MainWindow::~MainWindow() +{ + delete ui; +} diff --git a/softwareDirectory/AutoVerScheme/mainwindow.h b/softwareDirectory/AutoVerScheme/mainwindow.h new file mode 100644 index 0000000..40fd472 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/mainwindow.h @@ -0,0 +1,22 @@ +#ifndef MAINWINDOW_H +#define MAINWINDOW_H + +#include + +namespace Ui { +class MainWindow; +} + +class MainWindow : public QMainWindow +{ + Q_OBJECT + +public: + explicit MainWindow(QWidget *parent = nullptr); + ~MainWindow(); + +private: + Ui::MainWindow *ui; +}; + +#endif // MAINWINDOW_H diff --git a/softwareDirectory/AutoVerScheme/mainwindow.ui b/softwareDirectory/AutoVerScheme/mainwindow.ui new file mode 100644 index 0000000..dd4f1c8 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/mainwindow.ui @@ -0,0 +1,24 @@ + + + + + MainWindow + + + + 0 + 0 + 800 + 600 + + + + MainWindow + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro new file mode 100644 index 0000000..5b8f852 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro @@ -0,0 +1,48 @@ +QT += core gui +QT += sql +greaterThan(QT_MAJOR_VERSION, 4): QT += widgets + +CONFIG += c++11 + +# The following define makes your compiler emit warnings if you use +# any Qt feature that has been marked deprecated (the exact warnings +# depend on your compiler). Please consult the documentation of the +# deprecated API in order to know how to port your code away from it. +DEFINES += QT_DEPRECATED_WARNINGS + +# You can also make your code fail to compile if it uses deprecated APIs. +# In order to do so, uncomment the following line. +# You can also select to disable deprecated APIs only up to a certain version of Qt. +#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 + +SOURCES += \ + indexwindow.cpp \ + loginwindow.cpp \ + main.cpp \ + mainwindow.cpp \ + testview.cpp + +HEADERS += \ + indexwindow.h \ + loginwindow.h \ + mainwindow.h \ + testview.h + +FORMS += \ + indexwindow.ui \ + loginwindow.ui \ + mainwindow.ui \ + testview.ui + +# Default rules for deployment. +qnx: target.path = /tmp/$${TARGET}/bin +else: unix:!android: target.path = /opt/$${TARGET}/bin +!isEmpty(target.path): INSTALLS += target + +RESOURCES += \ + res/qss.qrc \ + res/res.qrc + +DISTFILES += \ + res/image/u2.png + diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user new file mode 100644 index 0000000..1f5ec64 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user @@ -0,0 +1,562 @@ + + + + + + EnvironmentId + {c08df58c-84a7-4965-bca6-e98789474efa} + + + ProjectExplorer.Project.ActiveTarget + 0 + + + ProjectExplorer.Project.EditorSettings + + true + false + true + + Cpp + + CppGlobal + + + + QmlJS + + QmlJSGlobal + + + 2 + UTF-8 + false + 4 + false + 80 + true + true + 1 + true + false + 0 + true + true + 0 + 8 + true + 1 + true + true + true + false + + + + ProjectExplorer.Project.PluginSettings + + + -fno-delayed-template-parsing + + true + + + + ProjectExplorer.Project.Target.0 + + Desktop Qt 5.14.2 MinGW 64-bit + Desktop Qt 5.14.2 MinGW 64-bit + qt.qt5.5142.win64_mingw73_kit + 0 + 0 + 0 + + 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 + 0 + 0 + 0 + + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug + + + true + QtProjectManager.QMakeBuildStep + true + + false + false + false + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Debug + Qt4ProjectManager.Qt4BuildConfiguration + 2 + + + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Release + + + true + QtProjectManager.QMakeBuildStep + false + + false + false + true + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Release + Qt4ProjectManager.Qt4BuildConfiguration + 0 + + + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Profile + + + true + QtProjectManager.QMakeBuildStep + true + + false + true + true + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Profile + Qt4ProjectManager.Qt4BuildConfiguration + 0 + + 3 + + + 0 + Deploy + Deploy + ProjectExplorer.BuildSteps.Deploy + + 1 + ProjectExplorer.DefaultDeployConfiguration + + 1 + + + dwarf + + cpu-cycles + + + 250 + + -e + cpu-cycles + --call-graph + dwarf,4096 + -F + 250 + + -F + true + 4096 + false + false + 1000 + + true + + false + false + false + false + true + 0.01 + 10 + true + kcachegrind + 1 + 25 + + 1 + true + false + true + valgrind + + 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + + 2 + + Qt4ProjectManager.Qt4RunConfiguration:D:/Auto_verification_scheme/AutoVerScheme/AutoVerScheme.pro + D:/Auto_verification_scheme/AutoVerScheme/AutoVerScheme.pro + + false + + false + true + true + false + false + true + + + + 1 + + + + ProjectExplorer.Project.TargetCount + 2 + + + ProjectExplorer.Project.Updater.FileVersion + 22 + + + Version + 22 + + diff --git a/softwareDirectory/AutoVerScheme/indexwindow.cpp b/softwareDirectory/AutoVerScheme/indexwindow.cpp new file mode 100644 index 0000000..3e52c7b --- /dev/null +++ b/softwareDirectory/AutoVerScheme/indexwindow.cpp @@ -0,0 +1,55 @@ +#include "indexwindow.h" +#include "ui_indexwindow.h" +#include "QFile" +#include "QTextStream" + +IndexWindow::IndexWindow(QWidget *parent) : + QMainWindow(parent), + ui(new Ui::IndexWindow) +{ + ui->setupUi(this); + this->initForm(); +} + +IndexWindow::~IndexWindow() +{ + delete ui; +} +void IndexWindow::initForm() +{ + //this->setWindowFlags(Qt::FramelessWindowHint); + //调用样式 + loadStyle(":/qss/Index.css"); + +} + +void IndexWindow::loadStyle(const QString &qssFile) +{ + //加载样式表 + QString qss; + + QFile file(qssFile); + + if (file.open(QFile::ReadOnly)) { + //用QTextStream读取样式文件不用区分文件编码 带bom也行 + QStringList list; + QTextStream in(&file); + //in.setCodec("utf-8"); + while (!in.atEnd()) { + QString line; + in >> line; + list << line; + } + + file.close(); + qss = list.join("\n"); + QString paletteColor = qss.mid(20, 7); + qApp->setPalette(QPalette(paletteColor)); + //用时主要在下面这句 + qApp->setStyleSheet(qss); + } + + +} + + diff --git a/softwareDirectory/AutoVerScheme/indexwindow.h b/softwareDirectory/AutoVerScheme/indexwindow.h new file mode 100644 index 0000000..2aee958 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/indexwindow.h @@ -0,0 +1,26 @@ +#ifndef INDEXWINDOW_H +#define INDEXWINDOW_H + +#include + +namespace Ui { +class IndexWindow; +} + +class IndexWindow : public QMainWindow +{ + Q_OBJECT + +public: + explicit IndexWindow(QWidget *parent = nullptr); + ~IndexWindow(); +private slots: + void initForm(); + void loadStyle(const QString &qssFile); + + +private: + Ui::IndexWindow *ui; +}; + +#endif // INDEXWINDOW_H diff --git a/softwareDirectory/AutoVerScheme/indexwindow.ui b/softwareDirectory/AutoVerScheme/indexwindow.ui new file mode 100644 index 0000000..d7153e0 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/indexwindow.ui @@ -0,0 +1,539 @@ + + + IndexWindow + + + Qt::NonModal + + + + 0 + 0 + 1334 + 789 + + + + + 0 + 0 + + + + MainWindow + + + + + + + 100 + 100 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + 6 + + + QLayout::SetFixedSize + + + 0 + + + 0 + + + + + Qt::Horizontal + + + QSizePolicy::Fixed + + + + 120 + 13 + + + + + + + + + 0 + 0 + + + + + 560 + 0 + + + + Qt::DefaultContextMenu + + + color: white; +font-weight: bold; +font-size: 24pt; + + + + + QFrame::NoFrame + + + QFrame::Plain + + + 自动检定系统 + + + Qt::AutoText + + + false + + + Qt::AlignCenter + + + + + + + Qt::Horizontal + + + QSizePolicy::Fixed + + + + 40 + 13 + + + + + + + + + + Qt::Vertical + + + QSizePolicy::Fixed + + + + 50 + 80 + + + + + + + + + + Qt::Vertical + + + QSizePolicy::Fixed + + + + 20 + 120 + + + + + + + + Qt::Horizontal + + + + 100 + 20 + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + 0 + 0 + + + + + 310 + 190 + + + + OpenHandCursor + + + margin-right: 0px; + + + 信息管理 + + + + 60 + 60 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + Qt::Horizontal + + + + 327 + 20 + + + + + + + + + 0 + 0 + + + + + 490 + 190 + + + + OpenHandCursor + + + + + + 自动核查 + + + + 60 + 60 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + + 0 + 0 + + + + + 490 + 190 + + + + OpenHandCursor + + + + + + 自动检定 + + + + 60 + 60 + + + + false + + + false + + + Qt::ToolButtonTextUnderIcon + + + + + + + + 0 + 0 + + + + + 490 + 190 + + + + OpenHandCursor + + + + + + 核查程序管理 + + + + 60 + 60 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + Qt::Horizontal + + + + 327 + 20 + + + + + + + + + 0 + 0 + + + + + 310 + 190 + + + + OpenHandCursor + + + margin-right: 0px; + + + 数据同步 + + + + 60 + 60 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + Qt::Vertical + + + QSizePolicy::Fixed + + + + 20 + 120 + + + + + + + + Qt::Vertical + + + QSizePolicy::Fixed + + + + 20 + 120 + + + + + + + + + 0 + 0 + + + + + 490 + 190 + + + + OpenHandCursor + + + + + + 检定程序管理 + + + + 60 + 60 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + + + + + + 0 + 0 + + + + + 10 + 10 + + + + color: white; +font-weight: bold; +font-size: 14pt; + + + 欢迎您! 用户: admin + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + Qt::Horizontal + + + QSizePolicy::Fixed + + + + 270 + 20 + + + + + + + + + + + btnConfig + btnData + tbtnMain1 + tbtnMain2 + tbtnMain3 + tbtnConfig1 + tbtnConfig2 + tbtnConfig3 + tbtnConfig4 + tbtnConfig5 + tbtnConfig6 + btnMain + btnHelp + btnExit + + + + diff --git a/softwareDirectory/AutoVerScheme/loginwindow.cpp b/softwareDirectory/AutoVerScheme/loginwindow.cpp new file mode 100644 index 0000000..155988a --- /dev/null +++ b/softwareDirectory/AutoVerScheme/loginwindow.cpp @@ -0,0 +1,68 @@ +#include "loginwindow.h" +#include "ui_loginwindow.h" +#include +#include +#include + +#include "indexwindow.h" + +loginWindow::loginWindow(QWidget *parent): QMainWindow(parent), ui(new Ui::loginWindow) +{ + ui->setupUi(this); + this->initForm(); + ui->label->styleSheet(); + +} + +loginWindow::~loginWindow() +{ + delete ui; +} +void loginWindow::initForm() +{ + //this->setWindowFlags(Qt::FramelessWindowHint); + //调用样式 + loadStyle(":/qss/login.css"); +} + +void loginWindow::loadStyle(const QString &qssFile) +{ + //加载样式表 + QString qss; + + QFile file(qssFile); + + if (file.open(QFile::ReadOnly)) { + //用QTextStream读取样式文件不用区分文件编码 带bom也行 + QStringList list; + QTextStream in(&file); + //in.setCodec("utf-8"); + while (!in.atEnd()) { + QString line; + in >> line; + list << line; + } + + file.close(); + qss = list.join("\n"); + QString paletteColor = qss.mid(20, 7); + qApp->setPalette(QPalette(paletteColor)); + //用时主要在下面这句 + qApp->setStyleSheet(qss); + } + + +} + + +void loginWindow::on_Button_login_clicked() +{ + QMessageBox::information(this, "提示", "登录成功!"); + //查询数据库内是否有账号 + IndexWindow *indexWindow = new IndexWindow; + indexWindow->setWindowState(Qt::WindowMaximized); + indexWindow->show(); + this->close(); + +} + diff --git a/softwareDirectory/AutoVerScheme/loginwindow.h b/softwareDirectory/AutoVerScheme/loginwindow.h new file mode 100644 index 0000000..2695bc3 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/loginwindow.h @@ -0,0 +1,31 @@ +#ifndef MAINWINDOW_H +#define MAINWINDOW_H + +#include +#include + + + +namespace Ui { +class loginWindow; +} + +class loginWindow : public QMainWindow +{ + Q_OBJECT + +public: + explicit loginWindow(QWidget *parent = 0); + ~loginWindow(); +private slots: + void initForm(); + void loadStyle(const QString &qssFile); + void on_Button_login_clicked(); + + +private: + Ui::loginWindow *ui; +private: + QSqlQuery query; +}; +#endif // MAINWINDOW_H diff --git a/softwareDirectory/AutoVerScheme/loginwindow.ui b/softwareDirectory/AutoVerScheme/loginwindow.ui new file mode 100644 index 0000000..ca04751 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/loginwindow.ui @@ -0,0 +1,234 @@ + + + loginWindow + + + + 0 + 0 + 954 + 603 + + + + MainWindow + + + background-color: rgb(255, 255, 255) + + + + + + 110 + 110 + 271 + 231 + + + + background-image: url(:/image/login/u9.png); +background-repeat: no-repeat; background-position: center; +background-color: transparent; + + + + + + + + + 0 + 10 + 491 + 601 + + + + background-image: url(:/image/login/u2.png); +background-repeat: no-repeat; +background-color: transparent; +background-repeat: no-repeat; +background-position: center; +background-size: 100%; + + + + + + + + + 5 + 10 + 491 + 569 + + + + background-image: url(:/image/login/u0.png); +background-repeat: no-repeat; background-position: center; + + + + + + 170 + 350 + 241 + 51 + + + + background-color: transparent; + + + Metrology + + + + + + 490 + 10 + 471 + 571 + + + + + + + 610 + 70 + 271 + 61 + + + + 自动检定软件 + + + + + + 540 + 200 + 61 + 61 + + + + + + + + + + 490 + 10 + 461 + 571 + + + + + + + 540 + 290 + 61 + 61 + + + + + + + + + + 540 + 430 + 341 + 81 + + + + OpenHandCursor + + + + + + 登 录 + + + + + + 610 + 210 + 221 + 41 + + + + 请输入账号 + + + + + + 610 + 300 + 221 + 41 + + + + 请输入账号 + + + + + + 507 + 1 + 72 + 16 + + + + + + + label_4 + graphicsView + label_2 + label_3 + graphicsView_2 + textBrowser + lab_title + textBrowser_2 + textBrowser_3 + Button_login + textEdit_acc + textEdit_pass + label + + + + + 0 + 0 + 954 + 25 + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/main.cpp b/softwareDirectory/AutoVerScheme/main.cpp new file mode 100644 index 0000000..16b6d3f --- /dev/null +++ b/softwareDirectory/AutoVerScheme/main.cpp @@ -0,0 +1,23 @@ +#include "loginwindow.h" +#include "mainwindow.h" +#include +#include "indexWindow.h" +#include "testview.h" + +int main(int argc, char *argv[]) +{ + QApplication a(argc, argv); + // 加载外部的CSS文件 + a.setStyleSheet("file:///path/to/styles.css"); + //设置字体 + QFont font; + font.setFamily("Microsoft Yahei"); + font.setPixelSize(13); + a.setFont(font); + + //TestView s; + //s.show(); + loginWindow w; + w.show(); + return a.exec(); +} diff --git a/softwareDirectory/AutoVerScheme/mainwindow.cpp b/softwareDirectory/AutoVerScheme/mainwindow.cpp new file mode 100644 index 0000000..12d07c0 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/mainwindow.cpp @@ -0,0 +1,14 @@ +#include "mainwindow.h" +#include "ui_mainwindow.h" + +MainWindow::MainWindow(QWidget *parent) : + QMainWindow(parent), + ui(new Ui::MainWindow) +{ + ui->setupUi(this); +} + +MainWindow::~MainWindow() +{ + delete ui; +} diff --git a/softwareDirectory/AutoVerScheme/mainwindow.h b/softwareDirectory/AutoVerScheme/mainwindow.h new file mode 100644 index 0000000..40fd472 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/mainwindow.h @@ -0,0 +1,22 @@ +#ifndef MAINWINDOW_H +#define MAINWINDOW_H + +#include + +namespace Ui { +class MainWindow; +} + +class MainWindow : public QMainWindow +{ + Q_OBJECT + +public: + explicit MainWindow(QWidget *parent = nullptr); + ~MainWindow(); + +private: + Ui::MainWindow *ui; +}; + +#endif // MAINWINDOW_H diff --git a/softwareDirectory/AutoVerScheme/mainwindow.ui b/softwareDirectory/AutoVerScheme/mainwindow.ui new file mode 100644 index 0000000..dd4f1c8 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/mainwindow.ui @@ -0,0 +1,24 @@ + + + + + MainWindow + + + + 0 + 0 + 800 + 600 + + + + MainWindow + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u101.png b/softwareDirectory/AutoVerScheme/res/image/Index/u101.png new file mode 100644 index 0000000..9e371e3 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u101.png Binary files differ diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro new file mode 100644 index 0000000..5b8f852 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro @@ -0,0 +1,48 @@ +QT += core gui +QT += sql +greaterThan(QT_MAJOR_VERSION, 4): QT += widgets + +CONFIG += c++11 + +# The following define makes your compiler emit warnings if you use +# any Qt feature that has been marked deprecated (the exact warnings +# depend on your compiler). Please consult the documentation of the +# deprecated API in order to know how to port your code away from it. +DEFINES += QT_DEPRECATED_WARNINGS + +# You can also make your code fail to compile if it uses deprecated APIs. +# In order to do so, uncomment the following line. +# You can also select to disable deprecated APIs only up to a certain version of Qt. +#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 + +SOURCES += \ + indexwindow.cpp \ + loginwindow.cpp \ + main.cpp \ + mainwindow.cpp \ + testview.cpp + +HEADERS += \ + indexwindow.h \ + loginwindow.h \ + mainwindow.h \ + testview.h + +FORMS += \ + indexwindow.ui \ + loginwindow.ui \ + mainwindow.ui \ + testview.ui + +# Default rules for deployment. +qnx: target.path = /tmp/$${TARGET}/bin +else: unix:!android: target.path = /opt/$${TARGET}/bin +!isEmpty(target.path): INSTALLS += target + +RESOURCES += \ + res/qss.qrc \ + res/res.qrc + +DISTFILES += \ + res/image/u2.png + diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user new file mode 100644 index 0000000..1f5ec64 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user @@ -0,0 +1,562 @@ + + + + + + EnvironmentId + {c08df58c-84a7-4965-bca6-e98789474efa} + + + ProjectExplorer.Project.ActiveTarget + 0 + + + ProjectExplorer.Project.EditorSettings + + true + false + true + + Cpp + + CppGlobal + + + + QmlJS + + QmlJSGlobal + + + 2 + UTF-8 + false + 4 + false + 80 + true + true + 1 + true + false + 0 + true + true + 0 + 8 + true + 1 + true + true + true + false + + + + ProjectExplorer.Project.PluginSettings + + + -fno-delayed-template-parsing + + true + + + + ProjectExplorer.Project.Target.0 + + Desktop Qt 5.14.2 MinGW 64-bit + Desktop Qt 5.14.2 MinGW 64-bit + qt.qt5.5142.win64_mingw73_kit + 0 + 0 + 0 + + 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 + 0 + 0 + 0 + + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug + + + true + QtProjectManager.QMakeBuildStep + true + + false + false + false + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Debug + Qt4ProjectManager.Qt4BuildConfiguration + 2 + + + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Release + + + true + QtProjectManager.QMakeBuildStep + false + + false + false + true + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Release + Qt4ProjectManager.Qt4BuildConfiguration + 0 + + + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Profile + + + true + QtProjectManager.QMakeBuildStep + true + + false + true + true + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Profile + Qt4ProjectManager.Qt4BuildConfiguration + 0 + + 3 + + + 0 + Deploy + Deploy + ProjectExplorer.BuildSteps.Deploy + + 1 + ProjectExplorer.DefaultDeployConfiguration + + 1 + + + dwarf + + cpu-cycles + + + 250 + + -e + cpu-cycles + --call-graph + dwarf,4096 + -F + 250 + + -F + true + 4096 + false + false + 1000 + + true + + false + false + false + false + true + 0.01 + 10 + true + kcachegrind + 1 + 25 + + 1 + true + false + true + valgrind + + 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + + 2 + + Qt4ProjectManager.Qt4RunConfiguration:D:/Auto_verification_scheme/AutoVerScheme/AutoVerScheme.pro + D:/Auto_verification_scheme/AutoVerScheme/AutoVerScheme.pro + + false + + false + true + true + false + false + true + + + + 1 + + + + ProjectExplorer.Project.TargetCount + 2 + + + ProjectExplorer.Project.Updater.FileVersion + 22 + + + Version + 22 + + diff --git a/softwareDirectory/AutoVerScheme/indexwindow.cpp b/softwareDirectory/AutoVerScheme/indexwindow.cpp new file mode 100644 index 0000000..3e52c7b --- /dev/null +++ b/softwareDirectory/AutoVerScheme/indexwindow.cpp @@ -0,0 +1,55 @@ +#include "indexwindow.h" +#include "ui_indexwindow.h" +#include "QFile" +#include "QTextStream" + +IndexWindow::IndexWindow(QWidget *parent) : + QMainWindow(parent), + ui(new Ui::IndexWindow) +{ + ui->setupUi(this); + this->initForm(); +} + +IndexWindow::~IndexWindow() +{ + delete ui; +} +void IndexWindow::initForm() +{ + //this->setWindowFlags(Qt::FramelessWindowHint); + //调用样式 + loadStyle(":/qss/Index.css"); + +} + +void IndexWindow::loadStyle(const QString &qssFile) +{ + //加载样式表 + QString qss; + + QFile file(qssFile); + + if (file.open(QFile::ReadOnly)) { + //用QTextStream读取样式文件不用区分文件编码 带bom也行 + QStringList list; + QTextStream in(&file); + //in.setCodec("utf-8"); + while (!in.atEnd()) { + QString line; + in >> line; + list << line; + } + + file.close(); + qss = list.join("\n"); + QString paletteColor = qss.mid(20, 7); + qApp->setPalette(QPalette(paletteColor)); + //用时主要在下面这句 + qApp->setStyleSheet(qss); + } + + +} + + diff --git a/softwareDirectory/AutoVerScheme/indexwindow.h b/softwareDirectory/AutoVerScheme/indexwindow.h new file mode 100644 index 0000000..2aee958 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/indexwindow.h @@ -0,0 +1,26 @@ +#ifndef INDEXWINDOW_H +#define INDEXWINDOW_H + +#include + +namespace Ui { +class IndexWindow; +} + +class IndexWindow : public QMainWindow +{ + Q_OBJECT + +public: + explicit IndexWindow(QWidget *parent = nullptr); + ~IndexWindow(); +private slots: + void initForm(); + void loadStyle(const QString &qssFile); + + +private: + Ui::IndexWindow *ui; +}; + +#endif // INDEXWINDOW_H diff --git a/softwareDirectory/AutoVerScheme/indexwindow.ui b/softwareDirectory/AutoVerScheme/indexwindow.ui new file mode 100644 index 0000000..d7153e0 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/indexwindow.ui @@ -0,0 +1,539 @@ + + + IndexWindow + + + Qt::NonModal + + + + 0 + 0 + 1334 + 789 + + + + + 0 + 0 + + + + MainWindow + + + + + + + 100 + 100 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + 6 + + + QLayout::SetFixedSize + + + 0 + + + 0 + + + + + Qt::Horizontal + + + QSizePolicy::Fixed + + + + 120 + 13 + + + + + + + + + 0 + 0 + + + + + 560 + 0 + + + + Qt::DefaultContextMenu + + + color: white; +font-weight: bold; +font-size: 24pt; + + + + + QFrame::NoFrame + + + QFrame::Plain + + + 自动检定系统 + + + Qt::AutoText + + + false + + + Qt::AlignCenter + + + + + + + Qt::Horizontal + + + QSizePolicy::Fixed + + + + 40 + 13 + + + + + + + + + + Qt::Vertical + + + QSizePolicy::Fixed + + + + 50 + 80 + + + + + + + + + + Qt::Vertical + + + QSizePolicy::Fixed + + + + 20 + 120 + + + + + + + + Qt::Horizontal + + + + 100 + 20 + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + 0 + 0 + + + + + 310 + 190 + + + + OpenHandCursor + + + margin-right: 0px; + + + 信息管理 + + + + 60 + 60 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + Qt::Horizontal + + + + 327 + 20 + + + + + + + + + 0 + 0 + + + + + 490 + 190 + + + + OpenHandCursor + + + + + + 自动核查 + + + + 60 + 60 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + + 0 + 0 + + + + + 490 + 190 + + + + OpenHandCursor + + + + + + 自动检定 + + + + 60 + 60 + + + + false + + + false + + + Qt::ToolButtonTextUnderIcon + + + + + + + + 0 + 0 + + + + + 490 + 190 + + + + OpenHandCursor + + + + + + 核查程序管理 + + + + 60 + 60 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + Qt::Horizontal + + + + 327 + 20 + + + + + + + + + 0 + 0 + + + + + 310 + 190 + + + + OpenHandCursor + + + margin-right: 0px; + + + 数据同步 + + + + 60 + 60 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + Qt::Vertical + + + QSizePolicy::Fixed + + + + 20 + 120 + + + + + + + + Qt::Vertical + + + QSizePolicy::Fixed + + + + 20 + 120 + + + + + + + + + 0 + 0 + + + + + 490 + 190 + + + + OpenHandCursor + + + + + + 检定程序管理 + + + + 60 + 60 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + + + + + + 0 + 0 + + + + + 10 + 10 + + + + color: white; +font-weight: bold; +font-size: 14pt; + + + 欢迎您! 用户: admin + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + Qt::Horizontal + + + QSizePolicy::Fixed + + + + 270 + 20 + + + + + + + + + + + btnConfig + btnData + tbtnMain1 + tbtnMain2 + tbtnMain3 + tbtnConfig1 + tbtnConfig2 + tbtnConfig3 + tbtnConfig4 + tbtnConfig5 + tbtnConfig6 + btnMain + btnHelp + btnExit + + + + diff --git a/softwareDirectory/AutoVerScheme/loginwindow.cpp b/softwareDirectory/AutoVerScheme/loginwindow.cpp new file mode 100644 index 0000000..155988a --- /dev/null +++ b/softwareDirectory/AutoVerScheme/loginwindow.cpp @@ -0,0 +1,68 @@ +#include "loginwindow.h" +#include "ui_loginwindow.h" +#include +#include +#include + +#include "indexwindow.h" + +loginWindow::loginWindow(QWidget *parent): QMainWindow(parent), ui(new Ui::loginWindow) +{ + ui->setupUi(this); + this->initForm(); + ui->label->styleSheet(); + +} + +loginWindow::~loginWindow() +{ + delete ui; +} +void loginWindow::initForm() +{ + //this->setWindowFlags(Qt::FramelessWindowHint); + //调用样式 + loadStyle(":/qss/login.css"); +} + +void loginWindow::loadStyle(const QString &qssFile) +{ + //加载样式表 + QString qss; + + QFile file(qssFile); + + if (file.open(QFile::ReadOnly)) { + //用QTextStream读取样式文件不用区分文件编码 带bom也行 + QStringList list; + QTextStream in(&file); + //in.setCodec("utf-8"); + while (!in.atEnd()) { + QString line; + in >> line; + list << line; + } + + file.close(); + qss = list.join("\n"); + QString paletteColor = qss.mid(20, 7); + qApp->setPalette(QPalette(paletteColor)); + //用时主要在下面这句 + qApp->setStyleSheet(qss); + } + + +} + + +void loginWindow::on_Button_login_clicked() +{ + QMessageBox::information(this, "提示", "登录成功!"); + //查询数据库内是否有账号 + IndexWindow *indexWindow = new IndexWindow; + indexWindow->setWindowState(Qt::WindowMaximized); + indexWindow->show(); + this->close(); + +} + diff --git a/softwareDirectory/AutoVerScheme/loginwindow.h b/softwareDirectory/AutoVerScheme/loginwindow.h new file mode 100644 index 0000000..2695bc3 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/loginwindow.h @@ -0,0 +1,31 @@ +#ifndef MAINWINDOW_H +#define MAINWINDOW_H + +#include +#include + + + +namespace Ui { +class loginWindow; +} + +class loginWindow : public QMainWindow +{ + Q_OBJECT + +public: + explicit loginWindow(QWidget *parent = 0); + ~loginWindow(); +private slots: + void initForm(); + void loadStyle(const QString &qssFile); + void on_Button_login_clicked(); + + +private: + Ui::loginWindow *ui; +private: + QSqlQuery query; +}; +#endif // MAINWINDOW_H diff --git a/softwareDirectory/AutoVerScheme/loginwindow.ui b/softwareDirectory/AutoVerScheme/loginwindow.ui new file mode 100644 index 0000000..ca04751 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/loginwindow.ui @@ -0,0 +1,234 @@ + + + loginWindow + + + + 0 + 0 + 954 + 603 + + + + MainWindow + + + background-color: rgb(255, 255, 255) + + + + + + 110 + 110 + 271 + 231 + + + + background-image: url(:/image/login/u9.png); +background-repeat: no-repeat; background-position: center; +background-color: transparent; + + + + + + + + + 0 + 10 + 491 + 601 + + + + background-image: url(:/image/login/u2.png); +background-repeat: no-repeat; +background-color: transparent; +background-repeat: no-repeat; +background-position: center; +background-size: 100%; + + + + + + + + + 5 + 10 + 491 + 569 + + + + background-image: url(:/image/login/u0.png); +background-repeat: no-repeat; background-position: center; + + + + + + 170 + 350 + 241 + 51 + + + + background-color: transparent; + + + Metrology + + + + + + 490 + 10 + 471 + 571 + + + + + + + 610 + 70 + 271 + 61 + + + + 自动检定软件 + + + + + + 540 + 200 + 61 + 61 + + + + + + + + + + 490 + 10 + 461 + 571 + + + + + + + 540 + 290 + 61 + 61 + + + + + + + + + + 540 + 430 + 341 + 81 + + + + OpenHandCursor + + + + + + 登 录 + + + + + + 610 + 210 + 221 + 41 + + + + 请输入账号 + + + + + + 610 + 300 + 221 + 41 + + + + 请输入账号 + + + + + + 507 + 1 + 72 + 16 + + + + + + + label_4 + graphicsView + label_2 + label_3 + graphicsView_2 + textBrowser + lab_title + textBrowser_2 + textBrowser_3 + Button_login + textEdit_acc + textEdit_pass + label + + + + + 0 + 0 + 954 + 25 + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/main.cpp b/softwareDirectory/AutoVerScheme/main.cpp new file mode 100644 index 0000000..16b6d3f --- /dev/null +++ b/softwareDirectory/AutoVerScheme/main.cpp @@ -0,0 +1,23 @@ +#include "loginwindow.h" +#include "mainwindow.h" +#include +#include "indexWindow.h" +#include "testview.h" + +int main(int argc, char *argv[]) +{ + QApplication a(argc, argv); + // 加载外部的CSS文件 + a.setStyleSheet("file:///path/to/styles.css"); + //设置字体 + QFont font; + font.setFamily("Microsoft Yahei"); + font.setPixelSize(13); + a.setFont(font); + + //TestView s; + //s.show(); + loginWindow w; + w.show(); + return a.exec(); +} diff --git a/softwareDirectory/AutoVerScheme/mainwindow.cpp b/softwareDirectory/AutoVerScheme/mainwindow.cpp new file mode 100644 index 0000000..12d07c0 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/mainwindow.cpp @@ -0,0 +1,14 @@ +#include "mainwindow.h" +#include "ui_mainwindow.h" + +MainWindow::MainWindow(QWidget *parent) : + QMainWindow(parent), + ui(new Ui::MainWindow) +{ + ui->setupUi(this); +} + +MainWindow::~MainWindow() +{ + delete ui; +} diff --git a/softwareDirectory/AutoVerScheme/mainwindow.h b/softwareDirectory/AutoVerScheme/mainwindow.h new file mode 100644 index 0000000..40fd472 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/mainwindow.h @@ -0,0 +1,22 @@ +#ifndef MAINWINDOW_H +#define MAINWINDOW_H + +#include + +namespace Ui { +class MainWindow; +} + +class MainWindow : public QMainWindow +{ + Q_OBJECT + +public: + explicit MainWindow(QWidget *parent = nullptr); + ~MainWindow(); + +private: + Ui::MainWindow *ui; +}; + +#endif // MAINWINDOW_H diff --git a/softwareDirectory/AutoVerScheme/mainwindow.ui b/softwareDirectory/AutoVerScheme/mainwindow.ui new file mode 100644 index 0000000..dd4f1c8 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/mainwindow.ui @@ -0,0 +1,24 @@ + + + + + MainWindow + + + + 0 + 0 + 800 + 600 + + + + MainWindow + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u101.png b/softwareDirectory/AutoVerScheme/res/image/Index/u101.png new file mode 100644 index 0000000..9e371e3 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u101.png Binary files differ diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u102.png b/softwareDirectory/AutoVerScheme/res/image/Index/u102.png new file mode 100644 index 0000000..b288067 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u102.png Binary files differ diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro new file mode 100644 index 0000000..5b8f852 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro @@ -0,0 +1,48 @@ +QT += core gui +QT += sql +greaterThan(QT_MAJOR_VERSION, 4): QT += widgets + +CONFIG += c++11 + +# The following define makes your compiler emit warnings if you use +# any Qt feature that has been marked deprecated (the exact warnings +# depend on your compiler). Please consult the documentation of the +# deprecated API in order to know how to port your code away from it. +DEFINES += QT_DEPRECATED_WARNINGS + +# You can also make your code fail to compile if it uses deprecated APIs. +# In order to do so, uncomment the following line. +# You can also select to disable deprecated APIs only up to a certain version of Qt. +#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 + +SOURCES += \ + indexwindow.cpp \ + loginwindow.cpp \ + main.cpp \ + mainwindow.cpp \ + testview.cpp + +HEADERS += \ + indexwindow.h \ + loginwindow.h \ + mainwindow.h \ + testview.h + +FORMS += \ + indexwindow.ui \ + loginwindow.ui \ + mainwindow.ui \ + testview.ui + +# Default rules for deployment. +qnx: target.path = /tmp/$${TARGET}/bin +else: unix:!android: target.path = /opt/$${TARGET}/bin +!isEmpty(target.path): INSTALLS += target + +RESOURCES += \ + res/qss.qrc \ + res/res.qrc + +DISTFILES += \ + res/image/u2.png + diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user new file mode 100644 index 0000000..1f5ec64 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user @@ -0,0 +1,562 @@ + + + + + + EnvironmentId + {c08df58c-84a7-4965-bca6-e98789474efa} + + + ProjectExplorer.Project.ActiveTarget + 0 + + + ProjectExplorer.Project.EditorSettings + + true + false + true + + Cpp + + CppGlobal + + + + QmlJS + + QmlJSGlobal + + + 2 + UTF-8 + false + 4 + false + 80 + true + true + 1 + true + false + 0 + true + true + 0 + 8 + true + 1 + true + true + true + false + + + + ProjectExplorer.Project.PluginSettings + + + -fno-delayed-template-parsing + + true + + + + ProjectExplorer.Project.Target.0 + + Desktop Qt 5.14.2 MinGW 64-bit + Desktop Qt 5.14.2 MinGW 64-bit + qt.qt5.5142.win64_mingw73_kit + 0 + 0 + 0 + + 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 + 0 + 0 + 0 + + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug + + + true + QtProjectManager.QMakeBuildStep + true + + false + false + false + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Debug + Qt4ProjectManager.Qt4BuildConfiguration + 2 + + + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Release + + + true + QtProjectManager.QMakeBuildStep + false + + false + false + true + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Release + Qt4ProjectManager.Qt4BuildConfiguration + 0 + + + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Profile + + + true + QtProjectManager.QMakeBuildStep + true + + false + true + true + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Profile + Qt4ProjectManager.Qt4BuildConfiguration + 0 + + 3 + + + 0 + Deploy + Deploy + ProjectExplorer.BuildSteps.Deploy + + 1 + ProjectExplorer.DefaultDeployConfiguration + + 1 + + + dwarf + + cpu-cycles + + + 250 + + -e + cpu-cycles + --call-graph + dwarf,4096 + -F + 250 + + -F + true + 4096 + false + false + 1000 + + true + + false + false + false + false + true + 0.01 + 10 + true + kcachegrind + 1 + 25 + + 1 + true + false + true + valgrind + + 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + + 2 + + Qt4ProjectManager.Qt4RunConfiguration:D:/Auto_verification_scheme/AutoVerScheme/AutoVerScheme.pro + D:/Auto_verification_scheme/AutoVerScheme/AutoVerScheme.pro + + false + + false + true + true + false + false + true + + + + 1 + + + + ProjectExplorer.Project.TargetCount + 2 + + + ProjectExplorer.Project.Updater.FileVersion + 22 + + + Version + 22 + + diff --git a/softwareDirectory/AutoVerScheme/indexwindow.cpp b/softwareDirectory/AutoVerScheme/indexwindow.cpp new file mode 100644 index 0000000..3e52c7b --- /dev/null +++ b/softwareDirectory/AutoVerScheme/indexwindow.cpp @@ -0,0 +1,55 @@ +#include "indexwindow.h" +#include "ui_indexwindow.h" +#include "QFile" +#include "QTextStream" + +IndexWindow::IndexWindow(QWidget *parent) : + QMainWindow(parent), + ui(new Ui::IndexWindow) +{ + ui->setupUi(this); + this->initForm(); +} + +IndexWindow::~IndexWindow() +{ + delete ui; +} +void IndexWindow::initForm() +{ + //this->setWindowFlags(Qt::FramelessWindowHint); + //调用样式 + loadStyle(":/qss/Index.css"); + +} + +void IndexWindow::loadStyle(const QString &qssFile) +{ + //加载样式表 + QString qss; + + QFile file(qssFile); + + if (file.open(QFile::ReadOnly)) { + //用QTextStream读取样式文件不用区分文件编码 带bom也行 + QStringList list; + QTextStream in(&file); + //in.setCodec("utf-8"); + while (!in.atEnd()) { + QString line; + in >> line; + list << line; + } + + file.close(); + qss = list.join("\n"); + QString paletteColor = qss.mid(20, 7); + qApp->setPalette(QPalette(paletteColor)); + //用时主要在下面这句 + qApp->setStyleSheet(qss); + } + + +} + + diff --git a/softwareDirectory/AutoVerScheme/indexwindow.h b/softwareDirectory/AutoVerScheme/indexwindow.h new file mode 100644 index 0000000..2aee958 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/indexwindow.h @@ -0,0 +1,26 @@ +#ifndef INDEXWINDOW_H +#define INDEXWINDOW_H + +#include + +namespace Ui { +class IndexWindow; +} + +class IndexWindow : public QMainWindow +{ + Q_OBJECT + +public: + explicit IndexWindow(QWidget *parent = nullptr); + ~IndexWindow(); +private slots: + void initForm(); + void loadStyle(const QString &qssFile); + + +private: + Ui::IndexWindow *ui; +}; + +#endif // INDEXWINDOW_H diff --git a/softwareDirectory/AutoVerScheme/indexwindow.ui b/softwareDirectory/AutoVerScheme/indexwindow.ui new file mode 100644 index 0000000..d7153e0 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/indexwindow.ui @@ -0,0 +1,539 @@ + + + IndexWindow + + + Qt::NonModal + + + + 0 + 0 + 1334 + 789 + + + + + 0 + 0 + + + + MainWindow + + + + + + + 100 + 100 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + 6 + + + QLayout::SetFixedSize + + + 0 + + + 0 + + + + + Qt::Horizontal + + + QSizePolicy::Fixed + + + + 120 + 13 + + + + + + + + + 0 + 0 + + + + + 560 + 0 + + + + Qt::DefaultContextMenu + + + color: white; +font-weight: bold; +font-size: 24pt; + + + + + QFrame::NoFrame + + + QFrame::Plain + + + 自动检定系统 + + + Qt::AutoText + + + false + + + Qt::AlignCenter + + + + + + + Qt::Horizontal + + + QSizePolicy::Fixed + + + + 40 + 13 + + + + + + + + + + Qt::Vertical + + + QSizePolicy::Fixed + + + + 50 + 80 + + + + + + + + + + Qt::Vertical + + + QSizePolicy::Fixed + + + + 20 + 120 + + + + + + + + Qt::Horizontal + + + + 100 + 20 + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + 0 + 0 + + + + + 310 + 190 + + + + OpenHandCursor + + + margin-right: 0px; + + + 信息管理 + + + + 60 + 60 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + Qt::Horizontal + + + + 327 + 20 + + + + + + + + + 0 + 0 + + + + + 490 + 190 + + + + OpenHandCursor + + + + + + 自动核查 + + + + 60 + 60 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + + 0 + 0 + + + + + 490 + 190 + + + + OpenHandCursor + + + + + + 自动检定 + + + + 60 + 60 + + + + false + + + false + + + Qt::ToolButtonTextUnderIcon + + + + + + + + 0 + 0 + + + + + 490 + 190 + + + + OpenHandCursor + + + + + + 核查程序管理 + + + + 60 + 60 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + Qt::Horizontal + + + + 327 + 20 + + + + + + + + + 0 + 0 + + + + + 310 + 190 + + + + OpenHandCursor + + + margin-right: 0px; + + + 数据同步 + + + + 60 + 60 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + Qt::Vertical + + + QSizePolicy::Fixed + + + + 20 + 120 + + + + + + + + Qt::Vertical + + + QSizePolicy::Fixed + + + + 20 + 120 + + + + + + + + + 0 + 0 + + + + + 490 + 190 + + + + OpenHandCursor + + + + + + 检定程序管理 + + + + 60 + 60 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + + + + + + 0 + 0 + + + + + 10 + 10 + + + + color: white; +font-weight: bold; +font-size: 14pt; + + + 欢迎您! 用户: admin + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + Qt::Horizontal + + + QSizePolicy::Fixed + + + + 270 + 20 + + + + + + + + + + + btnConfig + btnData + tbtnMain1 + tbtnMain2 + tbtnMain3 + tbtnConfig1 + tbtnConfig2 + tbtnConfig3 + tbtnConfig4 + tbtnConfig5 + tbtnConfig6 + btnMain + btnHelp + btnExit + + + + diff --git a/softwareDirectory/AutoVerScheme/loginwindow.cpp b/softwareDirectory/AutoVerScheme/loginwindow.cpp new file mode 100644 index 0000000..155988a --- /dev/null +++ b/softwareDirectory/AutoVerScheme/loginwindow.cpp @@ -0,0 +1,68 @@ +#include "loginwindow.h" +#include "ui_loginwindow.h" +#include +#include +#include + +#include "indexwindow.h" + +loginWindow::loginWindow(QWidget *parent): QMainWindow(parent), ui(new Ui::loginWindow) +{ + ui->setupUi(this); + this->initForm(); + ui->label->styleSheet(); + +} + +loginWindow::~loginWindow() +{ + delete ui; +} +void loginWindow::initForm() +{ + //this->setWindowFlags(Qt::FramelessWindowHint); + //调用样式 + loadStyle(":/qss/login.css"); +} + +void loginWindow::loadStyle(const QString &qssFile) +{ + //加载样式表 + QString qss; + + QFile file(qssFile); + + if (file.open(QFile::ReadOnly)) { + //用QTextStream读取样式文件不用区分文件编码 带bom也行 + QStringList list; + QTextStream in(&file); + //in.setCodec("utf-8"); + while (!in.atEnd()) { + QString line; + in >> line; + list << line; + } + + file.close(); + qss = list.join("\n"); + QString paletteColor = qss.mid(20, 7); + qApp->setPalette(QPalette(paletteColor)); + //用时主要在下面这句 + qApp->setStyleSheet(qss); + } + + +} + + +void loginWindow::on_Button_login_clicked() +{ + QMessageBox::information(this, "提示", "登录成功!"); + //查询数据库内是否有账号 + IndexWindow *indexWindow = new IndexWindow; + indexWindow->setWindowState(Qt::WindowMaximized); + indexWindow->show(); + this->close(); + +} + diff --git a/softwareDirectory/AutoVerScheme/loginwindow.h b/softwareDirectory/AutoVerScheme/loginwindow.h new file mode 100644 index 0000000..2695bc3 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/loginwindow.h @@ -0,0 +1,31 @@ +#ifndef MAINWINDOW_H +#define MAINWINDOW_H + +#include +#include + + + +namespace Ui { +class loginWindow; +} + +class loginWindow : public QMainWindow +{ + Q_OBJECT + +public: + explicit loginWindow(QWidget *parent = 0); + ~loginWindow(); +private slots: + void initForm(); + void loadStyle(const QString &qssFile); + void on_Button_login_clicked(); + + +private: + Ui::loginWindow *ui; +private: + QSqlQuery query; +}; +#endif // MAINWINDOW_H diff --git a/softwareDirectory/AutoVerScheme/loginwindow.ui b/softwareDirectory/AutoVerScheme/loginwindow.ui new file mode 100644 index 0000000..ca04751 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/loginwindow.ui @@ -0,0 +1,234 @@ + + + loginWindow + + + + 0 + 0 + 954 + 603 + + + + MainWindow + + + background-color: rgb(255, 255, 255) + + + + + + 110 + 110 + 271 + 231 + + + + background-image: url(:/image/login/u9.png); +background-repeat: no-repeat; background-position: center; +background-color: transparent; + + + + + + + + + 0 + 10 + 491 + 601 + + + + background-image: url(:/image/login/u2.png); +background-repeat: no-repeat; +background-color: transparent; +background-repeat: no-repeat; +background-position: center; +background-size: 100%; + + + + + + + + + 5 + 10 + 491 + 569 + + + + background-image: url(:/image/login/u0.png); +background-repeat: no-repeat; background-position: center; + + + + + + 170 + 350 + 241 + 51 + + + + background-color: transparent; + + + Metrology + + + + + + 490 + 10 + 471 + 571 + + + + + + + 610 + 70 + 271 + 61 + + + + 自动检定软件 + + + + + + 540 + 200 + 61 + 61 + + + + + + + + + + 490 + 10 + 461 + 571 + + + + + + + 540 + 290 + 61 + 61 + + + + + + + + + + 540 + 430 + 341 + 81 + + + + OpenHandCursor + + + + + + 登 录 + + + + + + 610 + 210 + 221 + 41 + + + + 请输入账号 + + + + + + 610 + 300 + 221 + 41 + + + + 请输入账号 + + + + + + 507 + 1 + 72 + 16 + + + + + + + label_4 + graphicsView + label_2 + label_3 + graphicsView_2 + textBrowser + lab_title + textBrowser_2 + textBrowser_3 + Button_login + textEdit_acc + textEdit_pass + label + + + + + 0 + 0 + 954 + 25 + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/main.cpp b/softwareDirectory/AutoVerScheme/main.cpp new file mode 100644 index 0000000..16b6d3f --- /dev/null +++ b/softwareDirectory/AutoVerScheme/main.cpp @@ -0,0 +1,23 @@ +#include "loginwindow.h" +#include "mainwindow.h" +#include +#include "indexWindow.h" +#include "testview.h" + +int main(int argc, char *argv[]) +{ + QApplication a(argc, argv); + // 加载外部的CSS文件 + a.setStyleSheet("file:///path/to/styles.css"); + //设置字体 + QFont font; + font.setFamily("Microsoft Yahei"); + font.setPixelSize(13); + a.setFont(font); + + //TestView s; + //s.show(); + loginWindow w; + w.show(); + return a.exec(); +} diff --git a/softwareDirectory/AutoVerScheme/mainwindow.cpp b/softwareDirectory/AutoVerScheme/mainwindow.cpp new file mode 100644 index 0000000..12d07c0 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/mainwindow.cpp @@ -0,0 +1,14 @@ +#include "mainwindow.h" +#include "ui_mainwindow.h" + +MainWindow::MainWindow(QWidget *parent) : + QMainWindow(parent), + ui(new Ui::MainWindow) +{ + ui->setupUi(this); +} + +MainWindow::~MainWindow() +{ + delete ui; +} diff --git a/softwareDirectory/AutoVerScheme/mainwindow.h b/softwareDirectory/AutoVerScheme/mainwindow.h new file mode 100644 index 0000000..40fd472 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/mainwindow.h @@ -0,0 +1,22 @@ +#ifndef MAINWINDOW_H +#define MAINWINDOW_H + +#include + +namespace Ui { +class MainWindow; +} + +class MainWindow : public QMainWindow +{ + Q_OBJECT + +public: + explicit MainWindow(QWidget *parent = nullptr); + ~MainWindow(); + +private: + Ui::MainWindow *ui; +}; + +#endif // MAINWINDOW_H diff --git a/softwareDirectory/AutoVerScheme/mainwindow.ui b/softwareDirectory/AutoVerScheme/mainwindow.ui new file mode 100644 index 0000000..dd4f1c8 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/mainwindow.ui @@ -0,0 +1,24 @@ + + + + + MainWindow + + + + 0 + 0 + 800 + 600 + + + + MainWindow + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u101.png b/softwareDirectory/AutoVerScheme/res/image/Index/u101.png new file mode 100644 index 0000000..9e371e3 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u101.png Binary files differ diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u102.png b/softwareDirectory/AutoVerScheme/res/image/Index/u102.png new file mode 100644 index 0000000..b288067 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u102.png Binary files differ diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u15.png b/softwareDirectory/AutoVerScheme/res/image/Index/u15.png new file mode 100644 index 0000000..7e699e6 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u15.png Binary files differ diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro new file mode 100644 index 0000000..5b8f852 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro @@ -0,0 +1,48 @@ +QT += core gui +QT += sql +greaterThan(QT_MAJOR_VERSION, 4): QT += widgets + +CONFIG += c++11 + +# The following define makes your compiler emit warnings if you use +# any Qt feature that has been marked deprecated (the exact warnings +# depend on your compiler). Please consult the documentation of the +# deprecated API in order to know how to port your code away from it. +DEFINES += QT_DEPRECATED_WARNINGS + +# You can also make your code fail to compile if it uses deprecated APIs. +# In order to do so, uncomment the following line. +# You can also select to disable deprecated APIs only up to a certain version of Qt. +#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 + +SOURCES += \ + indexwindow.cpp \ + loginwindow.cpp \ + main.cpp \ + mainwindow.cpp \ + testview.cpp + +HEADERS += \ + indexwindow.h \ + loginwindow.h \ + mainwindow.h \ + testview.h + +FORMS += \ + indexwindow.ui \ + loginwindow.ui \ + mainwindow.ui \ + testview.ui + +# Default rules for deployment. +qnx: target.path = /tmp/$${TARGET}/bin +else: unix:!android: target.path = /opt/$${TARGET}/bin +!isEmpty(target.path): INSTALLS += target + +RESOURCES += \ + res/qss.qrc \ + res/res.qrc + +DISTFILES += \ + res/image/u2.png + diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user new file mode 100644 index 0000000..1f5ec64 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user @@ -0,0 +1,562 @@ + + + + + + EnvironmentId + {c08df58c-84a7-4965-bca6-e98789474efa} + + + ProjectExplorer.Project.ActiveTarget + 0 + + + ProjectExplorer.Project.EditorSettings + + true + false + true + + Cpp + + CppGlobal + + + + QmlJS + + QmlJSGlobal + + + 2 + UTF-8 + false + 4 + false + 80 + true + true + 1 + true + false + 0 + true + true + 0 + 8 + true + 1 + true + true + true + false + + + + ProjectExplorer.Project.PluginSettings + + + -fno-delayed-template-parsing + + true + + + + ProjectExplorer.Project.Target.0 + + Desktop Qt 5.14.2 MinGW 64-bit + Desktop Qt 5.14.2 MinGW 64-bit + qt.qt5.5142.win64_mingw73_kit + 0 + 0 + 0 + + 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 + 0 + 0 + 0 + + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug + + + true + QtProjectManager.QMakeBuildStep + true + + false + false + false + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Debug + Qt4ProjectManager.Qt4BuildConfiguration + 2 + + + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Release + + + true + QtProjectManager.QMakeBuildStep + false + + false + false + true + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Release + Qt4ProjectManager.Qt4BuildConfiguration + 0 + + + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Profile + + + true + QtProjectManager.QMakeBuildStep + true + + false + true + true + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Profile + Qt4ProjectManager.Qt4BuildConfiguration + 0 + + 3 + + + 0 + Deploy + Deploy + ProjectExplorer.BuildSteps.Deploy + + 1 + ProjectExplorer.DefaultDeployConfiguration + + 1 + + + dwarf + + cpu-cycles + + + 250 + + -e + cpu-cycles + --call-graph + dwarf,4096 + -F + 250 + + -F + true + 4096 + false + false + 1000 + + true + + false + false + false + false + true + 0.01 + 10 + true + kcachegrind + 1 + 25 + + 1 + true + false + true + valgrind + + 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + + 2 + + Qt4ProjectManager.Qt4RunConfiguration:D:/Auto_verification_scheme/AutoVerScheme/AutoVerScheme.pro + D:/Auto_verification_scheme/AutoVerScheme/AutoVerScheme.pro + + false + + false + true + true + false + false + true + + + + 1 + + + + ProjectExplorer.Project.TargetCount + 2 + + + ProjectExplorer.Project.Updater.FileVersion + 22 + + + Version + 22 + + diff --git a/softwareDirectory/AutoVerScheme/indexwindow.cpp b/softwareDirectory/AutoVerScheme/indexwindow.cpp new file mode 100644 index 0000000..3e52c7b --- /dev/null +++ b/softwareDirectory/AutoVerScheme/indexwindow.cpp @@ -0,0 +1,55 @@ +#include "indexwindow.h" +#include "ui_indexwindow.h" +#include "QFile" +#include "QTextStream" + +IndexWindow::IndexWindow(QWidget *parent) : + QMainWindow(parent), + ui(new Ui::IndexWindow) +{ + ui->setupUi(this); + this->initForm(); +} + +IndexWindow::~IndexWindow() +{ + delete ui; +} +void IndexWindow::initForm() +{ + //this->setWindowFlags(Qt::FramelessWindowHint); + //调用样式 + loadStyle(":/qss/Index.css"); + +} + +void IndexWindow::loadStyle(const QString &qssFile) +{ + //加载样式表 + QString qss; + + QFile file(qssFile); + + if (file.open(QFile::ReadOnly)) { + //用QTextStream读取样式文件不用区分文件编码 带bom也行 + QStringList list; + QTextStream in(&file); + //in.setCodec("utf-8"); + while (!in.atEnd()) { + QString line; + in >> line; + list << line; + } + + file.close(); + qss = list.join("\n"); + QString paletteColor = qss.mid(20, 7); + qApp->setPalette(QPalette(paletteColor)); + //用时主要在下面这句 + qApp->setStyleSheet(qss); + } + + +} + + diff --git a/softwareDirectory/AutoVerScheme/indexwindow.h b/softwareDirectory/AutoVerScheme/indexwindow.h new file mode 100644 index 0000000..2aee958 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/indexwindow.h @@ -0,0 +1,26 @@ +#ifndef INDEXWINDOW_H +#define INDEXWINDOW_H + +#include + +namespace Ui { +class IndexWindow; +} + +class IndexWindow : public QMainWindow +{ + Q_OBJECT + +public: + explicit IndexWindow(QWidget *parent = nullptr); + ~IndexWindow(); +private slots: + void initForm(); + void loadStyle(const QString &qssFile); + + +private: + Ui::IndexWindow *ui; +}; + +#endif // INDEXWINDOW_H diff --git a/softwareDirectory/AutoVerScheme/indexwindow.ui b/softwareDirectory/AutoVerScheme/indexwindow.ui new file mode 100644 index 0000000..d7153e0 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/indexwindow.ui @@ -0,0 +1,539 @@ + + + IndexWindow + + + Qt::NonModal + + + + 0 + 0 + 1334 + 789 + + + + + 0 + 0 + + + + MainWindow + + + + + + + 100 + 100 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + 6 + + + QLayout::SetFixedSize + + + 0 + + + 0 + + + + + Qt::Horizontal + + + QSizePolicy::Fixed + + + + 120 + 13 + + + + + + + + + 0 + 0 + + + + + 560 + 0 + + + + Qt::DefaultContextMenu + + + color: white; +font-weight: bold; +font-size: 24pt; + + + + + QFrame::NoFrame + + + QFrame::Plain + + + 自动检定系统 + + + Qt::AutoText + + + false + + + Qt::AlignCenter + + + + + + + Qt::Horizontal + + + QSizePolicy::Fixed + + + + 40 + 13 + + + + + + + + + + Qt::Vertical + + + QSizePolicy::Fixed + + + + 50 + 80 + + + + + + + + + + Qt::Vertical + + + QSizePolicy::Fixed + + + + 20 + 120 + + + + + + + + Qt::Horizontal + + + + 100 + 20 + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + 0 + 0 + + + + + 310 + 190 + + + + OpenHandCursor + + + margin-right: 0px; + + + 信息管理 + + + + 60 + 60 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + Qt::Horizontal + + + + 327 + 20 + + + + + + + + + 0 + 0 + + + + + 490 + 190 + + + + OpenHandCursor + + + + + + 自动核查 + + + + 60 + 60 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + + 0 + 0 + + + + + 490 + 190 + + + + OpenHandCursor + + + + + + 自动检定 + + + + 60 + 60 + + + + false + + + false + + + Qt::ToolButtonTextUnderIcon + + + + + + + + 0 + 0 + + + + + 490 + 190 + + + + OpenHandCursor + + + + + + 核查程序管理 + + + + 60 + 60 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + Qt::Horizontal + + + + 327 + 20 + + + + + + + + + 0 + 0 + + + + + 310 + 190 + + + + OpenHandCursor + + + margin-right: 0px; + + + 数据同步 + + + + 60 + 60 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + Qt::Vertical + + + QSizePolicy::Fixed + + + + 20 + 120 + + + + + + + + Qt::Vertical + + + QSizePolicy::Fixed + + + + 20 + 120 + + + + + + + + + 0 + 0 + + + + + 490 + 190 + + + + OpenHandCursor + + + + + + 检定程序管理 + + + + 60 + 60 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + + + + + + 0 + 0 + + + + + 10 + 10 + + + + color: white; +font-weight: bold; +font-size: 14pt; + + + 欢迎您! 用户: admin + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + Qt::Horizontal + + + QSizePolicy::Fixed + + + + 270 + 20 + + + + + + + + + + + btnConfig + btnData + tbtnMain1 + tbtnMain2 + tbtnMain3 + tbtnConfig1 + tbtnConfig2 + tbtnConfig3 + tbtnConfig4 + tbtnConfig5 + tbtnConfig6 + btnMain + btnHelp + btnExit + + + + diff --git a/softwareDirectory/AutoVerScheme/loginwindow.cpp b/softwareDirectory/AutoVerScheme/loginwindow.cpp new file mode 100644 index 0000000..155988a --- /dev/null +++ b/softwareDirectory/AutoVerScheme/loginwindow.cpp @@ -0,0 +1,68 @@ +#include "loginwindow.h" +#include "ui_loginwindow.h" +#include +#include +#include + +#include "indexwindow.h" + +loginWindow::loginWindow(QWidget *parent): QMainWindow(parent), ui(new Ui::loginWindow) +{ + ui->setupUi(this); + this->initForm(); + ui->label->styleSheet(); + +} + +loginWindow::~loginWindow() +{ + delete ui; +} +void loginWindow::initForm() +{ + //this->setWindowFlags(Qt::FramelessWindowHint); + //调用样式 + loadStyle(":/qss/login.css"); +} + +void loginWindow::loadStyle(const QString &qssFile) +{ + //加载样式表 + QString qss; + + QFile file(qssFile); + + if (file.open(QFile::ReadOnly)) { + //用QTextStream读取样式文件不用区分文件编码 带bom也行 + QStringList list; + QTextStream in(&file); + //in.setCodec("utf-8"); + while (!in.atEnd()) { + QString line; + in >> line; + list << line; + } + + file.close(); + qss = list.join("\n"); + QString paletteColor = qss.mid(20, 7); + qApp->setPalette(QPalette(paletteColor)); + //用时主要在下面这句 + qApp->setStyleSheet(qss); + } + + +} + + +void loginWindow::on_Button_login_clicked() +{ + QMessageBox::information(this, "提示", "登录成功!"); + //查询数据库内是否有账号 + IndexWindow *indexWindow = new IndexWindow; + indexWindow->setWindowState(Qt::WindowMaximized); + indexWindow->show(); + this->close(); + +} + diff --git a/softwareDirectory/AutoVerScheme/loginwindow.h b/softwareDirectory/AutoVerScheme/loginwindow.h new file mode 100644 index 0000000..2695bc3 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/loginwindow.h @@ -0,0 +1,31 @@ +#ifndef MAINWINDOW_H +#define MAINWINDOW_H + +#include +#include + + + +namespace Ui { +class loginWindow; +} + +class loginWindow : public QMainWindow +{ + Q_OBJECT + +public: + explicit loginWindow(QWidget *parent = 0); + ~loginWindow(); +private slots: + void initForm(); + void loadStyle(const QString &qssFile); + void on_Button_login_clicked(); + + +private: + Ui::loginWindow *ui; +private: + QSqlQuery query; +}; +#endif // MAINWINDOW_H diff --git a/softwareDirectory/AutoVerScheme/loginwindow.ui b/softwareDirectory/AutoVerScheme/loginwindow.ui new file mode 100644 index 0000000..ca04751 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/loginwindow.ui @@ -0,0 +1,234 @@ + + + loginWindow + + + + 0 + 0 + 954 + 603 + + + + MainWindow + + + background-color: rgb(255, 255, 255) + + + + + + 110 + 110 + 271 + 231 + + + + background-image: url(:/image/login/u9.png); +background-repeat: no-repeat; background-position: center; +background-color: transparent; + + + + + + + + + 0 + 10 + 491 + 601 + + + + background-image: url(:/image/login/u2.png); +background-repeat: no-repeat; +background-color: transparent; +background-repeat: no-repeat; +background-position: center; +background-size: 100%; + + + + + + + + + 5 + 10 + 491 + 569 + + + + background-image: url(:/image/login/u0.png); +background-repeat: no-repeat; background-position: center; + + + + + + 170 + 350 + 241 + 51 + + + + background-color: transparent; + + + Metrology + + + + + + 490 + 10 + 471 + 571 + + + + + + + 610 + 70 + 271 + 61 + + + + 自动检定软件 + + + + + + 540 + 200 + 61 + 61 + + + + + + + + + + 490 + 10 + 461 + 571 + + + + + + + 540 + 290 + 61 + 61 + + + + + + + + + + 540 + 430 + 341 + 81 + + + + OpenHandCursor + + + + + + 登 录 + + + + + + 610 + 210 + 221 + 41 + + + + 请输入账号 + + + + + + 610 + 300 + 221 + 41 + + + + 请输入账号 + + + + + + 507 + 1 + 72 + 16 + + + + + + + label_4 + graphicsView + label_2 + label_3 + graphicsView_2 + textBrowser + lab_title + textBrowser_2 + textBrowser_3 + Button_login + textEdit_acc + textEdit_pass + label + + + + + 0 + 0 + 954 + 25 + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/main.cpp b/softwareDirectory/AutoVerScheme/main.cpp new file mode 100644 index 0000000..16b6d3f --- /dev/null +++ b/softwareDirectory/AutoVerScheme/main.cpp @@ -0,0 +1,23 @@ +#include "loginwindow.h" +#include "mainwindow.h" +#include +#include "indexWindow.h" +#include "testview.h" + +int main(int argc, char *argv[]) +{ + QApplication a(argc, argv); + // 加载外部的CSS文件 + a.setStyleSheet("file:///path/to/styles.css"); + //设置字体 + QFont font; + font.setFamily("Microsoft Yahei"); + font.setPixelSize(13); + a.setFont(font); + + //TestView s; + //s.show(); + loginWindow w; + w.show(); + return a.exec(); +} diff --git a/softwareDirectory/AutoVerScheme/mainwindow.cpp b/softwareDirectory/AutoVerScheme/mainwindow.cpp new file mode 100644 index 0000000..12d07c0 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/mainwindow.cpp @@ -0,0 +1,14 @@ +#include "mainwindow.h" +#include "ui_mainwindow.h" + +MainWindow::MainWindow(QWidget *parent) : + QMainWindow(parent), + ui(new Ui::MainWindow) +{ + ui->setupUi(this); +} + +MainWindow::~MainWindow() +{ + delete ui; +} diff --git a/softwareDirectory/AutoVerScheme/mainwindow.h b/softwareDirectory/AutoVerScheme/mainwindow.h new file mode 100644 index 0000000..40fd472 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/mainwindow.h @@ -0,0 +1,22 @@ +#ifndef MAINWINDOW_H +#define MAINWINDOW_H + +#include + +namespace Ui { +class MainWindow; +} + +class MainWindow : public QMainWindow +{ + Q_OBJECT + +public: + explicit MainWindow(QWidget *parent = nullptr); + ~MainWindow(); + +private: + Ui::MainWindow *ui; +}; + +#endif // MAINWINDOW_H diff --git a/softwareDirectory/AutoVerScheme/mainwindow.ui b/softwareDirectory/AutoVerScheme/mainwindow.ui new file mode 100644 index 0000000..dd4f1c8 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/mainwindow.ui @@ -0,0 +1,24 @@ + + + + + MainWindow + + + + 0 + 0 + 800 + 600 + + + + MainWindow + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u101.png b/softwareDirectory/AutoVerScheme/res/image/Index/u101.png new file mode 100644 index 0000000..9e371e3 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u101.png Binary files differ diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u102.png b/softwareDirectory/AutoVerScheme/res/image/Index/u102.png new file mode 100644 index 0000000..b288067 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u102.png Binary files differ diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u15.png b/softwareDirectory/AutoVerScheme/res/image/Index/u15.png new file mode 100644 index 0000000..7e699e6 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u15.png Binary files differ diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u17.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u17.svg new file mode 100644 index 0000000..acc0502 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u17.svg @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro new file mode 100644 index 0000000..5b8f852 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro @@ -0,0 +1,48 @@ +QT += core gui +QT += sql +greaterThan(QT_MAJOR_VERSION, 4): QT += widgets + +CONFIG += c++11 + +# The following define makes your compiler emit warnings if you use +# any Qt feature that has been marked deprecated (the exact warnings +# depend on your compiler). Please consult the documentation of the +# deprecated API in order to know how to port your code away from it. +DEFINES += QT_DEPRECATED_WARNINGS + +# You can also make your code fail to compile if it uses deprecated APIs. +# In order to do so, uncomment the following line. +# You can also select to disable deprecated APIs only up to a certain version of Qt. +#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 + +SOURCES += \ + indexwindow.cpp \ + loginwindow.cpp \ + main.cpp \ + mainwindow.cpp \ + testview.cpp + +HEADERS += \ + indexwindow.h \ + loginwindow.h \ + mainwindow.h \ + testview.h + +FORMS += \ + indexwindow.ui \ + loginwindow.ui \ + mainwindow.ui \ + testview.ui + +# Default rules for deployment. +qnx: target.path = /tmp/$${TARGET}/bin +else: unix:!android: target.path = /opt/$${TARGET}/bin +!isEmpty(target.path): INSTALLS += target + +RESOURCES += \ + res/qss.qrc \ + res/res.qrc + +DISTFILES += \ + res/image/u2.png + diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user new file mode 100644 index 0000000..1f5ec64 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user @@ -0,0 +1,562 @@ + + + + + + EnvironmentId + {c08df58c-84a7-4965-bca6-e98789474efa} + + + ProjectExplorer.Project.ActiveTarget + 0 + + + ProjectExplorer.Project.EditorSettings + + true + false + true + + Cpp + + CppGlobal + + + + QmlJS + + QmlJSGlobal + + + 2 + UTF-8 + false + 4 + false + 80 + true + true + 1 + true + false + 0 + true + true + 0 + 8 + true + 1 + true + true + true + false + + + + ProjectExplorer.Project.PluginSettings + + + -fno-delayed-template-parsing + + true + + + + ProjectExplorer.Project.Target.0 + + Desktop Qt 5.14.2 MinGW 64-bit + Desktop Qt 5.14.2 MinGW 64-bit + qt.qt5.5142.win64_mingw73_kit + 0 + 0 + 0 + + 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 + 0 + 0 + 0 + + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug + + + true + QtProjectManager.QMakeBuildStep + true + + false + false + false + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Debug + Qt4ProjectManager.Qt4BuildConfiguration + 2 + + + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Release + + + true + QtProjectManager.QMakeBuildStep + false + + false + false + true + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Release + Qt4ProjectManager.Qt4BuildConfiguration + 0 + + + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Profile + + + true + QtProjectManager.QMakeBuildStep + true + + false + true + true + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Profile + Qt4ProjectManager.Qt4BuildConfiguration + 0 + + 3 + + + 0 + Deploy + Deploy + ProjectExplorer.BuildSteps.Deploy + + 1 + ProjectExplorer.DefaultDeployConfiguration + + 1 + + + dwarf + + cpu-cycles + + + 250 + + -e + cpu-cycles + --call-graph + dwarf,4096 + -F + 250 + + -F + true + 4096 + false + false + 1000 + + true + + false + false + false + false + true + 0.01 + 10 + true + kcachegrind + 1 + 25 + + 1 + true + false + true + valgrind + + 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + + 2 + + Qt4ProjectManager.Qt4RunConfiguration:D:/Auto_verification_scheme/AutoVerScheme/AutoVerScheme.pro + D:/Auto_verification_scheme/AutoVerScheme/AutoVerScheme.pro + + false + + false + true + true + false + false + true + + + + 1 + + + + ProjectExplorer.Project.TargetCount + 2 + + + ProjectExplorer.Project.Updater.FileVersion + 22 + + + Version + 22 + + diff --git a/softwareDirectory/AutoVerScheme/indexwindow.cpp b/softwareDirectory/AutoVerScheme/indexwindow.cpp new file mode 100644 index 0000000..3e52c7b --- /dev/null +++ b/softwareDirectory/AutoVerScheme/indexwindow.cpp @@ -0,0 +1,55 @@ +#include "indexwindow.h" +#include "ui_indexwindow.h" +#include "QFile" +#include "QTextStream" + +IndexWindow::IndexWindow(QWidget *parent) : + QMainWindow(parent), + ui(new Ui::IndexWindow) +{ + ui->setupUi(this); + this->initForm(); +} + +IndexWindow::~IndexWindow() +{ + delete ui; +} +void IndexWindow::initForm() +{ + //this->setWindowFlags(Qt::FramelessWindowHint); + //调用样式 + loadStyle(":/qss/Index.css"); + +} + +void IndexWindow::loadStyle(const QString &qssFile) +{ + //加载样式表 + QString qss; + + QFile file(qssFile); + + if (file.open(QFile::ReadOnly)) { + //用QTextStream读取样式文件不用区分文件编码 带bom也行 + QStringList list; + QTextStream in(&file); + //in.setCodec("utf-8"); + while (!in.atEnd()) { + QString line; + in >> line; + list << line; + } + + file.close(); + qss = list.join("\n"); + QString paletteColor = qss.mid(20, 7); + qApp->setPalette(QPalette(paletteColor)); + //用时主要在下面这句 + qApp->setStyleSheet(qss); + } + + +} + + diff --git a/softwareDirectory/AutoVerScheme/indexwindow.h b/softwareDirectory/AutoVerScheme/indexwindow.h new file mode 100644 index 0000000..2aee958 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/indexwindow.h @@ -0,0 +1,26 @@ +#ifndef INDEXWINDOW_H +#define INDEXWINDOW_H + +#include + +namespace Ui { +class IndexWindow; +} + +class IndexWindow : public QMainWindow +{ + Q_OBJECT + +public: + explicit IndexWindow(QWidget *parent = nullptr); + ~IndexWindow(); +private slots: + void initForm(); + void loadStyle(const QString &qssFile); + + +private: + Ui::IndexWindow *ui; +}; + +#endif // INDEXWINDOW_H diff --git a/softwareDirectory/AutoVerScheme/indexwindow.ui b/softwareDirectory/AutoVerScheme/indexwindow.ui new file mode 100644 index 0000000..d7153e0 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/indexwindow.ui @@ -0,0 +1,539 @@ + + + IndexWindow + + + Qt::NonModal + + + + 0 + 0 + 1334 + 789 + + + + + 0 + 0 + + + + MainWindow + + + + + + + 100 + 100 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + 6 + + + QLayout::SetFixedSize + + + 0 + + + 0 + + + + + Qt::Horizontal + + + QSizePolicy::Fixed + + + + 120 + 13 + + + + + + + + + 0 + 0 + + + + + 560 + 0 + + + + Qt::DefaultContextMenu + + + color: white; +font-weight: bold; +font-size: 24pt; + + + + + QFrame::NoFrame + + + QFrame::Plain + + + 自动检定系统 + + + Qt::AutoText + + + false + + + Qt::AlignCenter + + + + + + + Qt::Horizontal + + + QSizePolicy::Fixed + + + + 40 + 13 + + + + + + + + + + Qt::Vertical + + + QSizePolicy::Fixed + + + + 50 + 80 + + + + + + + + + + Qt::Vertical + + + QSizePolicy::Fixed + + + + 20 + 120 + + + + + + + + Qt::Horizontal + + + + 100 + 20 + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + 0 + 0 + + + + + 310 + 190 + + + + OpenHandCursor + + + margin-right: 0px; + + + 信息管理 + + + + 60 + 60 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + Qt::Horizontal + + + + 327 + 20 + + + + + + + + + 0 + 0 + + + + + 490 + 190 + + + + OpenHandCursor + + + + + + 自动核查 + + + + 60 + 60 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + + 0 + 0 + + + + + 490 + 190 + + + + OpenHandCursor + + + + + + 自动检定 + + + + 60 + 60 + + + + false + + + false + + + Qt::ToolButtonTextUnderIcon + + + + + + + + 0 + 0 + + + + + 490 + 190 + + + + OpenHandCursor + + + + + + 核查程序管理 + + + + 60 + 60 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + Qt::Horizontal + + + + 327 + 20 + + + + + + + + + 0 + 0 + + + + + 310 + 190 + + + + OpenHandCursor + + + margin-right: 0px; + + + 数据同步 + + + + 60 + 60 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + Qt::Vertical + + + QSizePolicy::Fixed + + + + 20 + 120 + + + + + + + + Qt::Vertical + + + QSizePolicy::Fixed + + + + 20 + 120 + + + + + + + + + 0 + 0 + + + + + 490 + 190 + + + + OpenHandCursor + + + + + + 检定程序管理 + + + + 60 + 60 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + + + + + + 0 + 0 + + + + + 10 + 10 + + + + color: white; +font-weight: bold; +font-size: 14pt; + + + 欢迎您! 用户: admin + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + Qt::Horizontal + + + QSizePolicy::Fixed + + + + 270 + 20 + + + + + + + + + + + btnConfig + btnData + tbtnMain1 + tbtnMain2 + tbtnMain3 + tbtnConfig1 + tbtnConfig2 + tbtnConfig3 + tbtnConfig4 + tbtnConfig5 + tbtnConfig6 + btnMain + btnHelp + btnExit + + + + diff --git a/softwareDirectory/AutoVerScheme/loginwindow.cpp b/softwareDirectory/AutoVerScheme/loginwindow.cpp new file mode 100644 index 0000000..155988a --- /dev/null +++ b/softwareDirectory/AutoVerScheme/loginwindow.cpp @@ -0,0 +1,68 @@ +#include "loginwindow.h" +#include "ui_loginwindow.h" +#include +#include +#include + +#include "indexwindow.h" + +loginWindow::loginWindow(QWidget *parent): QMainWindow(parent), ui(new Ui::loginWindow) +{ + ui->setupUi(this); + this->initForm(); + ui->label->styleSheet(); + +} + +loginWindow::~loginWindow() +{ + delete ui; +} +void loginWindow::initForm() +{ + //this->setWindowFlags(Qt::FramelessWindowHint); + //调用样式 + loadStyle(":/qss/login.css"); +} + +void loginWindow::loadStyle(const QString &qssFile) +{ + //加载样式表 + QString qss; + + QFile file(qssFile); + + if (file.open(QFile::ReadOnly)) { + //用QTextStream读取样式文件不用区分文件编码 带bom也行 + QStringList list; + QTextStream in(&file); + //in.setCodec("utf-8"); + while (!in.atEnd()) { + QString line; + in >> line; + list << line; + } + + file.close(); + qss = list.join("\n"); + QString paletteColor = qss.mid(20, 7); + qApp->setPalette(QPalette(paletteColor)); + //用时主要在下面这句 + qApp->setStyleSheet(qss); + } + + +} + + +void loginWindow::on_Button_login_clicked() +{ + QMessageBox::information(this, "提示", "登录成功!"); + //查询数据库内是否有账号 + IndexWindow *indexWindow = new IndexWindow; + indexWindow->setWindowState(Qt::WindowMaximized); + indexWindow->show(); + this->close(); + +} + diff --git a/softwareDirectory/AutoVerScheme/loginwindow.h b/softwareDirectory/AutoVerScheme/loginwindow.h new file mode 100644 index 0000000..2695bc3 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/loginwindow.h @@ -0,0 +1,31 @@ +#ifndef MAINWINDOW_H +#define MAINWINDOW_H + +#include +#include + + + +namespace Ui { +class loginWindow; +} + +class loginWindow : public QMainWindow +{ + Q_OBJECT + +public: + explicit loginWindow(QWidget *parent = 0); + ~loginWindow(); +private slots: + void initForm(); + void loadStyle(const QString &qssFile); + void on_Button_login_clicked(); + + +private: + Ui::loginWindow *ui; +private: + QSqlQuery query; +}; +#endif // MAINWINDOW_H diff --git a/softwareDirectory/AutoVerScheme/loginwindow.ui b/softwareDirectory/AutoVerScheme/loginwindow.ui new file mode 100644 index 0000000..ca04751 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/loginwindow.ui @@ -0,0 +1,234 @@ + + + loginWindow + + + + 0 + 0 + 954 + 603 + + + + MainWindow + + + background-color: rgb(255, 255, 255) + + + + + + 110 + 110 + 271 + 231 + + + + background-image: url(:/image/login/u9.png); +background-repeat: no-repeat; background-position: center; +background-color: transparent; + + + + + + + + + 0 + 10 + 491 + 601 + + + + background-image: url(:/image/login/u2.png); +background-repeat: no-repeat; +background-color: transparent; +background-repeat: no-repeat; +background-position: center; +background-size: 100%; + + + + + + + + + 5 + 10 + 491 + 569 + + + + background-image: url(:/image/login/u0.png); +background-repeat: no-repeat; background-position: center; + + + + + + 170 + 350 + 241 + 51 + + + + background-color: transparent; + + + Metrology + + + + + + 490 + 10 + 471 + 571 + + + + + + + 610 + 70 + 271 + 61 + + + + 自动检定软件 + + + + + + 540 + 200 + 61 + 61 + + + + + + + + + + 490 + 10 + 461 + 571 + + + + + + + 540 + 290 + 61 + 61 + + + + + + + + + + 540 + 430 + 341 + 81 + + + + OpenHandCursor + + + + + + 登 录 + + + + + + 610 + 210 + 221 + 41 + + + + 请输入账号 + + + + + + 610 + 300 + 221 + 41 + + + + 请输入账号 + + + + + + 507 + 1 + 72 + 16 + + + + + + + label_4 + graphicsView + label_2 + label_3 + graphicsView_2 + textBrowser + lab_title + textBrowser_2 + textBrowser_3 + Button_login + textEdit_acc + textEdit_pass + label + + + + + 0 + 0 + 954 + 25 + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/main.cpp b/softwareDirectory/AutoVerScheme/main.cpp new file mode 100644 index 0000000..16b6d3f --- /dev/null +++ b/softwareDirectory/AutoVerScheme/main.cpp @@ -0,0 +1,23 @@ +#include "loginwindow.h" +#include "mainwindow.h" +#include +#include "indexWindow.h" +#include "testview.h" + +int main(int argc, char *argv[]) +{ + QApplication a(argc, argv); + // 加载外部的CSS文件 + a.setStyleSheet("file:///path/to/styles.css"); + //设置字体 + QFont font; + font.setFamily("Microsoft Yahei"); + font.setPixelSize(13); + a.setFont(font); + + //TestView s; + //s.show(); + loginWindow w; + w.show(); + return a.exec(); +} diff --git a/softwareDirectory/AutoVerScheme/mainwindow.cpp b/softwareDirectory/AutoVerScheme/mainwindow.cpp new file mode 100644 index 0000000..12d07c0 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/mainwindow.cpp @@ -0,0 +1,14 @@ +#include "mainwindow.h" +#include "ui_mainwindow.h" + +MainWindow::MainWindow(QWidget *parent) : + QMainWindow(parent), + ui(new Ui::MainWindow) +{ + ui->setupUi(this); +} + +MainWindow::~MainWindow() +{ + delete ui; +} diff --git a/softwareDirectory/AutoVerScheme/mainwindow.h b/softwareDirectory/AutoVerScheme/mainwindow.h new file mode 100644 index 0000000..40fd472 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/mainwindow.h @@ -0,0 +1,22 @@ +#ifndef MAINWINDOW_H +#define MAINWINDOW_H + +#include + +namespace Ui { +class MainWindow; +} + +class MainWindow : public QMainWindow +{ + Q_OBJECT + +public: + explicit MainWindow(QWidget *parent = nullptr); + ~MainWindow(); + +private: + Ui::MainWindow *ui; +}; + +#endif // MAINWINDOW_H diff --git a/softwareDirectory/AutoVerScheme/mainwindow.ui b/softwareDirectory/AutoVerScheme/mainwindow.ui new file mode 100644 index 0000000..dd4f1c8 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/mainwindow.ui @@ -0,0 +1,24 @@ + + + + + MainWindow + + + + 0 + 0 + 800 + 600 + + + + MainWindow + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u101.png b/softwareDirectory/AutoVerScheme/res/image/Index/u101.png new file mode 100644 index 0000000..9e371e3 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u101.png Binary files differ diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u102.png b/softwareDirectory/AutoVerScheme/res/image/Index/u102.png new file mode 100644 index 0000000..b288067 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u102.png Binary files differ diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u15.png b/softwareDirectory/AutoVerScheme/res/image/Index/u15.png new file mode 100644 index 0000000..7e699e6 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u15.png Binary files differ diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u17.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u17.svg new file mode 100644 index 0000000..acc0502 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u17.svg @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u18.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u18.svg new file mode 100644 index 0000000..6a00a10 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u18.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro new file mode 100644 index 0000000..5b8f852 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro @@ -0,0 +1,48 @@ +QT += core gui +QT += sql +greaterThan(QT_MAJOR_VERSION, 4): QT += widgets + +CONFIG += c++11 + +# The following define makes your compiler emit warnings if you use +# any Qt feature that has been marked deprecated (the exact warnings +# depend on your compiler). Please consult the documentation of the +# deprecated API in order to know how to port your code away from it. +DEFINES += QT_DEPRECATED_WARNINGS + +# You can also make your code fail to compile if it uses deprecated APIs. +# In order to do so, uncomment the following line. +# You can also select to disable deprecated APIs only up to a certain version of Qt. +#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 + +SOURCES += \ + indexwindow.cpp \ + loginwindow.cpp \ + main.cpp \ + mainwindow.cpp \ + testview.cpp + +HEADERS += \ + indexwindow.h \ + loginwindow.h \ + mainwindow.h \ + testview.h + +FORMS += \ + indexwindow.ui \ + loginwindow.ui \ + mainwindow.ui \ + testview.ui + +# Default rules for deployment. +qnx: target.path = /tmp/$${TARGET}/bin +else: unix:!android: target.path = /opt/$${TARGET}/bin +!isEmpty(target.path): INSTALLS += target + +RESOURCES += \ + res/qss.qrc \ + res/res.qrc + +DISTFILES += \ + res/image/u2.png + diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user new file mode 100644 index 0000000..1f5ec64 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user @@ -0,0 +1,562 @@ + + + + + + EnvironmentId + {c08df58c-84a7-4965-bca6-e98789474efa} + + + ProjectExplorer.Project.ActiveTarget + 0 + + + ProjectExplorer.Project.EditorSettings + + true + false + true + + Cpp + + CppGlobal + + + + QmlJS + + QmlJSGlobal + + + 2 + UTF-8 + false + 4 + false + 80 + true + true + 1 + true + false + 0 + true + true + 0 + 8 + true + 1 + true + true + true + false + + + + ProjectExplorer.Project.PluginSettings + + + -fno-delayed-template-parsing + + true + + + + ProjectExplorer.Project.Target.0 + + Desktop Qt 5.14.2 MinGW 64-bit + Desktop Qt 5.14.2 MinGW 64-bit + qt.qt5.5142.win64_mingw73_kit + 0 + 0 + 0 + + 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 + 0 + 0 + 0 + + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug + + + true + QtProjectManager.QMakeBuildStep + true + + false + false + false + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Debug + Qt4ProjectManager.Qt4BuildConfiguration + 2 + + + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Release + + + true + QtProjectManager.QMakeBuildStep + false + + false + false + true + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Release + Qt4ProjectManager.Qt4BuildConfiguration + 0 + + + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Profile + + + true + QtProjectManager.QMakeBuildStep + true + + false + true + true + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Profile + Qt4ProjectManager.Qt4BuildConfiguration + 0 + + 3 + + + 0 + Deploy + Deploy + ProjectExplorer.BuildSteps.Deploy + + 1 + ProjectExplorer.DefaultDeployConfiguration + + 1 + + + dwarf + + cpu-cycles + + + 250 + + -e + cpu-cycles + --call-graph + dwarf,4096 + -F + 250 + + -F + true + 4096 + false + false + 1000 + + true + + false + false + false + false + true + 0.01 + 10 + true + kcachegrind + 1 + 25 + + 1 + true + false + true + valgrind + + 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + + 2 + + Qt4ProjectManager.Qt4RunConfiguration:D:/Auto_verification_scheme/AutoVerScheme/AutoVerScheme.pro + D:/Auto_verification_scheme/AutoVerScheme/AutoVerScheme.pro + + false + + false + true + true + false + false + true + + + + 1 + + + + ProjectExplorer.Project.TargetCount + 2 + + + ProjectExplorer.Project.Updater.FileVersion + 22 + + + Version + 22 + + diff --git a/softwareDirectory/AutoVerScheme/indexwindow.cpp b/softwareDirectory/AutoVerScheme/indexwindow.cpp new file mode 100644 index 0000000..3e52c7b --- /dev/null +++ b/softwareDirectory/AutoVerScheme/indexwindow.cpp @@ -0,0 +1,55 @@ +#include "indexwindow.h" +#include "ui_indexwindow.h" +#include "QFile" +#include "QTextStream" + +IndexWindow::IndexWindow(QWidget *parent) : + QMainWindow(parent), + ui(new Ui::IndexWindow) +{ + ui->setupUi(this); + this->initForm(); +} + +IndexWindow::~IndexWindow() +{ + delete ui; +} +void IndexWindow::initForm() +{ + //this->setWindowFlags(Qt::FramelessWindowHint); + //调用样式 + loadStyle(":/qss/Index.css"); + +} + +void IndexWindow::loadStyle(const QString &qssFile) +{ + //加载样式表 + QString qss; + + QFile file(qssFile); + + if (file.open(QFile::ReadOnly)) { + //用QTextStream读取样式文件不用区分文件编码 带bom也行 + QStringList list; + QTextStream in(&file); + //in.setCodec("utf-8"); + while (!in.atEnd()) { + QString line; + in >> line; + list << line; + } + + file.close(); + qss = list.join("\n"); + QString paletteColor = qss.mid(20, 7); + qApp->setPalette(QPalette(paletteColor)); + //用时主要在下面这句 + qApp->setStyleSheet(qss); + } + + +} + + diff --git a/softwareDirectory/AutoVerScheme/indexwindow.h b/softwareDirectory/AutoVerScheme/indexwindow.h new file mode 100644 index 0000000..2aee958 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/indexwindow.h @@ -0,0 +1,26 @@ +#ifndef INDEXWINDOW_H +#define INDEXWINDOW_H + +#include + +namespace Ui { +class IndexWindow; +} + +class IndexWindow : public QMainWindow +{ + Q_OBJECT + +public: + explicit IndexWindow(QWidget *parent = nullptr); + ~IndexWindow(); +private slots: + void initForm(); + void loadStyle(const QString &qssFile); + + +private: + Ui::IndexWindow *ui; +}; + +#endif // INDEXWINDOW_H diff --git a/softwareDirectory/AutoVerScheme/indexwindow.ui b/softwareDirectory/AutoVerScheme/indexwindow.ui new file mode 100644 index 0000000..d7153e0 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/indexwindow.ui @@ -0,0 +1,539 @@ + + + IndexWindow + + + Qt::NonModal + + + + 0 + 0 + 1334 + 789 + + + + + 0 + 0 + + + + MainWindow + + + + + + + 100 + 100 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + 6 + + + QLayout::SetFixedSize + + + 0 + + + 0 + + + + + Qt::Horizontal + + + QSizePolicy::Fixed + + + + 120 + 13 + + + + + + + + + 0 + 0 + + + + + 560 + 0 + + + + Qt::DefaultContextMenu + + + color: white; +font-weight: bold; +font-size: 24pt; + + + + + QFrame::NoFrame + + + QFrame::Plain + + + 自动检定系统 + + + Qt::AutoText + + + false + + + Qt::AlignCenter + + + + + + + Qt::Horizontal + + + QSizePolicy::Fixed + + + + 40 + 13 + + + + + + + + + + Qt::Vertical + + + QSizePolicy::Fixed + + + + 50 + 80 + + + + + + + + + + Qt::Vertical + + + QSizePolicy::Fixed + + + + 20 + 120 + + + + + + + + Qt::Horizontal + + + + 100 + 20 + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + 0 + 0 + + + + + 310 + 190 + + + + OpenHandCursor + + + margin-right: 0px; + + + 信息管理 + + + + 60 + 60 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + Qt::Horizontal + + + + 327 + 20 + + + + + + + + + 0 + 0 + + + + + 490 + 190 + + + + OpenHandCursor + + + + + + 自动核查 + + + + 60 + 60 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + + 0 + 0 + + + + + 490 + 190 + + + + OpenHandCursor + + + + + + 自动检定 + + + + 60 + 60 + + + + false + + + false + + + Qt::ToolButtonTextUnderIcon + + + + + + + + 0 + 0 + + + + + 490 + 190 + + + + OpenHandCursor + + + + + + 核查程序管理 + + + + 60 + 60 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + Qt::Horizontal + + + + 327 + 20 + + + + + + + + + 0 + 0 + + + + + 310 + 190 + + + + OpenHandCursor + + + margin-right: 0px; + + + 数据同步 + + + + 60 + 60 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + Qt::Vertical + + + QSizePolicy::Fixed + + + + 20 + 120 + + + + + + + + Qt::Vertical + + + QSizePolicy::Fixed + + + + 20 + 120 + + + + + + + + + 0 + 0 + + + + + 490 + 190 + + + + OpenHandCursor + + + + + + 检定程序管理 + + + + 60 + 60 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + + + + + + 0 + 0 + + + + + 10 + 10 + + + + color: white; +font-weight: bold; +font-size: 14pt; + + + 欢迎您! 用户: admin + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + Qt::Horizontal + + + QSizePolicy::Fixed + + + + 270 + 20 + + + + + + + + + + + btnConfig + btnData + tbtnMain1 + tbtnMain2 + tbtnMain3 + tbtnConfig1 + tbtnConfig2 + tbtnConfig3 + tbtnConfig4 + tbtnConfig5 + tbtnConfig6 + btnMain + btnHelp + btnExit + + + + diff --git a/softwareDirectory/AutoVerScheme/loginwindow.cpp b/softwareDirectory/AutoVerScheme/loginwindow.cpp new file mode 100644 index 0000000..155988a --- /dev/null +++ b/softwareDirectory/AutoVerScheme/loginwindow.cpp @@ -0,0 +1,68 @@ +#include "loginwindow.h" +#include "ui_loginwindow.h" +#include +#include +#include + +#include "indexwindow.h" + +loginWindow::loginWindow(QWidget *parent): QMainWindow(parent), ui(new Ui::loginWindow) +{ + ui->setupUi(this); + this->initForm(); + ui->label->styleSheet(); + +} + +loginWindow::~loginWindow() +{ + delete ui; +} +void loginWindow::initForm() +{ + //this->setWindowFlags(Qt::FramelessWindowHint); + //调用样式 + loadStyle(":/qss/login.css"); +} + +void loginWindow::loadStyle(const QString &qssFile) +{ + //加载样式表 + QString qss; + + QFile file(qssFile); + + if (file.open(QFile::ReadOnly)) { + //用QTextStream读取样式文件不用区分文件编码 带bom也行 + QStringList list; + QTextStream in(&file); + //in.setCodec("utf-8"); + while (!in.atEnd()) { + QString line; + in >> line; + list << line; + } + + file.close(); + qss = list.join("\n"); + QString paletteColor = qss.mid(20, 7); + qApp->setPalette(QPalette(paletteColor)); + //用时主要在下面这句 + qApp->setStyleSheet(qss); + } + + +} + + +void loginWindow::on_Button_login_clicked() +{ + QMessageBox::information(this, "提示", "登录成功!"); + //查询数据库内是否有账号 + IndexWindow *indexWindow = new IndexWindow; + indexWindow->setWindowState(Qt::WindowMaximized); + indexWindow->show(); + this->close(); + +} + diff --git a/softwareDirectory/AutoVerScheme/loginwindow.h b/softwareDirectory/AutoVerScheme/loginwindow.h new file mode 100644 index 0000000..2695bc3 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/loginwindow.h @@ -0,0 +1,31 @@ +#ifndef MAINWINDOW_H +#define MAINWINDOW_H + +#include +#include + + + +namespace Ui { +class loginWindow; +} + +class loginWindow : public QMainWindow +{ + Q_OBJECT + +public: + explicit loginWindow(QWidget *parent = 0); + ~loginWindow(); +private slots: + void initForm(); + void loadStyle(const QString &qssFile); + void on_Button_login_clicked(); + + +private: + Ui::loginWindow *ui; +private: + QSqlQuery query; +}; +#endif // MAINWINDOW_H diff --git a/softwareDirectory/AutoVerScheme/loginwindow.ui b/softwareDirectory/AutoVerScheme/loginwindow.ui new file mode 100644 index 0000000..ca04751 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/loginwindow.ui @@ -0,0 +1,234 @@ + + + loginWindow + + + + 0 + 0 + 954 + 603 + + + + MainWindow + + + background-color: rgb(255, 255, 255) + + + + + + 110 + 110 + 271 + 231 + + + + background-image: url(:/image/login/u9.png); +background-repeat: no-repeat; background-position: center; +background-color: transparent; + + + + + + + + + 0 + 10 + 491 + 601 + + + + background-image: url(:/image/login/u2.png); +background-repeat: no-repeat; +background-color: transparent; +background-repeat: no-repeat; +background-position: center; +background-size: 100%; + + + + + + + + + 5 + 10 + 491 + 569 + + + + background-image: url(:/image/login/u0.png); +background-repeat: no-repeat; background-position: center; + + + + + + 170 + 350 + 241 + 51 + + + + background-color: transparent; + + + Metrology + + + + + + 490 + 10 + 471 + 571 + + + + + + + 610 + 70 + 271 + 61 + + + + 自动检定软件 + + + + + + 540 + 200 + 61 + 61 + + + + + + + + + + 490 + 10 + 461 + 571 + + + + + + + 540 + 290 + 61 + 61 + + + + + + + + + + 540 + 430 + 341 + 81 + + + + OpenHandCursor + + + + + + 登 录 + + + + + + 610 + 210 + 221 + 41 + + + + 请输入账号 + + + + + + 610 + 300 + 221 + 41 + + + + 请输入账号 + + + + + + 507 + 1 + 72 + 16 + + + + + + + label_4 + graphicsView + label_2 + label_3 + graphicsView_2 + textBrowser + lab_title + textBrowser_2 + textBrowser_3 + Button_login + textEdit_acc + textEdit_pass + label + + + + + 0 + 0 + 954 + 25 + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/main.cpp b/softwareDirectory/AutoVerScheme/main.cpp new file mode 100644 index 0000000..16b6d3f --- /dev/null +++ b/softwareDirectory/AutoVerScheme/main.cpp @@ -0,0 +1,23 @@ +#include "loginwindow.h" +#include "mainwindow.h" +#include +#include "indexWindow.h" +#include "testview.h" + +int main(int argc, char *argv[]) +{ + QApplication a(argc, argv); + // 加载外部的CSS文件 + a.setStyleSheet("file:///path/to/styles.css"); + //设置字体 + QFont font; + font.setFamily("Microsoft Yahei"); + font.setPixelSize(13); + a.setFont(font); + + //TestView s; + //s.show(); + loginWindow w; + w.show(); + return a.exec(); +} diff --git a/softwareDirectory/AutoVerScheme/mainwindow.cpp b/softwareDirectory/AutoVerScheme/mainwindow.cpp new file mode 100644 index 0000000..12d07c0 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/mainwindow.cpp @@ -0,0 +1,14 @@ +#include "mainwindow.h" +#include "ui_mainwindow.h" + +MainWindow::MainWindow(QWidget *parent) : + QMainWindow(parent), + ui(new Ui::MainWindow) +{ + ui->setupUi(this); +} + +MainWindow::~MainWindow() +{ + delete ui; +} diff --git a/softwareDirectory/AutoVerScheme/mainwindow.h b/softwareDirectory/AutoVerScheme/mainwindow.h new file mode 100644 index 0000000..40fd472 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/mainwindow.h @@ -0,0 +1,22 @@ +#ifndef MAINWINDOW_H +#define MAINWINDOW_H + +#include + +namespace Ui { +class MainWindow; +} + +class MainWindow : public QMainWindow +{ + Q_OBJECT + +public: + explicit MainWindow(QWidget *parent = nullptr); + ~MainWindow(); + +private: + Ui::MainWindow *ui; +}; + +#endif // MAINWINDOW_H diff --git a/softwareDirectory/AutoVerScheme/mainwindow.ui b/softwareDirectory/AutoVerScheme/mainwindow.ui new file mode 100644 index 0000000..dd4f1c8 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/mainwindow.ui @@ -0,0 +1,24 @@ + + + + + MainWindow + + + + 0 + 0 + 800 + 600 + + + + MainWindow + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u101.png b/softwareDirectory/AutoVerScheme/res/image/Index/u101.png new file mode 100644 index 0000000..9e371e3 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u101.png Binary files differ diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u102.png b/softwareDirectory/AutoVerScheme/res/image/Index/u102.png new file mode 100644 index 0000000..b288067 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u102.png Binary files differ diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u15.png b/softwareDirectory/AutoVerScheme/res/image/Index/u15.png new file mode 100644 index 0000000..7e699e6 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u15.png Binary files differ diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u17.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u17.svg new file mode 100644 index 0000000..acc0502 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u17.svg @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u18.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u18.svg new file mode 100644 index 0000000..6a00a10 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u18.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u19.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u19.svg new file mode 100644 index 0000000..42dea06 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u19.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro new file mode 100644 index 0000000..5b8f852 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro @@ -0,0 +1,48 @@ +QT += core gui +QT += sql +greaterThan(QT_MAJOR_VERSION, 4): QT += widgets + +CONFIG += c++11 + +# The following define makes your compiler emit warnings if you use +# any Qt feature that has been marked deprecated (the exact warnings +# depend on your compiler). Please consult the documentation of the +# deprecated API in order to know how to port your code away from it. +DEFINES += QT_DEPRECATED_WARNINGS + +# You can also make your code fail to compile if it uses deprecated APIs. +# In order to do so, uncomment the following line. +# You can also select to disable deprecated APIs only up to a certain version of Qt. +#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 + +SOURCES += \ + indexwindow.cpp \ + loginwindow.cpp \ + main.cpp \ + mainwindow.cpp \ + testview.cpp + +HEADERS += \ + indexwindow.h \ + loginwindow.h \ + mainwindow.h \ + testview.h + +FORMS += \ + indexwindow.ui \ + loginwindow.ui \ + mainwindow.ui \ + testview.ui + +# Default rules for deployment. +qnx: target.path = /tmp/$${TARGET}/bin +else: unix:!android: target.path = /opt/$${TARGET}/bin +!isEmpty(target.path): INSTALLS += target + +RESOURCES += \ + res/qss.qrc \ + res/res.qrc + +DISTFILES += \ + res/image/u2.png + diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user new file mode 100644 index 0000000..1f5ec64 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user @@ -0,0 +1,562 @@ + + + + + + EnvironmentId + {c08df58c-84a7-4965-bca6-e98789474efa} + + + ProjectExplorer.Project.ActiveTarget + 0 + + + ProjectExplorer.Project.EditorSettings + + true + false + true + + Cpp + + CppGlobal + + + + QmlJS + + QmlJSGlobal + + + 2 + UTF-8 + false + 4 + false + 80 + true + true + 1 + true + false + 0 + true + true + 0 + 8 + true + 1 + true + true + true + false + + + + ProjectExplorer.Project.PluginSettings + + + -fno-delayed-template-parsing + + true + + + + ProjectExplorer.Project.Target.0 + + Desktop Qt 5.14.2 MinGW 64-bit + Desktop Qt 5.14.2 MinGW 64-bit + qt.qt5.5142.win64_mingw73_kit + 0 + 0 + 0 + + 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 + 0 + 0 + 0 + + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug + + + true + QtProjectManager.QMakeBuildStep + true + + false + false + false + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Debug + Qt4ProjectManager.Qt4BuildConfiguration + 2 + + + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Release + + + true + QtProjectManager.QMakeBuildStep + false + + false + false + true + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Release + Qt4ProjectManager.Qt4BuildConfiguration + 0 + + + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Profile + + + true + QtProjectManager.QMakeBuildStep + true + + false + true + true + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Profile + Qt4ProjectManager.Qt4BuildConfiguration + 0 + + 3 + + + 0 + Deploy + Deploy + ProjectExplorer.BuildSteps.Deploy + + 1 + ProjectExplorer.DefaultDeployConfiguration + + 1 + + + dwarf + + cpu-cycles + + + 250 + + -e + cpu-cycles + --call-graph + dwarf,4096 + -F + 250 + + -F + true + 4096 + false + false + 1000 + + true + + false + false + false + false + true + 0.01 + 10 + true + kcachegrind + 1 + 25 + + 1 + true + false + true + valgrind + + 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + + 2 + + Qt4ProjectManager.Qt4RunConfiguration:D:/Auto_verification_scheme/AutoVerScheme/AutoVerScheme.pro + D:/Auto_verification_scheme/AutoVerScheme/AutoVerScheme.pro + + false + + false + true + true + false + false + true + + + + 1 + + + + ProjectExplorer.Project.TargetCount + 2 + + + ProjectExplorer.Project.Updater.FileVersion + 22 + + + Version + 22 + + diff --git a/softwareDirectory/AutoVerScheme/indexwindow.cpp b/softwareDirectory/AutoVerScheme/indexwindow.cpp new file mode 100644 index 0000000..3e52c7b --- /dev/null +++ b/softwareDirectory/AutoVerScheme/indexwindow.cpp @@ -0,0 +1,55 @@ +#include "indexwindow.h" +#include "ui_indexwindow.h" +#include "QFile" +#include "QTextStream" + +IndexWindow::IndexWindow(QWidget *parent) : + QMainWindow(parent), + ui(new Ui::IndexWindow) +{ + ui->setupUi(this); + this->initForm(); +} + +IndexWindow::~IndexWindow() +{ + delete ui; +} +void IndexWindow::initForm() +{ + //this->setWindowFlags(Qt::FramelessWindowHint); + //调用样式 + loadStyle(":/qss/Index.css"); + +} + +void IndexWindow::loadStyle(const QString &qssFile) +{ + //加载样式表 + QString qss; + + QFile file(qssFile); + + if (file.open(QFile::ReadOnly)) { + //用QTextStream读取样式文件不用区分文件编码 带bom也行 + QStringList list; + QTextStream in(&file); + //in.setCodec("utf-8"); + while (!in.atEnd()) { + QString line; + in >> line; + list << line; + } + + file.close(); + qss = list.join("\n"); + QString paletteColor = qss.mid(20, 7); + qApp->setPalette(QPalette(paletteColor)); + //用时主要在下面这句 + qApp->setStyleSheet(qss); + } + + +} + + diff --git a/softwareDirectory/AutoVerScheme/indexwindow.h b/softwareDirectory/AutoVerScheme/indexwindow.h new file mode 100644 index 0000000..2aee958 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/indexwindow.h @@ -0,0 +1,26 @@ +#ifndef INDEXWINDOW_H +#define INDEXWINDOW_H + +#include + +namespace Ui { +class IndexWindow; +} + +class IndexWindow : public QMainWindow +{ + Q_OBJECT + +public: + explicit IndexWindow(QWidget *parent = nullptr); + ~IndexWindow(); +private slots: + void initForm(); + void loadStyle(const QString &qssFile); + + +private: + Ui::IndexWindow *ui; +}; + +#endif // INDEXWINDOW_H diff --git a/softwareDirectory/AutoVerScheme/indexwindow.ui b/softwareDirectory/AutoVerScheme/indexwindow.ui new file mode 100644 index 0000000..d7153e0 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/indexwindow.ui @@ -0,0 +1,539 @@ + + + IndexWindow + + + Qt::NonModal + + + + 0 + 0 + 1334 + 789 + + + + + 0 + 0 + + + + MainWindow + + + + + + + 100 + 100 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + 6 + + + QLayout::SetFixedSize + + + 0 + + + 0 + + + + + Qt::Horizontal + + + QSizePolicy::Fixed + + + + 120 + 13 + + + + + + + + + 0 + 0 + + + + + 560 + 0 + + + + Qt::DefaultContextMenu + + + color: white; +font-weight: bold; +font-size: 24pt; + + + + + QFrame::NoFrame + + + QFrame::Plain + + + 自动检定系统 + + + Qt::AutoText + + + false + + + Qt::AlignCenter + + + + + + + Qt::Horizontal + + + QSizePolicy::Fixed + + + + 40 + 13 + + + + + + + + + + Qt::Vertical + + + QSizePolicy::Fixed + + + + 50 + 80 + + + + + + + + + + Qt::Vertical + + + QSizePolicy::Fixed + + + + 20 + 120 + + + + + + + + Qt::Horizontal + + + + 100 + 20 + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + 0 + 0 + + + + + 310 + 190 + + + + OpenHandCursor + + + margin-right: 0px; + + + 信息管理 + + + + 60 + 60 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + Qt::Horizontal + + + + 327 + 20 + + + + + + + + + 0 + 0 + + + + + 490 + 190 + + + + OpenHandCursor + + + + + + 自动核查 + + + + 60 + 60 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + + 0 + 0 + + + + + 490 + 190 + + + + OpenHandCursor + + + + + + 自动检定 + + + + 60 + 60 + + + + false + + + false + + + Qt::ToolButtonTextUnderIcon + + + + + + + + 0 + 0 + + + + + 490 + 190 + + + + OpenHandCursor + + + + + + 核查程序管理 + + + + 60 + 60 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + Qt::Horizontal + + + + 327 + 20 + + + + + + + + + 0 + 0 + + + + + 310 + 190 + + + + OpenHandCursor + + + margin-right: 0px; + + + 数据同步 + + + + 60 + 60 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + Qt::Vertical + + + QSizePolicy::Fixed + + + + 20 + 120 + + + + + + + + Qt::Vertical + + + QSizePolicy::Fixed + + + + 20 + 120 + + + + + + + + + 0 + 0 + + + + + 490 + 190 + + + + OpenHandCursor + + + + + + 检定程序管理 + + + + 60 + 60 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + + + + + + 0 + 0 + + + + + 10 + 10 + + + + color: white; +font-weight: bold; +font-size: 14pt; + + + 欢迎您! 用户: admin + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + Qt::Horizontal + + + QSizePolicy::Fixed + + + + 270 + 20 + + + + + + + + + + + btnConfig + btnData + tbtnMain1 + tbtnMain2 + tbtnMain3 + tbtnConfig1 + tbtnConfig2 + tbtnConfig3 + tbtnConfig4 + tbtnConfig5 + tbtnConfig6 + btnMain + btnHelp + btnExit + + + + diff --git a/softwareDirectory/AutoVerScheme/loginwindow.cpp b/softwareDirectory/AutoVerScheme/loginwindow.cpp new file mode 100644 index 0000000..155988a --- /dev/null +++ b/softwareDirectory/AutoVerScheme/loginwindow.cpp @@ -0,0 +1,68 @@ +#include "loginwindow.h" +#include "ui_loginwindow.h" +#include +#include +#include + +#include "indexwindow.h" + +loginWindow::loginWindow(QWidget *parent): QMainWindow(parent), ui(new Ui::loginWindow) +{ + ui->setupUi(this); + this->initForm(); + ui->label->styleSheet(); + +} + +loginWindow::~loginWindow() +{ + delete ui; +} +void loginWindow::initForm() +{ + //this->setWindowFlags(Qt::FramelessWindowHint); + //调用样式 + loadStyle(":/qss/login.css"); +} + +void loginWindow::loadStyle(const QString &qssFile) +{ + //加载样式表 + QString qss; + + QFile file(qssFile); + + if (file.open(QFile::ReadOnly)) { + //用QTextStream读取样式文件不用区分文件编码 带bom也行 + QStringList list; + QTextStream in(&file); + //in.setCodec("utf-8"); + while (!in.atEnd()) { + QString line; + in >> line; + list << line; + } + + file.close(); + qss = list.join("\n"); + QString paletteColor = qss.mid(20, 7); + qApp->setPalette(QPalette(paletteColor)); + //用时主要在下面这句 + qApp->setStyleSheet(qss); + } + + +} + + +void loginWindow::on_Button_login_clicked() +{ + QMessageBox::information(this, "提示", "登录成功!"); + //查询数据库内是否有账号 + IndexWindow *indexWindow = new IndexWindow; + indexWindow->setWindowState(Qt::WindowMaximized); + indexWindow->show(); + this->close(); + +} + diff --git a/softwareDirectory/AutoVerScheme/loginwindow.h b/softwareDirectory/AutoVerScheme/loginwindow.h new file mode 100644 index 0000000..2695bc3 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/loginwindow.h @@ -0,0 +1,31 @@ +#ifndef MAINWINDOW_H +#define MAINWINDOW_H + +#include +#include + + + +namespace Ui { +class loginWindow; +} + +class loginWindow : public QMainWindow +{ + Q_OBJECT + +public: + explicit loginWindow(QWidget *parent = 0); + ~loginWindow(); +private slots: + void initForm(); + void loadStyle(const QString &qssFile); + void on_Button_login_clicked(); + + +private: + Ui::loginWindow *ui; +private: + QSqlQuery query; +}; +#endif // MAINWINDOW_H diff --git a/softwareDirectory/AutoVerScheme/loginwindow.ui b/softwareDirectory/AutoVerScheme/loginwindow.ui new file mode 100644 index 0000000..ca04751 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/loginwindow.ui @@ -0,0 +1,234 @@ + + + loginWindow + + + + 0 + 0 + 954 + 603 + + + + MainWindow + + + background-color: rgb(255, 255, 255) + + + + + + 110 + 110 + 271 + 231 + + + + background-image: url(:/image/login/u9.png); +background-repeat: no-repeat; background-position: center; +background-color: transparent; + + + + + + + + + 0 + 10 + 491 + 601 + + + + background-image: url(:/image/login/u2.png); +background-repeat: no-repeat; +background-color: transparent; +background-repeat: no-repeat; +background-position: center; +background-size: 100%; + + + + + + + + + 5 + 10 + 491 + 569 + + + + background-image: url(:/image/login/u0.png); +background-repeat: no-repeat; background-position: center; + + + + + + 170 + 350 + 241 + 51 + + + + background-color: transparent; + + + Metrology + + + + + + 490 + 10 + 471 + 571 + + + + + + + 610 + 70 + 271 + 61 + + + + 自动检定软件 + + + + + + 540 + 200 + 61 + 61 + + + + + + + + + + 490 + 10 + 461 + 571 + + + + + + + 540 + 290 + 61 + 61 + + + + + + + + + + 540 + 430 + 341 + 81 + + + + OpenHandCursor + + + + + + 登 录 + + + + + + 610 + 210 + 221 + 41 + + + + 请输入账号 + + + + + + 610 + 300 + 221 + 41 + + + + 请输入账号 + + + + + + 507 + 1 + 72 + 16 + + + + + + + label_4 + graphicsView + label_2 + label_3 + graphicsView_2 + textBrowser + lab_title + textBrowser_2 + textBrowser_3 + Button_login + textEdit_acc + textEdit_pass + label + + + + + 0 + 0 + 954 + 25 + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/main.cpp b/softwareDirectory/AutoVerScheme/main.cpp new file mode 100644 index 0000000..16b6d3f --- /dev/null +++ b/softwareDirectory/AutoVerScheme/main.cpp @@ -0,0 +1,23 @@ +#include "loginwindow.h" +#include "mainwindow.h" +#include +#include "indexWindow.h" +#include "testview.h" + +int main(int argc, char *argv[]) +{ + QApplication a(argc, argv); + // 加载外部的CSS文件 + a.setStyleSheet("file:///path/to/styles.css"); + //设置字体 + QFont font; + font.setFamily("Microsoft Yahei"); + font.setPixelSize(13); + a.setFont(font); + + //TestView s; + //s.show(); + loginWindow w; + w.show(); + return a.exec(); +} diff --git a/softwareDirectory/AutoVerScheme/mainwindow.cpp b/softwareDirectory/AutoVerScheme/mainwindow.cpp new file mode 100644 index 0000000..12d07c0 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/mainwindow.cpp @@ -0,0 +1,14 @@ +#include "mainwindow.h" +#include "ui_mainwindow.h" + +MainWindow::MainWindow(QWidget *parent) : + QMainWindow(parent), + ui(new Ui::MainWindow) +{ + ui->setupUi(this); +} + +MainWindow::~MainWindow() +{ + delete ui; +} diff --git a/softwareDirectory/AutoVerScheme/mainwindow.h b/softwareDirectory/AutoVerScheme/mainwindow.h new file mode 100644 index 0000000..40fd472 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/mainwindow.h @@ -0,0 +1,22 @@ +#ifndef MAINWINDOW_H +#define MAINWINDOW_H + +#include + +namespace Ui { +class MainWindow; +} + +class MainWindow : public QMainWindow +{ + Q_OBJECT + +public: + explicit MainWindow(QWidget *parent = nullptr); + ~MainWindow(); + +private: + Ui::MainWindow *ui; +}; + +#endif // MAINWINDOW_H diff --git a/softwareDirectory/AutoVerScheme/mainwindow.ui b/softwareDirectory/AutoVerScheme/mainwindow.ui new file mode 100644 index 0000000..dd4f1c8 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/mainwindow.ui @@ -0,0 +1,24 @@ + + + + + MainWindow + + + + 0 + 0 + 800 + 600 + + + + MainWindow + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u101.png b/softwareDirectory/AutoVerScheme/res/image/Index/u101.png new file mode 100644 index 0000000..9e371e3 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u101.png Binary files differ diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u102.png b/softwareDirectory/AutoVerScheme/res/image/Index/u102.png new file mode 100644 index 0000000..b288067 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u102.png Binary files differ diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u15.png b/softwareDirectory/AutoVerScheme/res/image/Index/u15.png new file mode 100644 index 0000000..7e699e6 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u15.png Binary files differ diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u17.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u17.svg new file mode 100644 index 0000000..acc0502 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u17.svg @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u18.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u18.svg new file mode 100644 index 0000000..6a00a10 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u18.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u19.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u19.svg new file mode 100644 index 0000000..42dea06 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u19.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u20.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u20.svg new file mode 100644 index 0000000..7426e62 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u20.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro new file mode 100644 index 0000000..5b8f852 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro @@ -0,0 +1,48 @@ +QT += core gui +QT += sql +greaterThan(QT_MAJOR_VERSION, 4): QT += widgets + +CONFIG += c++11 + +# The following define makes your compiler emit warnings if you use +# any Qt feature that has been marked deprecated (the exact warnings +# depend on your compiler). Please consult the documentation of the +# deprecated API in order to know how to port your code away from it. +DEFINES += QT_DEPRECATED_WARNINGS + +# You can also make your code fail to compile if it uses deprecated APIs. +# In order to do so, uncomment the following line. +# You can also select to disable deprecated APIs only up to a certain version of Qt. +#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 + +SOURCES += \ + indexwindow.cpp \ + loginwindow.cpp \ + main.cpp \ + mainwindow.cpp \ + testview.cpp + +HEADERS += \ + indexwindow.h \ + loginwindow.h \ + mainwindow.h \ + testview.h + +FORMS += \ + indexwindow.ui \ + loginwindow.ui \ + mainwindow.ui \ + testview.ui + +# Default rules for deployment. +qnx: target.path = /tmp/$${TARGET}/bin +else: unix:!android: target.path = /opt/$${TARGET}/bin +!isEmpty(target.path): INSTALLS += target + +RESOURCES += \ + res/qss.qrc \ + res/res.qrc + +DISTFILES += \ + res/image/u2.png + diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user new file mode 100644 index 0000000..1f5ec64 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user @@ -0,0 +1,562 @@ + + + + + + EnvironmentId + {c08df58c-84a7-4965-bca6-e98789474efa} + + + ProjectExplorer.Project.ActiveTarget + 0 + + + ProjectExplorer.Project.EditorSettings + + true + false + true + + Cpp + + CppGlobal + + + + QmlJS + + QmlJSGlobal + + + 2 + UTF-8 + false + 4 + false + 80 + true + true + 1 + true + false + 0 + true + true + 0 + 8 + true + 1 + true + true + true + false + + + + ProjectExplorer.Project.PluginSettings + + + -fno-delayed-template-parsing + + true + + + + ProjectExplorer.Project.Target.0 + + Desktop Qt 5.14.2 MinGW 64-bit + Desktop Qt 5.14.2 MinGW 64-bit + qt.qt5.5142.win64_mingw73_kit + 0 + 0 + 0 + + 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 + 0 + 0 + 0 + + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug + + + true + QtProjectManager.QMakeBuildStep + true + + false + false + false + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Debug + Qt4ProjectManager.Qt4BuildConfiguration + 2 + + + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Release + + + true + QtProjectManager.QMakeBuildStep + false + + false + false + true + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Release + Qt4ProjectManager.Qt4BuildConfiguration + 0 + + + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Profile + + + true + QtProjectManager.QMakeBuildStep + true + + false + true + true + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Profile + Qt4ProjectManager.Qt4BuildConfiguration + 0 + + 3 + + + 0 + Deploy + Deploy + ProjectExplorer.BuildSteps.Deploy + + 1 + ProjectExplorer.DefaultDeployConfiguration + + 1 + + + dwarf + + cpu-cycles + + + 250 + + -e + cpu-cycles + --call-graph + dwarf,4096 + -F + 250 + + -F + true + 4096 + false + false + 1000 + + true + + false + false + false + false + true + 0.01 + 10 + true + kcachegrind + 1 + 25 + + 1 + true + false + true + valgrind + + 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + + 2 + + Qt4ProjectManager.Qt4RunConfiguration:D:/Auto_verification_scheme/AutoVerScheme/AutoVerScheme.pro + D:/Auto_verification_scheme/AutoVerScheme/AutoVerScheme.pro + + false + + false + true + true + false + false + true + + + + 1 + + + + ProjectExplorer.Project.TargetCount + 2 + + + ProjectExplorer.Project.Updater.FileVersion + 22 + + + Version + 22 + + diff --git a/softwareDirectory/AutoVerScheme/indexwindow.cpp b/softwareDirectory/AutoVerScheme/indexwindow.cpp new file mode 100644 index 0000000..3e52c7b --- /dev/null +++ b/softwareDirectory/AutoVerScheme/indexwindow.cpp @@ -0,0 +1,55 @@ +#include "indexwindow.h" +#include "ui_indexwindow.h" +#include "QFile" +#include "QTextStream" + +IndexWindow::IndexWindow(QWidget *parent) : + QMainWindow(parent), + ui(new Ui::IndexWindow) +{ + ui->setupUi(this); + this->initForm(); +} + +IndexWindow::~IndexWindow() +{ + delete ui; +} +void IndexWindow::initForm() +{ + //this->setWindowFlags(Qt::FramelessWindowHint); + //调用样式 + loadStyle(":/qss/Index.css"); + +} + +void IndexWindow::loadStyle(const QString &qssFile) +{ + //加载样式表 + QString qss; + + QFile file(qssFile); + + if (file.open(QFile::ReadOnly)) { + //用QTextStream读取样式文件不用区分文件编码 带bom也行 + QStringList list; + QTextStream in(&file); + //in.setCodec("utf-8"); + while (!in.atEnd()) { + QString line; + in >> line; + list << line; + } + + file.close(); + qss = list.join("\n"); + QString paletteColor = qss.mid(20, 7); + qApp->setPalette(QPalette(paletteColor)); + //用时主要在下面这句 + qApp->setStyleSheet(qss); + } + + +} + + diff --git a/softwareDirectory/AutoVerScheme/indexwindow.h b/softwareDirectory/AutoVerScheme/indexwindow.h new file mode 100644 index 0000000..2aee958 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/indexwindow.h @@ -0,0 +1,26 @@ +#ifndef INDEXWINDOW_H +#define INDEXWINDOW_H + +#include + +namespace Ui { +class IndexWindow; +} + +class IndexWindow : public QMainWindow +{ + Q_OBJECT + +public: + explicit IndexWindow(QWidget *parent = nullptr); + ~IndexWindow(); +private slots: + void initForm(); + void loadStyle(const QString &qssFile); + + +private: + Ui::IndexWindow *ui; +}; + +#endif // INDEXWINDOW_H diff --git a/softwareDirectory/AutoVerScheme/indexwindow.ui b/softwareDirectory/AutoVerScheme/indexwindow.ui new file mode 100644 index 0000000..d7153e0 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/indexwindow.ui @@ -0,0 +1,539 @@ + + + IndexWindow + + + Qt::NonModal + + + + 0 + 0 + 1334 + 789 + + + + + 0 + 0 + + + + MainWindow + + + + + + + 100 + 100 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + 6 + + + QLayout::SetFixedSize + + + 0 + + + 0 + + + + + Qt::Horizontal + + + QSizePolicy::Fixed + + + + 120 + 13 + + + + + + + + + 0 + 0 + + + + + 560 + 0 + + + + Qt::DefaultContextMenu + + + color: white; +font-weight: bold; +font-size: 24pt; + + + + + QFrame::NoFrame + + + QFrame::Plain + + + 自动检定系统 + + + Qt::AutoText + + + false + + + Qt::AlignCenter + + + + + + + Qt::Horizontal + + + QSizePolicy::Fixed + + + + 40 + 13 + + + + + + + + + + Qt::Vertical + + + QSizePolicy::Fixed + + + + 50 + 80 + + + + + + + + + + Qt::Vertical + + + QSizePolicy::Fixed + + + + 20 + 120 + + + + + + + + Qt::Horizontal + + + + 100 + 20 + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + 0 + 0 + + + + + 310 + 190 + + + + OpenHandCursor + + + margin-right: 0px; + + + 信息管理 + + + + 60 + 60 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + Qt::Horizontal + + + + 327 + 20 + + + + + + + + + 0 + 0 + + + + + 490 + 190 + + + + OpenHandCursor + + + + + + 自动核查 + + + + 60 + 60 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + + 0 + 0 + + + + + 490 + 190 + + + + OpenHandCursor + + + + + + 自动检定 + + + + 60 + 60 + + + + false + + + false + + + Qt::ToolButtonTextUnderIcon + + + + + + + + 0 + 0 + + + + + 490 + 190 + + + + OpenHandCursor + + + + + + 核查程序管理 + + + + 60 + 60 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + Qt::Horizontal + + + + 327 + 20 + + + + + + + + + 0 + 0 + + + + + 310 + 190 + + + + OpenHandCursor + + + margin-right: 0px; + + + 数据同步 + + + + 60 + 60 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + Qt::Vertical + + + QSizePolicy::Fixed + + + + 20 + 120 + + + + + + + + Qt::Vertical + + + QSizePolicy::Fixed + + + + 20 + 120 + + + + + + + + + 0 + 0 + + + + + 490 + 190 + + + + OpenHandCursor + + + + + + 检定程序管理 + + + + 60 + 60 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + + + + + + 0 + 0 + + + + + 10 + 10 + + + + color: white; +font-weight: bold; +font-size: 14pt; + + + 欢迎您! 用户: admin + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + Qt::Horizontal + + + QSizePolicy::Fixed + + + + 270 + 20 + + + + + + + + + + + btnConfig + btnData + tbtnMain1 + tbtnMain2 + tbtnMain3 + tbtnConfig1 + tbtnConfig2 + tbtnConfig3 + tbtnConfig4 + tbtnConfig5 + tbtnConfig6 + btnMain + btnHelp + btnExit + + + + diff --git a/softwareDirectory/AutoVerScheme/loginwindow.cpp b/softwareDirectory/AutoVerScheme/loginwindow.cpp new file mode 100644 index 0000000..155988a --- /dev/null +++ b/softwareDirectory/AutoVerScheme/loginwindow.cpp @@ -0,0 +1,68 @@ +#include "loginwindow.h" +#include "ui_loginwindow.h" +#include +#include +#include + +#include "indexwindow.h" + +loginWindow::loginWindow(QWidget *parent): QMainWindow(parent), ui(new Ui::loginWindow) +{ + ui->setupUi(this); + this->initForm(); + ui->label->styleSheet(); + +} + +loginWindow::~loginWindow() +{ + delete ui; +} +void loginWindow::initForm() +{ + //this->setWindowFlags(Qt::FramelessWindowHint); + //调用样式 + loadStyle(":/qss/login.css"); +} + +void loginWindow::loadStyle(const QString &qssFile) +{ + //加载样式表 + QString qss; + + QFile file(qssFile); + + if (file.open(QFile::ReadOnly)) { + //用QTextStream读取样式文件不用区分文件编码 带bom也行 + QStringList list; + QTextStream in(&file); + //in.setCodec("utf-8"); + while (!in.atEnd()) { + QString line; + in >> line; + list << line; + } + + file.close(); + qss = list.join("\n"); + QString paletteColor = qss.mid(20, 7); + qApp->setPalette(QPalette(paletteColor)); + //用时主要在下面这句 + qApp->setStyleSheet(qss); + } + + +} + + +void loginWindow::on_Button_login_clicked() +{ + QMessageBox::information(this, "提示", "登录成功!"); + //查询数据库内是否有账号 + IndexWindow *indexWindow = new IndexWindow; + indexWindow->setWindowState(Qt::WindowMaximized); + indexWindow->show(); + this->close(); + +} + diff --git a/softwareDirectory/AutoVerScheme/loginwindow.h b/softwareDirectory/AutoVerScheme/loginwindow.h new file mode 100644 index 0000000..2695bc3 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/loginwindow.h @@ -0,0 +1,31 @@ +#ifndef MAINWINDOW_H +#define MAINWINDOW_H + +#include +#include + + + +namespace Ui { +class loginWindow; +} + +class loginWindow : public QMainWindow +{ + Q_OBJECT + +public: + explicit loginWindow(QWidget *parent = 0); + ~loginWindow(); +private slots: + void initForm(); + void loadStyle(const QString &qssFile); + void on_Button_login_clicked(); + + +private: + Ui::loginWindow *ui; +private: + QSqlQuery query; +}; +#endif // MAINWINDOW_H diff --git a/softwareDirectory/AutoVerScheme/loginwindow.ui b/softwareDirectory/AutoVerScheme/loginwindow.ui new file mode 100644 index 0000000..ca04751 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/loginwindow.ui @@ -0,0 +1,234 @@ + + + loginWindow + + + + 0 + 0 + 954 + 603 + + + + MainWindow + + + background-color: rgb(255, 255, 255) + + + + + + 110 + 110 + 271 + 231 + + + + background-image: url(:/image/login/u9.png); +background-repeat: no-repeat; background-position: center; +background-color: transparent; + + + + + + + + + 0 + 10 + 491 + 601 + + + + background-image: url(:/image/login/u2.png); +background-repeat: no-repeat; +background-color: transparent; +background-repeat: no-repeat; +background-position: center; +background-size: 100%; + + + + + + + + + 5 + 10 + 491 + 569 + + + + background-image: url(:/image/login/u0.png); +background-repeat: no-repeat; background-position: center; + + + + + + 170 + 350 + 241 + 51 + + + + background-color: transparent; + + + Metrology + + + + + + 490 + 10 + 471 + 571 + + + + + + + 610 + 70 + 271 + 61 + + + + 自动检定软件 + + + + + + 540 + 200 + 61 + 61 + + + + + + + + + + 490 + 10 + 461 + 571 + + + + + + + 540 + 290 + 61 + 61 + + + + + + + + + + 540 + 430 + 341 + 81 + + + + OpenHandCursor + + + + + + 登 录 + + + + + + 610 + 210 + 221 + 41 + + + + 请输入账号 + + + + + + 610 + 300 + 221 + 41 + + + + 请输入账号 + + + + + + 507 + 1 + 72 + 16 + + + + + + + label_4 + graphicsView + label_2 + label_3 + graphicsView_2 + textBrowser + lab_title + textBrowser_2 + textBrowser_3 + Button_login + textEdit_acc + textEdit_pass + label + + + + + 0 + 0 + 954 + 25 + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/main.cpp b/softwareDirectory/AutoVerScheme/main.cpp new file mode 100644 index 0000000..16b6d3f --- /dev/null +++ b/softwareDirectory/AutoVerScheme/main.cpp @@ -0,0 +1,23 @@ +#include "loginwindow.h" +#include "mainwindow.h" +#include +#include "indexWindow.h" +#include "testview.h" + +int main(int argc, char *argv[]) +{ + QApplication a(argc, argv); + // 加载外部的CSS文件 + a.setStyleSheet("file:///path/to/styles.css"); + //设置字体 + QFont font; + font.setFamily("Microsoft Yahei"); + font.setPixelSize(13); + a.setFont(font); + + //TestView s; + //s.show(); + loginWindow w; + w.show(); + return a.exec(); +} diff --git a/softwareDirectory/AutoVerScheme/mainwindow.cpp b/softwareDirectory/AutoVerScheme/mainwindow.cpp new file mode 100644 index 0000000..12d07c0 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/mainwindow.cpp @@ -0,0 +1,14 @@ +#include "mainwindow.h" +#include "ui_mainwindow.h" + +MainWindow::MainWindow(QWidget *parent) : + QMainWindow(parent), + ui(new Ui::MainWindow) +{ + ui->setupUi(this); +} + +MainWindow::~MainWindow() +{ + delete ui; +} diff --git a/softwareDirectory/AutoVerScheme/mainwindow.h b/softwareDirectory/AutoVerScheme/mainwindow.h new file mode 100644 index 0000000..40fd472 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/mainwindow.h @@ -0,0 +1,22 @@ +#ifndef MAINWINDOW_H +#define MAINWINDOW_H + +#include + +namespace Ui { +class MainWindow; +} + +class MainWindow : public QMainWindow +{ + Q_OBJECT + +public: + explicit MainWindow(QWidget *parent = nullptr); + ~MainWindow(); + +private: + Ui::MainWindow *ui; +}; + +#endif // MAINWINDOW_H diff --git a/softwareDirectory/AutoVerScheme/mainwindow.ui b/softwareDirectory/AutoVerScheme/mainwindow.ui new file mode 100644 index 0000000..dd4f1c8 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/mainwindow.ui @@ -0,0 +1,24 @@ + + + + + MainWindow + + + + 0 + 0 + 800 + 600 + + + + MainWindow + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u101.png b/softwareDirectory/AutoVerScheme/res/image/Index/u101.png new file mode 100644 index 0000000..9e371e3 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u101.png Binary files differ diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u102.png b/softwareDirectory/AutoVerScheme/res/image/Index/u102.png new file mode 100644 index 0000000..b288067 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u102.png Binary files differ diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u15.png b/softwareDirectory/AutoVerScheme/res/image/Index/u15.png new file mode 100644 index 0000000..7e699e6 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u15.png Binary files differ diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u17.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u17.svg new file mode 100644 index 0000000..acc0502 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u17.svg @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u18.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u18.svg new file mode 100644 index 0000000..6a00a10 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u18.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u19.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u19.svg new file mode 100644 index 0000000..42dea06 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u19.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u20.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u20.svg new file mode 100644 index 0000000..7426e62 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u20.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u21.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u21.svg new file mode 100644 index 0000000..cba8469 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u21.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro new file mode 100644 index 0000000..5b8f852 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro @@ -0,0 +1,48 @@ +QT += core gui +QT += sql +greaterThan(QT_MAJOR_VERSION, 4): QT += widgets + +CONFIG += c++11 + +# The following define makes your compiler emit warnings if you use +# any Qt feature that has been marked deprecated (the exact warnings +# depend on your compiler). Please consult the documentation of the +# deprecated API in order to know how to port your code away from it. +DEFINES += QT_DEPRECATED_WARNINGS + +# You can also make your code fail to compile if it uses deprecated APIs. +# In order to do so, uncomment the following line. +# You can also select to disable deprecated APIs only up to a certain version of Qt. +#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 + +SOURCES += \ + indexwindow.cpp \ + loginwindow.cpp \ + main.cpp \ + mainwindow.cpp \ + testview.cpp + +HEADERS += \ + indexwindow.h \ + loginwindow.h \ + mainwindow.h \ + testview.h + +FORMS += \ + indexwindow.ui \ + loginwindow.ui \ + mainwindow.ui \ + testview.ui + +# Default rules for deployment. +qnx: target.path = /tmp/$${TARGET}/bin +else: unix:!android: target.path = /opt/$${TARGET}/bin +!isEmpty(target.path): INSTALLS += target + +RESOURCES += \ + res/qss.qrc \ + res/res.qrc + +DISTFILES += \ + res/image/u2.png + diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user new file mode 100644 index 0000000..1f5ec64 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user @@ -0,0 +1,562 @@ + + + + + + EnvironmentId + {c08df58c-84a7-4965-bca6-e98789474efa} + + + ProjectExplorer.Project.ActiveTarget + 0 + + + ProjectExplorer.Project.EditorSettings + + true + false + true + + Cpp + + CppGlobal + + + + QmlJS + + QmlJSGlobal + + + 2 + UTF-8 + false + 4 + false + 80 + true + true + 1 + true + false + 0 + true + true + 0 + 8 + true + 1 + true + true + true + false + + + + ProjectExplorer.Project.PluginSettings + + + -fno-delayed-template-parsing + + true + + + + ProjectExplorer.Project.Target.0 + + Desktop Qt 5.14.2 MinGW 64-bit + Desktop Qt 5.14.2 MinGW 64-bit + qt.qt5.5142.win64_mingw73_kit + 0 + 0 + 0 + + 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 + 0 + 0 + 0 + + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug + + + true + QtProjectManager.QMakeBuildStep + true + + false + false + false + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Debug + Qt4ProjectManager.Qt4BuildConfiguration + 2 + + + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Release + + + true + QtProjectManager.QMakeBuildStep + false + + false + false + true + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Release + Qt4ProjectManager.Qt4BuildConfiguration + 0 + + + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Profile + + + true + QtProjectManager.QMakeBuildStep + true + + false + true + true + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Profile + Qt4ProjectManager.Qt4BuildConfiguration + 0 + + 3 + + + 0 + Deploy + Deploy + ProjectExplorer.BuildSteps.Deploy + + 1 + ProjectExplorer.DefaultDeployConfiguration + + 1 + + + dwarf + + cpu-cycles + + + 250 + + -e + cpu-cycles + --call-graph + dwarf,4096 + -F + 250 + + -F + true + 4096 + false + false + 1000 + + true + + false + false + false + false + true + 0.01 + 10 + true + kcachegrind + 1 + 25 + + 1 + true + false + true + valgrind + + 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + + 2 + + Qt4ProjectManager.Qt4RunConfiguration:D:/Auto_verification_scheme/AutoVerScheme/AutoVerScheme.pro + D:/Auto_verification_scheme/AutoVerScheme/AutoVerScheme.pro + + false + + false + true + true + false + false + true + + + + 1 + + + + ProjectExplorer.Project.TargetCount + 2 + + + ProjectExplorer.Project.Updater.FileVersion + 22 + + + Version + 22 + + diff --git a/softwareDirectory/AutoVerScheme/indexwindow.cpp b/softwareDirectory/AutoVerScheme/indexwindow.cpp new file mode 100644 index 0000000..3e52c7b --- /dev/null +++ b/softwareDirectory/AutoVerScheme/indexwindow.cpp @@ -0,0 +1,55 @@ +#include "indexwindow.h" +#include "ui_indexwindow.h" +#include "QFile" +#include "QTextStream" + +IndexWindow::IndexWindow(QWidget *parent) : + QMainWindow(parent), + ui(new Ui::IndexWindow) +{ + ui->setupUi(this); + this->initForm(); +} + +IndexWindow::~IndexWindow() +{ + delete ui; +} +void IndexWindow::initForm() +{ + //this->setWindowFlags(Qt::FramelessWindowHint); + //调用样式 + loadStyle(":/qss/Index.css"); + +} + +void IndexWindow::loadStyle(const QString &qssFile) +{ + //加载样式表 + QString qss; + + QFile file(qssFile); + + if (file.open(QFile::ReadOnly)) { + //用QTextStream读取样式文件不用区分文件编码 带bom也行 + QStringList list; + QTextStream in(&file); + //in.setCodec("utf-8"); + while (!in.atEnd()) { + QString line; + in >> line; + list << line; + } + + file.close(); + qss = list.join("\n"); + QString paletteColor = qss.mid(20, 7); + qApp->setPalette(QPalette(paletteColor)); + //用时主要在下面这句 + qApp->setStyleSheet(qss); + } + + +} + + diff --git a/softwareDirectory/AutoVerScheme/indexwindow.h b/softwareDirectory/AutoVerScheme/indexwindow.h new file mode 100644 index 0000000..2aee958 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/indexwindow.h @@ -0,0 +1,26 @@ +#ifndef INDEXWINDOW_H +#define INDEXWINDOW_H + +#include + +namespace Ui { +class IndexWindow; +} + +class IndexWindow : public QMainWindow +{ + Q_OBJECT + +public: + explicit IndexWindow(QWidget *parent = nullptr); + ~IndexWindow(); +private slots: + void initForm(); + void loadStyle(const QString &qssFile); + + +private: + Ui::IndexWindow *ui; +}; + +#endif // INDEXWINDOW_H diff --git a/softwareDirectory/AutoVerScheme/indexwindow.ui b/softwareDirectory/AutoVerScheme/indexwindow.ui new file mode 100644 index 0000000..d7153e0 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/indexwindow.ui @@ -0,0 +1,539 @@ + + + IndexWindow + + + Qt::NonModal + + + + 0 + 0 + 1334 + 789 + + + + + 0 + 0 + + + + MainWindow + + + + + + + 100 + 100 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + 6 + + + QLayout::SetFixedSize + + + 0 + + + 0 + + + + + Qt::Horizontal + + + QSizePolicy::Fixed + + + + 120 + 13 + + + + + + + + + 0 + 0 + + + + + 560 + 0 + + + + Qt::DefaultContextMenu + + + color: white; +font-weight: bold; +font-size: 24pt; + + + + + QFrame::NoFrame + + + QFrame::Plain + + + 自动检定系统 + + + Qt::AutoText + + + false + + + Qt::AlignCenter + + + + + + + Qt::Horizontal + + + QSizePolicy::Fixed + + + + 40 + 13 + + + + + + + + + + Qt::Vertical + + + QSizePolicy::Fixed + + + + 50 + 80 + + + + + + + + + + Qt::Vertical + + + QSizePolicy::Fixed + + + + 20 + 120 + + + + + + + + Qt::Horizontal + + + + 100 + 20 + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + 0 + 0 + + + + + 310 + 190 + + + + OpenHandCursor + + + margin-right: 0px; + + + 信息管理 + + + + 60 + 60 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + Qt::Horizontal + + + + 327 + 20 + + + + + + + + + 0 + 0 + + + + + 490 + 190 + + + + OpenHandCursor + + + + + + 自动核查 + + + + 60 + 60 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + + 0 + 0 + + + + + 490 + 190 + + + + OpenHandCursor + + + + + + 自动检定 + + + + 60 + 60 + + + + false + + + false + + + Qt::ToolButtonTextUnderIcon + + + + + + + + 0 + 0 + + + + + 490 + 190 + + + + OpenHandCursor + + + + + + 核查程序管理 + + + + 60 + 60 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + Qt::Horizontal + + + + 327 + 20 + + + + + + + + + 0 + 0 + + + + + 310 + 190 + + + + OpenHandCursor + + + margin-right: 0px; + + + 数据同步 + + + + 60 + 60 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + Qt::Vertical + + + QSizePolicy::Fixed + + + + 20 + 120 + + + + + + + + Qt::Vertical + + + QSizePolicy::Fixed + + + + 20 + 120 + + + + + + + + + 0 + 0 + + + + + 490 + 190 + + + + OpenHandCursor + + + + + + 检定程序管理 + + + + 60 + 60 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + + + + + + 0 + 0 + + + + + 10 + 10 + + + + color: white; +font-weight: bold; +font-size: 14pt; + + + 欢迎您! 用户: admin + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + Qt::Horizontal + + + QSizePolicy::Fixed + + + + 270 + 20 + + + + + + + + + + + btnConfig + btnData + tbtnMain1 + tbtnMain2 + tbtnMain3 + tbtnConfig1 + tbtnConfig2 + tbtnConfig3 + tbtnConfig4 + tbtnConfig5 + tbtnConfig6 + btnMain + btnHelp + btnExit + + + + diff --git a/softwareDirectory/AutoVerScheme/loginwindow.cpp b/softwareDirectory/AutoVerScheme/loginwindow.cpp new file mode 100644 index 0000000..155988a --- /dev/null +++ b/softwareDirectory/AutoVerScheme/loginwindow.cpp @@ -0,0 +1,68 @@ +#include "loginwindow.h" +#include "ui_loginwindow.h" +#include +#include +#include + +#include "indexwindow.h" + +loginWindow::loginWindow(QWidget *parent): QMainWindow(parent), ui(new Ui::loginWindow) +{ + ui->setupUi(this); + this->initForm(); + ui->label->styleSheet(); + +} + +loginWindow::~loginWindow() +{ + delete ui; +} +void loginWindow::initForm() +{ + //this->setWindowFlags(Qt::FramelessWindowHint); + //调用样式 + loadStyle(":/qss/login.css"); +} + +void loginWindow::loadStyle(const QString &qssFile) +{ + //加载样式表 + QString qss; + + QFile file(qssFile); + + if (file.open(QFile::ReadOnly)) { + //用QTextStream读取样式文件不用区分文件编码 带bom也行 + QStringList list; + QTextStream in(&file); + //in.setCodec("utf-8"); + while (!in.atEnd()) { + QString line; + in >> line; + list << line; + } + + file.close(); + qss = list.join("\n"); + QString paletteColor = qss.mid(20, 7); + qApp->setPalette(QPalette(paletteColor)); + //用时主要在下面这句 + qApp->setStyleSheet(qss); + } + + +} + + +void loginWindow::on_Button_login_clicked() +{ + QMessageBox::information(this, "提示", "登录成功!"); + //查询数据库内是否有账号 + IndexWindow *indexWindow = new IndexWindow; + indexWindow->setWindowState(Qt::WindowMaximized); + indexWindow->show(); + this->close(); + +} + diff --git a/softwareDirectory/AutoVerScheme/loginwindow.h b/softwareDirectory/AutoVerScheme/loginwindow.h new file mode 100644 index 0000000..2695bc3 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/loginwindow.h @@ -0,0 +1,31 @@ +#ifndef MAINWINDOW_H +#define MAINWINDOW_H + +#include +#include + + + +namespace Ui { +class loginWindow; +} + +class loginWindow : public QMainWindow +{ + Q_OBJECT + +public: + explicit loginWindow(QWidget *parent = 0); + ~loginWindow(); +private slots: + void initForm(); + void loadStyle(const QString &qssFile); + void on_Button_login_clicked(); + + +private: + Ui::loginWindow *ui; +private: + QSqlQuery query; +}; +#endif // MAINWINDOW_H diff --git a/softwareDirectory/AutoVerScheme/loginwindow.ui b/softwareDirectory/AutoVerScheme/loginwindow.ui new file mode 100644 index 0000000..ca04751 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/loginwindow.ui @@ -0,0 +1,234 @@ + + + loginWindow + + + + 0 + 0 + 954 + 603 + + + + MainWindow + + + background-color: rgb(255, 255, 255) + + + + + + 110 + 110 + 271 + 231 + + + + background-image: url(:/image/login/u9.png); +background-repeat: no-repeat; background-position: center; +background-color: transparent; + + + + + + + + + 0 + 10 + 491 + 601 + + + + background-image: url(:/image/login/u2.png); +background-repeat: no-repeat; +background-color: transparent; +background-repeat: no-repeat; +background-position: center; +background-size: 100%; + + + + + + + + + 5 + 10 + 491 + 569 + + + + background-image: url(:/image/login/u0.png); +background-repeat: no-repeat; background-position: center; + + + + + + 170 + 350 + 241 + 51 + + + + background-color: transparent; + + + Metrology + + + + + + 490 + 10 + 471 + 571 + + + + + + + 610 + 70 + 271 + 61 + + + + 自动检定软件 + + + + + + 540 + 200 + 61 + 61 + + + + + + + + + + 490 + 10 + 461 + 571 + + + + + + + 540 + 290 + 61 + 61 + + + + + + + + + + 540 + 430 + 341 + 81 + + + + OpenHandCursor + + + + + + 登 录 + + + + + + 610 + 210 + 221 + 41 + + + + 请输入账号 + + + + + + 610 + 300 + 221 + 41 + + + + 请输入账号 + + + + + + 507 + 1 + 72 + 16 + + + + + + + label_4 + graphicsView + label_2 + label_3 + graphicsView_2 + textBrowser + lab_title + textBrowser_2 + textBrowser_3 + Button_login + textEdit_acc + textEdit_pass + label + + + + + 0 + 0 + 954 + 25 + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/main.cpp b/softwareDirectory/AutoVerScheme/main.cpp new file mode 100644 index 0000000..16b6d3f --- /dev/null +++ b/softwareDirectory/AutoVerScheme/main.cpp @@ -0,0 +1,23 @@ +#include "loginwindow.h" +#include "mainwindow.h" +#include +#include "indexWindow.h" +#include "testview.h" + +int main(int argc, char *argv[]) +{ + QApplication a(argc, argv); + // 加载外部的CSS文件 + a.setStyleSheet("file:///path/to/styles.css"); + //设置字体 + QFont font; + font.setFamily("Microsoft Yahei"); + font.setPixelSize(13); + a.setFont(font); + + //TestView s; + //s.show(); + loginWindow w; + w.show(); + return a.exec(); +} diff --git a/softwareDirectory/AutoVerScheme/mainwindow.cpp b/softwareDirectory/AutoVerScheme/mainwindow.cpp new file mode 100644 index 0000000..12d07c0 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/mainwindow.cpp @@ -0,0 +1,14 @@ +#include "mainwindow.h" +#include "ui_mainwindow.h" + +MainWindow::MainWindow(QWidget *parent) : + QMainWindow(parent), + ui(new Ui::MainWindow) +{ + ui->setupUi(this); +} + +MainWindow::~MainWindow() +{ + delete ui; +} diff --git a/softwareDirectory/AutoVerScheme/mainwindow.h b/softwareDirectory/AutoVerScheme/mainwindow.h new file mode 100644 index 0000000..40fd472 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/mainwindow.h @@ -0,0 +1,22 @@ +#ifndef MAINWINDOW_H +#define MAINWINDOW_H + +#include + +namespace Ui { +class MainWindow; +} + +class MainWindow : public QMainWindow +{ + Q_OBJECT + +public: + explicit MainWindow(QWidget *parent = nullptr); + ~MainWindow(); + +private: + Ui::MainWindow *ui; +}; + +#endif // MAINWINDOW_H diff --git a/softwareDirectory/AutoVerScheme/mainwindow.ui b/softwareDirectory/AutoVerScheme/mainwindow.ui new file mode 100644 index 0000000..dd4f1c8 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/mainwindow.ui @@ -0,0 +1,24 @@ + + + + + MainWindow + + + + 0 + 0 + 800 + 600 + + + + MainWindow + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u101.png b/softwareDirectory/AutoVerScheme/res/image/Index/u101.png new file mode 100644 index 0000000..9e371e3 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u101.png Binary files differ diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u102.png b/softwareDirectory/AutoVerScheme/res/image/Index/u102.png new file mode 100644 index 0000000..b288067 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u102.png Binary files differ diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u15.png b/softwareDirectory/AutoVerScheme/res/image/Index/u15.png new file mode 100644 index 0000000..7e699e6 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u15.png Binary files differ diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u17.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u17.svg new file mode 100644 index 0000000..acc0502 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u17.svg @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u18.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u18.svg new file mode 100644 index 0000000..6a00a10 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u18.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u19.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u19.svg new file mode 100644 index 0000000..42dea06 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u19.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u20.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u20.svg new file mode 100644 index 0000000..7426e62 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u20.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u21.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u21.svg new file mode 100644 index 0000000..cba8469 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u21.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u22.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u22.svg new file mode 100644 index 0000000..78843a0 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u22.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro new file mode 100644 index 0000000..5b8f852 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro @@ -0,0 +1,48 @@ +QT += core gui +QT += sql +greaterThan(QT_MAJOR_VERSION, 4): QT += widgets + +CONFIG += c++11 + +# The following define makes your compiler emit warnings if you use +# any Qt feature that has been marked deprecated (the exact warnings +# depend on your compiler). Please consult the documentation of the +# deprecated API in order to know how to port your code away from it. +DEFINES += QT_DEPRECATED_WARNINGS + +# You can also make your code fail to compile if it uses deprecated APIs. +# In order to do so, uncomment the following line. +# You can also select to disable deprecated APIs only up to a certain version of Qt. +#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 + +SOURCES += \ + indexwindow.cpp \ + loginwindow.cpp \ + main.cpp \ + mainwindow.cpp \ + testview.cpp + +HEADERS += \ + indexwindow.h \ + loginwindow.h \ + mainwindow.h \ + testview.h + +FORMS += \ + indexwindow.ui \ + loginwindow.ui \ + mainwindow.ui \ + testview.ui + +# Default rules for deployment. +qnx: target.path = /tmp/$${TARGET}/bin +else: unix:!android: target.path = /opt/$${TARGET}/bin +!isEmpty(target.path): INSTALLS += target + +RESOURCES += \ + res/qss.qrc \ + res/res.qrc + +DISTFILES += \ + res/image/u2.png + diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user new file mode 100644 index 0000000..1f5ec64 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user @@ -0,0 +1,562 @@ + + + + + + EnvironmentId + {c08df58c-84a7-4965-bca6-e98789474efa} + + + ProjectExplorer.Project.ActiveTarget + 0 + + + ProjectExplorer.Project.EditorSettings + + true + false + true + + Cpp + + CppGlobal + + + + QmlJS + + QmlJSGlobal + + + 2 + UTF-8 + false + 4 + false + 80 + true + true + 1 + true + false + 0 + true + true + 0 + 8 + true + 1 + true + true + true + false + + + + ProjectExplorer.Project.PluginSettings + + + -fno-delayed-template-parsing + + true + + + + ProjectExplorer.Project.Target.0 + + Desktop Qt 5.14.2 MinGW 64-bit + Desktop Qt 5.14.2 MinGW 64-bit + qt.qt5.5142.win64_mingw73_kit + 0 + 0 + 0 + + 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 + 0 + 0 + 0 + + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug + + + true + QtProjectManager.QMakeBuildStep + true + + false + false + false + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Debug + Qt4ProjectManager.Qt4BuildConfiguration + 2 + + + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Release + + + true + QtProjectManager.QMakeBuildStep + false + + false + false + true + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Release + Qt4ProjectManager.Qt4BuildConfiguration + 0 + + + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Profile + + + true + QtProjectManager.QMakeBuildStep + true + + false + true + true + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Profile + Qt4ProjectManager.Qt4BuildConfiguration + 0 + + 3 + + + 0 + Deploy + Deploy + ProjectExplorer.BuildSteps.Deploy + + 1 + ProjectExplorer.DefaultDeployConfiguration + + 1 + + + dwarf + + cpu-cycles + + + 250 + + -e + cpu-cycles + --call-graph + dwarf,4096 + -F + 250 + + -F + true + 4096 + false + false + 1000 + + true + + false + false + false + false + true + 0.01 + 10 + true + kcachegrind + 1 + 25 + + 1 + true + false + true + valgrind + + 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + + 2 + + Qt4ProjectManager.Qt4RunConfiguration:D:/Auto_verification_scheme/AutoVerScheme/AutoVerScheme.pro + D:/Auto_verification_scheme/AutoVerScheme/AutoVerScheme.pro + + false + + false + true + true + false + false + true + + + + 1 + + + + ProjectExplorer.Project.TargetCount + 2 + + + ProjectExplorer.Project.Updater.FileVersion + 22 + + + Version + 22 + + diff --git a/softwareDirectory/AutoVerScheme/indexwindow.cpp b/softwareDirectory/AutoVerScheme/indexwindow.cpp new file mode 100644 index 0000000..3e52c7b --- /dev/null +++ b/softwareDirectory/AutoVerScheme/indexwindow.cpp @@ -0,0 +1,55 @@ +#include "indexwindow.h" +#include "ui_indexwindow.h" +#include "QFile" +#include "QTextStream" + +IndexWindow::IndexWindow(QWidget *parent) : + QMainWindow(parent), + ui(new Ui::IndexWindow) +{ + ui->setupUi(this); + this->initForm(); +} + +IndexWindow::~IndexWindow() +{ + delete ui; +} +void IndexWindow::initForm() +{ + //this->setWindowFlags(Qt::FramelessWindowHint); + //调用样式 + loadStyle(":/qss/Index.css"); + +} + +void IndexWindow::loadStyle(const QString &qssFile) +{ + //加载样式表 + QString qss; + + QFile file(qssFile); + + if (file.open(QFile::ReadOnly)) { + //用QTextStream读取样式文件不用区分文件编码 带bom也行 + QStringList list; + QTextStream in(&file); + //in.setCodec("utf-8"); + while (!in.atEnd()) { + QString line; + in >> line; + list << line; + } + + file.close(); + qss = list.join("\n"); + QString paletteColor = qss.mid(20, 7); + qApp->setPalette(QPalette(paletteColor)); + //用时主要在下面这句 + qApp->setStyleSheet(qss); + } + + +} + + diff --git a/softwareDirectory/AutoVerScheme/indexwindow.h b/softwareDirectory/AutoVerScheme/indexwindow.h new file mode 100644 index 0000000..2aee958 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/indexwindow.h @@ -0,0 +1,26 @@ +#ifndef INDEXWINDOW_H +#define INDEXWINDOW_H + +#include + +namespace Ui { +class IndexWindow; +} + +class IndexWindow : public QMainWindow +{ + Q_OBJECT + +public: + explicit IndexWindow(QWidget *parent = nullptr); + ~IndexWindow(); +private slots: + void initForm(); + void loadStyle(const QString &qssFile); + + +private: + Ui::IndexWindow *ui; +}; + +#endif // INDEXWINDOW_H diff --git a/softwareDirectory/AutoVerScheme/indexwindow.ui b/softwareDirectory/AutoVerScheme/indexwindow.ui new file mode 100644 index 0000000..d7153e0 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/indexwindow.ui @@ -0,0 +1,539 @@ + + + IndexWindow + + + Qt::NonModal + + + + 0 + 0 + 1334 + 789 + + + + + 0 + 0 + + + + MainWindow + + + + + + + 100 + 100 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + 6 + + + QLayout::SetFixedSize + + + 0 + + + 0 + + + + + Qt::Horizontal + + + QSizePolicy::Fixed + + + + 120 + 13 + + + + + + + + + 0 + 0 + + + + + 560 + 0 + + + + Qt::DefaultContextMenu + + + color: white; +font-weight: bold; +font-size: 24pt; + + + + + QFrame::NoFrame + + + QFrame::Plain + + + 自动检定系统 + + + Qt::AutoText + + + false + + + Qt::AlignCenter + + + + + + + Qt::Horizontal + + + QSizePolicy::Fixed + + + + 40 + 13 + + + + + + + + + + Qt::Vertical + + + QSizePolicy::Fixed + + + + 50 + 80 + + + + + + + + + + Qt::Vertical + + + QSizePolicy::Fixed + + + + 20 + 120 + + + + + + + + Qt::Horizontal + + + + 100 + 20 + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + 0 + 0 + + + + + 310 + 190 + + + + OpenHandCursor + + + margin-right: 0px; + + + 信息管理 + + + + 60 + 60 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + Qt::Horizontal + + + + 327 + 20 + + + + + + + + + 0 + 0 + + + + + 490 + 190 + + + + OpenHandCursor + + + + + + 自动核查 + + + + 60 + 60 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + + 0 + 0 + + + + + 490 + 190 + + + + OpenHandCursor + + + + + + 自动检定 + + + + 60 + 60 + + + + false + + + false + + + Qt::ToolButtonTextUnderIcon + + + + + + + + 0 + 0 + + + + + 490 + 190 + + + + OpenHandCursor + + + + + + 核查程序管理 + + + + 60 + 60 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + Qt::Horizontal + + + + 327 + 20 + + + + + + + + + 0 + 0 + + + + + 310 + 190 + + + + OpenHandCursor + + + margin-right: 0px; + + + 数据同步 + + + + 60 + 60 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + Qt::Vertical + + + QSizePolicy::Fixed + + + + 20 + 120 + + + + + + + + Qt::Vertical + + + QSizePolicy::Fixed + + + + 20 + 120 + + + + + + + + + 0 + 0 + + + + + 490 + 190 + + + + OpenHandCursor + + + + + + 检定程序管理 + + + + 60 + 60 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + + + + + + 0 + 0 + + + + + 10 + 10 + + + + color: white; +font-weight: bold; +font-size: 14pt; + + + 欢迎您! 用户: admin + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + Qt::Horizontal + + + QSizePolicy::Fixed + + + + 270 + 20 + + + + + + + + + + + btnConfig + btnData + tbtnMain1 + tbtnMain2 + tbtnMain3 + tbtnConfig1 + tbtnConfig2 + tbtnConfig3 + tbtnConfig4 + tbtnConfig5 + tbtnConfig6 + btnMain + btnHelp + btnExit + + + + diff --git a/softwareDirectory/AutoVerScheme/loginwindow.cpp b/softwareDirectory/AutoVerScheme/loginwindow.cpp new file mode 100644 index 0000000..155988a --- /dev/null +++ b/softwareDirectory/AutoVerScheme/loginwindow.cpp @@ -0,0 +1,68 @@ +#include "loginwindow.h" +#include "ui_loginwindow.h" +#include +#include +#include + +#include "indexwindow.h" + +loginWindow::loginWindow(QWidget *parent): QMainWindow(parent), ui(new Ui::loginWindow) +{ + ui->setupUi(this); + this->initForm(); + ui->label->styleSheet(); + +} + +loginWindow::~loginWindow() +{ + delete ui; +} +void loginWindow::initForm() +{ + //this->setWindowFlags(Qt::FramelessWindowHint); + //调用样式 + loadStyle(":/qss/login.css"); +} + +void loginWindow::loadStyle(const QString &qssFile) +{ + //加载样式表 + QString qss; + + QFile file(qssFile); + + if (file.open(QFile::ReadOnly)) { + //用QTextStream读取样式文件不用区分文件编码 带bom也行 + QStringList list; + QTextStream in(&file); + //in.setCodec("utf-8"); + while (!in.atEnd()) { + QString line; + in >> line; + list << line; + } + + file.close(); + qss = list.join("\n"); + QString paletteColor = qss.mid(20, 7); + qApp->setPalette(QPalette(paletteColor)); + //用时主要在下面这句 + qApp->setStyleSheet(qss); + } + + +} + + +void loginWindow::on_Button_login_clicked() +{ + QMessageBox::information(this, "提示", "登录成功!"); + //查询数据库内是否有账号 + IndexWindow *indexWindow = new IndexWindow; + indexWindow->setWindowState(Qt::WindowMaximized); + indexWindow->show(); + this->close(); + +} + diff --git a/softwareDirectory/AutoVerScheme/loginwindow.h b/softwareDirectory/AutoVerScheme/loginwindow.h new file mode 100644 index 0000000..2695bc3 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/loginwindow.h @@ -0,0 +1,31 @@ +#ifndef MAINWINDOW_H +#define MAINWINDOW_H + +#include +#include + + + +namespace Ui { +class loginWindow; +} + +class loginWindow : public QMainWindow +{ + Q_OBJECT + +public: + explicit loginWindow(QWidget *parent = 0); + ~loginWindow(); +private slots: + void initForm(); + void loadStyle(const QString &qssFile); + void on_Button_login_clicked(); + + +private: + Ui::loginWindow *ui; +private: + QSqlQuery query; +}; +#endif // MAINWINDOW_H diff --git a/softwareDirectory/AutoVerScheme/loginwindow.ui b/softwareDirectory/AutoVerScheme/loginwindow.ui new file mode 100644 index 0000000..ca04751 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/loginwindow.ui @@ -0,0 +1,234 @@ + + + loginWindow + + + + 0 + 0 + 954 + 603 + + + + MainWindow + + + background-color: rgb(255, 255, 255) + + + + + + 110 + 110 + 271 + 231 + + + + background-image: url(:/image/login/u9.png); +background-repeat: no-repeat; background-position: center; +background-color: transparent; + + + + + + + + + 0 + 10 + 491 + 601 + + + + background-image: url(:/image/login/u2.png); +background-repeat: no-repeat; +background-color: transparent; +background-repeat: no-repeat; +background-position: center; +background-size: 100%; + + + + + + + + + 5 + 10 + 491 + 569 + + + + background-image: url(:/image/login/u0.png); +background-repeat: no-repeat; background-position: center; + + + + + + 170 + 350 + 241 + 51 + + + + background-color: transparent; + + + Metrology + + + + + + 490 + 10 + 471 + 571 + + + + + + + 610 + 70 + 271 + 61 + + + + 自动检定软件 + + + + + + 540 + 200 + 61 + 61 + + + + + + + + + + 490 + 10 + 461 + 571 + + + + + + + 540 + 290 + 61 + 61 + + + + + + + + + + 540 + 430 + 341 + 81 + + + + OpenHandCursor + + + + + + 登 录 + + + + + + 610 + 210 + 221 + 41 + + + + 请输入账号 + + + + + + 610 + 300 + 221 + 41 + + + + 请输入账号 + + + + + + 507 + 1 + 72 + 16 + + + + + + + label_4 + graphicsView + label_2 + label_3 + graphicsView_2 + textBrowser + lab_title + textBrowser_2 + textBrowser_3 + Button_login + textEdit_acc + textEdit_pass + label + + + + + 0 + 0 + 954 + 25 + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/main.cpp b/softwareDirectory/AutoVerScheme/main.cpp new file mode 100644 index 0000000..16b6d3f --- /dev/null +++ b/softwareDirectory/AutoVerScheme/main.cpp @@ -0,0 +1,23 @@ +#include "loginwindow.h" +#include "mainwindow.h" +#include +#include "indexWindow.h" +#include "testview.h" + +int main(int argc, char *argv[]) +{ + QApplication a(argc, argv); + // 加载外部的CSS文件 + a.setStyleSheet("file:///path/to/styles.css"); + //设置字体 + QFont font; + font.setFamily("Microsoft Yahei"); + font.setPixelSize(13); + a.setFont(font); + + //TestView s; + //s.show(); + loginWindow w; + w.show(); + return a.exec(); +} diff --git a/softwareDirectory/AutoVerScheme/mainwindow.cpp b/softwareDirectory/AutoVerScheme/mainwindow.cpp new file mode 100644 index 0000000..12d07c0 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/mainwindow.cpp @@ -0,0 +1,14 @@ +#include "mainwindow.h" +#include "ui_mainwindow.h" + +MainWindow::MainWindow(QWidget *parent) : + QMainWindow(parent), + ui(new Ui::MainWindow) +{ + ui->setupUi(this); +} + +MainWindow::~MainWindow() +{ + delete ui; +} diff --git a/softwareDirectory/AutoVerScheme/mainwindow.h b/softwareDirectory/AutoVerScheme/mainwindow.h new file mode 100644 index 0000000..40fd472 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/mainwindow.h @@ -0,0 +1,22 @@ +#ifndef MAINWINDOW_H +#define MAINWINDOW_H + +#include + +namespace Ui { +class MainWindow; +} + +class MainWindow : public QMainWindow +{ + Q_OBJECT + +public: + explicit MainWindow(QWidget *parent = nullptr); + ~MainWindow(); + +private: + Ui::MainWindow *ui; +}; + +#endif // MAINWINDOW_H diff --git a/softwareDirectory/AutoVerScheme/mainwindow.ui b/softwareDirectory/AutoVerScheme/mainwindow.ui new file mode 100644 index 0000000..dd4f1c8 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/mainwindow.ui @@ -0,0 +1,24 @@ + + + + + MainWindow + + + + 0 + 0 + 800 + 600 + + + + MainWindow + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u101.png b/softwareDirectory/AutoVerScheme/res/image/Index/u101.png new file mode 100644 index 0000000..9e371e3 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u101.png Binary files differ diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u102.png b/softwareDirectory/AutoVerScheme/res/image/Index/u102.png new file mode 100644 index 0000000..b288067 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u102.png Binary files differ diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u15.png b/softwareDirectory/AutoVerScheme/res/image/Index/u15.png new file mode 100644 index 0000000..7e699e6 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u15.png Binary files differ diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u17.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u17.svg new file mode 100644 index 0000000..acc0502 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u17.svg @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u18.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u18.svg new file mode 100644 index 0000000..6a00a10 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u18.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u19.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u19.svg new file mode 100644 index 0000000..42dea06 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u19.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u20.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u20.svg new file mode 100644 index 0000000..7426e62 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u20.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u21.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u21.svg new file mode 100644 index 0000000..cba8469 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u21.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u22.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u22.svg new file mode 100644 index 0000000..78843a0 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u22.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u23.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u23.svg new file mode 100644 index 0000000..c586b65 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u23.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro new file mode 100644 index 0000000..5b8f852 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro @@ -0,0 +1,48 @@ +QT += core gui +QT += sql +greaterThan(QT_MAJOR_VERSION, 4): QT += widgets + +CONFIG += c++11 + +# The following define makes your compiler emit warnings if you use +# any Qt feature that has been marked deprecated (the exact warnings +# depend on your compiler). Please consult the documentation of the +# deprecated API in order to know how to port your code away from it. +DEFINES += QT_DEPRECATED_WARNINGS + +# You can also make your code fail to compile if it uses deprecated APIs. +# In order to do so, uncomment the following line. +# You can also select to disable deprecated APIs only up to a certain version of Qt. +#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 + +SOURCES += \ + indexwindow.cpp \ + loginwindow.cpp \ + main.cpp \ + mainwindow.cpp \ + testview.cpp + +HEADERS += \ + indexwindow.h \ + loginwindow.h \ + mainwindow.h \ + testview.h + +FORMS += \ + indexwindow.ui \ + loginwindow.ui \ + mainwindow.ui \ + testview.ui + +# Default rules for deployment. +qnx: target.path = /tmp/$${TARGET}/bin +else: unix:!android: target.path = /opt/$${TARGET}/bin +!isEmpty(target.path): INSTALLS += target + +RESOURCES += \ + res/qss.qrc \ + res/res.qrc + +DISTFILES += \ + res/image/u2.png + diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user new file mode 100644 index 0000000..1f5ec64 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user @@ -0,0 +1,562 @@ + + + + + + EnvironmentId + {c08df58c-84a7-4965-bca6-e98789474efa} + + + ProjectExplorer.Project.ActiveTarget + 0 + + + ProjectExplorer.Project.EditorSettings + + true + false + true + + Cpp + + CppGlobal + + + + QmlJS + + QmlJSGlobal + + + 2 + UTF-8 + false + 4 + false + 80 + true + true + 1 + true + false + 0 + true + true + 0 + 8 + true + 1 + true + true + true + false + + + + ProjectExplorer.Project.PluginSettings + + + -fno-delayed-template-parsing + + true + + + + ProjectExplorer.Project.Target.0 + + Desktop Qt 5.14.2 MinGW 64-bit + Desktop Qt 5.14.2 MinGW 64-bit + qt.qt5.5142.win64_mingw73_kit + 0 + 0 + 0 + + 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 + 0 + 0 + 0 + + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug + + + true + QtProjectManager.QMakeBuildStep + true + + false + false + false + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Debug + Qt4ProjectManager.Qt4BuildConfiguration + 2 + + + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Release + + + true + QtProjectManager.QMakeBuildStep + false + + false + false + true + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Release + Qt4ProjectManager.Qt4BuildConfiguration + 0 + + + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Profile + + + true + QtProjectManager.QMakeBuildStep + true + + false + true + true + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Profile + Qt4ProjectManager.Qt4BuildConfiguration + 0 + + 3 + + + 0 + Deploy + Deploy + ProjectExplorer.BuildSteps.Deploy + + 1 + ProjectExplorer.DefaultDeployConfiguration + + 1 + + + dwarf + + cpu-cycles + + + 250 + + -e + cpu-cycles + --call-graph + dwarf,4096 + -F + 250 + + -F + true + 4096 + false + false + 1000 + + true + + false + false + false + false + true + 0.01 + 10 + true + kcachegrind + 1 + 25 + + 1 + true + false + true + valgrind + + 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + + 2 + + Qt4ProjectManager.Qt4RunConfiguration:D:/Auto_verification_scheme/AutoVerScheme/AutoVerScheme.pro + D:/Auto_verification_scheme/AutoVerScheme/AutoVerScheme.pro + + false + + false + true + true + false + false + true + + + + 1 + + + + ProjectExplorer.Project.TargetCount + 2 + + + ProjectExplorer.Project.Updater.FileVersion + 22 + + + Version + 22 + + diff --git a/softwareDirectory/AutoVerScheme/indexwindow.cpp b/softwareDirectory/AutoVerScheme/indexwindow.cpp new file mode 100644 index 0000000..3e52c7b --- /dev/null +++ b/softwareDirectory/AutoVerScheme/indexwindow.cpp @@ -0,0 +1,55 @@ +#include "indexwindow.h" +#include "ui_indexwindow.h" +#include "QFile" +#include "QTextStream" + +IndexWindow::IndexWindow(QWidget *parent) : + QMainWindow(parent), + ui(new Ui::IndexWindow) +{ + ui->setupUi(this); + this->initForm(); +} + +IndexWindow::~IndexWindow() +{ + delete ui; +} +void IndexWindow::initForm() +{ + //this->setWindowFlags(Qt::FramelessWindowHint); + //调用样式 + loadStyle(":/qss/Index.css"); + +} + +void IndexWindow::loadStyle(const QString &qssFile) +{ + //加载样式表 + QString qss; + + QFile file(qssFile); + + if (file.open(QFile::ReadOnly)) { + //用QTextStream读取样式文件不用区分文件编码 带bom也行 + QStringList list; + QTextStream in(&file); + //in.setCodec("utf-8"); + while (!in.atEnd()) { + QString line; + in >> line; + list << line; + } + + file.close(); + qss = list.join("\n"); + QString paletteColor = qss.mid(20, 7); + qApp->setPalette(QPalette(paletteColor)); + //用时主要在下面这句 + qApp->setStyleSheet(qss); + } + + +} + + diff --git a/softwareDirectory/AutoVerScheme/indexwindow.h b/softwareDirectory/AutoVerScheme/indexwindow.h new file mode 100644 index 0000000..2aee958 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/indexwindow.h @@ -0,0 +1,26 @@ +#ifndef INDEXWINDOW_H +#define INDEXWINDOW_H + +#include + +namespace Ui { +class IndexWindow; +} + +class IndexWindow : public QMainWindow +{ + Q_OBJECT + +public: + explicit IndexWindow(QWidget *parent = nullptr); + ~IndexWindow(); +private slots: + void initForm(); + void loadStyle(const QString &qssFile); + + +private: + Ui::IndexWindow *ui; +}; + +#endif // INDEXWINDOW_H diff --git a/softwareDirectory/AutoVerScheme/indexwindow.ui b/softwareDirectory/AutoVerScheme/indexwindow.ui new file mode 100644 index 0000000..d7153e0 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/indexwindow.ui @@ -0,0 +1,539 @@ + + + IndexWindow + + + Qt::NonModal + + + + 0 + 0 + 1334 + 789 + + + + + 0 + 0 + + + + MainWindow + + + + + + + 100 + 100 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + 6 + + + QLayout::SetFixedSize + + + 0 + + + 0 + + + + + Qt::Horizontal + + + QSizePolicy::Fixed + + + + 120 + 13 + + + + + + + + + 0 + 0 + + + + + 560 + 0 + + + + Qt::DefaultContextMenu + + + color: white; +font-weight: bold; +font-size: 24pt; + + + + + QFrame::NoFrame + + + QFrame::Plain + + + 自动检定系统 + + + Qt::AutoText + + + false + + + Qt::AlignCenter + + + + + + + Qt::Horizontal + + + QSizePolicy::Fixed + + + + 40 + 13 + + + + + + + + + + Qt::Vertical + + + QSizePolicy::Fixed + + + + 50 + 80 + + + + + + + + + + Qt::Vertical + + + QSizePolicy::Fixed + + + + 20 + 120 + + + + + + + + Qt::Horizontal + + + + 100 + 20 + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + 0 + 0 + + + + + 310 + 190 + + + + OpenHandCursor + + + margin-right: 0px; + + + 信息管理 + + + + 60 + 60 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + Qt::Horizontal + + + + 327 + 20 + + + + + + + + + 0 + 0 + + + + + 490 + 190 + + + + OpenHandCursor + + + + + + 自动核查 + + + + 60 + 60 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + + 0 + 0 + + + + + 490 + 190 + + + + OpenHandCursor + + + + + + 自动检定 + + + + 60 + 60 + + + + false + + + false + + + Qt::ToolButtonTextUnderIcon + + + + + + + + 0 + 0 + + + + + 490 + 190 + + + + OpenHandCursor + + + + + + 核查程序管理 + + + + 60 + 60 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + Qt::Horizontal + + + + 327 + 20 + + + + + + + + + 0 + 0 + + + + + 310 + 190 + + + + OpenHandCursor + + + margin-right: 0px; + + + 数据同步 + + + + 60 + 60 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + Qt::Vertical + + + QSizePolicy::Fixed + + + + 20 + 120 + + + + + + + + Qt::Vertical + + + QSizePolicy::Fixed + + + + 20 + 120 + + + + + + + + + 0 + 0 + + + + + 490 + 190 + + + + OpenHandCursor + + + + + + 检定程序管理 + + + + 60 + 60 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + + + + + + 0 + 0 + + + + + 10 + 10 + + + + color: white; +font-weight: bold; +font-size: 14pt; + + + 欢迎您! 用户: admin + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + Qt::Horizontal + + + QSizePolicy::Fixed + + + + 270 + 20 + + + + + + + + + + + btnConfig + btnData + tbtnMain1 + tbtnMain2 + tbtnMain3 + tbtnConfig1 + tbtnConfig2 + tbtnConfig3 + tbtnConfig4 + tbtnConfig5 + tbtnConfig6 + btnMain + btnHelp + btnExit + + + + diff --git a/softwareDirectory/AutoVerScheme/loginwindow.cpp b/softwareDirectory/AutoVerScheme/loginwindow.cpp new file mode 100644 index 0000000..155988a --- /dev/null +++ b/softwareDirectory/AutoVerScheme/loginwindow.cpp @@ -0,0 +1,68 @@ +#include "loginwindow.h" +#include "ui_loginwindow.h" +#include +#include +#include + +#include "indexwindow.h" + +loginWindow::loginWindow(QWidget *parent): QMainWindow(parent), ui(new Ui::loginWindow) +{ + ui->setupUi(this); + this->initForm(); + ui->label->styleSheet(); + +} + +loginWindow::~loginWindow() +{ + delete ui; +} +void loginWindow::initForm() +{ + //this->setWindowFlags(Qt::FramelessWindowHint); + //调用样式 + loadStyle(":/qss/login.css"); +} + +void loginWindow::loadStyle(const QString &qssFile) +{ + //加载样式表 + QString qss; + + QFile file(qssFile); + + if (file.open(QFile::ReadOnly)) { + //用QTextStream读取样式文件不用区分文件编码 带bom也行 + QStringList list; + QTextStream in(&file); + //in.setCodec("utf-8"); + while (!in.atEnd()) { + QString line; + in >> line; + list << line; + } + + file.close(); + qss = list.join("\n"); + QString paletteColor = qss.mid(20, 7); + qApp->setPalette(QPalette(paletteColor)); + //用时主要在下面这句 + qApp->setStyleSheet(qss); + } + + +} + + +void loginWindow::on_Button_login_clicked() +{ + QMessageBox::information(this, "提示", "登录成功!"); + //查询数据库内是否有账号 + IndexWindow *indexWindow = new IndexWindow; + indexWindow->setWindowState(Qt::WindowMaximized); + indexWindow->show(); + this->close(); + +} + diff --git a/softwareDirectory/AutoVerScheme/loginwindow.h b/softwareDirectory/AutoVerScheme/loginwindow.h new file mode 100644 index 0000000..2695bc3 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/loginwindow.h @@ -0,0 +1,31 @@ +#ifndef MAINWINDOW_H +#define MAINWINDOW_H + +#include +#include + + + +namespace Ui { +class loginWindow; +} + +class loginWindow : public QMainWindow +{ + Q_OBJECT + +public: + explicit loginWindow(QWidget *parent = 0); + ~loginWindow(); +private slots: + void initForm(); + void loadStyle(const QString &qssFile); + void on_Button_login_clicked(); + + +private: + Ui::loginWindow *ui; +private: + QSqlQuery query; +}; +#endif // MAINWINDOW_H diff --git a/softwareDirectory/AutoVerScheme/loginwindow.ui b/softwareDirectory/AutoVerScheme/loginwindow.ui new file mode 100644 index 0000000..ca04751 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/loginwindow.ui @@ -0,0 +1,234 @@ + + + loginWindow + + + + 0 + 0 + 954 + 603 + + + + MainWindow + + + background-color: rgb(255, 255, 255) + + + + + + 110 + 110 + 271 + 231 + + + + background-image: url(:/image/login/u9.png); +background-repeat: no-repeat; background-position: center; +background-color: transparent; + + + + + + + + + 0 + 10 + 491 + 601 + + + + background-image: url(:/image/login/u2.png); +background-repeat: no-repeat; +background-color: transparent; +background-repeat: no-repeat; +background-position: center; +background-size: 100%; + + + + + + + + + 5 + 10 + 491 + 569 + + + + background-image: url(:/image/login/u0.png); +background-repeat: no-repeat; background-position: center; + + + + + + 170 + 350 + 241 + 51 + + + + background-color: transparent; + + + Metrology + + + + + + 490 + 10 + 471 + 571 + + + + + + + 610 + 70 + 271 + 61 + + + + 自动检定软件 + + + + + + 540 + 200 + 61 + 61 + + + + + + + + + + 490 + 10 + 461 + 571 + + + + + + + 540 + 290 + 61 + 61 + + + + + + + + + + 540 + 430 + 341 + 81 + + + + OpenHandCursor + + + + + + 登 录 + + + + + + 610 + 210 + 221 + 41 + + + + 请输入账号 + + + + + + 610 + 300 + 221 + 41 + + + + 请输入账号 + + + + + + 507 + 1 + 72 + 16 + + + + + + + label_4 + graphicsView + label_2 + label_3 + graphicsView_2 + textBrowser + lab_title + textBrowser_2 + textBrowser_3 + Button_login + textEdit_acc + textEdit_pass + label + + + + + 0 + 0 + 954 + 25 + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/main.cpp b/softwareDirectory/AutoVerScheme/main.cpp new file mode 100644 index 0000000..16b6d3f --- /dev/null +++ b/softwareDirectory/AutoVerScheme/main.cpp @@ -0,0 +1,23 @@ +#include "loginwindow.h" +#include "mainwindow.h" +#include +#include "indexWindow.h" +#include "testview.h" + +int main(int argc, char *argv[]) +{ + QApplication a(argc, argv); + // 加载外部的CSS文件 + a.setStyleSheet("file:///path/to/styles.css"); + //设置字体 + QFont font; + font.setFamily("Microsoft Yahei"); + font.setPixelSize(13); + a.setFont(font); + + //TestView s; + //s.show(); + loginWindow w; + w.show(); + return a.exec(); +} diff --git a/softwareDirectory/AutoVerScheme/mainwindow.cpp b/softwareDirectory/AutoVerScheme/mainwindow.cpp new file mode 100644 index 0000000..12d07c0 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/mainwindow.cpp @@ -0,0 +1,14 @@ +#include "mainwindow.h" +#include "ui_mainwindow.h" + +MainWindow::MainWindow(QWidget *parent) : + QMainWindow(parent), + ui(new Ui::MainWindow) +{ + ui->setupUi(this); +} + +MainWindow::~MainWindow() +{ + delete ui; +} diff --git a/softwareDirectory/AutoVerScheme/mainwindow.h b/softwareDirectory/AutoVerScheme/mainwindow.h new file mode 100644 index 0000000..40fd472 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/mainwindow.h @@ -0,0 +1,22 @@ +#ifndef MAINWINDOW_H +#define MAINWINDOW_H + +#include + +namespace Ui { +class MainWindow; +} + +class MainWindow : public QMainWindow +{ + Q_OBJECT + +public: + explicit MainWindow(QWidget *parent = nullptr); + ~MainWindow(); + +private: + Ui::MainWindow *ui; +}; + +#endif // MAINWINDOW_H diff --git a/softwareDirectory/AutoVerScheme/mainwindow.ui b/softwareDirectory/AutoVerScheme/mainwindow.ui new file mode 100644 index 0000000..dd4f1c8 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/mainwindow.ui @@ -0,0 +1,24 @@ + + + + + MainWindow + + + + 0 + 0 + 800 + 600 + + + + MainWindow + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u101.png b/softwareDirectory/AutoVerScheme/res/image/Index/u101.png new file mode 100644 index 0000000..9e371e3 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u101.png Binary files differ diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u102.png b/softwareDirectory/AutoVerScheme/res/image/Index/u102.png new file mode 100644 index 0000000..b288067 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u102.png Binary files differ diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u15.png b/softwareDirectory/AutoVerScheme/res/image/Index/u15.png new file mode 100644 index 0000000..7e699e6 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u15.png Binary files differ diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u17.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u17.svg new file mode 100644 index 0000000..acc0502 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u17.svg @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u18.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u18.svg new file mode 100644 index 0000000..6a00a10 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u18.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u19.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u19.svg new file mode 100644 index 0000000..42dea06 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u19.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u20.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u20.svg new file mode 100644 index 0000000..7426e62 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u20.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u21.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u21.svg new file mode 100644 index 0000000..cba8469 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u21.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u22.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u22.svg new file mode 100644 index 0000000..78843a0 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u22.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u23.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u23.svg new file mode 100644 index 0000000..c586b65 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u23.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u24.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u24.svg new file mode 100644 index 0000000..066e006 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u24.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro new file mode 100644 index 0000000..5b8f852 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro @@ -0,0 +1,48 @@ +QT += core gui +QT += sql +greaterThan(QT_MAJOR_VERSION, 4): QT += widgets + +CONFIG += c++11 + +# The following define makes your compiler emit warnings if you use +# any Qt feature that has been marked deprecated (the exact warnings +# depend on your compiler). Please consult the documentation of the +# deprecated API in order to know how to port your code away from it. +DEFINES += QT_DEPRECATED_WARNINGS + +# You can also make your code fail to compile if it uses deprecated APIs. +# In order to do so, uncomment the following line. +# You can also select to disable deprecated APIs only up to a certain version of Qt. +#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 + +SOURCES += \ + indexwindow.cpp \ + loginwindow.cpp \ + main.cpp \ + mainwindow.cpp \ + testview.cpp + +HEADERS += \ + indexwindow.h \ + loginwindow.h \ + mainwindow.h \ + testview.h + +FORMS += \ + indexwindow.ui \ + loginwindow.ui \ + mainwindow.ui \ + testview.ui + +# Default rules for deployment. +qnx: target.path = /tmp/$${TARGET}/bin +else: unix:!android: target.path = /opt/$${TARGET}/bin +!isEmpty(target.path): INSTALLS += target + +RESOURCES += \ + res/qss.qrc \ + res/res.qrc + +DISTFILES += \ + res/image/u2.png + diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user new file mode 100644 index 0000000..1f5ec64 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user @@ -0,0 +1,562 @@ + + + + + + EnvironmentId + {c08df58c-84a7-4965-bca6-e98789474efa} + + + ProjectExplorer.Project.ActiveTarget + 0 + + + ProjectExplorer.Project.EditorSettings + + true + false + true + + Cpp + + CppGlobal + + + + QmlJS + + QmlJSGlobal + + + 2 + UTF-8 + false + 4 + false + 80 + true + true + 1 + true + false + 0 + true + true + 0 + 8 + true + 1 + true + true + true + false + + + + ProjectExplorer.Project.PluginSettings + + + -fno-delayed-template-parsing + + true + + + + ProjectExplorer.Project.Target.0 + + Desktop Qt 5.14.2 MinGW 64-bit + Desktop Qt 5.14.2 MinGW 64-bit + qt.qt5.5142.win64_mingw73_kit + 0 + 0 + 0 + + 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 + 0 + 0 + 0 + + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug + + + true + QtProjectManager.QMakeBuildStep + true + + false + false + false + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Debug + Qt4ProjectManager.Qt4BuildConfiguration + 2 + + + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Release + + + true + QtProjectManager.QMakeBuildStep + false + + false + false + true + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Release + Qt4ProjectManager.Qt4BuildConfiguration + 0 + + + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Profile + + + true + QtProjectManager.QMakeBuildStep + true + + false + true + true + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Profile + Qt4ProjectManager.Qt4BuildConfiguration + 0 + + 3 + + + 0 + Deploy + Deploy + ProjectExplorer.BuildSteps.Deploy + + 1 + ProjectExplorer.DefaultDeployConfiguration + + 1 + + + dwarf + + cpu-cycles + + + 250 + + -e + cpu-cycles + --call-graph + dwarf,4096 + -F + 250 + + -F + true + 4096 + false + false + 1000 + + true + + false + false + false + false + true + 0.01 + 10 + true + kcachegrind + 1 + 25 + + 1 + true + false + true + valgrind + + 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + + 2 + + Qt4ProjectManager.Qt4RunConfiguration:D:/Auto_verification_scheme/AutoVerScheme/AutoVerScheme.pro + D:/Auto_verification_scheme/AutoVerScheme/AutoVerScheme.pro + + false + + false + true + true + false + false + true + + + + 1 + + + + ProjectExplorer.Project.TargetCount + 2 + + + ProjectExplorer.Project.Updater.FileVersion + 22 + + + Version + 22 + + diff --git a/softwareDirectory/AutoVerScheme/indexwindow.cpp b/softwareDirectory/AutoVerScheme/indexwindow.cpp new file mode 100644 index 0000000..3e52c7b --- /dev/null +++ b/softwareDirectory/AutoVerScheme/indexwindow.cpp @@ -0,0 +1,55 @@ +#include "indexwindow.h" +#include "ui_indexwindow.h" +#include "QFile" +#include "QTextStream" + +IndexWindow::IndexWindow(QWidget *parent) : + QMainWindow(parent), + ui(new Ui::IndexWindow) +{ + ui->setupUi(this); + this->initForm(); +} + +IndexWindow::~IndexWindow() +{ + delete ui; +} +void IndexWindow::initForm() +{ + //this->setWindowFlags(Qt::FramelessWindowHint); + //调用样式 + loadStyle(":/qss/Index.css"); + +} + +void IndexWindow::loadStyle(const QString &qssFile) +{ + //加载样式表 + QString qss; + + QFile file(qssFile); + + if (file.open(QFile::ReadOnly)) { + //用QTextStream读取样式文件不用区分文件编码 带bom也行 + QStringList list; + QTextStream in(&file); + //in.setCodec("utf-8"); + while (!in.atEnd()) { + QString line; + in >> line; + list << line; + } + + file.close(); + qss = list.join("\n"); + QString paletteColor = qss.mid(20, 7); + qApp->setPalette(QPalette(paletteColor)); + //用时主要在下面这句 + qApp->setStyleSheet(qss); + } + + +} + + diff --git a/softwareDirectory/AutoVerScheme/indexwindow.h b/softwareDirectory/AutoVerScheme/indexwindow.h new file mode 100644 index 0000000..2aee958 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/indexwindow.h @@ -0,0 +1,26 @@ +#ifndef INDEXWINDOW_H +#define INDEXWINDOW_H + +#include + +namespace Ui { +class IndexWindow; +} + +class IndexWindow : public QMainWindow +{ + Q_OBJECT + +public: + explicit IndexWindow(QWidget *parent = nullptr); + ~IndexWindow(); +private slots: + void initForm(); + void loadStyle(const QString &qssFile); + + +private: + Ui::IndexWindow *ui; +}; + +#endif // INDEXWINDOW_H diff --git a/softwareDirectory/AutoVerScheme/indexwindow.ui b/softwareDirectory/AutoVerScheme/indexwindow.ui new file mode 100644 index 0000000..d7153e0 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/indexwindow.ui @@ -0,0 +1,539 @@ + + + IndexWindow + + + Qt::NonModal + + + + 0 + 0 + 1334 + 789 + + + + + 0 + 0 + + + + MainWindow + + + + + + + 100 + 100 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + 6 + + + QLayout::SetFixedSize + + + 0 + + + 0 + + + + + Qt::Horizontal + + + QSizePolicy::Fixed + + + + 120 + 13 + + + + + + + + + 0 + 0 + + + + + 560 + 0 + + + + Qt::DefaultContextMenu + + + color: white; +font-weight: bold; +font-size: 24pt; + + + + + QFrame::NoFrame + + + QFrame::Plain + + + 自动检定系统 + + + Qt::AutoText + + + false + + + Qt::AlignCenter + + + + + + + Qt::Horizontal + + + QSizePolicy::Fixed + + + + 40 + 13 + + + + + + + + + + Qt::Vertical + + + QSizePolicy::Fixed + + + + 50 + 80 + + + + + + + + + + Qt::Vertical + + + QSizePolicy::Fixed + + + + 20 + 120 + + + + + + + + Qt::Horizontal + + + + 100 + 20 + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + 0 + 0 + + + + + 310 + 190 + + + + OpenHandCursor + + + margin-right: 0px; + + + 信息管理 + + + + 60 + 60 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + Qt::Horizontal + + + + 327 + 20 + + + + + + + + + 0 + 0 + + + + + 490 + 190 + + + + OpenHandCursor + + + + + + 自动核查 + + + + 60 + 60 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + + 0 + 0 + + + + + 490 + 190 + + + + OpenHandCursor + + + + + + 自动检定 + + + + 60 + 60 + + + + false + + + false + + + Qt::ToolButtonTextUnderIcon + + + + + + + + 0 + 0 + + + + + 490 + 190 + + + + OpenHandCursor + + + + + + 核查程序管理 + + + + 60 + 60 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + Qt::Horizontal + + + + 327 + 20 + + + + + + + + + 0 + 0 + + + + + 310 + 190 + + + + OpenHandCursor + + + margin-right: 0px; + + + 数据同步 + + + + 60 + 60 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + Qt::Vertical + + + QSizePolicy::Fixed + + + + 20 + 120 + + + + + + + + Qt::Vertical + + + QSizePolicy::Fixed + + + + 20 + 120 + + + + + + + + + 0 + 0 + + + + + 490 + 190 + + + + OpenHandCursor + + + + + + 检定程序管理 + + + + 60 + 60 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + + + + + + 0 + 0 + + + + + 10 + 10 + + + + color: white; +font-weight: bold; +font-size: 14pt; + + + 欢迎您! 用户: admin + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + Qt::Horizontal + + + QSizePolicy::Fixed + + + + 270 + 20 + + + + + + + + + + + btnConfig + btnData + tbtnMain1 + tbtnMain2 + tbtnMain3 + tbtnConfig1 + tbtnConfig2 + tbtnConfig3 + tbtnConfig4 + tbtnConfig5 + tbtnConfig6 + btnMain + btnHelp + btnExit + + + + diff --git a/softwareDirectory/AutoVerScheme/loginwindow.cpp b/softwareDirectory/AutoVerScheme/loginwindow.cpp new file mode 100644 index 0000000..155988a --- /dev/null +++ b/softwareDirectory/AutoVerScheme/loginwindow.cpp @@ -0,0 +1,68 @@ +#include "loginwindow.h" +#include "ui_loginwindow.h" +#include +#include +#include + +#include "indexwindow.h" + +loginWindow::loginWindow(QWidget *parent): QMainWindow(parent), ui(new Ui::loginWindow) +{ + ui->setupUi(this); + this->initForm(); + ui->label->styleSheet(); + +} + +loginWindow::~loginWindow() +{ + delete ui; +} +void loginWindow::initForm() +{ + //this->setWindowFlags(Qt::FramelessWindowHint); + //调用样式 + loadStyle(":/qss/login.css"); +} + +void loginWindow::loadStyle(const QString &qssFile) +{ + //加载样式表 + QString qss; + + QFile file(qssFile); + + if (file.open(QFile::ReadOnly)) { + //用QTextStream读取样式文件不用区分文件编码 带bom也行 + QStringList list; + QTextStream in(&file); + //in.setCodec("utf-8"); + while (!in.atEnd()) { + QString line; + in >> line; + list << line; + } + + file.close(); + qss = list.join("\n"); + QString paletteColor = qss.mid(20, 7); + qApp->setPalette(QPalette(paletteColor)); + //用时主要在下面这句 + qApp->setStyleSheet(qss); + } + + +} + + +void loginWindow::on_Button_login_clicked() +{ + QMessageBox::information(this, "提示", "登录成功!"); + //查询数据库内是否有账号 + IndexWindow *indexWindow = new IndexWindow; + indexWindow->setWindowState(Qt::WindowMaximized); + indexWindow->show(); + this->close(); + +} + diff --git a/softwareDirectory/AutoVerScheme/loginwindow.h b/softwareDirectory/AutoVerScheme/loginwindow.h new file mode 100644 index 0000000..2695bc3 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/loginwindow.h @@ -0,0 +1,31 @@ +#ifndef MAINWINDOW_H +#define MAINWINDOW_H + +#include +#include + + + +namespace Ui { +class loginWindow; +} + +class loginWindow : public QMainWindow +{ + Q_OBJECT + +public: + explicit loginWindow(QWidget *parent = 0); + ~loginWindow(); +private slots: + void initForm(); + void loadStyle(const QString &qssFile); + void on_Button_login_clicked(); + + +private: + Ui::loginWindow *ui; +private: + QSqlQuery query; +}; +#endif // MAINWINDOW_H diff --git a/softwareDirectory/AutoVerScheme/loginwindow.ui b/softwareDirectory/AutoVerScheme/loginwindow.ui new file mode 100644 index 0000000..ca04751 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/loginwindow.ui @@ -0,0 +1,234 @@ + + + loginWindow + + + + 0 + 0 + 954 + 603 + + + + MainWindow + + + background-color: rgb(255, 255, 255) + + + + + + 110 + 110 + 271 + 231 + + + + background-image: url(:/image/login/u9.png); +background-repeat: no-repeat; background-position: center; +background-color: transparent; + + + + + + + + + 0 + 10 + 491 + 601 + + + + background-image: url(:/image/login/u2.png); +background-repeat: no-repeat; +background-color: transparent; +background-repeat: no-repeat; +background-position: center; +background-size: 100%; + + + + + + + + + 5 + 10 + 491 + 569 + + + + background-image: url(:/image/login/u0.png); +background-repeat: no-repeat; background-position: center; + + + + + + 170 + 350 + 241 + 51 + + + + background-color: transparent; + + + Metrology + + + + + + 490 + 10 + 471 + 571 + + + + + + + 610 + 70 + 271 + 61 + + + + 自动检定软件 + + + + + + 540 + 200 + 61 + 61 + + + + + + + + + + 490 + 10 + 461 + 571 + + + + + + + 540 + 290 + 61 + 61 + + + + + + + + + + 540 + 430 + 341 + 81 + + + + OpenHandCursor + + + + + + 登 录 + + + + + + 610 + 210 + 221 + 41 + + + + 请输入账号 + + + + + + 610 + 300 + 221 + 41 + + + + 请输入账号 + + + + + + 507 + 1 + 72 + 16 + + + + + + + label_4 + graphicsView + label_2 + label_3 + graphicsView_2 + textBrowser + lab_title + textBrowser_2 + textBrowser_3 + Button_login + textEdit_acc + textEdit_pass + label + + + + + 0 + 0 + 954 + 25 + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/main.cpp b/softwareDirectory/AutoVerScheme/main.cpp new file mode 100644 index 0000000..16b6d3f --- /dev/null +++ b/softwareDirectory/AutoVerScheme/main.cpp @@ -0,0 +1,23 @@ +#include "loginwindow.h" +#include "mainwindow.h" +#include +#include "indexWindow.h" +#include "testview.h" + +int main(int argc, char *argv[]) +{ + QApplication a(argc, argv); + // 加载外部的CSS文件 + a.setStyleSheet("file:///path/to/styles.css"); + //设置字体 + QFont font; + font.setFamily("Microsoft Yahei"); + font.setPixelSize(13); + a.setFont(font); + + //TestView s; + //s.show(); + loginWindow w; + w.show(); + return a.exec(); +} diff --git a/softwareDirectory/AutoVerScheme/mainwindow.cpp b/softwareDirectory/AutoVerScheme/mainwindow.cpp new file mode 100644 index 0000000..12d07c0 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/mainwindow.cpp @@ -0,0 +1,14 @@ +#include "mainwindow.h" +#include "ui_mainwindow.h" + +MainWindow::MainWindow(QWidget *parent) : + QMainWindow(parent), + ui(new Ui::MainWindow) +{ + ui->setupUi(this); +} + +MainWindow::~MainWindow() +{ + delete ui; +} diff --git a/softwareDirectory/AutoVerScheme/mainwindow.h b/softwareDirectory/AutoVerScheme/mainwindow.h new file mode 100644 index 0000000..40fd472 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/mainwindow.h @@ -0,0 +1,22 @@ +#ifndef MAINWINDOW_H +#define MAINWINDOW_H + +#include + +namespace Ui { +class MainWindow; +} + +class MainWindow : public QMainWindow +{ + Q_OBJECT + +public: + explicit MainWindow(QWidget *parent = nullptr); + ~MainWindow(); + +private: + Ui::MainWindow *ui; +}; + +#endif // MAINWINDOW_H diff --git a/softwareDirectory/AutoVerScheme/mainwindow.ui b/softwareDirectory/AutoVerScheme/mainwindow.ui new file mode 100644 index 0000000..dd4f1c8 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/mainwindow.ui @@ -0,0 +1,24 @@ + + + + + MainWindow + + + + 0 + 0 + 800 + 600 + + + + MainWindow + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u101.png b/softwareDirectory/AutoVerScheme/res/image/Index/u101.png new file mode 100644 index 0000000..9e371e3 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u101.png Binary files differ diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u102.png b/softwareDirectory/AutoVerScheme/res/image/Index/u102.png new file mode 100644 index 0000000..b288067 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u102.png Binary files differ diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u15.png b/softwareDirectory/AutoVerScheme/res/image/Index/u15.png new file mode 100644 index 0000000..7e699e6 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u15.png Binary files differ diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u17.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u17.svg new file mode 100644 index 0000000..acc0502 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u17.svg @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u18.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u18.svg new file mode 100644 index 0000000..6a00a10 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u18.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u19.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u19.svg new file mode 100644 index 0000000..42dea06 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u19.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u20.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u20.svg new file mode 100644 index 0000000..7426e62 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u20.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u21.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u21.svg new file mode 100644 index 0000000..cba8469 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u21.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u22.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u22.svg new file mode 100644 index 0000000..78843a0 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u22.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u23.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u23.svg new file mode 100644 index 0000000..c586b65 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u23.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u24.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u24.svg new file mode 100644 index 0000000..066e006 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u24.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u26.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u26.svg new file mode 100644 index 0000000..1834de5 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u26.svg @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro new file mode 100644 index 0000000..5b8f852 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro @@ -0,0 +1,48 @@ +QT += core gui +QT += sql +greaterThan(QT_MAJOR_VERSION, 4): QT += widgets + +CONFIG += c++11 + +# The following define makes your compiler emit warnings if you use +# any Qt feature that has been marked deprecated (the exact warnings +# depend on your compiler). Please consult the documentation of the +# deprecated API in order to know how to port your code away from it. +DEFINES += QT_DEPRECATED_WARNINGS + +# You can also make your code fail to compile if it uses deprecated APIs. +# In order to do so, uncomment the following line. +# You can also select to disable deprecated APIs only up to a certain version of Qt. +#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 + +SOURCES += \ + indexwindow.cpp \ + loginwindow.cpp \ + main.cpp \ + mainwindow.cpp \ + testview.cpp + +HEADERS += \ + indexwindow.h \ + loginwindow.h \ + mainwindow.h \ + testview.h + +FORMS += \ + indexwindow.ui \ + loginwindow.ui \ + mainwindow.ui \ + testview.ui + +# Default rules for deployment. +qnx: target.path = /tmp/$${TARGET}/bin +else: unix:!android: target.path = /opt/$${TARGET}/bin +!isEmpty(target.path): INSTALLS += target + +RESOURCES += \ + res/qss.qrc \ + res/res.qrc + +DISTFILES += \ + res/image/u2.png + diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user new file mode 100644 index 0000000..1f5ec64 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user @@ -0,0 +1,562 @@ + + + + + + EnvironmentId + {c08df58c-84a7-4965-bca6-e98789474efa} + + + ProjectExplorer.Project.ActiveTarget + 0 + + + ProjectExplorer.Project.EditorSettings + + true + false + true + + Cpp + + CppGlobal + + + + QmlJS + + QmlJSGlobal + + + 2 + UTF-8 + false + 4 + false + 80 + true + true + 1 + true + false + 0 + true + true + 0 + 8 + true + 1 + true + true + true + false + + + + ProjectExplorer.Project.PluginSettings + + + -fno-delayed-template-parsing + + true + + + + ProjectExplorer.Project.Target.0 + + Desktop Qt 5.14.2 MinGW 64-bit + Desktop Qt 5.14.2 MinGW 64-bit + qt.qt5.5142.win64_mingw73_kit + 0 + 0 + 0 + + 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 + 0 + 0 + 0 + + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug + + + true + QtProjectManager.QMakeBuildStep + true + + false + false + false + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Debug + Qt4ProjectManager.Qt4BuildConfiguration + 2 + + + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Release + + + true + QtProjectManager.QMakeBuildStep + false + + false + false + true + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Release + Qt4ProjectManager.Qt4BuildConfiguration + 0 + + + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Profile + + + true + QtProjectManager.QMakeBuildStep + true + + false + true + true + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Profile + Qt4ProjectManager.Qt4BuildConfiguration + 0 + + 3 + + + 0 + Deploy + Deploy + ProjectExplorer.BuildSteps.Deploy + + 1 + ProjectExplorer.DefaultDeployConfiguration + + 1 + + + dwarf + + cpu-cycles + + + 250 + + -e + cpu-cycles + --call-graph + dwarf,4096 + -F + 250 + + -F + true + 4096 + false + false + 1000 + + true + + false + false + false + false + true + 0.01 + 10 + true + kcachegrind + 1 + 25 + + 1 + true + false + true + valgrind + + 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + + 2 + + Qt4ProjectManager.Qt4RunConfiguration:D:/Auto_verification_scheme/AutoVerScheme/AutoVerScheme.pro + D:/Auto_verification_scheme/AutoVerScheme/AutoVerScheme.pro + + false + + false + true + true + false + false + true + + + + 1 + + + + ProjectExplorer.Project.TargetCount + 2 + + + ProjectExplorer.Project.Updater.FileVersion + 22 + + + Version + 22 + + diff --git a/softwareDirectory/AutoVerScheme/indexwindow.cpp b/softwareDirectory/AutoVerScheme/indexwindow.cpp new file mode 100644 index 0000000..3e52c7b --- /dev/null +++ b/softwareDirectory/AutoVerScheme/indexwindow.cpp @@ -0,0 +1,55 @@ +#include "indexwindow.h" +#include "ui_indexwindow.h" +#include "QFile" +#include "QTextStream" + +IndexWindow::IndexWindow(QWidget *parent) : + QMainWindow(parent), + ui(new Ui::IndexWindow) +{ + ui->setupUi(this); + this->initForm(); +} + +IndexWindow::~IndexWindow() +{ + delete ui; +} +void IndexWindow::initForm() +{ + //this->setWindowFlags(Qt::FramelessWindowHint); + //调用样式 + loadStyle(":/qss/Index.css"); + +} + +void IndexWindow::loadStyle(const QString &qssFile) +{ + //加载样式表 + QString qss; + + QFile file(qssFile); + + if (file.open(QFile::ReadOnly)) { + //用QTextStream读取样式文件不用区分文件编码 带bom也行 + QStringList list; + QTextStream in(&file); + //in.setCodec("utf-8"); + while (!in.atEnd()) { + QString line; + in >> line; + list << line; + } + + file.close(); + qss = list.join("\n"); + QString paletteColor = qss.mid(20, 7); + qApp->setPalette(QPalette(paletteColor)); + //用时主要在下面这句 + qApp->setStyleSheet(qss); + } + + +} + + diff --git a/softwareDirectory/AutoVerScheme/indexwindow.h b/softwareDirectory/AutoVerScheme/indexwindow.h new file mode 100644 index 0000000..2aee958 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/indexwindow.h @@ -0,0 +1,26 @@ +#ifndef INDEXWINDOW_H +#define INDEXWINDOW_H + +#include + +namespace Ui { +class IndexWindow; +} + +class IndexWindow : public QMainWindow +{ + Q_OBJECT + +public: + explicit IndexWindow(QWidget *parent = nullptr); + ~IndexWindow(); +private slots: + void initForm(); + void loadStyle(const QString &qssFile); + + +private: + Ui::IndexWindow *ui; +}; + +#endif // INDEXWINDOW_H diff --git a/softwareDirectory/AutoVerScheme/indexwindow.ui b/softwareDirectory/AutoVerScheme/indexwindow.ui new file mode 100644 index 0000000..d7153e0 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/indexwindow.ui @@ -0,0 +1,539 @@ + + + IndexWindow + + + Qt::NonModal + + + + 0 + 0 + 1334 + 789 + + + + + 0 + 0 + + + + MainWindow + + + + + + + 100 + 100 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + 6 + + + QLayout::SetFixedSize + + + 0 + + + 0 + + + + + Qt::Horizontal + + + QSizePolicy::Fixed + + + + 120 + 13 + + + + + + + + + 0 + 0 + + + + + 560 + 0 + + + + Qt::DefaultContextMenu + + + color: white; +font-weight: bold; +font-size: 24pt; + + + + + QFrame::NoFrame + + + QFrame::Plain + + + 自动检定系统 + + + Qt::AutoText + + + false + + + Qt::AlignCenter + + + + + + + Qt::Horizontal + + + QSizePolicy::Fixed + + + + 40 + 13 + + + + + + + + + + Qt::Vertical + + + QSizePolicy::Fixed + + + + 50 + 80 + + + + + + + + + + Qt::Vertical + + + QSizePolicy::Fixed + + + + 20 + 120 + + + + + + + + Qt::Horizontal + + + + 100 + 20 + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + 0 + 0 + + + + + 310 + 190 + + + + OpenHandCursor + + + margin-right: 0px; + + + 信息管理 + + + + 60 + 60 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + Qt::Horizontal + + + + 327 + 20 + + + + + + + + + 0 + 0 + + + + + 490 + 190 + + + + OpenHandCursor + + + + + + 自动核查 + + + + 60 + 60 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + + 0 + 0 + + + + + 490 + 190 + + + + OpenHandCursor + + + + + + 自动检定 + + + + 60 + 60 + + + + false + + + false + + + Qt::ToolButtonTextUnderIcon + + + + + + + + 0 + 0 + + + + + 490 + 190 + + + + OpenHandCursor + + + + + + 核查程序管理 + + + + 60 + 60 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + Qt::Horizontal + + + + 327 + 20 + + + + + + + + + 0 + 0 + + + + + 310 + 190 + + + + OpenHandCursor + + + margin-right: 0px; + + + 数据同步 + + + + 60 + 60 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + Qt::Vertical + + + QSizePolicy::Fixed + + + + 20 + 120 + + + + + + + + Qt::Vertical + + + QSizePolicy::Fixed + + + + 20 + 120 + + + + + + + + + 0 + 0 + + + + + 490 + 190 + + + + OpenHandCursor + + + + + + 检定程序管理 + + + + 60 + 60 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + + + + + + 0 + 0 + + + + + 10 + 10 + + + + color: white; +font-weight: bold; +font-size: 14pt; + + + 欢迎您! 用户: admin + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + Qt::Horizontal + + + QSizePolicy::Fixed + + + + 270 + 20 + + + + + + + + + + + btnConfig + btnData + tbtnMain1 + tbtnMain2 + tbtnMain3 + tbtnConfig1 + tbtnConfig2 + tbtnConfig3 + tbtnConfig4 + tbtnConfig5 + tbtnConfig6 + btnMain + btnHelp + btnExit + + + + diff --git a/softwareDirectory/AutoVerScheme/loginwindow.cpp b/softwareDirectory/AutoVerScheme/loginwindow.cpp new file mode 100644 index 0000000..155988a --- /dev/null +++ b/softwareDirectory/AutoVerScheme/loginwindow.cpp @@ -0,0 +1,68 @@ +#include "loginwindow.h" +#include "ui_loginwindow.h" +#include +#include +#include + +#include "indexwindow.h" + +loginWindow::loginWindow(QWidget *parent): QMainWindow(parent), ui(new Ui::loginWindow) +{ + ui->setupUi(this); + this->initForm(); + ui->label->styleSheet(); + +} + +loginWindow::~loginWindow() +{ + delete ui; +} +void loginWindow::initForm() +{ + //this->setWindowFlags(Qt::FramelessWindowHint); + //调用样式 + loadStyle(":/qss/login.css"); +} + +void loginWindow::loadStyle(const QString &qssFile) +{ + //加载样式表 + QString qss; + + QFile file(qssFile); + + if (file.open(QFile::ReadOnly)) { + //用QTextStream读取样式文件不用区分文件编码 带bom也行 + QStringList list; + QTextStream in(&file); + //in.setCodec("utf-8"); + while (!in.atEnd()) { + QString line; + in >> line; + list << line; + } + + file.close(); + qss = list.join("\n"); + QString paletteColor = qss.mid(20, 7); + qApp->setPalette(QPalette(paletteColor)); + //用时主要在下面这句 + qApp->setStyleSheet(qss); + } + + +} + + +void loginWindow::on_Button_login_clicked() +{ + QMessageBox::information(this, "提示", "登录成功!"); + //查询数据库内是否有账号 + IndexWindow *indexWindow = new IndexWindow; + indexWindow->setWindowState(Qt::WindowMaximized); + indexWindow->show(); + this->close(); + +} + diff --git a/softwareDirectory/AutoVerScheme/loginwindow.h b/softwareDirectory/AutoVerScheme/loginwindow.h new file mode 100644 index 0000000..2695bc3 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/loginwindow.h @@ -0,0 +1,31 @@ +#ifndef MAINWINDOW_H +#define MAINWINDOW_H + +#include +#include + + + +namespace Ui { +class loginWindow; +} + +class loginWindow : public QMainWindow +{ + Q_OBJECT + +public: + explicit loginWindow(QWidget *parent = 0); + ~loginWindow(); +private slots: + void initForm(); + void loadStyle(const QString &qssFile); + void on_Button_login_clicked(); + + +private: + Ui::loginWindow *ui; +private: + QSqlQuery query; +}; +#endif // MAINWINDOW_H diff --git a/softwareDirectory/AutoVerScheme/loginwindow.ui b/softwareDirectory/AutoVerScheme/loginwindow.ui new file mode 100644 index 0000000..ca04751 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/loginwindow.ui @@ -0,0 +1,234 @@ + + + loginWindow + + + + 0 + 0 + 954 + 603 + + + + MainWindow + + + background-color: rgb(255, 255, 255) + + + + + + 110 + 110 + 271 + 231 + + + + background-image: url(:/image/login/u9.png); +background-repeat: no-repeat; background-position: center; +background-color: transparent; + + + + + + + + + 0 + 10 + 491 + 601 + + + + background-image: url(:/image/login/u2.png); +background-repeat: no-repeat; +background-color: transparent; +background-repeat: no-repeat; +background-position: center; +background-size: 100%; + + + + + + + + + 5 + 10 + 491 + 569 + + + + background-image: url(:/image/login/u0.png); +background-repeat: no-repeat; background-position: center; + + + + + + 170 + 350 + 241 + 51 + + + + background-color: transparent; + + + Metrology + + + + + + 490 + 10 + 471 + 571 + + + + + + + 610 + 70 + 271 + 61 + + + + 自动检定软件 + + + + + + 540 + 200 + 61 + 61 + + + + + + + + + + 490 + 10 + 461 + 571 + + + + + + + 540 + 290 + 61 + 61 + + + + + + + + + + 540 + 430 + 341 + 81 + + + + OpenHandCursor + + + + + + 登 录 + + + + + + 610 + 210 + 221 + 41 + + + + 请输入账号 + + + + + + 610 + 300 + 221 + 41 + + + + 请输入账号 + + + + + + 507 + 1 + 72 + 16 + + + + + + + label_4 + graphicsView + label_2 + label_3 + graphicsView_2 + textBrowser + lab_title + textBrowser_2 + textBrowser_3 + Button_login + textEdit_acc + textEdit_pass + label + + + + + 0 + 0 + 954 + 25 + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/main.cpp b/softwareDirectory/AutoVerScheme/main.cpp new file mode 100644 index 0000000..16b6d3f --- /dev/null +++ b/softwareDirectory/AutoVerScheme/main.cpp @@ -0,0 +1,23 @@ +#include "loginwindow.h" +#include "mainwindow.h" +#include +#include "indexWindow.h" +#include "testview.h" + +int main(int argc, char *argv[]) +{ + QApplication a(argc, argv); + // 加载外部的CSS文件 + a.setStyleSheet("file:///path/to/styles.css"); + //设置字体 + QFont font; + font.setFamily("Microsoft Yahei"); + font.setPixelSize(13); + a.setFont(font); + + //TestView s; + //s.show(); + loginWindow w; + w.show(); + return a.exec(); +} diff --git a/softwareDirectory/AutoVerScheme/mainwindow.cpp b/softwareDirectory/AutoVerScheme/mainwindow.cpp new file mode 100644 index 0000000..12d07c0 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/mainwindow.cpp @@ -0,0 +1,14 @@ +#include "mainwindow.h" +#include "ui_mainwindow.h" + +MainWindow::MainWindow(QWidget *parent) : + QMainWindow(parent), + ui(new Ui::MainWindow) +{ + ui->setupUi(this); +} + +MainWindow::~MainWindow() +{ + delete ui; +} diff --git a/softwareDirectory/AutoVerScheme/mainwindow.h b/softwareDirectory/AutoVerScheme/mainwindow.h new file mode 100644 index 0000000..40fd472 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/mainwindow.h @@ -0,0 +1,22 @@ +#ifndef MAINWINDOW_H +#define MAINWINDOW_H + +#include + +namespace Ui { +class MainWindow; +} + +class MainWindow : public QMainWindow +{ + Q_OBJECT + +public: + explicit MainWindow(QWidget *parent = nullptr); + ~MainWindow(); + +private: + Ui::MainWindow *ui; +}; + +#endif // MAINWINDOW_H diff --git a/softwareDirectory/AutoVerScheme/mainwindow.ui b/softwareDirectory/AutoVerScheme/mainwindow.ui new file mode 100644 index 0000000..dd4f1c8 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/mainwindow.ui @@ -0,0 +1,24 @@ + + + + + MainWindow + + + + 0 + 0 + 800 + 600 + + + + MainWindow + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u101.png b/softwareDirectory/AutoVerScheme/res/image/Index/u101.png new file mode 100644 index 0000000..9e371e3 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u101.png Binary files differ diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u102.png b/softwareDirectory/AutoVerScheme/res/image/Index/u102.png new file mode 100644 index 0000000..b288067 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u102.png Binary files differ diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u15.png b/softwareDirectory/AutoVerScheme/res/image/Index/u15.png new file mode 100644 index 0000000..7e699e6 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u15.png Binary files differ diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u17.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u17.svg new file mode 100644 index 0000000..acc0502 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u17.svg @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u18.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u18.svg new file mode 100644 index 0000000..6a00a10 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u18.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u19.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u19.svg new file mode 100644 index 0000000..42dea06 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u19.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u20.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u20.svg new file mode 100644 index 0000000..7426e62 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u20.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u21.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u21.svg new file mode 100644 index 0000000..cba8469 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u21.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u22.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u22.svg new file mode 100644 index 0000000..78843a0 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u22.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u23.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u23.svg new file mode 100644 index 0000000..c586b65 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u23.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u24.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u24.svg new file mode 100644 index 0000000..066e006 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u24.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u26.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u26.svg new file mode 100644 index 0000000..1834de5 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u26.svg @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u26_mouseOver.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u26_mouseOver.svg new file mode 100644 index 0000000..1420ba1 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u26_mouseOver.svg @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro new file mode 100644 index 0000000..5b8f852 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro @@ -0,0 +1,48 @@ +QT += core gui +QT += sql +greaterThan(QT_MAJOR_VERSION, 4): QT += widgets + +CONFIG += c++11 + +# The following define makes your compiler emit warnings if you use +# any Qt feature that has been marked deprecated (the exact warnings +# depend on your compiler). Please consult the documentation of the +# deprecated API in order to know how to port your code away from it. +DEFINES += QT_DEPRECATED_WARNINGS + +# You can also make your code fail to compile if it uses deprecated APIs. +# In order to do so, uncomment the following line. +# You can also select to disable deprecated APIs only up to a certain version of Qt. +#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 + +SOURCES += \ + indexwindow.cpp \ + loginwindow.cpp \ + main.cpp \ + mainwindow.cpp \ + testview.cpp + +HEADERS += \ + indexwindow.h \ + loginwindow.h \ + mainwindow.h \ + testview.h + +FORMS += \ + indexwindow.ui \ + loginwindow.ui \ + mainwindow.ui \ + testview.ui + +# Default rules for deployment. +qnx: target.path = /tmp/$${TARGET}/bin +else: unix:!android: target.path = /opt/$${TARGET}/bin +!isEmpty(target.path): INSTALLS += target + +RESOURCES += \ + res/qss.qrc \ + res/res.qrc + +DISTFILES += \ + res/image/u2.png + diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user new file mode 100644 index 0000000..1f5ec64 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user @@ -0,0 +1,562 @@ + + + + + + EnvironmentId + {c08df58c-84a7-4965-bca6-e98789474efa} + + + ProjectExplorer.Project.ActiveTarget + 0 + + + ProjectExplorer.Project.EditorSettings + + true + false + true + + Cpp + + CppGlobal + + + + QmlJS + + QmlJSGlobal + + + 2 + UTF-8 + false + 4 + false + 80 + true + true + 1 + true + false + 0 + true + true + 0 + 8 + true + 1 + true + true + true + false + + + + ProjectExplorer.Project.PluginSettings + + + -fno-delayed-template-parsing + + true + + + + ProjectExplorer.Project.Target.0 + + Desktop Qt 5.14.2 MinGW 64-bit + Desktop Qt 5.14.2 MinGW 64-bit + qt.qt5.5142.win64_mingw73_kit + 0 + 0 + 0 + + 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 + 0 + 0 + 0 + + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug + + + true + QtProjectManager.QMakeBuildStep + true + + false + false + false + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Debug + Qt4ProjectManager.Qt4BuildConfiguration + 2 + + + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Release + + + true + QtProjectManager.QMakeBuildStep + false + + false + false + true + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Release + Qt4ProjectManager.Qt4BuildConfiguration + 0 + + + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Profile + + + true + QtProjectManager.QMakeBuildStep + true + + false + true + true + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Profile + Qt4ProjectManager.Qt4BuildConfiguration + 0 + + 3 + + + 0 + Deploy + Deploy + ProjectExplorer.BuildSteps.Deploy + + 1 + ProjectExplorer.DefaultDeployConfiguration + + 1 + + + dwarf + + cpu-cycles + + + 250 + + -e + cpu-cycles + --call-graph + dwarf,4096 + -F + 250 + + -F + true + 4096 + false + false + 1000 + + true + + false + false + false + false + true + 0.01 + 10 + true + kcachegrind + 1 + 25 + + 1 + true + false + true + valgrind + + 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + + 2 + + Qt4ProjectManager.Qt4RunConfiguration:D:/Auto_verification_scheme/AutoVerScheme/AutoVerScheme.pro + D:/Auto_verification_scheme/AutoVerScheme/AutoVerScheme.pro + + false + + false + true + true + false + false + true + + + + 1 + + + + ProjectExplorer.Project.TargetCount + 2 + + + ProjectExplorer.Project.Updater.FileVersion + 22 + + + Version + 22 + + diff --git a/softwareDirectory/AutoVerScheme/indexwindow.cpp b/softwareDirectory/AutoVerScheme/indexwindow.cpp new file mode 100644 index 0000000..3e52c7b --- /dev/null +++ b/softwareDirectory/AutoVerScheme/indexwindow.cpp @@ -0,0 +1,55 @@ +#include "indexwindow.h" +#include "ui_indexwindow.h" +#include "QFile" +#include "QTextStream" + +IndexWindow::IndexWindow(QWidget *parent) : + QMainWindow(parent), + ui(new Ui::IndexWindow) +{ + ui->setupUi(this); + this->initForm(); +} + +IndexWindow::~IndexWindow() +{ + delete ui; +} +void IndexWindow::initForm() +{ + //this->setWindowFlags(Qt::FramelessWindowHint); + //调用样式 + loadStyle(":/qss/Index.css"); + +} + +void IndexWindow::loadStyle(const QString &qssFile) +{ + //加载样式表 + QString qss; + + QFile file(qssFile); + + if (file.open(QFile::ReadOnly)) { + //用QTextStream读取样式文件不用区分文件编码 带bom也行 + QStringList list; + QTextStream in(&file); + //in.setCodec("utf-8"); + while (!in.atEnd()) { + QString line; + in >> line; + list << line; + } + + file.close(); + qss = list.join("\n"); + QString paletteColor = qss.mid(20, 7); + qApp->setPalette(QPalette(paletteColor)); + //用时主要在下面这句 + qApp->setStyleSheet(qss); + } + + +} + + diff --git a/softwareDirectory/AutoVerScheme/indexwindow.h b/softwareDirectory/AutoVerScheme/indexwindow.h new file mode 100644 index 0000000..2aee958 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/indexwindow.h @@ -0,0 +1,26 @@ +#ifndef INDEXWINDOW_H +#define INDEXWINDOW_H + +#include + +namespace Ui { +class IndexWindow; +} + +class IndexWindow : public QMainWindow +{ + Q_OBJECT + +public: + explicit IndexWindow(QWidget *parent = nullptr); + ~IndexWindow(); +private slots: + void initForm(); + void loadStyle(const QString &qssFile); + + +private: + Ui::IndexWindow *ui; +}; + +#endif // INDEXWINDOW_H diff --git a/softwareDirectory/AutoVerScheme/indexwindow.ui b/softwareDirectory/AutoVerScheme/indexwindow.ui new file mode 100644 index 0000000..d7153e0 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/indexwindow.ui @@ -0,0 +1,539 @@ + + + IndexWindow + + + Qt::NonModal + + + + 0 + 0 + 1334 + 789 + + + + + 0 + 0 + + + + MainWindow + + + + + + + 100 + 100 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + 6 + + + QLayout::SetFixedSize + + + 0 + + + 0 + + + + + Qt::Horizontal + + + QSizePolicy::Fixed + + + + 120 + 13 + + + + + + + + + 0 + 0 + + + + + 560 + 0 + + + + Qt::DefaultContextMenu + + + color: white; +font-weight: bold; +font-size: 24pt; + + + + + QFrame::NoFrame + + + QFrame::Plain + + + 自动检定系统 + + + Qt::AutoText + + + false + + + Qt::AlignCenter + + + + + + + Qt::Horizontal + + + QSizePolicy::Fixed + + + + 40 + 13 + + + + + + + + + + Qt::Vertical + + + QSizePolicy::Fixed + + + + 50 + 80 + + + + + + + + + + Qt::Vertical + + + QSizePolicy::Fixed + + + + 20 + 120 + + + + + + + + Qt::Horizontal + + + + 100 + 20 + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + 0 + 0 + + + + + 310 + 190 + + + + OpenHandCursor + + + margin-right: 0px; + + + 信息管理 + + + + 60 + 60 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + Qt::Horizontal + + + + 327 + 20 + + + + + + + + + 0 + 0 + + + + + 490 + 190 + + + + OpenHandCursor + + + + + + 自动核查 + + + + 60 + 60 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + + 0 + 0 + + + + + 490 + 190 + + + + OpenHandCursor + + + + + + 自动检定 + + + + 60 + 60 + + + + false + + + false + + + Qt::ToolButtonTextUnderIcon + + + + + + + + 0 + 0 + + + + + 490 + 190 + + + + OpenHandCursor + + + + + + 核查程序管理 + + + + 60 + 60 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + Qt::Horizontal + + + + 327 + 20 + + + + + + + + + 0 + 0 + + + + + 310 + 190 + + + + OpenHandCursor + + + margin-right: 0px; + + + 数据同步 + + + + 60 + 60 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + Qt::Vertical + + + QSizePolicy::Fixed + + + + 20 + 120 + + + + + + + + Qt::Vertical + + + QSizePolicy::Fixed + + + + 20 + 120 + + + + + + + + + 0 + 0 + + + + + 490 + 190 + + + + OpenHandCursor + + + + + + 检定程序管理 + + + + 60 + 60 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + + + + + + 0 + 0 + + + + + 10 + 10 + + + + color: white; +font-weight: bold; +font-size: 14pt; + + + 欢迎您! 用户: admin + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + Qt::Horizontal + + + QSizePolicy::Fixed + + + + 270 + 20 + + + + + + + + + + + btnConfig + btnData + tbtnMain1 + tbtnMain2 + tbtnMain3 + tbtnConfig1 + tbtnConfig2 + tbtnConfig3 + tbtnConfig4 + tbtnConfig5 + tbtnConfig6 + btnMain + btnHelp + btnExit + + + + diff --git a/softwareDirectory/AutoVerScheme/loginwindow.cpp b/softwareDirectory/AutoVerScheme/loginwindow.cpp new file mode 100644 index 0000000..155988a --- /dev/null +++ b/softwareDirectory/AutoVerScheme/loginwindow.cpp @@ -0,0 +1,68 @@ +#include "loginwindow.h" +#include "ui_loginwindow.h" +#include +#include +#include + +#include "indexwindow.h" + +loginWindow::loginWindow(QWidget *parent): QMainWindow(parent), ui(new Ui::loginWindow) +{ + ui->setupUi(this); + this->initForm(); + ui->label->styleSheet(); + +} + +loginWindow::~loginWindow() +{ + delete ui; +} +void loginWindow::initForm() +{ + //this->setWindowFlags(Qt::FramelessWindowHint); + //调用样式 + loadStyle(":/qss/login.css"); +} + +void loginWindow::loadStyle(const QString &qssFile) +{ + //加载样式表 + QString qss; + + QFile file(qssFile); + + if (file.open(QFile::ReadOnly)) { + //用QTextStream读取样式文件不用区分文件编码 带bom也行 + QStringList list; + QTextStream in(&file); + //in.setCodec("utf-8"); + while (!in.atEnd()) { + QString line; + in >> line; + list << line; + } + + file.close(); + qss = list.join("\n"); + QString paletteColor = qss.mid(20, 7); + qApp->setPalette(QPalette(paletteColor)); + //用时主要在下面这句 + qApp->setStyleSheet(qss); + } + + +} + + +void loginWindow::on_Button_login_clicked() +{ + QMessageBox::information(this, "提示", "登录成功!"); + //查询数据库内是否有账号 + IndexWindow *indexWindow = new IndexWindow; + indexWindow->setWindowState(Qt::WindowMaximized); + indexWindow->show(); + this->close(); + +} + diff --git a/softwareDirectory/AutoVerScheme/loginwindow.h b/softwareDirectory/AutoVerScheme/loginwindow.h new file mode 100644 index 0000000..2695bc3 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/loginwindow.h @@ -0,0 +1,31 @@ +#ifndef MAINWINDOW_H +#define MAINWINDOW_H + +#include +#include + + + +namespace Ui { +class loginWindow; +} + +class loginWindow : public QMainWindow +{ + Q_OBJECT + +public: + explicit loginWindow(QWidget *parent = 0); + ~loginWindow(); +private slots: + void initForm(); + void loadStyle(const QString &qssFile); + void on_Button_login_clicked(); + + +private: + Ui::loginWindow *ui; +private: + QSqlQuery query; +}; +#endif // MAINWINDOW_H diff --git a/softwareDirectory/AutoVerScheme/loginwindow.ui b/softwareDirectory/AutoVerScheme/loginwindow.ui new file mode 100644 index 0000000..ca04751 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/loginwindow.ui @@ -0,0 +1,234 @@ + + + loginWindow + + + + 0 + 0 + 954 + 603 + + + + MainWindow + + + background-color: rgb(255, 255, 255) + + + + + + 110 + 110 + 271 + 231 + + + + background-image: url(:/image/login/u9.png); +background-repeat: no-repeat; background-position: center; +background-color: transparent; + + + + + + + + + 0 + 10 + 491 + 601 + + + + background-image: url(:/image/login/u2.png); +background-repeat: no-repeat; +background-color: transparent; +background-repeat: no-repeat; +background-position: center; +background-size: 100%; + + + + + + + + + 5 + 10 + 491 + 569 + + + + background-image: url(:/image/login/u0.png); +background-repeat: no-repeat; background-position: center; + + + + + + 170 + 350 + 241 + 51 + + + + background-color: transparent; + + + Metrology + + + + + + 490 + 10 + 471 + 571 + + + + + + + 610 + 70 + 271 + 61 + + + + 自动检定软件 + + + + + + 540 + 200 + 61 + 61 + + + + + + + + + + 490 + 10 + 461 + 571 + + + + + + + 540 + 290 + 61 + 61 + + + + + + + + + + 540 + 430 + 341 + 81 + + + + OpenHandCursor + + + + + + 登 录 + + + + + + 610 + 210 + 221 + 41 + + + + 请输入账号 + + + + + + 610 + 300 + 221 + 41 + + + + 请输入账号 + + + + + + 507 + 1 + 72 + 16 + + + + + + + label_4 + graphicsView + label_2 + label_3 + graphicsView_2 + textBrowser + lab_title + textBrowser_2 + textBrowser_3 + Button_login + textEdit_acc + textEdit_pass + label + + + + + 0 + 0 + 954 + 25 + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/main.cpp b/softwareDirectory/AutoVerScheme/main.cpp new file mode 100644 index 0000000..16b6d3f --- /dev/null +++ b/softwareDirectory/AutoVerScheme/main.cpp @@ -0,0 +1,23 @@ +#include "loginwindow.h" +#include "mainwindow.h" +#include +#include "indexWindow.h" +#include "testview.h" + +int main(int argc, char *argv[]) +{ + QApplication a(argc, argv); + // 加载外部的CSS文件 + a.setStyleSheet("file:///path/to/styles.css"); + //设置字体 + QFont font; + font.setFamily("Microsoft Yahei"); + font.setPixelSize(13); + a.setFont(font); + + //TestView s; + //s.show(); + loginWindow w; + w.show(); + return a.exec(); +} diff --git a/softwareDirectory/AutoVerScheme/mainwindow.cpp b/softwareDirectory/AutoVerScheme/mainwindow.cpp new file mode 100644 index 0000000..12d07c0 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/mainwindow.cpp @@ -0,0 +1,14 @@ +#include "mainwindow.h" +#include "ui_mainwindow.h" + +MainWindow::MainWindow(QWidget *parent) : + QMainWindow(parent), + ui(new Ui::MainWindow) +{ + ui->setupUi(this); +} + +MainWindow::~MainWindow() +{ + delete ui; +} diff --git a/softwareDirectory/AutoVerScheme/mainwindow.h b/softwareDirectory/AutoVerScheme/mainwindow.h new file mode 100644 index 0000000..40fd472 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/mainwindow.h @@ -0,0 +1,22 @@ +#ifndef MAINWINDOW_H +#define MAINWINDOW_H + +#include + +namespace Ui { +class MainWindow; +} + +class MainWindow : public QMainWindow +{ + Q_OBJECT + +public: + explicit MainWindow(QWidget *parent = nullptr); + ~MainWindow(); + +private: + Ui::MainWindow *ui; +}; + +#endif // MAINWINDOW_H diff --git a/softwareDirectory/AutoVerScheme/mainwindow.ui b/softwareDirectory/AutoVerScheme/mainwindow.ui new file mode 100644 index 0000000..dd4f1c8 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/mainwindow.ui @@ -0,0 +1,24 @@ + + + + + MainWindow + + + + 0 + 0 + 800 + 600 + + + + MainWindow + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u101.png b/softwareDirectory/AutoVerScheme/res/image/Index/u101.png new file mode 100644 index 0000000..9e371e3 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u101.png Binary files differ diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u102.png b/softwareDirectory/AutoVerScheme/res/image/Index/u102.png new file mode 100644 index 0000000..b288067 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u102.png Binary files differ diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u15.png b/softwareDirectory/AutoVerScheme/res/image/Index/u15.png new file mode 100644 index 0000000..7e699e6 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u15.png Binary files differ diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u17.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u17.svg new file mode 100644 index 0000000..acc0502 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u17.svg @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u18.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u18.svg new file mode 100644 index 0000000..6a00a10 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u18.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u19.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u19.svg new file mode 100644 index 0000000..42dea06 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u19.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u20.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u20.svg new file mode 100644 index 0000000..7426e62 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u20.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u21.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u21.svg new file mode 100644 index 0000000..cba8469 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u21.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u22.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u22.svg new file mode 100644 index 0000000..78843a0 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u22.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u23.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u23.svg new file mode 100644 index 0000000..c586b65 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u23.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u24.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u24.svg new file mode 100644 index 0000000..066e006 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u24.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u26.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u26.svg new file mode 100644 index 0000000..1834de5 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u26.svg @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u26_mouseOver.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u26_mouseOver.svg new file mode 100644 index 0000000..1420ba1 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u26_mouseOver.svg @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u33.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u33.svg new file mode 100644 index 0000000..e932d0a --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u33.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro new file mode 100644 index 0000000..5b8f852 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro @@ -0,0 +1,48 @@ +QT += core gui +QT += sql +greaterThan(QT_MAJOR_VERSION, 4): QT += widgets + +CONFIG += c++11 + +# The following define makes your compiler emit warnings if you use +# any Qt feature that has been marked deprecated (the exact warnings +# depend on your compiler). Please consult the documentation of the +# deprecated API in order to know how to port your code away from it. +DEFINES += QT_DEPRECATED_WARNINGS + +# You can also make your code fail to compile if it uses deprecated APIs. +# In order to do so, uncomment the following line. +# You can also select to disable deprecated APIs only up to a certain version of Qt. +#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 + +SOURCES += \ + indexwindow.cpp \ + loginwindow.cpp \ + main.cpp \ + mainwindow.cpp \ + testview.cpp + +HEADERS += \ + indexwindow.h \ + loginwindow.h \ + mainwindow.h \ + testview.h + +FORMS += \ + indexwindow.ui \ + loginwindow.ui \ + mainwindow.ui \ + testview.ui + +# Default rules for deployment. +qnx: target.path = /tmp/$${TARGET}/bin +else: unix:!android: target.path = /opt/$${TARGET}/bin +!isEmpty(target.path): INSTALLS += target + +RESOURCES += \ + res/qss.qrc \ + res/res.qrc + +DISTFILES += \ + res/image/u2.png + diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user new file mode 100644 index 0000000..1f5ec64 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user @@ -0,0 +1,562 @@ + + + + + + EnvironmentId + {c08df58c-84a7-4965-bca6-e98789474efa} + + + ProjectExplorer.Project.ActiveTarget + 0 + + + ProjectExplorer.Project.EditorSettings + + true + false + true + + Cpp + + CppGlobal + + + + QmlJS + + QmlJSGlobal + + + 2 + UTF-8 + false + 4 + false + 80 + true + true + 1 + true + false + 0 + true + true + 0 + 8 + true + 1 + true + true + true + false + + + + ProjectExplorer.Project.PluginSettings + + + -fno-delayed-template-parsing + + true + + + + ProjectExplorer.Project.Target.0 + + Desktop Qt 5.14.2 MinGW 64-bit + Desktop Qt 5.14.2 MinGW 64-bit + qt.qt5.5142.win64_mingw73_kit + 0 + 0 + 0 + + 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 + 0 + 0 + 0 + + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug + + + true + QtProjectManager.QMakeBuildStep + true + + false + false + false + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Debug + Qt4ProjectManager.Qt4BuildConfiguration + 2 + + + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Release + + + true + QtProjectManager.QMakeBuildStep + false + + false + false + true + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Release + Qt4ProjectManager.Qt4BuildConfiguration + 0 + + + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Profile + + + true + QtProjectManager.QMakeBuildStep + true + + false + true + true + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Profile + Qt4ProjectManager.Qt4BuildConfiguration + 0 + + 3 + + + 0 + Deploy + Deploy + ProjectExplorer.BuildSteps.Deploy + + 1 + ProjectExplorer.DefaultDeployConfiguration + + 1 + + + dwarf + + cpu-cycles + + + 250 + + -e + cpu-cycles + --call-graph + dwarf,4096 + -F + 250 + + -F + true + 4096 + false + false + 1000 + + true + + false + false + false + false + true + 0.01 + 10 + true + kcachegrind + 1 + 25 + + 1 + true + false + true + valgrind + + 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + + 2 + + Qt4ProjectManager.Qt4RunConfiguration:D:/Auto_verification_scheme/AutoVerScheme/AutoVerScheme.pro + D:/Auto_verification_scheme/AutoVerScheme/AutoVerScheme.pro + + false + + false + true + true + false + false + true + + + + 1 + + + + ProjectExplorer.Project.TargetCount + 2 + + + ProjectExplorer.Project.Updater.FileVersion + 22 + + + Version + 22 + + diff --git a/softwareDirectory/AutoVerScheme/indexwindow.cpp b/softwareDirectory/AutoVerScheme/indexwindow.cpp new file mode 100644 index 0000000..3e52c7b --- /dev/null +++ b/softwareDirectory/AutoVerScheme/indexwindow.cpp @@ -0,0 +1,55 @@ +#include "indexwindow.h" +#include "ui_indexwindow.h" +#include "QFile" +#include "QTextStream" + +IndexWindow::IndexWindow(QWidget *parent) : + QMainWindow(parent), + ui(new Ui::IndexWindow) +{ + ui->setupUi(this); + this->initForm(); +} + +IndexWindow::~IndexWindow() +{ + delete ui; +} +void IndexWindow::initForm() +{ + //this->setWindowFlags(Qt::FramelessWindowHint); + //调用样式 + loadStyle(":/qss/Index.css"); + +} + +void IndexWindow::loadStyle(const QString &qssFile) +{ + //加载样式表 + QString qss; + + QFile file(qssFile); + + if (file.open(QFile::ReadOnly)) { + //用QTextStream读取样式文件不用区分文件编码 带bom也行 + QStringList list; + QTextStream in(&file); + //in.setCodec("utf-8"); + while (!in.atEnd()) { + QString line; + in >> line; + list << line; + } + + file.close(); + qss = list.join("\n"); + QString paletteColor = qss.mid(20, 7); + qApp->setPalette(QPalette(paletteColor)); + //用时主要在下面这句 + qApp->setStyleSheet(qss); + } + + +} + + diff --git a/softwareDirectory/AutoVerScheme/indexwindow.h b/softwareDirectory/AutoVerScheme/indexwindow.h new file mode 100644 index 0000000..2aee958 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/indexwindow.h @@ -0,0 +1,26 @@ +#ifndef INDEXWINDOW_H +#define INDEXWINDOW_H + +#include + +namespace Ui { +class IndexWindow; +} + +class IndexWindow : public QMainWindow +{ + Q_OBJECT + +public: + explicit IndexWindow(QWidget *parent = nullptr); + ~IndexWindow(); +private slots: + void initForm(); + void loadStyle(const QString &qssFile); + + +private: + Ui::IndexWindow *ui; +}; + +#endif // INDEXWINDOW_H diff --git a/softwareDirectory/AutoVerScheme/indexwindow.ui b/softwareDirectory/AutoVerScheme/indexwindow.ui new file mode 100644 index 0000000..d7153e0 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/indexwindow.ui @@ -0,0 +1,539 @@ + + + IndexWindow + + + Qt::NonModal + + + + 0 + 0 + 1334 + 789 + + + + + 0 + 0 + + + + MainWindow + + + + + + + 100 + 100 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + 6 + + + QLayout::SetFixedSize + + + 0 + + + 0 + + + + + Qt::Horizontal + + + QSizePolicy::Fixed + + + + 120 + 13 + + + + + + + + + 0 + 0 + + + + + 560 + 0 + + + + Qt::DefaultContextMenu + + + color: white; +font-weight: bold; +font-size: 24pt; + + + + + QFrame::NoFrame + + + QFrame::Plain + + + 自动检定系统 + + + Qt::AutoText + + + false + + + Qt::AlignCenter + + + + + + + Qt::Horizontal + + + QSizePolicy::Fixed + + + + 40 + 13 + + + + + + + + + + Qt::Vertical + + + QSizePolicy::Fixed + + + + 50 + 80 + + + + + + + + + + Qt::Vertical + + + QSizePolicy::Fixed + + + + 20 + 120 + + + + + + + + Qt::Horizontal + + + + 100 + 20 + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + 0 + 0 + + + + + 310 + 190 + + + + OpenHandCursor + + + margin-right: 0px; + + + 信息管理 + + + + 60 + 60 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + Qt::Horizontal + + + + 327 + 20 + + + + + + + + + 0 + 0 + + + + + 490 + 190 + + + + OpenHandCursor + + + + + + 自动核查 + + + + 60 + 60 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + + 0 + 0 + + + + + 490 + 190 + + + + OpenHandCursor + + + + + + 自动检定 + + + + 60 + 60 + + + + false + + + false + + + Qt::ToolButtonTextUnderIcon + + + + + + + + 0 + 0 + + + + + 490 + 190 + + + + OpenHandCursor + + + + + + 核查程序管理 + + + + 60 + 60 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + Qt::Horizontal + + + + 327 + 20 + + + + + + + + + 0 + 0 + + + + + 310 + 190 + + + + OpenHandCursor + + + margin-right: 0px; + + + 数据同步 + + + + 60 + 60 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + Qt::Vertical + + + QSizePolicy::Fixed + + + + 20 + 120 + + + + + + + + Qt::Vertical + + + QSizePolicy::Fixed + + + + 20 + 120 + + + + + + + + + 0 + 0 + + + + + 490 + 190 + + + + OpenHandCursor + + + + + + 检定程序管理 + + + + 60 + 60 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + + + + + + 0 + 0 + + + + + 10 + 10 + + + + color: white; +font-weight: bold; +font-size: 14pt; + + + 欢迎您! 用户: admin + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + Qt::Horizontal + + + QSizePolicy::Fixed + + + + 270 + 20 + + + + + + + + + + + btnConfig + btnData + tbtnMain1 + tbtnMain2 + tbtnMain3 + tbtnConfig1 + tbtnConfig2 + tbtnConfig3 + tbtnConfig4 + tbtnConfig5 + tbtnConfig6 + btnMain + btnHelp + btnExit + + + + diff --git a/softwareDirectory/AutoVerScheme/loginwindow.cpp b/softwareDirectory/AutoVerScheme/loginwindow.cpp new file mode 100644 index 0000000..155988a --- /dev/null +++ b/softwareDirectory/AutoVerScheme/loginwindow.cpp @@ -0,0 +1,68 @@ +#include "loginwindow.h" +#include "ui_loginwindow.h" +#include +#include +#include + +#include "indexwindow.h" + +loginWindow::loginWindow(QWidget *parent): QMainWindow(parent), ui(new Ui::loginWindow) +{ + ui->setupUi(this); + this->initForm(); + ui->label->styleSheet(); + +} + +loginWindow::~loginWindow() +{ + delete ui; +} +void loginWindow::initForm() +{ + //this->setWindowFlags(Qt::FramelessWindowHint); + //调用样式 + loadStyle(":/qss/login.css"); +} + +void loginWindow::loadStyle(const QString &qssFile) +{ + //加载样式表 + QString qss; + + QFile file(qssFile); + + if (file.open(QFile::ReadOnly)) { + //用QTextStream读取样式文件不用区分文件编码 带bom也行 + QStringList list; + QTextStream in(&file); + //in.setCodec("utf-8"); + while (!in.atEnd()) { + QString line; + in >> line; + list << line; + } + + file.close(); + qss = list.join("\n"); + QString paletteColor = qss.mid(20, 7); + qApp->setPalette(QPalette(paletteColor)); + //用时主要在下面这句 + qApp->setStyleSheet(qss); + } + + +} + + +void loginWindow::on_Button_login_clicked() +{ + QMessageBox::information(this, "提示", "登录成功!"); + //查询数据库内是否有账号 + IndexWindow *indexWindow = new IndexWindow; + indexWindow->setWindowState(Qt::WindowMaximized); + indexWindow->show(); + this->close(); + +} + diff --git a/softwareDirectory/AutoVerScheme/loginwindow.h b/softwareDirectory/AutoVerScheme/loginwindow.h new file mode 100644 index 0000000..2695bc3 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/loginwindow.h @@ -0,0 +1,31 @@ +#ifndef MAINWINDOW_H +#define MAINWINDOW_H + +#include +#include + + + +namespace Ui { +class loginWindow; +} + +class loginWindow : public QMainWindow +{ + Q_OBJECT + +public: + explicit loginWindow(QWidget *parent = 0); + ~loginWindow(); +private slots: + void initForm(); + void loadStyle(const QString &qssFile); + void on_Button_login_clicked(); + + +private: + Ui::loginWindow *ui; +private: + QSqlQuery query; +}; +#endif // MAINWINDOW_H diff --git a/softwareDirectory/AutoVerScheme/loginwindow.ui b/softwareDirectory/AutoVerScheme/loginwindow.ui new file mode 100644 index 0000000..ca04751 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/loginwindow.ui @@ -0,0 +1,234 @@ + + + loginWindow + + + + 0 + 0 + 954 + 603 + + + + MainWindow + + + background-color: rgb(255, 255, 255) + + + + + + 110 + 110 + 271 + 231 + + + + background-image: url(:/image/login/u9.png); +background-repeat: no-repeat; background-position: center; +background-color: transparent; + + + + + + + + + 0 + 10 + 491 + 601 + + + + background-image: url(:/image/login/u2.png); +background-repeat: no-repeat; +background-color: transparent; +background-repeat: no-repeat; +background-position: center; +background-size: 100%; + + + + + + + + + 5 + 10 + 491 + 569 + + + + background-image: url(:/image/login/u0.png); +background-repeat: no-repeat; background-position: center; + + + + + + 170 + 350 + 241 + 51 + + + + background-color: transparent; + + + Metrology + + + + + + 490 + 10 + 471 + 571 + + + + + + + 610 + 70 + 271 + 61 + + + + 自动检定软件 + + + + + + 540 + 200 + 61 + 61 + + + + + + + + + + 490 + 10 + 461 + 571 + + + + + + + 540 + 290 + 61 + 61 + + + + + + + + + + 540 + 430 + 341 + 81 + + + + OpenHandCursor + + + + + + 登 录 + + + + + + 610 + 210 + 221 + 41 + + + + 请输入账号 + + + + + + 610 + 300 + 221 + 41 + + + + 请输入账号 + + + + + + 507 + 1 + 72 + 16 + + + + + + + label_4 + graphicsView + label_2 + label_3 + graphicsView_2 + textBrowser + lab_title + textBrowser_2 + textBrowser_3 + Button_login + textEdit_acc + textEdit_pass + label + + + + + 0 + 0 + 954 + 25 + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/main.cpp b/softwareDirectory/AutoVerScheme/main.cpp new file mode 100644 index 0000000..16b6d3f --- /dev/null +++ b/softwareDirectory/AutoVerScheme/main.cpp @@ -0,0 +1,23 @@ +#include "loginwindow.h" +#include "mainwindow.h" +#include +#include "indexWindow.h" +#include "testview.h" + +int main(int argc, char *argv[]) +{ + QApplication a(argc, argv); + // 加载外部的CSS文件 + a.setStyleSheet("file:///path/to/styles.css"); + //设置字体 + QFont font; + font.setFamily("Microsoft Yahei"); + font.setPixelSize(13); + a.setFont(font); + + //TestView s; + //s.show(); + loginWindow w; + w.show(); + return a.exec(); +} diff --git a/softwareDirectory/AutoVerScheme/mainwindow.cpp b/softwareDirectory/AutoVerScheme/mainwindow.cpp new file mode 100644 index 0000000..12d07c0 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/mainwindow.cpp @@ -0,0 +1,14 @@ +#include "mainwindow.h" +#include "ui_mainwindow.h" + +MainWindow::MainWindow(QWidget *parent) : + QMainWindow(parent), + ui(new Ui::MainWindow) +{ + ui->setupUi(this); +} + +MainWindow::~MainWindow() +{ + delete ui; +} diff --git a/softwareDirectory/AutoVerScheme/mainwindow.h b/softwareDirectory/AutoVerScheme/mainwindow.h new file mode 100644 index 0000000..40fd472 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/mainwindow.h @@ -0,0 +1,22 @@ +#ifndef MAINWINDOW_H +#define MAINWINDOW_H + +#include + +namespace Ui { +class MainWindow; +} + +class MainWindow : public QMainWindow +{ + Q_OBJECT + +public: + explicit MainWindow(QWidget *parent = nullptr); + ~MainWindow(); + +private: + Ui::MainWindow *ui; +}; + +#endif // MAINWINDOW_H diff --git a/softwareDirectory/AutoVerScheme/mainwindow.ui b/softwareDirectory/AutoVerScheme/mainwindow.ui new file mode 100644 index 0000000..dd4f1c8 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/mainwindow.ui @@ -0,0 +1,24 @@ + + + + + MainWindow + + + + 0 + 0 + 800 + 600 + + + + MainWindow + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u101.png b/softwareDirectory/AutoVerScheme/res/image/Index/u101.png new file mode 100644 index 0000000..9e371e3 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u101.png Binary files differ diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u102.png b/softwareDirectory/AutoVerScheme/res/image/Index/u102.png new file mode 100644 index 0000000..b288067 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u102.png Binary files differ diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u15.png b/softwareDirectory/AutoVerScheme/res/image/Index/u15.png new file mode 100644 index 0000000..7e699e6 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u15.png Binary files differ diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u17.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u17.svg new file mode 100644 index 0000000..acc0502 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u17.svg @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u18.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u18.svg new file mode 100644 index 0000000..6a00a10 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u18.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u19.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u19.svg new file mode 100644 index 0000000..42dea06 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u19.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u20.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u20.svg new file mode 100644 index 0000000..7426e62 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u20.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u21.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u21.svg new file mode 100644 index 0000000..cba8469 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u21.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u22.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u22.svg new file mode 100644 index 0000000..78843a0 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u22.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u23.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u23.svg new file mode 100644 index 0000000..c586b65 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u23.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u24.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u24.svg new file mode 100644 index 0000000..066e006 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u24.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u26.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u26.svg new file mode 100644 index 0000000..1834de5 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u26.svg @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u26_mouseOver.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u26_mouseOver.svg new file mode 100644 index 0000000..1420ba1 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u26_mouseOver.svg @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u33.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u33.svg new file mode 100644 index 0000000..e932d0a --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u33.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u34.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u34.svg new file mode 100644 index 0000000..0ab265b --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u34.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro new file mode 100644 index 0000000..5b8f852 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro @@ -0,0 +1,48 @@ +QT += core gui +QT += sql +greaterThan(QT_MAJOR_VERSION, 4): QT += widgets + +CONFIG += c++11 + +# The following define makes your compiler emit warnings if you use +# any Qt feature that has been marked deprecated (the exact warnings +# depend on your compiler). Please consult the documentation of the +# deprecated API in order to know how to port your code away from it. +DEFINES += QT_DEPRECATED_WARNINGS + +# You can also make your code fail to compile if it uses deprecated APIs. +# In order to do so, uncomment the following line. +# You can also select to disable deprecated APIs only up to a certain version of Qt. +#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 + +SOURCES += \ + indexwindow.cpp \ + loginwindow.cpp \ + main.cpp \ + mainwindow.cpp \ + testview.cpp + +HEADERS += \ + indexwindow.h \ + loginwindow.h \ + mainwindow.h \ + testview.h + +FORMS += \ + indexwindow.ui \ + loginwindow.ui \ + mainwindow.ui \ + testview.ui + +# Default rules for deployment. +qnx: target.path = /tmp/$${TARGET}/bin +else: unix:!android: target.path = /opt/$${TARGET}/bin +!isEmpty(target.path): INSTALLS += target + +RESOURCES += \ + res/qss.qrc \ + res/res.qrc + +DISTFILES += \ + res/image/u2.png + diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user new file mode 100644 index 0000000..1f5ec64 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user @@ -0,0 +1,562 @@ + + + + + + EnvironmentId + {c08df58c-84a7-4965-bca6-e98789474efa} + + + ProjectExplorer.Project.ActiveTarget + 0 + + + ProjectExplorer.Project.EditorSettings + + true + false + true + + Cpp + + CppGlobal + + + + QmlJS + + QmlJSGlobal + + + 2 + UTF-8 + false + 4 + false + 80 + true + true + 1 + true + false + 0 + true + true + 0 + 8 + true + 1 + true + true + true + false + + + + ProjectExplorer.Project.PluginSettings + + + -fno-delayed-template-parsing + + true + + + + ProjectExplorer.Project.Target.0 + + Desktop Qt 5.14.2 MinGW 64-bit + Desktop Qt 5.14.2 MinGW 64-bit + qt.qt5.5142.win64_mingw73_kit + 0 + 0 + 0 + + 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 + 0 + 0 + 0 + + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug + + + true + QtProjectManager.QMakeBuildStep + true + + false + false + false + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Debug + Qt4ProjectManager.Qt4BuildConfiguration + 2 + + + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Release + + + true + QtProjectManager.QMakeBuildStep + false + + false + false + true + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Release + Qt4ProjectManager.Qt4BuildConfiguration + 0 + + + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Profile + + + true + QtProjectManager.QMakeBuildStep + true + + false + true + true + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Profile + Qt4ProjectManager.Qt4BuildConfiguration + 0 + + 3 + + + 0 + Deploy + Deploy + ProjectExplorer.BuildSteps.Deploy + + 1 + ProjectExplorer.DefaultDeployConfiguration + + 1 + + + dwarf + + cpu-cycles + + + 250 + + -e + cpu-cycles + --call-graph + dwarf,4096 + -F + 250 + + -F + true + 4096 + false + false + 1000 + + true + + false + false + false + false + true + 0.01 + 10 + true + kcachegrind + 1 + 25 + + 1 + true + false + true + valgrind + + 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + + 2 + + Qt4ProjectManager.Qt4RunConfiguration:D:/Auto_verification_scheme/AutoVerScheme/AutoVerScheme.pro + D:/Auto_verification_scheme/AutoVerScheme/AutoVerScheme.pro + + false + + false + true + true + false + false + true + + + + 1 + + + + ProjectExplorer.Project.TargetCount + 2 + + + ProjectExplorer.Project.Updater.FileVersion + 22 + + + Version + 22 + + diff --git a/softwareDirectory/AutoVerScheme/indexwindow.cpp b/softwareDirectory/AutoVerScheme/indexwindow.cpp new file mode 100644 index 0000000..3e52c7b --- /dev/null +++ b/softwareDirectory/AutoVerScheme/indexwindow.cpp @@ -0,0 +1,55 @@ +#include "indexwindow.h" +#include "ui_indexwindow.h" +#include "QFile" +#include "QTextStream" + +IndexWindow::IndexWindow(QWidget *parent) : + QMainWindow(parent), + ui(new Ui::IndexWindow) +{ + ui->setupUi(this); + this->initForm(); +} + +IndexWindow::~IndexWindow() +{ + delete ui; +} +void IndexWindow::initForm() +{ + //this->setWindowFlags(Qt::FramelessWindowHint); + //调用样式 + loadStyle(":/qss/Index.css"); + +} + +void IndexWindow::loadStyle(const QString &qssFile) +{ + //加载样式表 + QString qss; + + QFile file(qssFile); + + if (file.open(QFile::ReadOnly)) { + //用QTextStream读取样式文件不用区分文件编码 带bom也行 + QStringList list; + QTextStream in(&file); + //in.setCodec("utf-8"); + while (!in.atEnd()) { + QString line; + in >> line; + list << line; + } + + file.close(); + qss = list.join("\n"); + QString paletteColor = qss.mid(20, 7); + qApp->setPalette(QPalette(paletteColor)); + //用时主要在下面这句 + qApp->setStyleSheet(qss); + } + + +} + + diff --git a/softwareDirectory/AutoVerScheme/indexwindow.h b/softwareDirectory/AutoVerScheme/indexwindow.h new file mode 100644 index 0000000..2aee958 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/indexwindow.h @@ -0,0 +1,26 @@ +#ifndef INDEXWINDOW_H +#define INDEXWINDOW_H + +#include + +namespace Ui { +class IndexWindow; +} + +class IndexWindow : public QMainWindow +{ + Q_OBJECT + +public: + explicit IndexWindow(QWidget *parent = nullptr); + ~IndexWindow(); +private slots: + void initForm(); + void loadStyle(const QString &qssFile); + + +private: + Ui::IndexWindow *ui; +}; + +#endif // INDEXWINDOW_H diff --git a/softwareDirectory/AutoVerScheme/indexwindow.ui b/softwareDirectory/AutoVerScheme/indexwindow.ui new file mode 100644 index 0000000..d7153e0 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/indexwindow.ui @@ -0,0 +1,539 @@ + + + IndexWindow + + + Qt::NonModal + + + + 0 + 0 + 1334 + 789 + + + + + 0 + 0 + + + + MainWindow + + + + + + + 100 + 100 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + 6 + + + QLayout::SetFixedSize + + + 0 + + + 0 + + + + + Qt::Horizontal + + + QSizePolicy::Fixed + + + + 120 + 13 + + + + + + + + + 0 + 0 + + + + + 560 + 0 + + + + Qt::DefaultContextMenu + + + color: white; +font-weight: bold; +font-size: 24pt; + + + + + QFrame::NoFrame + + + QFrame::Plain + + + 自动检定系统 + + + Qt::AutoText + + + false + + + Qt::AlignCenter + + + + + + + Qt::Horizontal + + + QSizePolicy::Fixed + + + + 40 + 13 + + + + + + + + + + Qt::Vertical + + + QSizePolicy::Fixed + + + + 50 + 80 + + + + + + + + + + Qt::Vertical + + + QSizePolicy::Fixed + + + + 20 + 120 + + + + + + + + Qt::Horizontal + + + + 100 + 20 + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + 0 + 0 + + + + + 310 + 190 + + + + OpenHandCursor + + + margin-right: 0px; + + + 信息管理 + + + + 60 + 60 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + Qt::Horizontal + + + + 327 + 20 + + + + + + + + + 0 + 0 + + + + + 490 + 190 + + + + OpenHandCursor + + + + + + 自动核查 + + + + 60 + 60 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + + 0 + 0 + + + + + 490 + 190 + + + + OpenHandCursor + + + + + + 自动检定 + + + + 60 + 60 + + + + false + + + false + + + Qt::ToolButtonTextUnderIcon + + + + + + + + 0 + 0 + + + + + 490 + 190 + + + + OpenHandCursor + + + + + + 核查程序管理 + + + + 60 + 60 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + Qt::Horizontal + + + + 327 + 20 + + + + + + + + + 0 + 0 + + + + + 310 + 190 + + + + OpenHandCursor + + + margin-right: 0px; + + + 数据同步 + + + + 60 + 60 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + Qt::Vertical + + + QSizePolicy::Fixed + + + + 20 + 120 + + + + + + + + Qt::Vertical + + + QSizePolicy::Fixed + + + + 20 + 120 + + + + + + + + + 0 + 0 + + + + + 490 + 190 + + + + OpenHandCursor + + + + + + 检定程序管理 + + + + 60 + 60 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + + + + + + 0 + 0 + + + + + 10 + 10 + + + + color: white; +font-weight: bold; +font-size: 14pt; + + + 欢迎您! 用户: admin + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + Qt::Horizontal + + + QSizePolicy::Fixed + + + + 270 + 20 + + + + + + + + + + + btnConfig + btnData + tbtnMain1 + tbtnMain2 + tbtnMain3 + tbtnConfig1 + tbtnConfig2 + tbtnConfig3 + tbtnConfig4 + tbtnConfig5 + tbtnConfig6 + btnMain + btnHelp + btnExit + + + + diff --git a/softwareDirectory/AutoVerScheme/loginwindow.cpp b/softwareDirectory/AutoVerScheme/loginwindow.cpp new file mode 100644 index 0000000..155988a --- /dev/null +++ b/softwareDirectory/AutoVerScheme/loginwindow.cpp @@ -0,0 +1,68 @@ +#include "loginwindow.h" +#include "ui_loginwindow.h" +#include +#include +#include + +#include "indexwindow.h" + +loginWindow::loginWindow(QWidget *parent): QMainWindow(parent), ui(new Ui::loginWindow) +{ + ui->setupUi(this); + this->initForm(); + ui->label->styleSheet(); + +} + +loginWindow::~loginWindow() +{ + delete ui; +} +void loginWindow::initForm() +{ + //this->setWindowFlags(Qt::FramelessWindowHint); + //调用样式 + loadStyle(":/qss/login.css"); +} + +void loginWindow::loadStyle(const QString &qssFile) +{ + //加载样式表 + QString qss; + + QFile file(qssFile); + + if (file.open(QFile::ReadOnly)) { + //用QTextStream读取样式文件不用区分文件编码 带bom也行 + QStringList list; + QTextStream in(&file); + //in.setCodec("utf-8"); + while (!in.atEnd()) { + QString line; + in >> line; + list << line; + } + + file.close(); + qss = list.join("\n"); + QString paletteColor = qss.mid(20, 7); + qApp->setPalette(QPalette(paletteColor)); + //用时主要在下面这句 + qApp->setStyleSheet(qss); + } + + +} + + +void loginWindow::on_Button_login_clicked() +{ + QMessageBox::information(this, "提示", "登录成功!"); + //查询数据库内是否有账号 + IndexWindow *indexWindow = new IndexWindow; + indexWindow->setWindowState(Qt::WindowMaximized); + indexWindow->show(); + this->close(); + +} + diff --git a/softwareDirectory/AutoVerScheme/loginwindow.h b/softwareDirectory/AutoVerScheme/loginwindow.h new file mode 100644 index 0000000..2695bc3 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/loginwindow.h @@ -0,0 +1,31 @@ +#ifndef MAINWINDOW_H +#define MAINWINDOW_H + +#include +#include + + + +namespace Ui { +class loginWindow; +} + +class loginWindow : public QMainWindow +{ + Q_OBJECT + +public: + explicit loginWindow(QWidget *parent = 0); + ~loginWindow(); +private slots: + void initForm(); + void loadStyle(const QString &qssFile); + void on_Button_login_clicked(); + + +private: + Ui::loginWindow *ui; +private: + QSqlQuery query; +}; +#endif // MAINWINDOW_H diff --git a/softwareDirectory/AutoVerScheme/loginwindow.ui b/softwareDirectory/AutoVerScheme/loginwindow.ui new file mode 100644 index 0000000..ca04751 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/loginwindow.ui @@ -0,0 +1,234 @@ + + + loginWindow + + + + 0 + 0 + 954 + 603 + + + + MainWindow + + + background-color: rgb(255, 255, 255) + + + + + + 110 + 110 + 271 + 231 + + + + background-image: url(:/image/login/u9.png); +background-repeat: no-repeat; background-position: center; +background-color: transparent; + + + + + + + + + 0 + 10 + 491 + 601 + + + + background-image: url(:/image/login/u2.png); +background-repeat: no-repeat; +background-color: transparent; +background-repeat: no-repeat; +background-position: center; +background-size: 100%; + + + + + + + + + 5 + 10 + 491 + 569 + + + + background-image: url(:/image/login/u0.png); +background-repeat: no-repeat; background-position: center; + + + + + + 170 + 350 + 241 + 51 + + + + background-color: transparent; + + + Metrology + + + + + + 490 + 10 + 471 + 571 + + + + + + + 610 + 70 + 271 + 61 + + + + 自动检定软件 + + + + + + 540 + 200 + 61 + 61 + + + + + + + + + + 490 + 10 + 461 + 571 + + + + + + + 540 + 290 + 61 + 61 + + + + + + + + + + 540 + 430 + 341 + 81 + + + + OpenHandCursor + + + + + + 登 录 + + + + + + 610 + 210 + 221 + 41 + + + + 请输入账号 + + + + + + 610 + 300 + 221 + 41 + + + + 请输入账号 + + + + + + 507 + 1 + 72 + 16 + + + + + + + label_4 + graphicsView + label_2 + label_3 + graphicsView_2 + textBrowser + lab_title + textBrowser_2 + textBrowser_3 + Button_login + textEdit_acc + textEdit_pass + label + + + + + 0 + 0 + 954 + 25 + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/main.cpp b/softwareDirectory/AutoVerScheme/main.cpp new file mode 100644 index 0000000..16b6d3f --- /dev/null +++ b/softwareDirectory/AutoVerScheme/main.cpp @@ -0,0 +1,23 @@ +#include "loginwindow.h" +#include "mainwindow.h" +#include +#include "indexWindow.h" +#include "testview.h" + +int main(int argc, char *argv[]) +{ + QApplication a(argc, argv); + // 加载外部的CSS文件 + a.setStyleSheet("file:///path/to/styles.css"); + //设置字体 + QFont font; + font.setFamily("Microsoft Yahei"); + font.setPixelSize(13); + a.setFont(font); + + //TestView s; + //s.show(); + loginWindow w; + w.show(); + return a.exec(); +} diff --git a/softwareDirectory/AutoVerScheme/mainwindow.cpp b/softwareDirectory/AutoVerScheme/mainwindow.cpp new file mode 100644 index 0000000..12d07c0 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/mainwindow.cpp @@ -0,0 +1,14 @@ +#include "mainwindow.h" +#include "ui_mainwindow.h" + +MainWindow::MainWindow(QWidget *parent) : + QMainWindow(parent), + ui(new Ui::MainWindow) +{ + ui->setupUi(this); +} + +MainWindow::~MainWindow() +{ + delete ui; +} diff --git a/softwareDirectory/AutoVerScheme/mainwindow.h b/softwareDirectory/AutoVerScheme/mainwindow.h new file mode 100644 index 0000000..40fd472 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/mainwindow.h @@ -0,0 +1,22 @@ +#ifndef MAINWINDOW_H +#define MAINWINDOW_H + +#include + +namespace Ui { +class MainWindow; +} + +class MainWindow : public QMainWindow +{ + Q_OBJECT + +public: + explicit MainWindow(QWidget *parent = nullptr); + ~MainWindow(); + +private: + Ui::MainWindow *ui; +}; + +#endif // MAINWINDOW_H diff --git a/softwareDirectory/AutoVerScheme/mainwindow.ui b/softwareDirectory/AutoVerScheme/mainwindow.ui new file mode 100644 index 0000000..dd4f1c8 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/mainwindow.ui @@ -0,0 +1,24 @@ + + + + + MainWindow + + + + 0 + 0 + 800 + 600 + + + + MainWindow + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u101.png b/softwareDirectory/AutoVerScheme/res/image/Index/u101.png new file mode 100644 index 0000000..9e371e3 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u101.png Binary files differ diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u102.png b/softwareDirectory/AutoVerScheme/res/image/Index/u102.png new file mode 100644 index 0000000..b288067 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u102.png Binary files differ diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u15.png b/softwareDirectory/AutoVerScheme/res/image/Index/u15.png new file mode 100644 index 0000000..7e699e6 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u15.png Binary files differ diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u17.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u17.svg new file mode 100644 index 0000000..acc0502 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u17.svg @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u18.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u18.svg new file mode 100644 index 0000000..6a00a10 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u18.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u19.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u19.svg new file mode 100644 index 0000000..42dea06 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u19.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u20.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u20.svg new file mode 100644 index 0000000..7426e62 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u20.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u21.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u21.svg new file mode 100644 index 0000000..cba8469 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u21.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u22.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u22.svg new file mode 100644 index 0000000..78843a0 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u22.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u23.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u23.svg new file mode 100644 index 0000000..c586b65 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u23.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u24.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u24.svg new file mode 100644 index 0000000..066e006 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u24.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u26.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u26.svg new file mode 100644 index 0000000..1834de5 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u26.svg @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u26_mouseOver.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u26_mouseOver.svg new file mode 100644 index 0000000..1420ba1 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u26_mouseOver.svg @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u33.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u33.svg new file mode 100644 index 0000000..e932d0a --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u33.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u34.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u34.svg new file mode 100644 index 0000000..0ab265b --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u34.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u35.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u35.svg new file mode 100644 index 0000000..7748314 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u35.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro new file mode 100644 index 0000000..5b8f852 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro @@ -0,0 +1,48 @@ +QT += core gui +QT += sql +greaterThan(QT_MAJOR_VERSION, 4): QT += widgets + +CONFIG += c++11 + +# The following define makes your compiler emit warnings if you use +# any Qt feature that has been marked deprecated (the exact warnings +# depend on your compiler). Please consult the documentation of the +# deprecated API in order to know how to port your code away from it. +DEFINES += QT_DEPRECATED_WARNINGS + +# You can also make your code fail to compile if it uses deprecated APIs. +# In order to do so, uncomment the following line. +# You can also select to disable deprecated APIs only up to a certain version of Qt. +#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 + +SOURCES += \ + indexwindow.cpp \ + loginwindow.cpp \ + main.cpp \ + mainwindow.cpp \ + testview.cpp + +HEADERS += \ + indexwindow.h \ + loginwindow.h \ + mainwindow.h \ + testview.h + +FORMS += \ + indexwindow.ui \ + loginwindow.ui \ + mainwindow.ui \ + testview.ui + +# Default rules for deployment. +qnx: target.path = /tmp/$${TARGET}/bin +else: unix:!android: target.path = /opt/$${TARGET}/bin +!isEmpty(target.path): INSTALLS += target + +RESOURCES += \ + res/qss.qrc \ + res/res.qrc + +DISTFILES += \ + res/image/u2.png + diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user new file mode 100644 index 0000000..1f5ec64 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user @@ -0,0 +1,562 @@ + + + + + + EnvironmentId + {c08df58c-84a7-4965-bca6-e98789474efa} + + + ProjectExplorer.Project.ActiveTarget + 0 + + + ProjectExplorer.Project.EditorSettings + + true + false + true + + Cpp + + CppGlobal + + + + QmlJS + + QmlJSGlobal + + + 2 + UTF-8 + false + 4 + false + 80 + true + true + 1 + true + false + 0 + true + true + 0 + 8 + true + 1 + true + true + true + false + + + + ProjectExplorer.Project.PluginSettings + + + -fno-delayed-template-parsing + + true + + + + ProjectExplorer.Project.Target.0 + + Desktop Qt 5.14.2 MinGW 64-bit + Desktop Qt 5.14.2 MinGW 64-bit + qt.qt5.5142.win64_mingw73_kit + 0 + 0 + 0 + + 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 + 0 + 0 + 0 + + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug + + + true + QtProjectManager.QMakeBuildStep + true + + false + false + false + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Debug + Qt4ProjectManager.Qt4BuildConfiguration + 2 + + + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Release + + + true + QtProjectManager.QMakeBuildStep + false + + false + false + true + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Release + Qt4ProjectManager.Qt4BuildConfiguration + 0 + + + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Profile + + + true + QtProjectManager.QMakeBuildStep + true + + false + true + true + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Profile + Qt4ProjectManager.Qt4BuildConfiguration + 0 + + 3 + + + 0 + Deploy + Deploy + ProjectExplorer.BuildSteps.Deploy + + 1 + ProjectExplorer.DefaultDeployConfiguration + + 1 + + + dwarf + + cpu-cycles + + + 250 + + -e + cpu-cycles + --call-graph + dwarf,4096 + -F + 250 + + -F + true + 4096 + false + false + 1000 + + true + + false + false + false + false + true + 0.01 + 10 + true + kcachegrind + 1 + 25 + + 1 + true + false + true + valgrind + + 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + + 2 + + Qt4ProjectManager.Qt4RunConfiguration:D:/Auto_verification_scheme/AutoVerScheme/AutoVerScheme.pro + D:/Auto_verification_scheme/AutoVerScheme/AutoVerScheme.pro + + false + + false + true + true + false + false + true + + + + 1 + + + + ProjectExplorer.Project.TargetCount + 2 + + + ProjectExplorer.Project.Updater.FileVersion + 22 + + + Version + 22 + + diff --git a/softwareDirectory/AutoVerScheme/indexwindow.cpp b/softwareDirectory/AutoVerScheme/indexwindow.cpp new file mode 100644 index 0000000..3e52c7b --- /dev/null +++ b/softwareDirectory/AutoVerScheme/indexwindow.cpp @@ -0,0 +1,55 @@ +#include "indexwindow.h" +#include "ui_indexwindow.h" +#include "QFile" +#include "QTextStream" + +IndexWindow::IndexWindow(QWidget *parent) : + QMainWindow(parent), + ui(new Ui::IndexWindow) +{ + ui->setupUi(this); + this->initForm(); +} + +IndexWindow::~IndexWindow() +{ + delete ui; +} +void IndexWindow::initForm() +{ + //this->setWindowFlags(Qt::FramelessWindowHint); + //调用样式 + loadStyle(":/qss/Index.css"); + +} + +void IndexWindow::loadStyle(const QString &qssFile) +{ + //加载样式表 + QString qss; + + QFile file(qssFile); + + if (file.open(QFile::ReadOnly)) { + //用QTextStream读取样式文件不用区分文件编码 带bom也行 + QStringList list; + QTextStream in(&file); + //in.setCodec("utf-8"); + while (!in.atEnd()) { + QString line; + in >> line; + list << line; + } + + file.close(); + qss = list.join("\n"); + QString paletteColor = qss.mid(20, 7); + qApp->setPalette(QPalette(paletteColor)); + //用时主要在下面这句 + qApp->setStyleSheet(qss); + } + + +} + + diff --git a/softwareDirectory/AutoVerScheme/indexwindow.h b/softwareDirectory/AutoVerScheme/indexwindow.h new file mode 100644 index 0000000..2aee958 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/indexwindow.h @@ -0,0 +1,26 @@ +#ifndef INDEXWINDOW_H +#define INDEXWINDOW_H + +#include + +namespace Ui { +class IndexWindow; +} + +class IndexWindow : public QMainWindow +{ + Q_OBJECT + +public: + explicit IndexWindow(QWidget *parent = nullptr); + ~IndexWindow(); +private slots: + void initForm(); + void loadStyle(const QString &qssFile); + + +private: + Ui::IndexWindow *ui; +}; + +#endif // INDEXWINDOW_H diff --git a/softwareDirectory/AutoVerScheme/indexwindow.ui b/softwareDirectory/AutoVerScheme/indexwindow.ui new file mode 100644 index 0000000..d7153e0 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/indexwindow.ui @@ -0,0 +1,539 @@ + + + IndexWindow + + + Qt::NonModal + + + + 0 + 0 + 1334 + 789 + + + + + 0 + 0 + + + + MainWindow + + + + + + + 100 + 100 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + 6 + + + QLayout::SetFixedSize + + + 0 + + + 0 + + + + + Qt::Horizontal + + + QSizePolicy::Fixed + + + + 120 + 13 + + + + + + + + + 0 + 0 + + + + + 560 + 0 + + + + Qt::DefaultContextMenu + + + color: white; +font-weight: bold; +font-size: 24pt; + + + + + QFrame::NoFrame + + + QFrame::Plain + + + 自动检定系统 + + + Qt::AutoText + + + false + + + Qt::AlignCenter + + + + + + + Qt::Horizontal + + + QSizePolicy::Fixed + + + + 40 + 13 + + + + + + + + + + Qt::Vertical + + + QSizePolicy::Fixed + + + + 50 + 80 + + + + + + + + + + Qt::Vertical + + + QSizePolicy::Fixed + + + + 20 + 120 + + + + + + + + Qt::Horizontal + + + + 100 + 20 + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + 0 + 0 + + + + + 310 + 190 + + + + OpenHandCursor + + + margin-right: 0px; + + + 信息管理 + + + + 60 + 60 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + Qt::Horizontal + + + + 327 + 20 + + + + + + + + + 0 + 0 + + + + + 490 + 190 + + + + OpenHandCursor + + + + + + 自动核查 + + + + 60 + 60 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + + 0 + 0 + + + + + 490 + 190 + + + + OpenHandCursor + + + + + + 自动检定 + + + + 60 + 60 + + + + false + + + false + + + Qt::ToolButtonTextUnderIcon + + + + + + + + 0 + 0 + + + + + 490 + 190 + + + + OpenHandCursor + + + + + + 核查程序管理 + + + + 60 + 60 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + Qt::Horizontal + + + + 327 + 20 + + + + + + + + + 0 + 0 + + + + + 310 + 190 + + + + OpenHandCursor + + + margin-right: 0px; + + + 数据同步 + + + + 60 + 60 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + Qt::Vertical + + + QSizePolicy::Fixed + + + + 20 + 120 + + + + + + + + Qt::Vertical + + + QSizePolicy::Fixed + + + + 20 + 120 + + + + + + + + + 0 + 0 + + + + + 490 + 190 + + + + OpenHandCursor + + + + + + 检定程序管理 + + + + 60 + 60 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + + + + + + 0 + 0 + + + + + 10 + 10 + + + + color: white; +font-weight: bold; +font-size: 14pt; + + + 欢迎您! 用户: admin + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + Qt::Horizontal + + + QSizePolicy::Fixed + + + + 270 + 20 + + + + + + + + + + + btnConfig + btnData + tbtnMain1 + tbtnMain2 + tbtnMain3 + tbtnConfig1 + tbtnConfig2 + tbtnConfig3 + tbtnConfig4 + tbtnConfig5 + tbtnConfig6 + btnMain + btnHelp + btnExit + + + + diff --git a/softwareDirectory/AutoVerScheme/loginwindow.cpp b/softwareDirectory/AutoVerScheme/loginwindow.cpp new file mode 100644 index 0000000..155988a --- /dev/null +++ b/softwareDirectory/AutoVerScheme/loginwindow.cpp @@ -0,0 +1,68 @@ +#include "loginwindow.h" +#include "ui_loginwindow.h" +#include +#include +#include + +#include "indexwindow.h" + +loginWindow::loginWindow(QWidget *parent): QMainWindow(parent), ui(new Ui::loginWindow) +{ + ui->setupUi(this); + this->initForm(); + ui->label->styleSheet(); + +} + +loginWindow::~loginWindow() +{ + delete ui; +} +void loginWindow::initForm() +{ + //this->setWindowFlags(Qt::FramelessWindowHint); + //调用样式 + loadStyle(":/qss/login.css"); +} + +void loginWindow::loadStyle(const QString &qssFile) +{ + //加载样式表 + QString qss; + + QFile file(qssFile); + + if (file.open(QFile::ReadOnly)) { + //用QTextStream读取样式文件不用区分文件编码 带bom也行 + QStringList list; + QTextStream in(&file); + //in.setCodec("utf-8"); + while (!in.atEnd()) { + QString line; + in >> line; + list << line; + } + + file.close(); + qss = list.join("\n"); + QString paletteColor = qss.mid(20, 7); + qApp->setPalette(QPalette(paletteColor)); + //用时主要在下面这句 + qApp->setStyleSheet(qss); + } + + +} + + +void loginWindow::on_Button_login_clicked() +{ + QMessageBox::information(this, "提示", "登录成功!"); + //查询数据库内是否有账号 + IndexWindow *indexWindow = new IndexWindow; + indexWindow->setWindowState(Qt::WindowMaximized); + indexWindow->show(); + this->close(); + +} + diff --git a/softwareDirectory/AutoVerScheme/loginwindow.h b/softwareDirectory/AutoVerScheme/loginwindow.h new file mode 100644 index 0000000..2695bc3 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/loginwindow.h @@ -0,0 +1,31 @@ +#ifndef MAINWINDOW_H +#define MAINWINDOW_H + +#include +#include + + + +namespace Ui { +class loginWindow; +} + +class loginWindow : public QMainWindow +{ + Q_OBJECT + +public: + explicit loginWindow(QWidget *parent = 0); + ~loginWindow(); +private slots: + void initForm(); + void loadStyle(const QString &qssFile); + void on_Button_login_clicked(); + + +private: + Ui::loginWindow *ui; +private: + QSqlQuery query; +}; +#endif // MAINWINDOW_H diff --git a/softwareDirectory/AutoVerScheme/loginwindow.ui b/softwareDirectory/AutoVerScheme/loginwindow.ui new file mode 100644 index 0000000..ca04751 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/loginwindow.ui @@ -0,0 +1,234 @@ + + + loginWindow + + + + 0 + 0 + 954 + 603 + + + + MainWindow + + + background-color: rgb(255, 255, 255) + + + + + + 110 + 110 + 271 + 231 + + + + background-image: url(:/image/login/u9.png); +background-repeat: no-repeat; background-position: center; +background-color: transparent; + + + + + + + + + 0 + 10 + 491 + 601 + + + + background-image: url(:/image/login/u2.png); +background-repeat: no-repeat; +background-color: transparent; +background-repeat: no-repeat; +background-position: center; +background-size: 100%; + + + + + + + + + 5 + 10 + 491 + 569 + + + + background-image: url(:/image/login/u0.png); +background-repeat: no-repeat; background-position: center; + + + + + + 170 + 350 + 241 + 51 + + + + background-color: transparent; + + + Metrology + + + + + + 490 + 10 + 471 + 571 + + + + + + + 610 + 70 + 271 + 61 + + + + 自动检定软件 + + + + + + 540 + 200 + 61 + 61 + + + + + + + + + + 490 + 10 + 461 + 571 + + + + + + + 540 + 290 + 61 + 61 + + + + + + + + + + 540 + 430 + 341 + 81 + + + + OpenHandCursor + + + + + + 登 录 + + + + + + 610 + 210 + 221 + 41 + + + + 请输入账号 + + + + + + 610 + 300 + 221 + 41 + + + + 请输入账号 + + + + + + 507 + 1 + 72 + 16 + + + + + + + label_4 + graphicsView + label_2 + label_3 + graphicsView_2 + textBrowser + lab_title + textBrowser_2 + textBrowser_3 + Button_login + textEdit_acc + textEdit_pass + label + + + + + 0 + 0 + 954 + 25 + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/main.cpp b/softwareDirectory/AutoVerScheme/main.cpp new file mode 100644 index 0000000..16b6d3f --- /dev/null +++ b/softwareDirectory/AutoVerScheme/main.cpp @@ -0,0 +1,23 @@ +#include "loginwindow.h" +#include "mainwindow.h" +#include +#include "indexWindow.h" +#include "testview.h" + +int main(int argc, char *argv[]) +{ + QApplication a(argc, argv); + // 加载外部的CSS文件 + a.setStyleSheet("file:///path/to/styles.css"); + //设置字体 + QFont font; + font.setFamily("Microsoft Yahei"); + font.setPixelSize(13); + a.setFont(font); + + //TestView s; + //s.show(); + loginWindow w; + w.show(); + return a.exec(); +} diff --git a/softwareDirectory/AutoVerScheme/mainwindow.cpp b/softwareDirectory/AutoVerScheme/mainwindow.cpp new file mode 100644 index 0000000..12d07c0 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/mainwindow.cpp @@ -0,0 +1,14 @@ +#include "mainwindow.h" +#include "ui_mainwindow.h" + +MainWindow::MainWindow(QWidget *parent) : + QMainWindow(parent), + ui(new Ui::MainWindow) +{ + ui->setupUi(this); +} + +MainWindow::~MainWindow() +{ + delete ui; +} diff --git a/softwareDirectory/AutoVerScheme/mainwindow.h b/softwareDirectory/AutoVerScheme/mainwindow.h new file mode 100644 index 0000000..40fd472 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/mainwindow.h @@ -0,0 +1,22 @@ +#ifndef MAINWINDOW_H +#define MAINWINDOW_H + +#include + +namespace Ui { +class MainWindow; +} + +class MainWindow : public QMainWindow +{ + Q_OBJECT + +public: + explicit MainWindow(QWidget *parent = nullptr); + ~MainWindow(); + +private: + Ui::MainWindow *ui; +}; + +#endif // MAINWINDOW_H diff --git a/softwareDirectory/AutoVerScheme/mainwindow.ui b/softwareDirectory/AutoVerScheme/mainwindow.ui new file mode 100644 index 0000000..dd4f1c8 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/mainwindow.ui @@ -0,0 +1,24 @@ + + + + + MainWindow + + + + 0 + 0 + 800 + 600 + + + + MainWindow + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u101.png b/softwareDirectory/AutoVerScheme/res/image/Index/u101.png new file mode 100644 index 0000000..9e371e3 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u101.png Binary files differ diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u102.png b/softwareDirectory/AutoVerScheme/res/image/Index/u102.png new file mode 100644 index 0000000..b288067 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u102.png Binary files differ diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u15.png b/softwareDirectory/AutoVerScheme/res/image/Index/u15.png new file mode 100644 index 0000000..7e699e6 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u15.png Binary files differ diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u17.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u17.svg new file mode 100644 index 0000000..acc0502 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u17.svg @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u18.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u18.svg new file mode 100644 index 0000000..6a00a10 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u18.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u19.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u19.svg new file mode 100644 index 0000000..42dea06 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u19.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u20.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u20.svg new file mode 100644 index 0000000..7426e62 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u20.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u21.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u21.svg new file mode 100644 index 0000000..cba8469 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u21.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u22.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u22.svg new file mode 100644 index 0000000..78843a0 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u22.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u23.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u23.svg new file mode 100644 index 0000000..c586b65 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u23.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u24.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u24.svg new file mode 100644 index 0000000..066e006 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u24.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u26.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u26.svg new file mode 100644 index 0000000..1834de5 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u26.svg @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u26_mouseOver.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u26_mouseOver.svg new file mode 100644 index 0000000..1420ba1 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u26_mouseOver.svg @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u33.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u33.svg new file mode 100644 index 0000000..e932d0a --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u33.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u34.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u34.svg new file mode 100644 index 0000000..0ab265b --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u34.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u35.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u35.svg new file mode 100644 index 0000000..7748314 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u35.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/login/u0.png b/softwareDirectory/AutoVerScheme/res/image/login/u0.png new file mode 100644 index 0000000..03d764f --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/login/u0.png Binary files differ diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro new file mode 100644 index 0000000..5b8f852 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro @@ -0,0 +1,48 @@ +QT += core gui +QT += sql +greaterThan(QT_MAJOR_VERSION, 4): QT += widgets + +CONFIG += c++11 + +# The following define makes your compiler emit warnings if you use +# any Qt feature that has been marked deprecated (the exact warnings +# depend on your compiler). Please consult the documentation of the +# deprecated API in order to know how to port your code away from it. +DEFINES += QT_DEPRECATED_WARNINGS + +# You can also make your code fail to compile if it uses deprecated APIs. +# In order to do so, uncomment the following line. +# You can also select to disable deprecated APIs only up to a certain version of Qt. +#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 + +SOURCES += \ + indexwindow.cpp \ + loginwindow.cpp \ + main.cpp \ + mainwindow.cpp \ + testview.cpp + +HEADERS += \ + indexwindow.h \ + loginwindow.h \ + mainwindow.h \ + testview.h + +FORMS += \ + indexwindow.ui \ + loginwindow.ui \ + mainwindow.ui \ + testview.ui + +# Default rules for deployment. +qnx: target.path = /tmp/$${TARGET}/bin +else: unix:!android: target.path = /opt/$${TARGET}/bin +!isEmpty(target.path): INSTALLS += target + +RESOURCES += \ + res/qss.qrc \ + res/res.qrc + +DISTFILES += \ + res/image/u2.png + diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user new file mode 100644 index 0000000..1f5ec64 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user @@ -0,0 +1,562 @@ + + + + + + EnvironmentId + {c08df58c-84a7-4965-bca6-e98789474efa} + + + ProjectExplorer.Project.ActiveTarget + 0 + + + ProjectExplorer.Project.EditorSettings + + true + false + true + + Cpp + + CppGlobal + + + + QmlJS + + QmlJSGlobal + + + 2 + UTF-8 + false + 4 + false + 80 + true + true + 1 + true + false + 0 + true + true + 0 + 8 + true + 1 + true + true + true + false + + + + ProjectExplorer.Project.PluginSettings + + + -fno-delayed-template-parsing + + true + + + + ProjectExplorer.Project.Target.0 + + Desktop Qt 5.14.2 MinGW 64-bit + Desktop Qt 5.14.2 MinGW 64-bit + qt.qt5.5142.win64_mingw73_kit + 0 + 0 + 0 + + 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 + 0 + 0 + 0 + + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug + + + true + QtProjectManager.QMakeBuildStep + true + + false + false + false + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Debug + Qt4ProjectManager.Qt4BuildConfiguration + 2 + + + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Release + + + true + QtProjectManager.QMakeBuildStep + false + + false + false + true + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Release + Qt4ProjectManager.Qt4BuildConfiguration + 0 + + + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Profile + + + true + QtProjectManager.QMakeBuildStep + true + + false + true + true + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Profile + Qt4ProjectManager.Qt4BuildConfiguration + 0 + + 3 + + + 0 + Deploy + Deploy + ProjectExplorer.BuildSteps.Deploy + + 1 + ProjectExplorer.DefaultDeployConfiguration + + 1 + + + dwarf + + cpu-cycles + + + 250 + + -e + cpu-cycles + --call-graph + dwarf,4096 + -F + 250 + + -F + true + 4096 + false + false + 1000 + + true + + false + false + false + false + true + 0.01 + 10 + true + kcachegrind + 1 + 25 + + 1 + true + false + true + valgrind + + 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + + 2 + + Qt4ProjectManager.Qt4RunConfiguration:D:/Auto_verification_scheme/AutoVerScheme/AutoVerScheme.pro + D:/Auto_verification_scheme/AutoVerScheme/AutoVerScheme.pro + + false + + false + true + true + false + false + true + + + + 1 + + + + ProjectExplorer.Project.TargetCount + 2 + + + ProjectExplorer.Project.Updater.FileVersion + 22 + + + Version + 22 + + diff --git a/softwareDirectory/AutoVerScheme/indexwindow.cpp b/softwareDirectory/AutoVerScheme/indexwindow.cpp new file mode 100644 index 0000000..3e52c7b --- /dev/null +++ b/softwareDirectory/AutoVerScheme/indexwindow.cpp @@ -0,0 +1,55 @@ +#include "indexwindow.h" +#include "ui_indexwindow.h" +#include "QFile" +#include "QTextStream" + +IndexWindow::IndexWindow(QWidget *parent) : + QMainWindow(parent), + ui(new Ui::IndexWindow) +{ + ui->setupUi(this); + this->initForm(); +} + +IndexWindow::~IndexWindow() +{ + delete ui; +} +void IndexWindow::initForm() +{ + //this->setWindowFlags(Qt::FramelessWindowHint); + //调用样式 + loadStyle(":/qss/Index.css"); + +} + +void IndexWindow::loadStyle(const QString &qssFile) +{ + //加载样式表 + QString qss; + + QFile file(qssFile); + + if (file.open(QFile::ReadOnly)) { + //用QTextStream读取样式文件不用区分文件编码 带bom也行 + QStringList list; + QTextStream in(&file); + //in.setCodec("utf-8"); + while (!in.atEnd()) { + QString line; + in >> line; + list << line; + } + + file.close(); + qss = list.join("\n"); + QString paletteColor = qss.mid(20, 7); + qApp->setPalette(QPalette(paletteColor)); + //用时主要在下面这句 + qApp->setStyleSheet(qss); + } + + +} + + diff --git a/softwareDirectory/AutoVerScheme/indexwindow.h b/softwareDirectory/AutoVerScheme/indexwindow.h new file mode 100644 index 0000000..2aee958 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/indexwindow.h @@ -0,0 +1,26 @@ +#ifndef INDEXWINDOW_H +#define INDEXWINDOW_H + +#include + +namespace Ui { +class IndexWindow; +} + +class IndexWindow : public QMainWindow +{ + Q_OBJECT + +public: + explicit IndexWindow(QWidget *parent = nullptr); + ~IndexWindow(); +private slots: + void initForm(); + void loadStyle(const QString &qssFile); + + +private: + Ui::IndexWindow *ui; +}; + +#endif // INDEXWINDOW_H diff --git a/softwareDirectory/AutoVerScheme/indexwindow.ui b/softwareDirectory/AutoVerScheme/indexwindow.ui new file mode 100644 index 0000000..d7153e0 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/indexwindow.ui @@ -0,0 +1,539 @@ + + + IndexWindow + + + Qt::NonModal + + + + 0 + 0 + 1334 + 789 + + + + + 0 + 0 + + + + MainWindow + + + + + + + 100 + 100 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + 6 + + + QLayout::SetFixedSize + + + 0 + + + 0 + + + + + Qt::Horizontal + + + QSizePolicy::Fixed + + + + 120 + 13 + + + + + + + + + 0 + 0 + + + + + 560 + 0 + + + + Qt::DefaultContextMenu + + + color: white; +font-weight: bold; +font-size: 24pt; + + + + + QFrame::NoFrame + + + QFrame::Plain + + + 自动检定系统 + + + Qt::AutoText + + + false + + + Qt::AlignCenter + + + + + + + Qt::Horizontal + + + QSizePolicy::Fixed + + + + 40 + 13 + + + + + + + + + + Qt::Vertical + + + QSizePolicy::Fixed + + + + 50 + 80 + + + + + + + + + + Qt::Vertical + + + QSizePolicy::Fixed + + + + 20 + 120 + + + + + + + + Qt::Horizontal + + + + 100 + 20 + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + 0 + 0 + + + + + 310 + 190 + + + + OpenHandCursor + + + margin-right: 0px; + + + 信息管理 + + + + 60 + 60 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + Qt::Horizontal + + + + 327 + 20 + + + + + + + + + 0 + 0 + + + + + 490 + 190 + + + + OpenHandCursor + + + + + + 自动核查 + + + + 60 + 60 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + + 0 + 0 + + + + + 490 + 190 + + + + OpenHandCursor + + + + + + 自动检定 + + + + 60 + 60 + + + + false + + + false + + + Qt::ToolButtonTextUnderIcon + + + + + + + + 0 + 0 + + + + + 490 + 190 + + + + OpenHandCursor + + + + + + 核查程序管理 + + + + 60 + 60 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + Qt::Horizontal + + + + 327 + 20 + + + + + + + + + 0 + 0 + + + + + 310 + 190 + + + + OpenHandCursor + + + margin-right: 0px; + + + 数据同步 + + + + 60 + 60 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + Qt::Vertical + + + QSizePolicy::Fixed + + + + 20 + 120 + + + + + + + + Qt::Vertical + + + QSizePolicy::Fixed + + + + 20 + 120 + + + + + + + + + 0 + 0 + + + + + 490 + 190 + + + + OpenHandCursor + + + + + + 检定程序管理 + + + + 60 + 60 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + + + + + + 0 + 0 + + + + + 10 + 10 + + + + color: white; +font-weight: bold; +font-size: 14pt; + + + 欢迎您! 用户: admin + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + Qt::Horizontal + + + QSizePolicy::Fixed + + + + 270 + 20 + + + + + + + + + + + btnConfig + btnData + tbtnMain1 + tbtnMain2 + tbtnMain3 + tbtnConfig1 + tbtnConfig2 + tbtnConfig3 + tbtnConfig4 + tbtnConfig5 + tbtnConfig6 + btnMain + btnHelp + btnExit + + + + diff --git a/softwareDirectory/AutoVerScheme/loginwindow.cpp b/softwareDirectory/AutoVerScheme/loginwindow.cpp new file mode 100644 index 0000000..155988a --- /dev/null +++ b/softwareDirectory/AutoVerScheme/loginwindow.cpp @@ -0,0 +1,68 @@ +#include "loginwindow.h" +#include "ui_loginwindow.h" +#include +#include +#include + +#include "indexwindow.h" + +loginWindow::loginWindow(QWidget *parent): QMainWindow(parent), ui(new Ui::loginWindow) +{ + ui->setupUi(this); + this->initForm(); + ui->label->styleSheet(); + +} + +loginWindow::~loginWindow() +{ + delete ui; +} +void loginWindow::initForm() +{ + //this->setWindowFlags(Qt::FramelessWindowHint); + //调用样式 + loadStyle(":/qss/login.css"); +} + +void loginWindow::loadStyle(const QString &qssFile) +{ + //加载样式表 + QString qss; + + QFile file(qssFile); + + if (file.open(QFile::ReadOnly)) { + //用QTextStream读取样式文件不用区分文件编码 带bom也行 + QStringList list; + QTextStream in(&file); + //in.setCodec("utf-8"); + while (!in.atEnd()) { + QString line; + in >> line; + list << line; + } + + file.close(); + qss = list.join("\n"); + QString paletteColor = qss.mid(20, 7); + qApp->setPalette(QPalette(paletteColor)); + //用时主要在下面这句 + qApp->setStyleSheet(qss); + } + + +} + + +void loginWindow::on_Button_login_clicked() +{ + QMessageBox::information(this, "提示", "登录成功!"); + //查询数据库内是否有账号 + IndexWindow *indexWindow = new IndexWindow; + indexWindow->setWindowState(Qt::WindowMaximized); + indexWindow->show(); + this->close(); + +} + diff --git a/softwareDirectory/AutoVerScheme/loginwindow.h b/softwareDirectory/AutoVerScheme/loginwindow.h new file mode 100644 index 0000000..2695bc3 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/loginwindow.h @@ -0,0 +1,31 @@ +#ifndef MAINWINDOW_H +#define MAINWINDOW_H + +#include +#include + + + +namespace Ui { +class loginWindow; +} + +class loginWindow : public QMainWindow +{ + Q_OBJECT + +public: + explicit loginWindow(QWidget *parent = 0); + ~loginWindow(); +private slots: + void initForm(); + void loadStyle(const QString &qssFile); + void on_Button_login_clicked(); + + +private: + Ui::loginWindow *ui; +private: + QSqlQuery query; +}; +#endif // MAINWINDOW_H diff --git a/softwareDirectory/AutoVerScheme/loginwindow.ui b/softwareDirectory/AutoVerScheme/loginwindow.ui new file mode 100644 index 0000000..ca04751 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/loginwindow.ui @@ -0,0 +1,234 @@ + + + loginWindow + + + + 0 + 0 + 954 + 603 + + + + MainWindow + + + background-color: rgb(255, 255, 255) + + + + + + 110 + 110 + 271 + 231 + + + + background-image: url(:/image/login/u9.png); +background-repeat: no-repeat; background-position: center; +background-color: transparent; + + + + + + + + + 0 + 10 + 491 + 601 + + + + background-image: url(:/image/login/u2.png); +background-repeat: no-repeat; +background-color: transparent; +background-repeat: no-repeat; +background-position: center; +background-size: 100%; + + + + + + + + + 5 + 10 + 491 + 569 + + + + background-image: url(:/image/login/u0.png); +background-repeat: no-repeat; background-position: center; + + + + + + 170 + 350 + 241 + 51 + + + + background-color: transparent; + + + Metrology + + + + + + 490 + 10 + 471 + 571 + + + + + + + 610 + 70 + 271 + 61 + + + + 自动检定软件 + + + + + + 540 + 200 + 61 + 61 + + + + + + + + + + 490 + 10 + 461 + 571 + + + + + + + 540 + 290 + 61 + 61 + + + + + + + + + + 540 + 430 + 341 + 81 + + + + OpenHandCursor + + + + + + 登 录 + + + + + + 610 + 210 + 221 + 41 + + + + 请输入账号 + + + + + + 610 + 300 + 221 + 41 + + + + 请输入账号 + + + + + + 507 + 1 + 72 + 16 + + + + + + + label_4 + graphicsView + label_2 + label_3 + graphicsView_2 + textBrowser + lab_title + textBrowser_2 + textBrowser_3 + Button_login + textEdit_acc + textEdit_pass + label + + + + + 0 + 0 + 954 + 25 + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/main.cpp b/softwareDirectory/AutoVerScheme/main.cpp new file mode 100644 index 0000000..16b6d3f --- /dev/null +++ b/softwareDirectory/AutoVerScheme/main.cpp @@ -0,0 +1,23 @@ +#include "loginwindow.h" +#include "mainwindow.h" +#include +#include "indexWindow.h" +#include "testview.h" + +int main(int argc, char *argv[]) +{ + QApplication a(argc, argv); + // 加载外部的CSS文件 + a.setStyleSheet("file:///path/to/styles.css"); + //设置字体 + QFont font; + font.setFamily("Microsoft Yahei"); + font.setPixelSize(13); + a.setFont(font); + + //TestView s; + //s.show(); + loginWindow w; + w.show(); + return a.exec(); +} diff --git a/softwareDirectory/AutoVerScheme/mainwindow.cpp b/softwareDirectory/AutoVerScheme/mainwindow.cpp new file mode 100644 index 0000000..12d07c0 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/mainwindow.cpp @@ -0,0 +1,14 @@ +#include "mainwindow.h" +#include "ui_mainwindow.h" + +MainWindow::MainWindow(QWidget *parent) : + QMainWindow(parent), + ui(new Ui::MainWindow) +{ + ui->setupUi(this); +} + +MainWindow::~MainWindow() +{ + delete ui; +} diff --git a/softwareDirectory/AutoVerScheme/mainwindow.h b/softwareDirectory/AutoVerScheme/mainwindow.h new file mode 100644 index 0000000..40fd472 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/mainwindow.h @@ -0,0 +1,22 @@ +#ifndef MAINWINDOW_H +#define MAINWINDOW_H + +#include + +namespace Ui { +class MainWindow; +} + +class MainWindow : public QMainWindow +{ + Q_OBJECT + +public: + explicit MainWindow(QWidget *parent = nullptr); + ~MainWindow(); + +private: + Ui::MainWindow *ui; +}; + +#endif // MAINWINDOW_H diff --git a/softwareDirectory/AutoVerScheme/mainwindow.ui b/softwareDirectory/AutoVerScheme/mainwindow.ui new file mode 100644 index 0000000..dd4f1c8 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/mainwindow.ui @@ -0,0 +1,24 @@ + + + + + MainWindow + + + + 0 + 0 + 800 + 600 + + + + MainWindow + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u101.png b/softwareDirectory/AutoVerScheme/res/image/Index/u101.png new file mode 100644 index 0000000..9e371e3 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u101.png Binary files differ diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u102.png b/softwareDirectory/AutoVerScheme/res/image/Index/u102.png new file mode 100644 index 0000000..b288067 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u102.png Binary files differ diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u15.png b/softwareDirectory/AutoVerScheme/res/image/Index/u15.png new file mode 100644 index 0000000..7e699e6 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u15.png Binary files differ diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u17.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u17.svg new file mode 100644 index 0000000..acc0502 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u17.svg @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u18.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u18.svg new file mode 100644 index 0000000..6a00a10 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u18.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u19.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u19.svg new file mode 100644 index 0000000..42dea06 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u19.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u20.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u20.svg new file mode 100644 index 0000000..7426e62 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u20.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u21.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u21.svg new file mode 100644 index 0000000..cba8469 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u21.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u22.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u22.svg new file mode 100644 index 0000000..78843a0 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u22.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u23.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u23.svg new file mode 100644 index 0000000..c586b65 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u23.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u24.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u24.svg new file mode 100644 index 0000000..066e006 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u24.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u26.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u26.svg new file mode 100644 index 0000000..1834de5 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u26.svg @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u26_mouseOver.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u26_mouseOver.svg new file mode 100644 index 0000000..1420ba1 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u26_mouseOver.svg @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u33.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u33.svg new file mode 100644 index 0000000..e932d0a --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u33.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u34.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u34.svg new file mode 100644 index 0000000..0ab265b --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u34.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u35.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u35.svg new file mode 100644 index 0000000..7748314 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u35.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/login/u0.png b/softwareDirectory/AutoVerScheme/res/image/login/u0.png new file mode 100644 index 0000000..03d764f --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/login/u0.png Binary files differ diff --git a/softwareDirectory/AutoVerScheme/res/image/login/u2.png b/softwareDirectory/AutoVerScheme/res/image/login/u2.png new file mode 100644 index 0000000..9d8fed7 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/login/u2.png Binary files differ diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro new file mode 100644 index 0000000..5b8f852 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro @@ -0,0 +1,48 @@ +QT += core gui +QT += sql +greaterThan(QT_MAJOR_VERSION, 4): QT += widgets + +CONFIG += c++11 + +# The following define makes your compiler emit warnings if you use +# any Qt feature that has been marked deprecated (the exact warnings +# depend on your compiler). Please consult the documentation of the +# deprecated API in order to know how to port your code away from it. +DEFINES += QT_DEPRECATED_WARNINGS + +# You can also make your code fail to compile if it uses deprecated APIs. +# In order to do so, uncomment the following line. +# You can also select to disable deprecated APIs only up to a certain version of Qt. +#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 + +SOURCES += \ + indexwindow.cpp \ + loginwindow.cpp \ + main.cpp \ + mainwindow.cpp \ + testview.cpp + +HEADERS += \ + indexwindow.h \ + loginwindow.h \ + mainwindow.h \ + testview.h + +FORMS += \ + indexwindow.ui \ + loginwindow.ui \ + mainwindow.ui \ + testview.ui + +# Default rules for deployment. +qnx: target.path = /tmp/$${TARGET}/bin +else: unix:!android: target.path = /opt/$${TARGET}/bin +!isEmpty(target.path): INSTALLS += target + +RESOURCES += \ + res/qss.qrc \ + res/res.qrc + +DISTFILES += \ + res/image/u2.png + diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user new file mode 100644 index 0000000..1f5ec64 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user @@ -0,0 +1,562 @@ + + + + + + EnvironmentId + {c08df58c-84a7-4965-bca6-e98789474efa} + + + ProjectExplorer.Project.ActiveTarget + 0 + + + ProjectExplorer.Project.EditorSettings + + true + false + true + + Cpp + + CppGlobal + + + + QmlJS + + QmlJSGlobal + + + 2 + UTF-8 + false + 4 + false + 80 + true + true + 1 + true + false + 0 + true + true + 0 + 8 + true + 1 + true + true + true + false + + + + ProjectExplorer.Project.PluginSettings + + + -fno-delayed-template-parsing + + true + + + + ProjectExplorer.Project.Target.0 + + Desktop Qt 5.14.2 MinGW 64-bit + Desktop Qt 5.14.2 MinGW 64-bit + qt.qt5.5142.win64_mingw73_kit + 0 + 0 + 0 + + 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 + 0 + 0 + 0 + + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug + + + true + QtProjectManager.QMakeBuildStep + true + + false + false + false + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Debug + Qt4ProjectManager.Qt4BuildConfiguration + 2 + + + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Release + + + true + QtProjectManager.QMakeBuildStep + false + + false + false + true + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Release + Qt4ProjectManager.Qt4BuildConfiguration + 0 + + + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Profile + + + true + QtProjectManager.QMakeBuildStep + true + + false + true + true + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Profile + Qt4ProjectManager.Qt4BuildConfiguration + 0 + + 3 + + + 0 + Deploy + Deploy + ProjectExplorer.BuildSteps.Deploy + + 1 + ProjectExplorer.DefaultDeployConfiguration + + 1 + + + dwarf + + cpu-cycles + + + 250 + + -e + cpu-cycles + --call-graph + dwarf,4096 + -F + 250 + + -F + true + 4096 + false + false + 1000 + + true + + false + false + false + false + true + 0.01 + 10 + true + kcachegrind + 1 + 25 + + 1 + true + false + true + valgrind + + 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + + 2 + + Qt4ProjectManager.Qt4RunConfiguration:D:/Auto_verification_scheme/AutoVerScheme/AutoVerScheme.pro + D:/Auto_verification_scheme/AutoVerScheme/AutoVerScheme.pro + + false + + false + true + true + false + false + true + + + + 1 + + + + ProjectExplorer.Project.TargetCount + 2 + + + ProjectExplorer.Project.Updater.FileVersion + 22 + + + Version + 22 + + diff --git a/softwareDirectory/AutoVerScheme/indexwindow.cpp b/softwareDirectory/AutoVerScheme/indexwindow.cpp new file mode 100644 index 0000000..3e52c7b --- /dev/null +++ b/softwareDirectory/AutoVerScheme/indexwindow.cpp @@ -0,0 +1,55 @@ +#include "indexwindow.h" +#include "ui_indexwindow.h" +#include "QFile" +#include "QTextStream" + +IndexWindow::IndexWindow(QWidget *parent) : + QMainWindow(parent), + ui(new Ui::IndexWindow) +{ + ui->setupUi(this); + this->initForm(); +} + +IndexWindow::~IndexWindow() +{ + delete ui; +} +void IndexWindow::initForm() +{ + //this->setWindowFlags(Qt::FramelessWindowHint); + //调用样式 + loadStyle(":/qss/Index.css"); + +} + +void IndexWindow::loadStyle(const QString &qssFile) +{ + //加载样式表 + QString qss; + + QFile file(qssFile); + + if (file.open(QFile::ReadOnly)) { + //用QTextStream读取样式文件不用区分文件编码 带bom也行 + QStringList list; + QTextStream in(&file); + //in.setCodec("utf-8"); + while (!in.atEnd()) { + QString line; + in >> line; + list << line; + } + + file.close(); + qss = list.join("\n"); + QString paletteColor = qss.mid(20, 7); + qApp->setPalette(QPalette(paletteColor)); + //用时主要在下面这句 + qApp->setStyleSheet(qss); + } + + +} + + diff --git a/softwareDirectory/AutoVerScheme/indexwindow.h b/softwareDirectory/AutoVerScheme/indexwindow.h new file mode 100644 index 0000000..2aee958 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/indexwindow.h @@ -0,0 +1,26 @@ +#ifndef INDEXWINDOW_H +#define INDEXWINDOW_H + +#include + +namespace Ui { +class IndexWindow; +} + +class IndexWindow : public QMainWindow +{ + Q_OBJECT + +public: + explicit IndexWindow(QWidget *parent = nullptr); + ~IndexWindow(); +private slots: + void initForm(); + void loadStyle(const QString &qssFile); + + +private: + Ui::IndexWindow *ui; +}; + +#endif // INDEXWINDOW_H diff --git a/softwareDirectory/AutoVerScheme/indexwindow.ui b/softwareDirectory/AutoVerScheme/indexwindow.ui new file mode 100644 index 0000000..d7153e0 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/indexwindow.ui @@ -0,0 +1,539 @@ + + + IndexWindow + + + Qt::NonModal + + + + 0 + 0 + 1334 + 789 + + + + + 0 + 0 + + + + MainWindow + + + + + + + 100 + 100 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + 6 + + + QLayout::SetFixedSize + + + 0 + + + 0 + + + + + Qt::Horizontal + + + QSizePolicy::Fixed + + + + 120 + 13 + + + + + + + + + 0 + 0 + + + + + 560 + 0 + + + + Qt::DefaultContextMenu + + + color: white; +font-weight: bold; +font-size: 24pt; + + + + + QFrame::NoFrame + + + QFrame::Plain + + + 自动检定系统 + + + Qt::AutoText + + + false + + + Qt::AlignCenter + + + + + + + Qt::Horizontal + + + QSizePolicy::Fixed + + + + 40 + 13 + + + + + + + + + + Qt::Vertical + + + QSizePolicy::Fixed + + + + 50 + 80 + + + + + + + + + + Qt::Vertical + + + QSizePolicy::Fixed + + + + 20 + 120 + + + + + + + + Qt::Horizontal + + + + 100 + 20 + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + 0 + 0 + + + + + 310 + 190 + + + + OpenHandCursor + + + margin-right: 0px; + + + 信息管理 + + + + 60 + 60 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + Qt::Horizontal + + + + 327 + 20 + + + + + + + + + 0 + 0 + + + + + 490 + 190 + + + + OpenHandCursor + + + + + + 自动核查 + + + + 60 + 60 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + + 0 + 0 + + + + + 490 + 190 + + + + OpenHandCursor + + + + + + 自动检定 + + + + 60 + 60 + + + + false + + + false + + + Qt::ToolButtonTextUnderIcon + + + + + + + + 0 + 0 + + + + + 490 + 190 + + + + OpenHandCursor + + + + + + 核查程序管理 + + + + 60 + 60 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + Qt::Horizontal + + + + 327 + 20 + + + + + + + + + 0 + 0 + + + + + 310 + 190 + + + + OpenHandCursor + + + margin-right: 0px; + + + 数据同步 + + + + 60 + 60 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + Qt::Vertical + + + QSizePolicy::Fixed + + + + 20 + 120 + + + + + + + + Qt::Vertical + + + QSizePolicy::Fixed + + + + 20 + 120 + + + + + + + + + 0 + 0 + + + + + 490 + 190 + + + + OpenHandCursor + + + + + + 检定程序管理 + + + + 60 + 60 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + + + + + + 0 + 0 + + + + + 10 + 10 + + + + color: white; +font-weight: bold; +font-size: 14pt; + + + 欢迎您! 用户: admin + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + Qt::Horizontal + + + QSizePolicy::Fixed + + + + 270 + 20 + + + + + + + + + + + btnConfig + btnData + tbtnMain1 + tbtnMain2 + tbtnMain3 + tbtnConfig1 + tbtnConfig2 + tbtnConfig3 + tbtnConfig4 + tbtnConfig5 + tbtnConfig6 + btnMain + btnHelp + btnExit + + + + diff --git a/softwareDirectory/AutoVerScheme/loginwindow.cpp b/softwareDirectory/AutoVerScheme/loginwindow.cpp new file mode 100644 index 0000000..155988a --- /dev/null +++ b/softwareDirectory/AutoVerScheme/loginwindow.cpp @@ -0,0 +1,68 @@ +#include "loginwindow.h" +#include "ui_loginwindow.h" +#include +#include +#include + +#include "indexwindow.h" + +loginWindow::loginWindow(QWidget *parent): QMainWindow(parent), ui(new Ui::loginWindow) +{ + ui->setupUi(this); + this->initForm(); + ui->label->styleSheet(); + +} + +loginWindow::~loginWindow() +{ + delete ui; +} +void loginWindow::initForm() +{ + //this->setWindowFlags(Qt::FramelessWindowHint); + //调用样式 + loadStyle(":/qss/login.css"); +} + +void loginWindow::loadStyle(const QString &qssFile) +{ + //加载样式表 + QString qss; + + QFile file(qssFile); + + if (file.open(QFile::ReadOnly)) { + //用QTextStream读取样式文件不用区分文件编码 带bom也行 + QStringList list; + QTextStream in(&file); + //in.setCodec("utf-8"); + while (!in.atEnd()) { + QString line; + in >> line; + list << line; + } + + file.close(); + qss = list.join("\n"); + QString paletteColor = qss.mid(20, 7); + qApp->setPalette(QPalette(paletteColor)); + //用时主要在下面这句 + qApp->setStyleSheet(qss); + } + + +} + + +void loginWindow::on_Button_login_clicked() +{ + QMessageBox::information(this, "提示", "登录成功!"); + //查询数据库内是否有账号 + IndexWindow *indexWindow = new IndexWindow; + indexWindow->setWindowState(Qt::WindowMaximized); + indexWindow->show(); + this->close(); + +} + diff --git a/softwareDirectory/AutoVerScheme/loginwindow.h b/softwareDirectory/AutoVerScheme/loginwindow.h new file mode 100644 index 0000000..2695bc3 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/loginwindow.h @@ -0,0 +1,31 @@ +#ifndef MAINWINDOW_H +#define MAINWINDOW_H + +#include +#include + + + +namespace Ui { +class loginWindow; +} + +class loginWindow : public QMainWindow +{ + Q_OBJECT + +public: + explicit loginWindow(QWidget *parent = 0); + ~loginWindow(); +private slots: + void initForm(); + void loadStyle(const QString &qssFile); + void on_Button_login_clicked(); + + +private: + Ui::loginWindow *ui; +private: + QSqlQuery query; +}; +#endif // MAINWINDOW_H diff --git a/softwareDirectory/AutoVerScheme/loginwindow.ui b/softwareDirectory/AutoVerScheme/loginwindow.ui new file mode 100644 index 0000000..ca04751 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/loginwindow.ui @@ -0,0 +1,234 @@ + + + loginWindow + + + + 0 + 0 + 954 + 603 + + + + MainWindow + + + background-color: rgb(255, 255, 255) + + + + + + 110 + 110 + 271 + 231 + + + + background-image: url(:/image/login/u9.png); +background-repeat: no-repeat; background-position: center; +background-color: transparent; + + + + + + + + + 0 + 10 + 491 + 601 + + + + background-image: url(:/image/login/u2.png); +background-repeat: no-repeat; +background-color: transparent; +background-repeat: no-repeat; +background-position: center; +background-size: 100%; + + + + + + + + + 5 + 10 + 491 + 569 + + + + background-image: url(:/image/login/u0.png); +background-repeat: no-repeat; background-position: center; + + + + + + 170 + 350 + 241 + 51 + + + + background-color: transparent; + + + Metrology + + + + + + 490 + 10 + 471 + 571 + + + + + + + 610 + 70 + 271 + 61 + + + + 自动检定软件 + + + + + + 540 + 200 + 61 + 61 + + + + + + + + + + 490 + 10 + 461 + 571 + + + + + + + 540 + 290 + 61 + 61 + + + + + + + + + + 540 + 430 + 341 + 81 + + + + OpenHandCursor + + + + + + 登 录 + + + + + + 610 + 210 + 221 + 41 + + + + 请输入账号 + + + + + + 610 + 300 + 221 + 41 + + + + 请输入账号 + + + + + + 507 + 1 + 72 + 16 + + + + + + + label_4 + graphicsView + label_2 + label_3 + graphicsView_2 + textBrowser + lab_title + textBrowser_2 + textBrowser_3 + Button_login + textEdit_acc + textEdit_pass + label + + + + + 0 + 0 + 954 + 25 + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/main.cpp b/softwareDirectory/AutoVerScheme/main.cpp new file mode 100644 index 0000000..16b6d3f --- /dev/null +++ b/softwareDirectory/AutoVerScheme/main.cpp @@ -0,0 +1,23 @@ +#include "loginwindow.h" +#include "mainwindow.h" +#include +#include "indexWindow.h" +#include "testview.h" + +int main(int argc, char *argv[]) +{ + QApplication a(argc, argv); + // 加载外部的CSS文件 + a.setStyleSheet("file:///path/to/styles.css"); + //设置字体 + QFont font; + font.setFamily("Microsoft Yahei"); + font.setPixelSize(13); + a.setFont(font); + + //TestView s; + //s.show(); + loginWindow w; + w.show(); + return a.exec(); +} diff --git a/softwareDirectory/AutoVerScheme/mainwindow.cpp b/softwareDirectory/AutoVerScheme/mainwindow.cpp new file mode 100644 index 0000000..12d07c0 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/mainwindow.cpp @@ -0,0 +1,14 @@ +#include "mainwindow.h" +#include "ui_mainwindow.h" + +MainWindow::MainWindow(QWidget *parent) : + QMainWindow(parent), + ui(new Ui::MainWindow) +{ + ui->setupUi(this); +} + +MainWindow::~MainWindow() +{ + delete ui; +} diff --git a/softwareDirectory/AutoVerScheme/mainwindow.h b/softwareDirectory/AutoVerScheme/mainwindow.h new file mode 100644 index 0000000..40fd472 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/mainwindow.h @@ -0,0 +1,22 @@ +#ifndef MAINWINDOW_H +#define MAINWINDOW_H + +#include + +namespace Ui { +class MainWindow; +} + +class MainWindow : public QMainWindow +{ + Q_OBJECT + +public: + explicit MainWindow(QWidget *parent = nullptr); + ~MainWindow(); + +private: + Ui::MainWindow *ui; +}; + +#endif // MAINWINDOW_H diff --git a/softwareDirectory/AutoVerScheme/mainwindow.ui b/softwareDirectory/AutoVerScheme/mainwindow.ui new file mode 100644 index 0000000..dd4f1c8 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/mainwindow.ui @@ -0,0 +1,24 @@ + + + + + MainWindow + + + + 0 + 0 + 800 + 600 + + + + MainWindow + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u101.png b/softwareDirectory/AutoVerScheme/res/image/Index/u101.png new file mode 100644 index 0000000..9e371e3 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u101.png Binary files differ diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u102.png b/softwareDirectory/AutoVerScheme/res/image/Index/u102.png new file mode 100644 index 0000000..b288067 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u102.png Binary files differ diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u15.png b/softwareDirectory/AutoVerScheme/res/image/Index/u15.png new file mode 100644 index 0000000..7e699e6 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u15.png Binary files differ diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u17.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u17.svg new file mode 100644 index 0000000..acc0502 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u17.svg @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u18.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u18.svg new file mode 100644 index 0000000..6a00a10 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u18.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u19.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u19.svg new file mode 100644 index 0000000..42dea06 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u19.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u20.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u20.svg new file mode 100644 index 0000000..7426e62 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u20.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u21.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u21.svg new file mode 100644 index 0000000..cba8469 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u21.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u22.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u22.svg new file mode 100644 index 0000000..78843a0 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u22.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u23.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u23.svg new file mode 100644 index 0000000..c586b65 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u23.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u24.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u24.svg new file mode 100644 index 0000000..066e006 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u24.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u26.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u26.svg new file mode 100644 index 0000000..1834de5 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u26.svg @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u26_mouseOver.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u26_mouseOver.svg new file mode 100644 index 0000000..1420ba1 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u26_mouseOver.svg @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u33.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u33.svg new file mode 100644 index 0000000..e932d0a --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u33.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u34.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u34.svg new file mode 100644 index 0000000..0ab265b --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u34.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u35.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u35.svg new file mode 100644 index 0000000..7748314 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u35.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/login/u0.png b/softwareDirectory/AutoVerScheme/res/image/login/u0.png new file mode 100644 index 0000000..03d764f --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/login/u0.png Binary files differ diff --git a/softwareDirectory/AutoVerScheme/res/image/login/u2.png b/softwareDirectory/AutoVerScheme/res/image/login/u2.png new file mode 100644 index 0000000..9d8fed7 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/login/u2.png Binary files differ diff --git a/softwareDirectory/AutoVerScheme/res/image/login/u2.svg b/softwareDirectory/AutoVerScheme/res/image/login/u2.svg new file mode 100644 index 0000000..fc1bc92 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/login/u2.svg @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro new file mode 100644 index 0000000..5b8f852 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro @@ -0,0 +1,48 @@ +QT += core gui +QT += sql +greaterThan(QT_MAJOR_VERSION, 4): QT += widgets + +CONFIG += c++11 + +# The following define makes your compiler emit warnings if you use +# any Qt feature that has been marked deprecated (the exact warnings +# depend on your compiler). Please consult the documentation of the +# deprecated API in order to know how to port your code away from it. +DEFINES += QT_DEPRECATED_WARNINGS + +# You can also make your code fail to compile if it uses deprecated APIs. +# In order to do so, uncomment the following line. +# You can also select to disable deprecated APIs only up to a certain version of Qt. +#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 + +SOURCES += \ + indexwindow.cpp \ + loginwindow.cpp \ + main.cpp \ + mainwindow.cpp \ + testview.cpp + +HEADERS += \ + indexwindow.h \ + loginwindow.h \ + mainwindow.h \ + testview.h + +FORMS += \ + indexwindow.ui \ + loginwindow.ui \ + mainwindow.ui \ + testview.ui + +# Default rules for deployment. +qnx: target.path = /tmp/$${TARGET}/bin +else: unix:!android: target.path = /opt/$${TARGET}/bin +!isEmpty(target.path): INSTALLS += target + +RESOURCES += \ + res/qss.qrc \ + res/res.qrc + +DISTFILES += \ + res/image/u2.png + diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user new file mode 100644 index 0000000..1f5ec64 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user @@ -0,0 +1,562 @@ + + + + + + EnvironmentId + {c08df58c-84a7-4965-bca6-e98789474efa} + + + ProjectExplorer.Project.ActiveTarget + 0 + + + ProjectExplorer.Project.EditorSettings + + true + false + true + + Cpp + + CppGlobal + + + + QmlJS + + QmlJSGlobal + + + 2 + UTF-8 + false + 4 + false + 80 + true + true + 1 + true + false + 0 + true + true + 0 + 8 + true + 1 + true + true + true + false + + + + ProjectExplorer.Project.PluginSettings + + + -fno-delayed-template-parsing + + true + + + + ProjectExplorer.Project.Target.0 + + Desktop Qt 5.14.2 MinGW 64-bit + Desktop Qt 5.14.2 MinGW 64-bit + qt.qt5.5142.win64_mingw73_kit + 0 + 0 + 0 + + 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 + 0 + 0 + 0 + + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug + + + true + QtProjectManager.QMakeBuildStep + true + + false + false + false + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Debug + Qt4ProjectManager.Qt4BuildConfiguration + 2 + + + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Release + + + true + QtProjectManager.QMakeBuildStep + false + + false + false + true + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Release + Qt4ProjectManager.Qt4BuildConfiguration + 0 + + + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Profile + + + true + QtProjectManager.QMakeBuildStep + true + + false + true + true + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Profile + Qt4ProjectManager.Qt4BuildConfiguration + 0 + + 3 + + + 0 + Deploy + Deploy + ProjectExplorer.BuildSteps.Deploy + + 1 + ProjectExplorer.DefaultDeployConfiguration + + 1 + + + dwarf + + cpu-cycles + + + 250 + + -e + cpu-cycles + --call-graph + dwarf,4096 + -F + 250 + + -F + true + 4096 + false + false + 1000 + + true + + false + false + false + false + true + 0.01 + 10 + true + kcachegrind + 1 + 25 + + 1 + true + false + true + valgrind + + 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + + 2 + + Qt4ProjectManager.Qt4RunConfiguration:D:/Auto_verification_scheme/AutoVerScheme/AutoVerScheme.pro + D:/Auto_verification_scheme/AutoVerScheme/AutoVerScheme.pro + + false + + false + true + true + false + false + true + + + + 1 + + + + ProjectExplorer.Project.TargetCount + 2 + + + ProjectExplorer.Project.Updater.FileVersion + 22 + + + Version + 22 + + diff --git a/softwareDirectory/AutoVerScheme/indexwindow.cpp b/softwareDirectory/AutoVerScheme/indexwindow.cpp new file mode 100644 index 0000000..3e52c7b --- /dev/null +++ b/softwareDirectory/AutoVerScheme/indexwindow.cpp @@ -0,0 +1,55 @@ +#include "indexwindow.h" +#include "ui_indexwindow.h" +#include "QFile" +#include "QTextStream" + +IndexWindow::IndexWindow(QWidget *parent) : + QMainWindow(parent), + ui(new Ui::IndexWindow) +{ + ui->setupUi(this); + this->initForm(); +} + +IndexWindow::~IndexWindow() +{ + delete ui; +} +void IndexWindow::initForm() +{ + //this->setWindowFlags(Qt::FramelessWindowHint); + //调用样式 + loadStyle(":/qss/Index.css"); + +} + +void IndexWindow::loadStyle(const QString &qssFile) +{ + //加载样式表 + QString qss; + + QFile file(qssFile); + + if (file.open(QFile::ReadOnly)) { + //用QTextStream读取样式文件不用区分文件编码 带bom也行 + QStringList list; + QTextStream in(&file); + //in.setCodec("utf-8"); + while (!in.atEnd()) { + QString line; + in >> line; + list << line; + } + + file.close(); + qss = list.join("\n"); + QString paletteColor = qss.mid(20, 7); + qApp->setPalette(QPalette(paletteColor)); + //用时主要在下面这句 + qApp->setStyleSheet(qss); + } + + +} + + diff --git a/softwareDirectory/AutoVerScheme/indexwindow.h b/softwareDirectory/AutoVerScheme/indexwindow.h new file mode 100644 index 0000000..2aee958 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/indexwindow.h @@ -0,0 +1,26 @@ +#ifndef INDEXWINDOW_H +#define INDEXWINDOW_H + +#include + +namespace Ui { +class IndexWindow; +} + +class IndexWindow : public QMainWindow +{ + Q_OBJECT + +public: + explicit IndexWindow(QWidget *parent = nullptr); + ~IndexWindow(); +private slots: + void initForm(); + void loadStyle(const QString &qssFile); + + +private: + Ui::IndexWindow *ui; +}; + +#endif // INDEXWINDOW_H diff --git a/softwareDirectory/AutoVerScheme/indexwindow.ui b/softwareDirectory/AutoVerScheme/indexwindow.ui new file mode 100644 index 0000000..d7153e0 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/indexwindow.ui @@ -0,0 +1,539 @@ + + + IndexWindow + + + Qt::NonModal + + + + 0 + 0 + 1334 + 789 + + + + + 0 + 0 + + + + MainWindow + + + + + + + 100 + 100 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + 6 + + + QLayout::SetFixedSize + + + 0 + + + 0 + + + + + Qt::Horizontal + + + QSizePolicy::Fixed + + + + 120 + 13 + + + + + + + + + 0 + 0 + + + + + 560 + 0 + + + + Qt::DefaultContextMenu + + + color: white; +font-weight: bold; +font-size: 24pt; + + + + + QFrame::NoFrame + + + QFrame::Plain + + + 自动检定系统 + + + Qt::AutoText + + + false + + + Qt::AlignCenter + + + + + + + Qt::Horizontal + + + QSizePolicy::Fixed + + + + 40 + 13 + + + + + + + + + + Qt::Vertical + + + QSizePolicy::Fixed + + + + 50 + 80 + + + + + + + + + + Qt::Vertical + + + QSizePolicy::Fixed + + + + 20 + 120 + + + + + + + + Qt::Horizontal + + + + 100 + 20 + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + 0 + 0 + + + + + 310 + 190 + + + + OpenHandCursor + + + margin-right: 0px; + + + 信息管理 + + + + 60 + 60 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + Qt::Horizontal + + + + 327 + 20 + + + + + + + + + 0 + 0 + + + + + 490 + 190 + + + + OpenHandCursor + + + + + + 自动核查 + + + + 60 + 60 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + + 0 + 0 + + + + + 490 + 190 + + + + OpenHandCursor + + + + + + 自动检定 + + + + 60 + 60 + + + + false + + + false + + + Qt::ToolButtonTextUnderIcon + + + + + + + + 0 + 0 + + + + + 490 + 190 + + + + OpenHandCursor + + + + + + 核查程序管理 + + + + 60 + 60 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + Qt::Horizontal + + + + 327 + 20 + + + + + + + + + 0 + 0 + + + + + 310 + 190 + + + + OpenHandCursor + + + margin-right: 0px; + + + 数据同步 + + + + 60 + 60 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + Qt::Vertical + + + QSizePolicy::Fixed + + + + 20 + 120 + + + + + + + + Qt::Vertical + + + QSizePolicy::Fixed + + + + 20 + 120 + + + + + + + + + 0 + 0 + + + + + 490 + 190 + + + + OpenHandCursor + + + + + + 检定程序管理 + + + + 60 + 60 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + + + + + + 0 + 0 + + + + + 10 + 10 + + + + color: white; +font-weight: bold; +font-size: 14pt; + + + 欢迎您! 用户: admin + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + Qt::Horizontal + + + QSizePolicy::Fixed + + + + 270 + 20 + + + + + + + + + + + btnConfig + btnData + tbtnMain1 + tbtnMain2 + tbtnMain3 + tbtnConfig1 + tbtnConfig2 + tbtnConfig3 + tbtnConfig4 + tbtnConfig5 + tbtnConfig6 + btnMain + btnHelp + btnExit + + + + diff --git a/softwareDirectory/AutoVerScheme/loginwindow.cpp b/softwareDirectory/AutoVerScheme/loginwindow.cpp new file mode 100644 index 0000000..155988a --- /dev/null +++ b/softwareDirectory/AutoVerScheme/loginwindow.cpp @@ -0,0 +1,68 @@ +#include "loginwindow.h" +#include "ui_loginwindow.h" +#include +#include +#include + +#include "indexwindow.h" + +loginWindow::loginWindow(QWidget *parent): QMainWindow(parent), ui(new Ui::loginWindow) +{ + ui->setupUi(this); + this->initForm(); + ui->label->styleSheet(); + +} + +loginWindow::~loginWindow() +{ + delete ui; +} +void loginWindow::initForm() +{ + //this->setWindowFlags(Qt::FramelessWindowHint); + //调用样式 + loadStyle(":/qss/login.css"); +} + +void loginWindow::loadStyle(const QString &qssFile) +{ + //加载样式表 + QString qss; + + QFile file(qssFile); + + if (file.open(QFile::ReadOnly)) { + //用QTextStream读取样式文件不用区分文件编码 带bom也行 + QStringList list; + QTextStream in(&file); + //in.setCodec("utf-8"); + while (!in.atEnd()) { + QString line; + in >> line; + list << line; + } + + file.close(); + qss = list.join("\n"); + QString paletteColor = qss.mid(20, 7); + qApp->setPalette(QPalette(paletteColor)); + //用时主要在下面这句 + qApp->setStyleSheet(qss); + } + + +} + + +void loginWindow::on_Button_login_clicked() +{ + QMessageBox::information(this, "提示", "登录成功!"); + //查询数据库内是否有账号 + IndexWindow *indexWindow = new IndexWindow; + indexWindow->setWindowState(Qt::WindowMaximized); + indexWindow->show(); + this->close(); + +} + diff --git a/softwareDirectory/AutoVerScheme/loginwindow.h b/softwareDirectory/AutoVerScheme/loginwindow.h new file mode 100644 index 0000000..2695bc3 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/loginwindow.h @@ -0,0 +1,31 @@ +#ifndef MAINWINDOW_H +#define MAINWINDOW_H + +#include +#include + + + +namespace Ui { +class loginWindow; +} + +class loginWindow : public QMainWindow +{ + Q_OBJECT + +public: + explicit loginWindow(QWidget *parent = 0); + ~loginWindow(); +private slots: + void initForm(); + void loadStyle(const QString &qssFile); + void on_Button_login_clicked(); + + +private: + Ui::loginWindow *ui; +private: + QSqlQuery query; +}; +#endif // MAINWINDOW_H diff --git a/softwareDirectory/AutoVerScheme/loginwindow.ui b/softwareDirectory/AutoVerScheme/loginwindow.ui new file mode 100644 index 0000000..ca04751 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/loginwindow.ui @@ -0,0 +1,234 @@ + + + loginWindow + + + + 0 + 0 + 954 + 603 + + + + MainWindow + + + background-color: rgb(255, 255, 255) + + + + + + 110 + 110 + 271 + 231 + + + + background-image: url(:/image/login/u9.png); +background-repeat: no-repeat; background-position: center; +background-color: transparent; + + + + + + + + + 0 + 10 + 491 + 601 + + + + background-image: url(:/image/login/u2.png); +background-repeat: no-repeat; +background-color: transparent; +background-repeat: no-repeat; +background-position: center; +background-size: 100%; + + + + + + + + + 5 + 10 + 491 + 569 + + + + background-image: url(:/image/login/u0.png); +background-repeat: no-repeat; background-position: center; + + + + + + 170 + 350 + 241 + 51 + + + + background-color: transparent; + + + Metrology + + + + + + 490 + 10 + 471 + 571 + + + + + + + 610 + 70 + 271 + 61 + + + + 自动检定软件 + + + + + + 540 + 200 + 61 + 61 + + + + + + + + + + 490 + 10 + 461 + 571 + + + + + + + 540 + 290 + 61 + 61 + + + + + + + + + + 540 + 430 + 341 + 81 + + + + OpenHandCursor + + + + + + 登 录 + + + + + + 610 + 210 + 221 + 41 + + + + 请输入账号 + + + + + + 610 + 300 + 221 + 41 + + + + 请输入账号 + + + + + + 507 + 1 + 72 + 16 + + + + + + + label_4 + graphicsView + label_2 + label_3 + graphicsView_2 + textBrowser + lab_title + textBrowser_2 + textBrowser_3 + Button_login + textEdit_acc + textEdit_pass + label + + + + + 0 + 0 + 954 + 25 + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/main.cpp b/softwareDirectory/AutoVerScheme/main.cpp new file mode 100644 index 0000000..16b6d3f --- /dev/null +++ b/softwareDirectory/AutoVerScheme/main.cpp @@ -0,0 +1,23 @@ +#include "loginwindow.h" +#include "mainwindow.h" +#include +#include "indexWindow.h" +#include "testview.h" + +int main(int argc, char *argv[]) +{ + QApplication a(argc, argv); + // 加载外部的CSS文件 + a.setStyleSheet("file:///path/to/styles.css"); + //设置字体 + QFont font; + font.setFamily("Microsoft Yahei"); + font.setPixelSize(13); + a.setFont(font); + + //TestView s; + //s.show(); + loginWindow w; + w.show(); + return a.exec(); +} diff --git a/softwareDirectory/AutoVerScheme/mainwindow.cpp b/softwareDirectory/AutoVerScheme/mainwindow.cpp new file mode 100644 index 0000000..12d07c0 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/mainwindow.cpp @@ -0,0 +1,14 @@ +#include "mainwindow.h" +#include "ui_mainwindow.h" + +MainWindow::MainWindow(QWidget *parent) : + QMainWindow(parent), + ui(new Ui::MainWindow) +{ + ui->setupUi(this); +} + +MainWindow::~MainWindow() +{ + delete ui; +} diff --git a/softwareDirectory/AutoVerScheme/mainwindow.h b/softwareDirectory/AutoVerScheme/mainwindow.h new file mode 100644 index 0000000..40fd472 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/mainwindow.h @@ -0,0 +1,22 @@ +#ifndef MAINWINDOW_H +#define MAINWINDOW_H + +#include + +namespace Ui { +class MainWindow; +} + +class MainWindow : public QMainWindow +{ + Q_OBJECT + +public: + explicit MainWindow(QWidget *parent = nullptr); + ~MainWindow(); + +private: + Ui::MainWindow *ui; +}; + +#endif // MAINWINDOW_H diff --git a/softwareDirectory/AutoVerScheme/mainwindow.ui b/softwareDirectory/AutoVerScheme/mainwindow.ui new file mode 100644 index 0000000..dd4f1c8 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/mainwindow.ui @@ -0,0 +1,24 @@ + + + + + MainWindow + + + + 0 + 0 + 800 + 600 + + + + MainWindow + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u101.png b/softwareDirectory/AutoVerScheme/res/image/Index/u101.png new file mode 100644 index 0000000..9e371e3 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u101.png Binary files differ diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u102.png b/softwareDirectory/AutoVerScheme/res/image/Index/u102.png new file mode 100644 index 0000000..b288067 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u102.png Binary files differ diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u15.png b/softwareDirectory/AutoVerScheme/res/image/Index/u15.png new file mode 100644 index 0000000..7e699e6 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u15.png Binary files differ diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u17.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u17.svg new file mode 100644 index 0000000..acc0502 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u17.svg @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u18.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u18.svg new file mode 100644 index 0000000..6a00a10 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u18.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u19.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u19.svg new file mode 100644 index 0000000..42dea06 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u19.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u20.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u20.svg new file mode 100644 index 0000000..7426e62 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u20.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u21.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u21.svg new file mode 100644 index 0000000..cba8469 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u21.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u22.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u22.svg new file mode 100644 index 0000000..78843a0 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u22.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u23.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u23.svg new file mode 100644 index 0000000..c586b65 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u23.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u24.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u24.svg new file mode 100644 index 0000000..066e006 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u24.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u26.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u26.svg new file mode 100644 index 0000000..1834de5 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u26.svg @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u26_mouseOver.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u26_mouseOver.svg new file mode 100644 index 0000000..1420ba1 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u26_mouseOver.svg @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u33.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u33.svg new file mode 100644 index 0000000..e932d0a --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u33.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u34.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u34.svg new file mode 100644 index 0000000..0ab265b --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u34.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u35.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u35.svg new file mode 100644 index 0000000..7748314 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u35.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/login/u0.png b/softwareDirectory/AutoVerScheme/res/image/login/u0.png new file mode 100644 index 0000000..03d764f --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/login/u0.png Binary files differ diff --git a/softwareDirectory/AutoVerScheme/res/image/login/u2.png b/softwareDirectory/AutoVerScheme/res/image/login/u2.png new file mode 100644 index 0000000..9d8fed7 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/login/u2.png Binary files differ diff --git a/softwareDirectory/AutoVerScheme/res/image/login/u2.svg b/softwareDirectory/AutoVerScheme/res/image/login/u2.svg new file mode 100644 index 0000000..fc1bc92 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/login/u2.svg @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/login/u3.svg b/softwareDirectory/AutoVerScheme/res/image/login/u3.svg new file mode 100644 index 0000000..9d0f6ae --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/login/u3.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro new file mode 100644 index 0000000..5b8f852 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro @@ -0,0 +1,48 @@ +QT += core gui +QT += sql +greaterThan(QT_MAJOR_VERSION, 4): QT += widgets + +CONFIG += c++11 + +# The following define makes your compiler emit warnings if you use +# any Qt feature that has been marked deprecated (the exact warnings +# depend on your compiler). Please consult the documentation of the +# deprecated API in order to know how to port your code away from it. +DEFINES += QT_DEPRECATED_WARNINGS + +# You can also make your code fail to compile if it uses deprecated APIs. +# In order to do so, uncomment the following line. +# You can also select to disable deprecated APIs only up to a certain version of Qt. +#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 + +SOURCES += \ + indexwindow.cpp \ + loginwindow.cpp \ + main.cpp \ + mainwindow.cpp \ + testview.cpp + +HEADERS += \ + indexwindow.h \ + loginwindow.h \ + mainwindow.h \ + testview.h + +FORMS += \ + indexwindow.ui \ + loginwindow.ui \ + mainwindow.ui \ + testview.ui + +# Default rules for deployment. +qnx: target.path = /tmp/$${TARGET}/bin +else: unix:!android: target.path = /opt/$${TARGET}/bin +!isEmpty(target.path): INSTALLS += target + +RESOURCES += \ + res/qss.qrc \ + res/res.qrc + +DISTFILES += \ + res/image/u2.png + diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user new file mode 100644 index 0000000..1f5ec64 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user @@ -0,0 +1,562 @@ + + + + + + EnvironmentId + {c08df58c-84a7-4965-bca6-e98789474efa} + + + ProjectExplorer.Project.ActiveTarget + 0 + + + ProjectExplorer.Project.EditorSettings + + true + false + true + + Cpp + + CppGlobal + + + + QmlJS + + QmlJSGlobal + + + 2 + UTF-8 + false + 4 + false + 80 + true + true + 1 + true + false + 0 + true + true + 0 + 8 + true + 1 + true + true + true + false + + + + ProjectExplorer.Project.PluginSettings + + + -fno-delayed-template-parsing + + true + + + + ProjectExplorer.Project.Target.0 + + Desktop Qt 5.14.2 MinGW 64-bit + Desktop Qt 5.14.2 MinGW 64-bit + qt.qt5.5142.win64_mingw73_kit + 0 + 0 + 0 + + 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 + 0 + 0 + 0 + + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug + + + true + QtProjectManager.QMakeBuildStep + true + + false + false + false + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Debug + Qt4ProjectManager.Qt4BuildConfiguration + 2 + + + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Release + + + true + QtProjectManager.QMakeBuildStep + false + + false + false + true + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Release + Qt4ProjectManager.Qt4BuildConfiguration + 0 + + + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Profile + + + true + QtProjectManager.QMakeBuildStep + true + + false + true + true + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Profile + Qt4ProjectManager.Qt4BuildConfiguration + 0 + + 3 + + + 0 + Deploy + Deploy + ProjectExplorer.BuildSteps.Deploy + + 1 + ProjectExplorer.DefaultDeployConfiguration + + 1 + + + dwarf + + cpu-cycles + + + 250 + + -e + cpu-cycles + --call-graph + dwarf,4096 + -F + 250 + + -F + true + 4096 + false + false + 1000 + + true + + false + false + false + false + true + 0.01 + 10 + true + kcachegrind + 1 + 25 + + 1 + true + false + true + valgrind + + 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + + 2 + + Qt4ProjectManager.Qt4RunConfiguration:D:/Auto_verification_scheme/AutoVerScheme/AutoVerScheme.pro + D:/Auto_verification_scheme/AutoVerScheme/AutoVerScheme.pro + + false + + false + true + true + false + false + true + + + + 1 + + + + ProjectExplorer.Project.TargetCount + 2 + + + ProjectExplorer.Project.Updater.FileVersion + 22 + + + Version + 22 + + diff --git a/softwareDirectory/AutoVerScheme/indexwindow.cpp b/softwareDirectory/AutoVerScheme/indexwindow.cpp new file mode 100644 index 0000000..3e52c7b --- /dev/null +++ b/softwareDirectory/AutoVerScheme/indexwindow.cpp @@ -0,0 +1,55 @@ +#include "indexwindow.h" +#include "ui_indexwindow.h" +#include "QFile" +#include "QTextStream" + +IndexWindow::IndexWindow(QWidget *parent) : + QMainWindow(parent), + ui(new Ui::IndexWindow) +{ + ui->setupUi(this); + this->initForm(); +} + +IndexWindow::~IndexWindow() +{ + delete ui; +} +void IndexWindow::initForm() +{ + //this->setWindowFlags(Qt::FramelessWindowHint); + //调用样式 + loadStyle(":/qss/Index.css"); + +} + +void IndexWindow::loadStyle(const QString &qssFile) +{ + //加载样式表 + QString qss; + + QFile file(qssFile); + + if (file.open(QFile::ReadOnly)) { + //用QTextStream读取样式文件不用区分文件编码 带bom也行 + QStringList list; + QTextStream in(&file); + //in.setCodec("utf-8"); + while (!in.atEnd()) { + QString line; + in >> line; + list << line; + } + + file.close(); + qss = list.join("\n"); + QString paletteColor = qss.mid(20, 7); + qApp->setPalette(QPalette(paletteColor)); + //用时主要在下面这句 + qApp->setStyleSheet(qss); + } + + +} + + diff --git a/softwareDirectory/AutoVerScheme/indexwindow.h b/softwareDirectory/AutoVerScheme/indexwindow.h new file mode 100644 index 0000000..2aee958 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/indexwindow.h @@ -0,0 +1,26 @@ +#ifndef INDEXWINDOW_H +#define INDEXWINDOW_H + +#include + +namespace Ui { +class IndexWindow; +} + +class IndexWindow : public QMainWindow +{ + Q_OBJECT + +public: + explicit IndexWindow(QWidget *parent = nullptr); + ~IndexWindow(); +private slots: + void initForm(); + void loadStyle(const QString &qssFile); + + +private: + Ui::IndexWindow *ui; +}; + +#endif // INDEXWINDOW_H diff --git a/softwareDirectory/AutoVerScheme/indexwindow.ui b/softwareDirectory/AutoVerScheme/indexwindow.ui new file mode 100644 index 0000000..d7153e0 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/indexwindow.ui @@ -0,0 +1,539 @@ + + + IndexWindow + + + Qt::NonModal + + + + 0 + 0 + 1334 + 789 + + + + + 0 + 0 + + + + MainWindow + + + + + + + 100 + 100 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + 6 + + + QLayout::SetFixedSize + + + 0 + + + 0 + + + + + Qt::Horizontal + + + QSizePolicy::Fixed + + + + 120 + 13 + + + + + + + + + 0 + 0 + + + + + 560 + 0 + + + + Qt::DefaultContextMenu + + + color: white; +font-weight: bold; +font-size: 24pt; + + + + + QFrame::NoFrame + + + QFrame::Plain + + + 自动检定系统 + + + Qt::AutoText + + + false + + + Qt::AlignCenter + + + + + + + Qt::Horizontal + + + QSizePolicy::Fixed + + + + 40 + 13 + + + + + + + + + + Qt::Vertical + + + QSizePolicy::Fixed + + + + 50 + 80 + + + + + + + + + + Qt::Vertical + + + QSizePolicy::Fixed + + + + 20 + 120 + + + + + + + + Qt::Horizontal + + + + 100 + 20 + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + 0 + 0 + + + + + 310 + 190 + + + + OpenHandCursor + + + margin-right: 0px; + + + 信息管理 + + + + 60 + 60 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + Qt::Horizontal + + + + 327 + 20 + + + + + + + + + 0 + 0 + + + + + 490 + 190 + + + + OpenHandCursor + + + + + + 自动核查 + + + + 60 + 60 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + + 0 + 0 + + + + + 490 + 190 + + + + OpenHandCursor + + + + + + 自动检定 + + + + 60 + 60 + + + + false + + + false + + + Qt::ToolButtonTextUnderIcon + + + + + + + + 0 + 0 + + + + + 490 + 190 + + + + OpenHandCursor + + + + + + 核查程序管理 + + + + 60 + 60 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + Qt::Horizontal + + + + 327 + 20 + + + + + + + + + 0 + 0 + + + + + 310 + 190 + + + + OpenHandCursor + + + margin-right: 0px; + + + 数据同步 + + + + 60 + 60 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + Qt::Vertical + + + QSizePolicy::Fixed + + + + 20 + 120 + + + + + + + + Qt::Vertical + + + QSizePolicy::Fixed + + + + 20 + 120 + + + + + + + + + 0 + 0 + + + + + 490 + 190 + + + + OpenHandCursor + + + + + + 检定程序管理 + + + + 60 + 60 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + + + + + + 0 + 0 + + + + + 10 + 10 + + + + color: white; +font-weight: bold; +font-size: 14pt; + + + 欢迎您! 用户: admin + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + Qt::Horizontal + + + QSizePolicy::Fixed + + + + 270 + 20 + + + + + + + + + + + btnConfig + btnData + tbtnMain1 + tbtnMain2 + tbtnMain3 + tbtnConfig1 + tbtnConfig2 + tbtnConfig3 + tbtnConfig4 + tbtnConfig5 + tbtnConfig6 + btnMain + btnHelp + btnExit + + + + diff --git a/softwareDirectory/AutoVerScheme/loginwindow.cpp b/softwareDirectory/AutoVerScheme/loginwindow.cpp new file mode 100644 index 0000000..155988a --- /dev/null +++ b/softwareDirectory/AutoVerScheme/loginwindow.cpp @@ -0,0 +1,68 @@ +#include "loginwindow.h" +#include "ui_loginwindow.h" +#include +#include +#include + +#include "indexwindow.h" + +loginWindow::loginWindow(QWidget *parent): QMainWindow(parent), ui(new Ui::loginWindow) +{ + ui->setupUi(this); + this->initForm(); + ui->label->styleSheet(); + +} + +loginWindow::~loginWindow() +{ + delete ui; +} +void loginWindow::initForm() +{ + //this->setWindowFlags(Qt::FramelessWindowHint); + //调用样式 + loadStyle(":/qss/login.css"); +} + +void loginWindow::loadStyle(const QString &qssFile) +{ + //加载样式表 + QString qss; + + QFile file(qssFile); + + if (file.open(QFile::ReadOnly)) { + //用QTextStream读取样式文件不用区分文件编码 带bom也行 + QStringList list; + QTextStream in(&file); + //in.setCodec("utf-8"); + while (!in.atEnd()) { + QString line; + in >> line; + list << line; + } + + file.close(); + qss = list.join("\n"); + QString paletteColor = qss.mid(20, 7); + qApp->setPalette(QPalette(paletteColor)); + //用时主要在下面这句 + qApp->setStyleSheet(qss); + } + + +} + + +void loginWindow::on_Button_login_clicked() +{ + QMessageBox::information(this, "提示", "登录成功!"); + //查询数据库内是否有账号 + IndexWindow *indexWindow = new IndexWindow; + indexWindow->setWindowState(Qt::WindowMaximized); + indexWindow->show(); + this->close(); + +} + diff --git a/softwareDirectory/AutoVerScheme/loginwindow.h b/softwareDirectory/AutoVerScheme/loginwindow.h new file mode 100644 index 0000000..2695bc3 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/loginwindow.h @@ -0,0 +1,31 @@ +#ifndef MAINWINDOW_H +#define MAINWINDOW_H + +#include +#include + + + +namespace Ui { +class loginWindow; +} + +class loginWindow : public QMainWindow +{ + Q_OBJECT + +public: + explicit loginWindow(QWidget *parent = 0); + ~loginWindow(); +private slots: + void initForm(); + void loadStyle(const QString &qssFile); + void on_Button_login_clicked(); + + +private: + Ui::loginWindow *ui; +private: + QSqlQuery query; +}; +#endif // MAINWINDOW_H diff --git a/softwareDirectory/AutoVerScheme/loginwindow.ui b/softwareDirectory/AutoVerScheme/loginwindow.ui new file mode 100644 index 0000000..ca04751 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/loginwindow.ui @@ -0,0 +1,234 @@ + + + loginWindow + + + + 0 + 0 + 954 + 603 + + + + MainWindow + + + background-color: rgb(255, 255, 255) + + + + + + 110 + 110 + 271 + 231 + + + + background-image: url(:/image/login/u9.png); +background-repeat: no-repeat; background-position: center; +background-color: transparent; + + + + + + + + + 0 + 10 + 491 + 601 + + + + background-image: url(:/image/login/u2.png); +background-repeat: no-repeat; +background-color: transparent; +background-repeat: no-repeat; +background-position: center; +background-size: 100%; + + + + + + + + + 5 + 10 + 491 + 569 + + + + background-image: url(:/image/login/u0.png); +background-repeat: no-repeat; background-position: center; + + + + + + 170 + 350 + 241 + 51 + + + + background-color: transparent; + + + Metrology + + + + + + 490 + 10 + 471 + 571 + + + + + + + 610 + 70 + 271 + 61 + + + + 自动检定软件 + + + + + + 540 + 200 + 61 + 61 + + + + + + + + + + 490 + 10 + 461 + 571 + + + + + + + 540 + 290 + 61 + 61 + + + + + + + + + + 540 + 430 + 341 + 81 + + + + OpenHandCursor + + + + + + 登 录 + + + + + + 610 + 210 + 221 + 41 + + + + 请输入账号 + + + + + + 610 + 300 + 221 + 41 + + + + 请输入账号 + + + + + + 507 + 1 + 72 + 16 + + + + + + + label_4 + graphicsView + label_2 + label_3 + graphicsView_2 + textBrowser + lab_title + textBrowser_2 + textBrowser_3 + Button_login + textEdit_acc + textEdit_pass + label + + + + + 0 + 0 + 954 + 25 + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/main.cpp b/softwareDirectory/AutoVerScheme/main.cpp new file mode 100644 index 0000000..16b6d3f --- /dev/null +++ b/softwareDirectory/AutoVerScheme/main.cpp @@ -0,0 +1,23 @@ +#include "loginwindow.h" +#include "mainwindow.h" +#include +#include "indexWindow.h" +#include "testview.h" + +int main(int argc, char *argv[]) +{ + QApplication a(argc, argv); + // 加载外部的CSS文件 + a.setStyleSheet("file:///path/to/styles.css"); + //设置字体 + QFont font; + font.setFamily("Microsoft Yahei"); + font.setPixelSize(13); + a.setFont(font); + + //TestView s; + //s.show(); + loginWindow w; + w.show(); + return a.exec(); +} diff --git a/softwareDirectory/AutoVerScheme/mainwindow.cpp b/softwareDirectory/AutoVerScheme/mainwindow.cpp new file mode 100644 index 0000000..12d07c0 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/mainwindow.cpp @@ -0,0 +1,14 @@ +#include "mainwindow.h" +#include "ui_mainwindow.h" + +MainWindow::MainWindow(QWidget *parent) : + QMainWindow(parent), + ui(new Ui::MainWindow) +{ + ui->setupUi(this); +} + +MainWindow::~MainWindow() +{ + delete ui; +} diff --git a/softwareDirectory/AutoVerScheme/mainwindow.h b/softwareDirectory/AutoVerScheme/mainwindow.h new file mode 100644 index 0000000..40fd472 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/mainwindow.h @@ -0,0 +1,22 @@ +#ifndef MAINWINDOW_H +#define MAINWINDOW_H + +#include + +namespace Ui { +class MainWindow; +} + +class MainWindow : public QMainWindow +{ + Q_OBJECT + +public: + explicit MainWindow(QWidget *parent = nullptr); + ~MainWindow(); + +private: + Ui::MainWindow *ui; +}; + +#endif // MAINWINDOW_H diff --git a/softwareDirectory/AutoVerScheme/mainwindow.ui b/softwareDirectory/AutoVerScheme/mainwindow.ui new file mode 100644 index 0000000..dd4f1c8 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/mainwindow.ui @@ -0,0 +1,24 @@ + + + + + MainWindow + + + + 0 + 0 + 800 + 600 + + + + MainWindow + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u101.png b/softwareDirectory/AutoVerScheme/res/image/Index/u101.png new file mode 100644 index 0000000..9e371e3 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u101.png Binary files differ diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u102.png b/softwareDirectory/AutoVerScheme/res/image/Index/u102.png new file mode 100644 index 0000000..b288067 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u102.png Binary files differ diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u15.png b/softwareDirectory/AutoVerScheme/res/image/Index/u15.png new file mode 100644 index 0000000..7e699e6 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u15.png Binary files differ diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u17.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u17.svg new file mode 100644 index 0000000..acc0502 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u17.svg @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u18.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u18.svg new file mode 100644 index 0000000..6a00a10 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u18.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u19.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u19.svg new file mode 100644 index 0000000..42dea06 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u19.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u20.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u20.svg new file mode 100644 index 0000000..7426e62 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u20.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u21.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u21.svg new file mode 100644 index 0000000..cba8469 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u21.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u22.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u22.svg new file mode 100644 index 0000000..78843a0 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u22.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u23.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u23.svg new file mode 100644 index 0000000..c586b65 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u23.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u24.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u24.svg new file mode 100644 index 0000000..066e006 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u24.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u26.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u26.svg new file mode 100644 index 0000000..1834de5 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u26.svg @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u26_mouseOver.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u26_mouseOver.svg new file mode 100644 index 0000000..1420ba1 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u26_mouseOver.svg @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u33.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u33.svg new file mode 100644 index 0000000..e932d0a --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u33.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u34.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u34.svg new file mode 100644 index 0000000..0ab265b --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u34.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u35.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u35.svg new file mode 100644 index 0000000..7748314 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u35.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/login/u0.png b/softwareDirectory/AutoVerScheme/res/image/login/u0.png new file mode 100644 index 0000000..03d764f --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/login/u0.png Binary files differ diff --git a/softwareDirectory/AutoVerScheme/res/image/login/u2.png b/softwareDirectory/AutoVerScheme/res/image/login/u2.png new file mode 100644 index 0000000..9d8fed7 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/login/u2.png Binary files differ diff --git a/softwareDirectory/AutoVerScheme/res/image/login/u2.svg b/softwareDirectory/AutoVerScheme/res/image/login/u2.svg new file mode 100644 index 0000000..fc1bc92 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/login/u2.svg @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/login/u3.svg b/softwareDirectory/AutoVerScheme/res/image/login/u3.svg new file mode 100644 index 0000000..9d0f6ae --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/login/u3.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/login/u5.png b/softwareDirectory/AutoVerScheme/res/image/login/u5.png new file mode 100644 index 0000000..9b0e06f --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/login/u5.png Binary files differ diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro new file mode 100644 index 0000000..5b8f852 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro @@ -0,0 +1,48 @@ +QT += core gui +QT += sql +greaterThan(QT_MAJOR_VERSION, 4): QT += widgets + +CONFIG += c++11 + +# The following define makes your compiler emit warnings if you use +# any Qt feature that has been marked deprecated (the exact warnings +# depend on your compiler). Please consult the documentation of the +# deprecated API in order to know how to port your code away from it. +DEFINES += QT_DEPRECATED_WARNINGS + +# You can also make your code fail to compile if it uses deprecated APIs. +# In order to do so, uncomment the following line. +# You can also select to disable deprecated APIs only up to a certain version of Qt. +#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 + +SOURCES += \ + indexwindow.cpp \ + loginwindow.cpp \ + main.cpp \ + mainwindow.cpp \ + testview.cpp + +HEADERS += \ + indexwindow.h \ + loginwindow.h \ + mainwindow.h \ + testview.h + +FORMS += \ + indexwindow.ui \ + loginwindow.ui \ + mainwindow.ui \ + testview.ui + +# Default rules for deployment. +qnx: target.path = /tmp/$${TARGET}/bin +else: unix:!android: target.path = /opt/$${TARGET}/bin +!isEmpty(target.path): INSTALLS += target + +RESOURCES += \ + res/qss.qrc \ + res/res.qrc + +DISTFILES += \ + res/image/u2.png + diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user new file mode 100644 index 0000000..1f5ec64 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user @@ -0,0 +1,562 @@ + + + + + + EnvironmentId + {c08df58c-84a7-4965-bca6-e98789474efa} + + + ProjectExplorer.Project.ActiveTarget + 0 + + + ProjectExplorer.Project.EditorSettings + + true + false + true + + Cpp + + CppGlobal + + + + QmlJS + + QmlJSGlobal + + + 2 + UTF-8 + false + 4 + false + 80 + true + true + 1 + true + false + 0 + true + true + 0 + 8 + true + 1 + true + true + true + false + + + + ProjectExplorer.Project.PluginSettings + + + -fno-delayed-template-parsing + + true + + + + ProjectExplorer.Project.Target.0 + + Desktop Qt 5.14.2 MinGW 64-bit + Desktop Qt 5.14.2 MinGW 64-bit + qt.qt5.5142.win64_mingw73_kit + 0 + 0 + 0 + + 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 + 0 + 0 + 0 + + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug + + + true + QtProjectManager.QMakeBuildStep + true + + false + false + false + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Debug + Qt4ProjectManager.Qt4BuildConfiguration + 2 + + + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Release + + + true + QtProjectManager.QMakeBuildStep + false + + false + false + true + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Release + Qt4ProjectManager.Qt4BuildConfiguration + 0 + + + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Profile + + + true + QtProjectManager.QMakeBuildStep + true + + false + true + true + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Profile + Qt4ProjectManager.Qt4BuildConfiguration + 0 + + 3 + + + 0 + Deploy + Deploy + ProjectExplorer.BuildSteps.Deploy + + 1 + ProjectExplorer.DefaultDeployConfiguration + + 1 + + + dwarf + + cpu-cycles + + + 250 + + -e + cpu-cycles + --call-graph + dwarf,4096 + -F + 250 + + -F + true + 4096 + false + false + 1000 + + true + + false + false + false + false + true + 0.01 + 10 + true + kcachegrind + 1 + 25 + + 1 + true + false + true + valgrind + + 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + + 2 + + Qt4ProjectManager.Qt4RunConfiguration:D:/Auto_verification_scheme/AutoVerScheme/AutoVerScheme.pro + D:/Auto_verification_scheme/AutoVerScheme/AutoVerScheme.pro + + false + + false + true + true + false + false + true + + + + 1 + + + + ProjectExplorer.Project.TargetCount + 2 + + + ProjectExplorer.Project.Updater.FileVersion + 22 + + + Version + 22 + + diff --git a/softwareDirectory/AutoVerScheme/indexwindow.cpp b/softwareDirectory/AutoVerScheme/indexwindow.cpp new file mode 100644 index 0000000..3e52c7b --- /dev/null +++ b/softwareDirectory/AutoVerScheme/indexwindow.cpp @@ -0,0 +1,55 @@ +#include "indexwindow.h" +#include "ui_indexwindow.h" +#include "QFile" +#include "QTextStream" + +IndexWindow::IndexWindow(QWidget *parent) : + QMainWindow(parent), + ui(new Ui::IndexWindow) +{ + ui->setupUi(this); + this->initForm(); +} + +IndexWindow::~IndexWindow() +{ + delete ui; +} +void IndexWindow::initForm() +{ + //this->setWindowFlags(Qt::FramelessWindowHint); + //调用样式 + loadStyle(":/qss/Index.css"); + +} + +void IndexWindow::loadStyle(const QString &qssFile) +{ + //加载样式表 + QString qss; + + QFile file(qssFile); + + if (file.open(QFile::ReadOnly)) { + //用QTextStream读取样式文件不用区分文件编码 带bom也行 + QStringList list; + QTextStream in(&file); + //in.setCodec("utf-8"); + while (!in.atEnd()) { + QString line; + in >> line; + list << line; + } + + file.close(); + qss = list.join("\n"); + QString paletteColor = qss.mid(20, 7); + qApp->setPalette(QPalette(paletteColor)); + //用时主要在下面这句 + qApp->setStyleSheet(qss); + } + + +} + + diff --git a/softwareDirectory/AutoVerScheme/indexwindow.h b/softwareDirectory/AutoVerScheme/indexwindow.h new file mode 100644 index 0000000..2aee958 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/indexwindow.h @@ -0,0 +1,26 @@ +#ifndef INDEXWINDOW_H +#define INDEXWINDOW_H + +#include + +namespace Ui { +class IndexWindow; +} + +class IndexWindow : public QMainWindow +{ + Q_OBJECT + +public: + explicit IndexWindow(QWidget *parent = nullptr); + ~IndexWindow(); +private slots: + void initForm(); + void loadStyle(const QString &qssFile); + + +private: + Ui::IndexWindow *ui; +}; + +#endif // INDEXWINDOW_H diff --git a/softwareDirectory/AutoVerScheme/indexwindow.ui b/softwareDirectory/AutoVerScheme/indexwindow.ui new file mode 100644 index 0000000..d7153e0 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/indexwindow.ui @@ -0,0 +1,539 @@ + + + IndexWindow + + + Qt::NonModal + + + + 0 + 0 + 1334 + 789 + + + + + 0 + 0 + + + + MainWindow + + + + + + + 100 + 100 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + 6 + + + QLayout::SetFixedSize + + + 0 + + + 0 + + + + + Qt::Horizontal + + + QSizePolicy::Fixed + + + + 120 + 13 + + + + + + + + + 0 + 0 + + + + + 560 + 0 + + + + Qt::DefaultContextMenu + + + color: white; +font-weight: bold; +font-size: 24pt; + + + + + QFrame::NoFrame + + + QFrame::Plain + + + 自动检定系统 + + + Qt::AutoText + + + false + + + Qt::AlignCenter + + + + + + + Qt::Horizontal + + + QSizePolicy::Fixed + + + + 40 + 13 + + + + + + + + + + Qt::Vertical + + + QSizePolicy::Fixed + + + + 50 + 80 + + + + + + + + + + Qt::Vertical + + + QSizePolicy::Fixed + + + + 20 + 120 + + + + + + + + Qt::Horizontal + + + + 100 + 20 + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + 0 + 0 + + + + + 310 + 190 + + + + OpenHandCursor + + + margin-right: 0px; + + + 信息管理 + + + + 60 + 60 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + Qt::Horizontal + + + + 327 + 20 + + + + + + + + + 0 + 0 + + + + + 490 + 190 + + + + OpenHandCursor + + + + + + 自动核查 + + + + 60 + 60 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + + 0 + 0 + + + + + 490 + 190 + + + + OpenHandCursor + + + + + + 自动检定 + + + + 60 + 60 + + + + false + + + false + + + Qt::ToolButtonTextUnderIcon + + + + + + + + 0 + 0 + + + + + 490 + 190 + + + + OpenHandCursor + + + + + + 核查程序管理 + + + + 60 + 60 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + Qt::Horizontal + + + + 327 + 20 + + + + + + + + + 0 + 0 + + + + + 310 + 190 + + + + OpenHandCursor + + + margin-right: 0px; + + + 数据同步 + + + + 60 + 60 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + Qt::Vertical + + + QSizePolicy::Fixed + + + + 20 + 120 + + + + + + + + Qt::Vertical + + + QSizePolicy::Fixed + + + + 20 + 120 + + + + + + + + + 0 + 0 + + + + + 490 + 190 + + + + OpenHandCursor + + + + + + 检定程序管理 + + + + 60 + 60 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + + + + + + 0 + 0 + + + + + 10 + 10 + + + + color: white; +font-weight: bold; +font-size: 14pt; + + + 欢迎您! 用户: admin + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + Qt::Horizontal + + + QSizePolicy::Fixed + + + + 270 + 20 + + + + + + + + + + + btnConfig + btnData + tbtnMain1 + tbtnMain2 + tbtnMain3 + tbtnConfig1 + tbtnConfig2 + tbtnConfig3 + tbtnConfig4 + tbtnConfig5 + tbtnConfig6 + btnMain + btnHelp + btnExit + + + + diff --git a/softwareDirectory/AutoVerScheme/loginwindow.cpp b/softwareDirectory/AutoVerScheme/loginwindow.cpp new file mode 100644 index 0000000..155988a --- /dev/null +++ b/softwareDirectory/AutoVerScheme/loginwindow.cpp @@ -0,0 +1,68 @@ +#include "loginwindow.h" +#include "ui_loginwindow.h" +#include +#include +#include + +#include "indexwindow.h" + +loginWindow::loginWindow(QWidget *parent): QMainWindow(parent), ui(new Ui::loginWindow) +{ + ui->setupUi(this); + this->initForm(); + ui->label->styleSheet(); + +} + +loginWindow::~loginWindow() +{ + delete ui; +} +void loginWindow::initForm() +{ + //this->setWindowFlags(Qt::FramelessWindowHint); + //调用样式 + loadStyle(":/qss/login.css"); +} + +void loginWindow::loadStyle(const QString &qssFile) +{ + //加载样式表 + QString qss; + + QFile file(qssFile); + + if (file.open(QFile::ReadOnly)) { + //用QTextStream读取样式文件不用区分文件编码 带bom也行 + QStringList list; + QTextStream in(&file); + //in.setCodec("utf-8"); + while (!in.atEnd()) { + QString line; + in >> line; + list << line; + } + + file.close(); + qss = list.join("\n"); + QString paletteColor = qss.mid(20, 7); + qApp->setPalette(QPalette(paletteColor)); + //用时主要在下面这句 + qApp->setStyleSheet(qss); + } + + +} + + +void loginWindow::on_Button_login_clicked() +{ + QMessageBox::information(this, "提示", "登录成功!"); + //查询数据库内是否有账号 + IndexWindow *indexWindow = new IndexWindow; + indexWindow->setWindowState(Qt::WindowMaximized); + indexWindow->show(); + this->close(); + +} + diff --git a/softwareDirectory/AutoVerScheme/loginwindow.h b/softwareDirectory/AutoVerScheme/loginwindow.h new file mode 100644 index 0000000..2695bc3 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/loginwindow.h @@ -0,0 +1,31 @@ +#ifndef MAINWINDOW_H +#define MAINWINDOW_H + +#include +#include + + + +namespace Ui { +class loginWindow; +} + +class loginWindow : public QMainWindow +{ + Q_OBJECT + +public: + explicit loginWindow(QWidget *parent = 0); + ~loginWindow(); +private slots: + void initForm(); + void loadStyle(const QString &qssFile); + void on_Button_login_clicked(); + + +private: + Ui::loginWindow *ui; +private: + QSqlQuery query; +}; +#endif // MAINWINDOW_H diff --git a/softwareDirectory/AutoVerScheme/loginwindow.ui b/softwareDirectory/AutoVerScheme/loginwindow.ui new file mode 100644 index 0000000..ca04751 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/loginwindow.ui @@ -0,0 +1,234 @@ + + + loginWindow + + + + 0 + 0 + 954 + 603 + + + + MainWindow + + + background-color: rgb(255, 255, 255) + + + + + + 110 + 110 + 271 + 231 + + + + background-image: url(:/image/login/u9.png); +background-repeat: no-repeat; background-position: center; +background-color: transparent; + + + + + + + + + 0 + 10 + 491 + 601 + + + + background-image: url(:/image/login/u2.png); +background-repeat: no-repeat; +background-color: transparent; +background-repeat: no-repeat; +background-position: center; +background-size: 100%; + + + + + + + + + 5 + 10 + 491 + 569 + + + + background-image: url(:/image/login/u0.png); +background-repeat: no-repeat; background-position: center; + + + + + + 170 + 350 + 241 + 51 + + + + background-color: transparent; + + + Metrology + + + + + + 490 + 10 + 471 + 571 + + + + + + + 610 + 70 + 271 + 61 + + + + 自动检定软件 + + + + + + 540 + 200 + 61 + 61 + + + + + + + + + + 490 + 10 + 461 + 571 + + + + + + + 540 + 290 + 61 + 61 + + + + + + + + + + 540 + 430 + 341 + 81 + + + + OpenHandCursor + + + + + + 登 录 + + + + + + 610 + 210 + 221 + 41 + + + + 请输入账号 + + + + + + 610 + 300 + 221 + 41 + + + + 请输入账号 + + + + + + 507 + 1 + 72 + 16 + + + + + + + label_4 + graphicsView + label_2 + label_3 + graphicsView_2 + textBrowser + lab_title + textBrowser_2 + textBrowser_3 + Button_login + textEdit_acc + textEdit_pass + label + + + + + 0 + 0 + 954 + 25 + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/main.cpp b/softwareDirectory/AutoVerScheme/main.cpp new file mode 100644 index 0000000..16b6d3f --- /dev/null +++ b/softwareDirectory/AutoVerScheme/main.cpp @@ -0,0 +1,23 @@ +#include "loginwindow.h" +#include "mainwindow.h" +#include +#include "indexWindow.h" +#include "testview.h" + +int main(int argc, char *argv[]) +{ + QApplication a(argc, argv); + // 加载外部的CSS文件 + a.setStyleSheet("file:///path/to/styles.css"); + //设置字体 + QFont font; + font.setFamily("Microsoft Yahei"); + font.setPixelSize(13); + a.setFont(font); + + //TestView s; + //s.show(); + loginWindow w; + w.show(); + return a.exec(); +} diff --git a/softwareDirectory/AutoVerScheme/mainwindow.cpp b/softwareDirectory/AutoVerScheme/mainwindow.cpp new file mode 100644 index 0000000..12d07c0 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/mainwindow.cpp @@ -0,0 +1,14 @@ +#include "mainwindow.h" +#include "ui_mainwindow.h" + +MainWindow::MainWindow(QWidget *parent) : + QMainWindow(parent), + ui(new Ui::MainWindow) +{ + ui->setupUi(this); +} + +MainWindow::~MainWindow() +{ + delete ui; +} diff --git a/softwareDirectory/AutoVerScheme/mainwindow.h b/softwareDirectory/AutoVerScheme/mainwindow.h new file mode 100644 index 0000000..40fd472 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/mainwindow.h @@ -0,0 +1,22 @@ +#ifndef MAINWINDOW_H +#define MAINWINDOW_H + +#include + +namespace Ui { +class MainWindow; +} + +class MainWindow : public QMainWindow +{ + Q_OBJECT + +public: + explicit MainWindow(QWidget *parent = nullptr); + ~MainWindow(); + +private: + Ui::MainWindow *ui; +}; + +#endif // MAINWINDOW_H diff --git a/softwareDirectory/AutoVerScheme/mainwindow.ui b/softwareDirectory/AutoVerScheme/mainwindow.ui new file mode 100644 index 0000000..dd4f1c8 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/mainwindow.ui @@ -0,0 +1,24 @@ + + + + + MainWindow + + + + 0 + 0 + 800 + 600 + + + + MainWindow + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u101.png b/softwareDirectory/AutoVerScheme/res/image/Index/u101.png new file mode 100644 index 0000000..9e371e3 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u101.png Binary files differ diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u102.png b/softwareDirectory/AutoVerScheme/res/image/Index/u102.png new file mode 100644 index 0000000..b288067 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u102.png Binary files differ diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u15.png b/softwareDirectory/AutoVerScheme/res/image/Index/u15.png new file mode 100644 index 0000000..7e699e6 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u15.png Binary files differ diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u17.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u17.svg new file mode 100644 index 0000000..acc0502 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u17.svg @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u18.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u18.svg new file mode 100644 index 0000000..6a00a10 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u18.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u19.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u19.svg new file mode 100644 index 0000000..42dea06 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u19.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u20.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u20.svg new file mode 100644 index 0000000..7426e62 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u20.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u21.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u21.svg new file mode 100644 index 0000000..cba8469 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u21.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u22.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u22.svg new file mode 100644 index 0000000..78843a0 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u22.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u23.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u23.svg new file mode 100644 index 0000000..c586b65 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u23.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u24.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u24.svg new file mode 100644 index 0000000..066e006 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u24.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u26.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u26.svg new file mode 100644 index 0000000..1834de5 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u26.svg @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u26_mouseOver.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u26_mouseOver.svg new file mode 100644 index 0000000..1420ba1 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u26_mouseOver.svg @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u33.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u33.svg new file mode 100644 index 0000000..e932d0a --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u33.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u34.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u34.svg new file mode 100644 index 0000000..0ab265b --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u34.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u35.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u35.svg new file mode 100644 index 0000000..7748314 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u35.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/login/u0.png b/softwareDirectory/AutoVerScheme/res/image/login/u0.png new file mode 100644 index 0000000..03d764f --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/login/u0.png Binary files differ diff --git a/softwareDirectory/AutoVerScheme/res/image/login/u2.png b/softwareDirectory/AutoVerScheme/res/image/login/u2.png new file mode 100644 index 0000000..9d8fed7 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/login/u2.png Binary files differ diff --git a/softwareDirectory/AutoVerScheme/res/image/login/u2.svg b/softwareDirectory/AutoVerScheme/res/image/login/u2.svg new file mode 100644 index 0000000..fc1bc92 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/login/u2.svg @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/login/u3.svg b/softwareDirectory/AutoVerScheme/res/image/login/u3.svg new file mode 100644 index 0000000..9d0f6ae --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/login/u3.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/login/u5.png b/softwareDirectory/AutoVerScheme/res/image/login/u5.png new file mode 100644 index 0000000..9b0e06f --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/login/u5.png Binary files differ diff --git a/softwareDirectory/AutoVerScheme/res/image/login/u6.png b/softwareDirectory/AutoVerScheme/res/image/login/u6.png new file mode 100644 index 0000000..de43ce9 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/login/u6.png Binary files differ diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro new file mode 100644 index 0000000..5b8f852 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro @@ -0,0 +1,48 @@ +QT += core gui +QT += sql +greaterThan(QT_MAJOR_VERSION, 4): QT += widgets + +CONFIG += c++11 + +# The following define makes your compiler emit warnings if you use +# any Qt feature that has been marked deprecated (the exact warnings +# depend on your compiler). Please consult the documentation of the +# deprecated API in order to know how to port your code away from it. +DEFINES += QT_DEPRECATED_WARNINGS + +# You can also make your code fail to compile if it uses deprecated APIs. +# In order to do so, uncomment the following line. +# You can also select to disable deprecated APIs only up to a certain version of Qt. +#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 + +SOURCES += \ + indexwindow.cpp \ + loginwindow.cpp \ + main.cpp \ + mainwindow.cpp \ + testview.cpp + +HEADERS += \ + indexwindow.h \ + loginwindow.h \ + mainwindow.h \ + testview.h + +FORMS += \ + indexwindow.ui \ + loginwindow.ui \ + mainwindow.ui \ + testview.ui + +# Default rules for deployment. +qnx: target.path = /tmp/$${TARGET}/bin +else: unix:!android: target.path = /opt/$${TARGET}/bin +!isEmpty(target.path): INSTALLS += target + +RESOURCES += \ + res/qss.qrc \ + res/res.qrc + +DISTFILES += \ + res/image/u2.png + diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user new file mode 100644 index 0000000..1f5ec64 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user @@ -0,0 +1,562 @@ + + + + + + EnvironmentId + {c08df58c-84a7-4965-bca6-e98789474efa} + + + ProjectExplorer.Project.ActiveTarget + 0 + + + ProjectExplorer.Project.EditorSettings + + true + false + true + + Cpp + + CppGlobal + + + + QmlJS + + QmlJSGlobal + + + 2 + UTF-8 + false + 4 + false + 80 + true + true + 1 + true + false + 0 + true + true + 0 + 8 + true + 1 + true + true + true + false + + + + ProjectExplorer.Project.PluginSettings + + + -fno-delayed-template-parsing + + true + + + + ProjectExplorer.Project.Target.0 + + Desktop Qt 5.14.2 MinGW 64-bit + Desktop Qt 5.14.2 MinGW 64-bit + qt.qt5.5142.win64_mingw73_kit + 0 + 0 + 0 + + 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 + 0 + 0 + 0 + + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug + + + true + QtProjectManager.QMakeBuildStep + true + + false + false + false + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Debug + Qt4ProjectManager.Qt4BuildConfiguration + 2 + + + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Release + + + true + QtProjectManager.QMakeBuildStep + false + + false + false + true + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Release + Qt4ProjectManager.Qt4BuildConfiguration + 0 + + + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Profile + + + true + QtProjectManager.QMakeBuildStep + true + + false + true + true + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Profile + Qt4ProjectManager.Qt4BuildConfiguration + 0 + + 3 + + + 0 + Deploy + Deploy + ProjectExplorer.BuildSteps.Deploy + + 1 + ProjectExplorer.DefaultDeployConfiguration + + 1 + + + dwarf + + cpu-cycles + + + 250 + + -e + cpu-cycles + --call-graph + dwarf,4096 + -F + 250 + + -F + true + 4096 + false + false + 1000 + + true + + false + false + false + false + true + 0.01 + 10 + true + kcachegrind + 1 + 25 + + 1 + true + false + true + valgrind + + 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + + 2 + + Qt4ProjectManager.Qt4RunConfiguration:D:/Auto_verification_scheme/AutoVerScheme/AutoVerScheme.pro + D:/Auto_verification_scheme/AutoVerScheme/AutoVerScheme.pro + + false + + false + true + true + false + false + true + + + + 1 + + + + ProjectExplorer.Project.TargetCount + 2 + + + ProjectExplorer.Project.Updater.FileVersion + 22 + + + Version + 22 + + diff --git a/softwareDirectory/AutoVerScheme/indexwindow.cpp b/softwareDirectory/AutoVerScheme/indexwindow.cpp new file mode 100644 index 0000000..3e52c7b --- /dev/null +++ b/softwareDirectory/AutoVerScheme/indexwindow.cpp @@ -0,0 +1,55 @@ +#include "indexwindow.h" +#include "ui_indexwindow.h" +#include "QFile" +#include "QTextStream" + +IndexWindow::IndexWindow(QWidget *parent) : + QMainWindow(parent), + ui(new Ui::IndexWindow) +{ + ui->setupUi(this); + this->initForm(); +} + +IndexWindow::~IndexWindow() +{ + delete ui; +} +void IndexWindow::initForm() +{ + //this->setWindowFlags(Qt::FramelessWindowHint); + //调用样式 + loadStyle(":/qss/Index.css"); + +} + +void IndexWindow::loadStyle(const QString &qssFile) +{ + //加载样式表 + QString qss; + + QFile file(qssFile); + + if (file.open(QFile::ReadOnly)) { + //用QTextStream读取样式文件不用区分文件编码 带bom也行 + QStringList list; + QTextStream in(&file); + //in.setCodec("utf-8"); + while (!in.atEnd()) { + QString line; + in >> line; + list << line; + } + + file.close(); + qss = list.join("\n"); + QString paletteColor = qss.mid(20, 7); + qApp->setPalette(QPalette(paletteColor)); + //用时主要在下面这句 + qApp->setStyleSheet(qss); + } + + +} + + diff --git a/softwareDirectory/AutoVerScheme/indexwindow.h b/softwareDirectory/AutoVerScheme/indexwindow.h new file mode 100644 index 0000000..2aee958 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/indexwindow.h @@ -0,0 +1,26 @@ +#ifndef INDEXWINDOW_H +#define INDEXWINDOW_H + +#include + +namespace Ui { +class IndexWindow; +} + +class IndexWindow : public QMainWindow +{ + Q_OBJECT + +public: + explicit IndexWindow(QWidget *parent = nullptr); + ~IndexWindow(); +private slots: + void initForm(); + void loadStyle(const QString &qssFile); + + +private: + Ui::IndexWindow *ui; +}; + +#endif // INDEXWINDOW_H diff --git a/softwareDirectory/AutoVerScheme/indexwindow.ui b/softwareDirectory/AutoVerScheme/indexwindow.ui new file mode 100644 index 0000000..d7153e0 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/indexwindow.ui @@ -0,0 +1,539 @@ + + + IndexWindow + + + Qt::NonModal + + + + 0 + 0 + 1334 + 789 + + + + + 0 + 0 + + + + MainWindow + + + + + + + 100 + 100 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + 6 + + + QLayout::SetFixedSize + + + 0 + + + 0 + + + + + Qt::Horizontal + + + QSizePolicy::Fixed + + + + 120 + 13 + + + + + + + + + 0 + 0 + + + + + 560 + 0 + + + + Qt::DefaultContextMenu + + + color: white; +font-weight: bold; +font-size: 24pt; + + + + + QFrame::NoFrame + + + QFrame::Plain + + + 自动检定系统 + + + Qt::AutoText + + + false + + + Qt::AlignCenter + + + + + + + Qt::Horizontal + + + QSizePolicy::Fixed + + + + 40 + 13 + + + + + + + + + + Qt::Vertical + + + QSizePolicy::Fixed + + + + 50 + 80 + + + + + + + + + + Qt::Vertical + + + QSizePolicy::Fixed + + + + 20 + 120 + + + + + + + + Qt::Horizontal + + + + 100 + 20 + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + 0 + 0 + + + + + 310 + 190 + + + + OpenHandCursor + + + margin-right: 0px; + + + 信息管理 + + + + 60 + 60 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + Qt::Horizontal + + + + 327 + 20 + + + + + + + + + 0 + 0 + + + + + 490 + 190 + + + + OpenHandCursor + + + + + + 自动核查 + + + + 60 + 60 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + + 0 + 0 + + + + + 490 + 190 + + + + OpenHandCursor + + + + + + 自动检定 + + + + 60 + 60 + + + + false + + + false + + + Qt::ToolButtonTextUnderIcon + + + + + + + + 0 + 0 + + + + + 490 + 190 + + + + OpenHandCursor + + + + + + 核查程序管理 + + + + 60 + 60 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + Qt::Horizontal + + + + 327 + 20 + + + + + + + + + 0 + 0 + + + + + 310 + 190 + + + + OpenHandCursor + + + margin-right: 0px; + + + 数据同步 + + + + 60 + 60 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + Qt::Vertical + + + QSizePolicy::Fixed + + + + 20 + 120 + + + + + + + + Qt::Vertical + + + QSizePolicy::Fixed + + + + 20 + 120 + + + + + + + + + 0 + 0 + + + + + 490 + 190 + + + + OpenHandCursor + + + + + + 检定程序管理 + + + + 60 + 60 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + + + + + + 0 + 0 + + + + + 10 + 10 + + + + color: white; +font-weight: bold; +font-size: 14pt; + + + 欢迎您! 用户: admin + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + Qt::Horizontal + + + QSizePolicy::Fixed + + + + 270 + 20 + + + + + + + + + + + btnConfig + btnData + tbtnMain1 + tbtnMain2 + tbtnMain3 + tbtnConfig1 + tbtnConfig2 + tbtnConfig3 + tbtnConfig4 + tbtnConfig5 + tbtnConfig6 + btnMain + btnHelp + btnExit + + + + diff --git a/softwareDirectory/AutoVerScheme/loginwindow.cpp b/softwareDirectory/AutoVerScheme/loginwindow.cpp new file mode 100644 index 0000000..155988a --- /dev/null +++ b/softwareDirectory/AutoVerScheme/loginwindow.cpp @@ -0,0 +1,68 @@ +#include "loginwindow.h" +#include "ui_loginwindow.h" +#include +#include +#include + +#include "indexwindow.h" + +loginWindow::loginWindow(QWidget *parent): QMainWindow(parent), ui(new Ui::loginWindow) +{ + ui->setupUi(this); + this->initForm(); + ui->label->styleSheet(); + +} + +loginWindow::~loginWindow() +{ + delete ui; +} +void loginWindow::initForm() +{ + //this->setWindowFlags(Qt::FramelessWindowHint); + //调用样式 + loadStyle(":/qss/login.css"); +} + +void loginWindow::loadStyle(const QString &qssFile) +{ + //加载样式表 + QString qss; + + QFile file(qssFile); + + if (file.open(QFile::ReadOnly)) { + //用QTextStream读取样式文件不用区分文件编码 带bom也行 + QStringList list; + QTextStream in(&file); + //in.setCodec("utf-8"); + while (!in.atEnd()) { + QString line; + in >> line; + list << line; + } + + file.close(); + qss = list.join("\n"); + QString paletteColor = qss.mid(20, 7); + qApp->setPalette(QPalette(paletteColor)); + //用时主要在下面这句 + qApp->setStyleSheet(qss); + } + + +} + + +void loginWindow::on_Button_login_clicked() +{ + QMessageBox::information(this, "提示", "登录成功!"); + //查询数据库内是否有账号 + IndexWindow *indexWindow = new IndexWindow; + indexWindow->setWindowState(Qt::WindowMaximized); + indexWindow->show(); + this->close(); + +} + diff --git a/softwareDirectory/AutoVerScheme/loginwindow.h b/softwareDirectory/AutoVerScheme/loginwindow.h new file mode 100644 index 0000000..2695bc3 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/loginwindow.h @@ -0,0 +1,31 @@ +#ifndef MAINWINDOW_H +#define MAINWINDOW_H + +#include +#include + + + +namespace Ui { +class loginWindow; +} + +class loginWindow : public QMainWindow +{ + Q_OBJECT + +public: + explicit loginWindow(QWidget *parent = 0); + ~loginWindow(); +private slots: + void initForm(); + void loadStyle(const QString &qssFile); + void on_Button_login_clicked(); + + +private: + Ui::loginWindow *ui; +private: + QSqlQuery query; +}; +#endif // MAINWINDOW_H diff --git a/softwareDirectory/AutoVerScheme/loginwindow.ui b/softwareDirectory/AutoVerScheme/loginwindow.ui new file mode 100644 index 0000000..ca04751 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/loginwindow.ui @@ -0,0 +1,234 @@ + + + loginWindow + + + + 0 + 0 + 954 + 603 + + + + MainWindow + + + background-color: rgb(255, 255, 255) + + + + + + 110 + 110 + 271 + 231 + + + + background-image: url(:/image/login/u9.png); +background-repeat: no-repeat; background-position: center; +background-color: transparent; + + + + + + + + + 0 + 10 + 491 + 601 + + + + background-image: url(:/image/login/u2.png); +background-repeat: no-repeat; +background-color: transparent; +background-repeat: no-repeat; +background-position: center; +background-size: 100%; + + + + + + + + + 5 + 10 + 491 + 569 + + + + background-image: url(:/image/login/u0.png); +background-repeat: no-repeat; background-position: center; + + + + + + 170 + 350 + 241 + 51 + + + + background-color: transparent; + + + Metrology + + + + + + 490 + 10 + 471 + 571 + + + + + + + 610 + 70 + 271 + 61 + + + + 自动检定软件 + + + + + + 540 + 200 + 61 + 61 + + + + + + + + + + 490 + 10 + 461 + 571 + + + + + + + 540 + 290 + 61 + 61 + + + + + + + + + + 540 + 430 + 341 + 81 + + + + OpenHandCursor + + + + + + 登 录 + + + + + + 610 + 210 + 221 + 41 + + + + 请输入账号 + + + + + + 610 + 300 + 221 + 41 + + + + 请输入账号 + + + + + + 507 + 1 + 72 + 16 + + + + + + + label_4 + graphicsView + label_2 + label_3 + graphicsView_2 + textBrowser + lab_title + textBrowser_2 + textBrowser_3 + Button_login + textEdit_acc + textEdit_pass + label + + + + + 0 + 0 + 954 + 25 + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/main.cpp b/softwareDirectory/AutoVerScheme/main.cpp new file mode 100644 index 0000000..16b6d3f --- /dev/null +++ b/softwareDirectory/AutoVerScheme/main.cpp @@ -0,0 +1,23 @@ +#include "loginwindow.h" +#include "mainwindow.h" +#include +#include "indexWindow.h" +#include "testview.h" + +int main(int argc, char *argv[]) +{ + QApplication a(argc, argv); + // 加载外部的CSS文件 + a.setStyleSheet("file:///path/to/styles.css"); + //设置字体 + QFont font; + font.setFamily("Microsoft Yahei"); + font.setPixelSize(13); + a.setFont(font); + + //TestView s; + //s.show(); + loginWindow w; + w.show(); + return a.exec(); +} diff --git a/softwareDirectory/AutoVerScheme/mainwindow.cpp b/softwareDirectory/AutoVerScheme/mainwindow.cpp new file mode 100644 index 0000000..12d07c0 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/mainwindow.cpp @@ -0,0 +1,14 @@ +#include "mainwindow.h" +#include "ui_mainwindow.h" + +MainWindow::MainWindow(QWidget *parent) : + QMainWindow(parent), + ui(new Ui::MainWindow) +{ + ui->setupUi(this); +} + +MainWindow::~MainWindow() +{ + delete ui; +} diff --git a/softwareDirectory/AutoVerScheme/mainwindow.h b/softwareDirectory/AutoVerScheme/mainwindow.h new file mode 100644 index 0000000..40fd472 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/mainwindow.h @@ -0,0 +1,22 @@ +#ifndef MAINWINDOW_H +#define MAINWINDOW_H + +#include + +namespace Ui { +class MainWindow; +} + +class MainWindow : public QMainWindow +{ + Q_OBJECT + +public: + explicit MainWindow(QWidget *parent = nullptr); + ~MainWindow(); + +private: + Ui::MainWindow *ui; +}; + +#endif // MAINWINDOW_H diff --git a/softwareDirectory/AutoVerScheme/mainwindow.ui b/softwareDirectory/AutoVerScheme/mainwindow.ui new file mode 100644 index 0000000..dd4f1c8 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/mainwindow.ui @@ -0,0 +1,24 @@ + + + + + MainWindow + + + + 0 + 0 + 800 + 600 + + + + MainWindow + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u101.png b/softwareDirectory/AutoVerScheme/res/image/Index/u101.png new file mode 100644 index 0000000..9e371e3 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u101.png Binary files differ diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u102.png b/softwareDirectory/AutoVerScheme/res/image/Index/u102.png new file mode 100644 index 0000000..b288067 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u102.png Binary files differ diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u15.png b/softwareDirectory/AutoVerScheme/res/image/Index/u15.png new file mode 100644 index 0000000..7e699e6 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u15.png Binary files differ diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u17.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u17.svg new file mode 100644 index 0000000..acc0502 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u17.svg @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u18.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u18.svg new file mode 100644 index 0000000..6a00a10 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u18.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u19.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u19.svg new file mode 100644 index 0000000..42dea06 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u19.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u20.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u20.svg new file mode 100644 index 0000000..7426e62 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u20.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u21.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u21.svg new file mode 100644 index 0000000..cba8469 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u21.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u22.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u22.svg new file mode 100644 index 0000000..78843a0 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u22.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u23.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u23.svg new file mode 100644 index 0000000..c586b65 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u23.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u24.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u24.svg new file mode 100644 index 0000000..066e006 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u24.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u26.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u26.svg new file mode 100644 index 0000000..1834de5 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u26.svg @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u26_mouseOver.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u26_mouseOver.svg new file mode 100644 index 0000000..1420ba1 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u26_mouseOver.svg @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u33.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u33.svg new file mode 100644 index 0000000..e932d0a --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u33.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u34.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u34.svg new file mode 100644 index 0000000..0ab265b --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u34.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u35.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u35.svg new file mode 100644 index 0000000..7748314 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u35.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/login/u0.png b/softwareDirectory/AutoVerScheme/res/image/login/u0.png new file mode 100644 index 0000000..03d764f --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/login/u0.png Binary files differ diff --git a/softwareDirectory/AutoVerScheme/res/image/login/u2.png b/softwareDirectory/AutoVerScheme/res/image/login/u2.png new file mode 100644 index 0000000..9d8fed7 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/login/u2.png Binary files differ diff --git a/softwareDirectory/AutoVerScheme/res/image/login/u2.svg b/softwareDirectory/AutoVerScheme/res/image/login/u2.svg new file mode 100644 index 0000000..fc1bc92 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/login/u2.svg @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/login/u3.svg b/softwareDirectory/AutoVerScheme/res/image/login/u3.svg new file mode 100644 index 0000000..9d0f6ae --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/login/u3.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/login/u5.png b/softwareDirectory/AutoVerScheme/res/image/login/u5.png new file mode 100644 index 0000000..9b0e06f --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/login/u5.png Binary files differ diff --git a/softwareDirectory/AutoVerScheme/res/image/login/u6.png b/softwareDirectory/AutoVerScheme/res/image/login/u6.png new file mode 100644 index 0000000..de43ce9 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/login/u6.png Binary files differ diff --git a/softwareDirectory/AutoVerScheme/res/image/login/u7.svg b/softwareDirectory/AutoVerScheme/res/image/login/u7.svg new file mode 100644 index 0000000..31d19e1 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/login/u7.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro new file mode 100644 index 0000000..5b8f852 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro @@ -0,0 +1,48 @@ +QT += core gui +QT += sql +greaterThan(QT_MAJOR_VERSION, 4): QT += widgets + +CONFIG += c++11 + +# The following define makes your compiler emit warnings if you use +# any Qt feature that has been marked deprecated (the exact warnings +# depend on your compiler). Please consult the documentation of the +# deprecated API in order to know how to port your code away from it. +DEFINES += QT_DEPRECATED_WARNINGS + +# You can also make your code fail to compile if it uses deprecated APIs. +# In order to do so, uncomment the following line. +# You can also select to disable deprecated APIs only up to a certain version of Qt. +#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 + +SOURCES += \ + indexwindow.cpp \ + loginwindow.cpp \ + main.cpp \ + mainwindow.cpp \ + testview.cpp + +HEADERS += \ + indexwindow.h \ + loginwindow.h \ + mainwindow.h \ + testview.h + +FORMS += \ + indexwindow.ui \ + loginwindow.ui \ + mainwindow.ui \ + testview.ui + +# Default rules for deployment. +qnx: target.path = /tmp/$${TARGET}/bin +else: unix:!android: target.path = /opt/$${TARGET}/bin +!isEmpty(target.path): INSTALLS += target + +RESOURCES += \ + res/qss.qrc \ + res/res.qrc + +DISTFILES += \ + res/image/u2.png + diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user new file mode 100644 index 0000000..1f5ec64 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user @@ -0,0 +1,562 @@ + + + + + + EnvironmentId + {c08df58c-84a7-4965-bca6-e98789474efa} + + + ProjectExplorer.Project.ActiveTarget + 0 + + + ProjectExplorer.Project.EditorSettings + + true + false + true + + Cpp + + CppGlobal + + + + QmlJS + + QmlJSGlobal + + + 2 + UTF-8 + false + 4 + false + 80 + true + true + 1 + true + false + 0 + true + true + 0 + 8 + true + 1 + true + true + true + false + + + + ProjectExplorer.Project.PluginSettings + + + -fno-delayed-template-parsing + + true + + + + ProjectExplorer.Project.Target.0 + + Desktop Qt 5.14.2 MinGW 64-bit + Desktop Qt 5.14.2 MinGW 64-bit + qt.qt5.5142.win64_mingw73_kit + 0 + 0 + 0 + + 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 + 0 + 0 + 0 + + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug + + + true + QtProjectManager.QMakeBuildStep + true + + false + false + false + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Debug + Qt4ProjectManager.Qt4BuildConfiguration + 2 + + + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Release + + + true + QtProjectManager.QMakeBuildStep + false + + false + false + true + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Release + Qt4ProjectManager.Qt4BuildConfiguration + 0 + + + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Profile + + + true + QtProjectManager.QMakeBuildStep + true + + false + true + true + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Profile + Qt4ProjectManager.Qt4BuildConfiguration + 0 + + 3 + + + 0 + Deploy + Deploy + ProjectExplorer.BuildSteps.Deploy + + 1 + ProjectExplorer.DefaultDeployConfiguration + + 1 + + + dwarf + + cpu-cycles + + + 250 + + -e + cpu-cycles + --call-graph + dwarf,4096 + -F + 250 + + -F + true + 4096 + false + false + 1000 + + true + + false + false + false + false + true + 0.01 + 10 + true + kcachegrind + 1 + 25 + + 1 + true + false + true + valgrind + + 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + + 2 + + Qt4ProjectManager.Qt4RunConfiguration:D:/Auto_verification_scheme/AutoVerScheme/AutoVerScheme.pro + D:/Auto_verification_scheme/AutoVerScheme/AutoVerScheme.pro + + false + + false + true + true + false + false + true + + + + 1 + + + + ProjectExplorer.Project.TargetCount + 2 + + + ProjectExplorer.Project.Updater.FileVersion + 22 + + + Version + 22 + + diff --git a/softwareDirectory/AutoVerScheme/indexwindow.cpp b/softwareDirectory/AutoVerScheme/indexwindow.cpp new file mode 100644 index 0000000..3e52c7b --- /dev/null +++ b/softwareDirectory/AutoVerScheme/indexwindow.cpp @@ -0,0 +1,55 @@ +#include "indexwindow.h" +#include "ui_indexwindow.h" +#include "QFile" +#include "QTextStream" + +IndexWindow::IndexWindow(QWidget *parent) : + QMainWindow(parent), + ui(new Ui::IndexWindow) +{ + ui->setupUi(this); + this->initForm(); +} + +IndexWindow::~IndexWindow() +{ + delete ui; +} +void IndexWindow::initForm() +{ + //this->setWindowFlags(Qt::FramelessWindowHint); + //调用样式 + loadStyle(":/qss/Index.css"); + +} + +void IndexWindow::loadStyle(const QString &qssFile) +{ + //加载样式表 + QString qss; + + QFile file(qssFile); + + if (file.open(QFile::ReadOnly)) { + //用QTextStream读取样式文件不用区分文件编码 带bom也行 + QStringList list; + QTextStream in(&file); + //in.setCodec("utf-8"); + while (!in.atEnd()) { + QString line; + in >> line; + list << line; + } + + file.close(); + qss = list.join("\n"); + QString paletteColor = qss.mid(20, 7); + qApp->setPalette(QPalette(paletteColor)); + //用时主要在下面这句 + qApp->setStyleSheet(qss); + } + + +} + + diff --git a/softwareDirectory/AutoVerScheme/indexwindow.h b/softwareDirectory/AutoVerScheme/indexwindow.h new file mode 100644 index 0000000..2aee958 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/indexwindow.h @@ -0,0 +1,26 @@ +#ifndef INDEXWINDOW_H +#define INDEXWINDOW_H + +#include + +namespace Ui { +class IndexWindow; +} + +class IndexWindow : public QMainWindow +{ + Q_OBJECT + +public: + explicit IndexWindow(QWidget *parent = nullptr); + ~IndexWindow(); +private slots: + void initForm(); + void loadStyle(const QString &qssFile); + + +private: + Ui::IndexWindow *ui; +}; + +#endif // INDEXWINDOW_H diff --git a/softwareDirectory/AutoVerScheme/indexwindow.ui b/softwareDirectory/AutoVerScheme/indexwindow.ui new file mode 100644 index 0000000..d7153e0 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/indexwindow.ui @@ -0,0 +1,539 @@ + + + IndexWindow + + + Qt::NonModal + + + + 0 + 0 + 1334 + 789 + + + + + 0 + 0 + + + + MainWindow + + + + + + + 100 + 100 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + 6 + + + QLayout::SetFixedSize + + + 0 + + + 0 + + + + + Qt::Horizontal + + + QSizePolicy::Fixed + + + + 120 + 13 + + + + + + + + + 0 + 0 + + + + + 560 + 0 + + + + Qt::DefaultContextMenu + + + color: white; +font-weight: bold; +font-size: 24pt; + + + + + QFrame::NoFrame + + + QFrame::Plain + + + 自动检定系统 + + + Qt::AutoText + + + false + + + Qt::AlignCenter + + + + + + + Qt::Horizontal + + + QSizePolicy::Fixed + + + + 40 + 13 + + + + + + + + + + Qt::Vertical + + + QSizePolicy::Fixed + + + + 50 + 80 + + + + + + + + + + Qt::Vertical + + + QSizePolicy::Fixed + + + + 20 + 120 + + + + + + + + Qt::Horizontal + + + + 100 + 20 + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + 0 + 0 + + + + + 310 + 190 + + + + OpenHandCursor + + + margin-right: 0px; + + + 信息管理 + + + + 60 + 60 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + Qt::Horizontal + + + + 327 + 20 + + + + + + + + + 0 + 0 + + + + + 490 + 190 + + + + OpenHandCursor + + + + + + 自动核查 + + + + 60 + 60 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + + 0 + 0 + + + + + 490 + 190 + + + + OpenHandCursor + + + + + + 自动检定 + + + + 60 + 60 + + + + false + + + false + + + Qt::ToolButtonTextUnderIcon + + + + + + + + 0 + 0 + + + + + 490 + 190 + + + + OpenHandCursor + + + + + + 核查程序管理 + + + + 60 + 60 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + Qt::Horizontal + + + + 327 + 20 + + + + + + + + + 0 + 0 + + + + + 310 + 190 + + + + OpenHandCursor + + + margin-right: 0px; + + + 数据同步 + + + + 60 + 60 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + Qt::Vertical + + + QSizePolicy::Fixed + + + + 20 + 120 + + + + + + + + Qt::Vertical + + + QSizePolicy::Fixed + + + + 20 + 120 + + + + + + + + + 0 + 0 + + + + + 490 + 190 + + + + OpenHandCursor + + + + + + 检定程序管理 + + + + 60 + 60 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + + + + + + 0 + 0 + + + + + 10 + 10 + + + + color: white; +font-weight: bold; +font-size: 14pt; + + + 欢迎您! 用户: admin + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + Qt::Horizontal + + + QSizePolicy::Fixed + + + + 270 + 20 + + + + + + + + + + + btnConfig + btnData + tbtnMain1 + tbtnMain2 + tbtnMain3 + tbtnConfig1 + tbtnConfig2 + tbtnConfig3 + tbtnConfig4 + tbtnConfig5 + tbtnConfig6 + btnMain + btnHelp + btnExit + + + + diff --git a/softwareDirectory/AutoVerScheme/loginwindow.cpp b/softwareDirectory/AutoVerScheme/loginwindow.cpp new file mode 100644 index 0000000..155988a --- /dev/null +++ b/softwareDirectory/AutoVerScheme/loginwindow.cpp @@ -0,0 +1,68 @@ +#include "loginwindow.h" +#include "ui_loginwindow.h" +#include +#include +#include + +#include "indexwindow.h" + +loginWindow::loginWindow(QWidget *parent): QMainWindow(parent), ui(new Ui::loginWindow) +{ + ui->setupUi(this); + this->initForm(); + ui->label->styleSheet(); + +} + +loginWindow::~loginWindow() +{ + delete ui; +} +void loginWindow::initForm() +{ + //this->setWindowFlags(Qt::FramelessWindowHint); + //调用样式 + loadStyle(":/qss/login.css"); +} + +void loginWindow::loadStyle(const QString &qssFile) +{ + //加载样式表 + QString qss; + + QFile file(qssFile); + + if (file.open(QFile::ReadOnly)) { + //用QTextStream读取样式文件不用区分文件编码 带bom也行 + QStringList list; + QTextStream in(&file); + //in.setCodec("utf-8"); + while (!in.atEnd()) { + QString line; + in >> line; + list << line; + } + + file.close(); + qss = list.join("\n"); + QString paletteColor = qss.mid(20, 7); + qApp->setPalette(QPalette(paletteColor)); + //用时主要在下面这句 + qApp->setStyleSheet(qss); + } + + +} + + +void loginWindow::on_Button_login_clicked() +{ + QMessageBox::information(this, "提示", "登录成功!"); + //查询数据库内是否有账号 + IndexWindow *indexWindow = new IndexWindow; + indexWindow->setWindowState(Qt::WindowMaximized); + indexWindow->show(); + this->close(); + +} + diff --git a/softwareDirectory/AutoVerScheme/loginwindow.h b/softwareDirectory/AutoVerScheme/loginwindow.h new file mode 100644 index 0000000..2695bc3 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/loginwindow.h @@ -0,0 +1,31 @@ +#ifndef MAINWINDOW_H +#define MAINWINDOW_H + +#include +#include + + + +namespace Ui { +class loginWindow; +} + +class loginWindow : public QMainWindow +{ + Q_OBJECT + +public: + explicit loginWindow(QWidget *parent = 0); + ~loginWindow(); +private slots: + void initForm(); + void loadStyle(const QString &qssFile); + void on_Button_login_clicked(); + + +private: + Ui::loginWindow *ui; +private: + QSqlQuery query; +}; +#endif // MAINWINDOW_H diff --git a/softwareDirectory/AutoVerScheme/loginwindow.ui b/softwareDirectory/AutoVerScheme/loginwindow.ui new file mode 100644 index 0000000..ca04751 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/loginwindow.ui @@ -0,0 +1,234 @@ + + + loginWindow + + + + 0 + 0 + 954 + 603 + + + + MainWindow + + + background-color: rgb(255, 255, 255) + + + + + + 110 + 110 + 271 + 231 + + + + background-image: url(:/image/login/u9.png); +background-repeat: no-repeat; background-position: center; +background-color: transparent; + + + + + + + + + 0 + 10 + 491 + 601 + + + + background-image: url(:/image/login/u2.png); +background-repeat: no-repeat; +background-color: transparent; +background-repeat: no-repeat; +background-position: center; +background-size: 100%; + + + + + + + + + 5 + 10 + 491 + 569 + + + + background-image: url(:/image/login/u0.png); +background-repeat: no-repeat; background-position: center; + + + + + + 170 + 350 + 241 + 51 + + + + background-color: transparent; + + + Metrology + + + + + + 490 + 10 + 471 + 571 + + + + + + + 610 + 70 + 271 + 61 + + + + 自动检定软件 + + + + + + 540 + 200 + 61 + 61 + + + + + + + + + + 490 + 10 + 461 + 571 + + + + + + + 540 + 290 + 61 + 61 + + + + + + + + + + 540 + 430 + 341 + 81 + + + + OpenHandCursor + + + + + + 登 录 + + + + + + 610 + 210 + 221 + 41 + + + + 请输入账号 + + + + + + 610 + 300 + 221 + 41 + + + + 请输入账号 + + + + + + 507 + 1 + 72 + 16 + + + + + + + label_4 + graphicsView + label_2 + label_3 + graphicsView_2 + textBrowser + lab_title + textBrowser_2 + textBrowser_3 + Button_login + textEdit_acc + textEdit_pass + label + + + + + 0 + 0 + 954 + 25 + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/main.cpp b/softwareDirectory/AutoVerScheme/main.cpp new file mode 100644 index 0000000..16b6d3f --- /dev/null +++ b/softwareDirectory/AutoVerScheme/main.cpp @@ -0,0 +1,23 @@ +#include "loginwindow.h" +#include "mainwindow.h" +#include +#include "indexWindow.h" +#include "testview.h" + +int main(int argc, char *argv[]) +{ + QApplication a(argc, argv); + // 加载外部的CSS文件 + a.setStyleSheet("file:///path/to/styles.css"); + //设置字体 + QFont font; + font.setFamily("Microsoft Yahei"); + font.setPixelSize(13); + a.setFont(font); + + //TestView s; + //s.show(); + loginWindow w; + w.show(); + return a.exec(); +} diff --git a/softwareDirectory/AutoVerScheme/mainwindow.cpp b/softwareDirectory/AutoVerScheme/mainwindow.cpp new file mode 100644 index 0000000..12d07c0 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/mainwindow.cpp @@ -0,0 +1,14 @@ +#include "mainwindow.h" +#include "ui_mainwindow.h" + +MainWindow::MainWindow(QWidget *parent) : + QMainWindow(parent), + ui(new Ui::MainWindow) +{ + ui->setupUi(this); +} + +MainWindow::~MainWindow() +{ + delete ui; +} diff --git a/softwareDirectory/AutoVerScheme/mainwindow.h b/softwareDirectory/AutoVerScheme/mainwindow.h new file mode 100644 index 0000000..40fd472 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/mainwindow.h @@ -0,0 +1,22 @@ +#ifndef MAINWINDOW_H +#define MAINWINDOW_H + +#include + +namespace Ui { +class MainWindow; +} + +class MainWindow : public QMainWindow +{ + Q_OBJECT + +public: + explicit MainWindow(QWidget *parent = nullptr); + ~MainWindow(); + +private: + Ui::MainWindow *ui; +}; + +#endif // MAINWINDOW_H diff --git a/softwareDirectory/AutoVerScheme/mainwindow.ui b/softwareDirectory/AutoVerScheme/mainwindow.ui new file mode 100644 index 0000000..dd4f1c8 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/mainwindow.ui @@ -0,0 +1,24 @@ + + + + + MainWindow + + + + 0 + 0 + 800 + 600 + + + + MainWindow + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u101.png b/softwareDirectory/AutoVerScheme/res/image/Index/u101.png new file mode 100644 index 0000000..9e371e3 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u101.png Binary files differ diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u102.png b/softwareDirectory/AutoVerScheme/res/image/Index/u102.png new file mode 100644 index 0000000..b288067 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u102.png Binary files differ diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u15.png b/softwareDirectory/AutoVerScheme/res/image/Index/u15.png new file mode 100644 index 0000000..7e699e6 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u15.png Binary files differ diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u17.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u17.svg new file mode 100644 index 0000000..acc0502 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u17.svg @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u18.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u18.svg new file mode 100644 index 0000000..6a00a10 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u18.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u19.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u19.svg new file mode 100644 index 0000000..42dea06 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u19.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u20.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u20.svg new file mode 100644 index 0000000..7426e62 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u20.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u21.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u21.svg new file mode 100644 index 0000000..cba8469 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u21.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u22.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u22.svg new file mode 100644 index 0000000..78843a0 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u22.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u23.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u23.svg new file mode 100644 index 0000000..c586b65 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u23.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u24.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u24.svg new file mode 100644 index 0000000..066e006 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u24.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u26.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u26.svg new file mode 100644 index 0000000..1834de5 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u26.svg @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u26_mouseOver.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u26_mouseOver.svg new file mode 100644 index 0000000..1420ba1 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u26_mouseOver.svg @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u33.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u33.svg new file mode 100644 index 0000000..e932d0a --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u33.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u34.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u34.svg new file mode 100644 index 0000000..0ab265b --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u34.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u35.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u35.svg new file mode 100644 index 0000000..7748314 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u35.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/login/u0.png b/softwareDirectory/AutoVerScheme/res/image/login/u0.png new file mode 100644 index 0000000..03d764f --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/login/u0.png Binary files differ diff --git a/softwareDirectory/AutoVerScheme/res/image/login/u2.png b/softwareDirectory/AutoVerScheme/res/image/login/u2.png new file mode 100644 index 0000000..9d8fed7 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/login/u2.png Binary files differ diff --git a/softwareDirectory/AutoVerScheme/res/image/login/u2.svg b/softwareDirectory/AutoVerScheme/res/image/login/u2.svg new file mode 100644 index 0000000..fc1bc92 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/login/u2.svg @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/login/u3.svg b/softwareDirectory/AutoVerScheme/res/image/login/u3.svg new file mode 100644 index 0000000..9d0f6ae --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/login/u3.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/login/u5.png b/softwareDirectory/AutoVerScheme/res/image/login/u5.png new file mode 100644 index 0000000..9b0e06f --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/login/u5.png Binary files differ diff --git a/softwareDirectory/AutoVerScheme/res/image/login/u6.png b/softwareDirectory/AutoVerScheme/res/image/login/u6.png new file mode 100644 index 0000000..de43ce9 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/login/u6.png Binary files differ diff --git a/softwareDirectory/AutoVerScheme/res/image/login/u7.svg b/softwareDirectory/AutoVerScheme/res/image/login/u7.svg new file mode 100644 index 0000000..31d19e1 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/login/u7.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/login/u9.png b/softwareDirectory/AutoVerScheme/res/image/login/u9.png new file mode 100644 index 0000000..7a5ec9f --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/login/u9.png Binary files differ diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro new file mode 100644 index 0000000..5b8f852 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro @@ -0,0 +1,48 @@ +QT += core gui +QT += sql +greaterThan(QT_MAJOR_VERSION, 4): QT += widgets + +CONFIG += c++11 + +# The following define makes your compiler emit warnings if you use +# any Qt feature that has been marked deprecated (the exact warnings +# depend on your compiler). Please consult the documentation of the +# deprecated API in order to know how to port your code away from it. +DEFINES += QT_DEPRECATED_WARNINGS + +# You can also make your code fail to compile if it uses deprecated APIs. +# In order to do so, uncomment the following line. +# You can also select to disable deprecated APIs only up to a certain version of Qt. +#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 + +SOURCES += \ + indexwindow.cpp \ + loginwindow.cpp \ + main.cpp \ + mainwindow.cpp \ + testview.cpp + +HEADERS += \ + indexwindow.h \ + loginwindow.h \ + mainwindow.h \ + testview.h + +FORMS += \ + indexwindow.ui \ + loginwindow.ui \ + mainwindow.ui \ + testview.ui + +# Default rules for deployment. +qnx: target.path = /tmp/$${TARGET}/bin +else: unix:!android: target.path = /opt/$${TARGET}/bin +!isEmpty(target.path): INSTALLS += target + +RESOURCES += \ + res/qss.qrc \ + res/res.qrc + +DISTFILES += \ + res/image/u2.png + diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user new file mode 100644 index 0000000..1f5ec64 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user @@ -0,0 +1,562 @@ + + + + + + EnvironmentId + {c08df58c-84a7-4965-bca6-e98789474efa} + + + ProjectExplorer.Project.ActiveTarget + 0 + + + ProjectExplorer.Project.EditorSettings + + true + false + true + + Cpp + + CppGlobal + + + + QmlJS + + QmlJSGlobal + + + 2 + UTF-8 + false + 4 + false + 80 + true + true + 1 + true + false + 0 + true + true + 0 + 8 + true + 1 + true + true + true + false + + + + ProjectExplorer.Project.PluginSettings + + + -fno-delayed-template-parsing + + true + + + + ProjectExplorer.Project.Target.0 + + Desktop Qt 5.14.2 MinGW 64-bit + Desktop Qt 5.14.2 MinGW 64-bit + qt.qt5.5142.win64_mingw73_kit + 0 + 0 + 0 + + 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 + 0 + 0 + 0 + + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug + + + true + QtProjectManager.QMakeBuildStep + true + + false + false + false + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Debug + Qt4ProjectManager.Qt4BuildConfiguration + 2 + + + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Release + + + true + QtProjectManager.QMakeBuildStep + false + + false + false + true + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Release + Qt4ProjectManager.Qt4BuildConfiguration + 0 + + + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Profile + + + true + QtProjectManager.QMakeBuildStep + true + + false + true + true + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Profile + Qt4ProjectManager.Qt4BuildConfiguration + 0 + + 3 + + + 0 + Deploy + Deploy + ProjectExplorer.BuildSteps.Deploy + + 1 + ProjectExplorer.DefaultDeployConfiguration + + 1 + + + dwarf + + cpu-cycles + + + 250 + + -e + cpu-cycles + --call-graph + dwarf,4096 + -F + 250 + + -F + true + 4096 + false + false + 1000 + + true + + false + false + false + false + true + 0.01 + 10 + true + kcachegrind + 1 + 25 + + 1 + true + false + true + valgrind + + 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + + 2 + + Qt4ProjectManager.Qt4RunConfiguration:D:/Auto_verification_scheme/AutoVerScheme/AutoVerScheme.pro + D:/Auto_verification_scheme/AutoVerScheme/AutoVerScheme.pro + + false + + false + true + true + false + false + true + + + + 1 + + + + ProjectExplorer.Project.TargetCount + 2 + + + ProjectExplorer.Project.Updater.FileVersion + 22 + + + Version + 22 + + diff --git a/softwareDirectory/AutoVerScheme/indexwindow.cpp b/softwareDirectory/AutoVerScheme/indexwindow.cpp new file mode 100644 index 0000000..3e52c7b --- /dev/null +++ b/softwareDirectory/AutoVerScheme/indexwindow.cpp @@ -0,0 +1,55 @@ +#include "indexwindow.h" +#include "ui_indexwindow.h" +#include "QFile" +#include "QTextStream" + +IndexWindow::IndexWindow(QWidget *parent) : + QMainWindow(parent), + ui(new Ui::IndexWindow) +{ + ui->setupUi(this); + this->initForm(); +} + +IndexWindow::~IndexWindow() +{ + delete ui; +} +void IndexWindow::initForm() +{ + //this->setWindowFlags(Qt::FramelessWindowHint); + //调用样式 + loadStyle(":/qss/Index.css"); + +} + +void IndexWindow::loadStyle(const QString &qssFile) +{ + //加载样式表 + QString qss; + + QFile file(qssFile); + + if (file.open(QFile::ReadOnly)) { + //用QTextStream读取样式文件不用区分文件编码 带bom也行 + QStringList list; + QTextStream in(&file); + //in.setCodec("utf-8"); + while (!in.atEnd()) { + QString line; + in >> line; + list << line; + } + + file.close(); + qss = list.join("\n"); + QString paletteColor = qss.mid(20, 7); + qApp->setPalette(QPalette(paletteColor)); + //用时主要在下面这句 + qApp->setStyleSheet(qss); + } + + +} + + diff --git a/softwareDirectory/AutoVerScheme/indexwindow.h b/softwareDirectory/AutoVerScheme/indexwindow.h new file mode 100644 index 0000000..2aee958 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/indexwindow.h @@ -0,0 +1,26 @@ +#ifndef INDEXWINDOW_H +#define INDEXWINDOW_H + +#include + +namespace Ui { +class IndexWindow; +} + +class IndexWindow : public QMainWindow +{ + Q_OBJECT + +public: + explicit IndexWindow(QWidget *parent = nullptr); + ~IndexWindow(); +private slots: + void initForm(); + void loadStyle(const QString &qssFile); + + +private: + Ui::IndexWindow *ui; +}; + +#endif // INDEXWINDOW_H diff --git a/softwareDirectory/AutoVerScheme/indexwindow.ui b/softwareDirectory/AutoVerScheme/indexwindow.ui new file mode 100644 index 0000000..d7153e0 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/indexwindow.ui @@ -0,0 +1,539 @@ + + + IndexWindow + + + Qt::NonModal + + + + 0 + 0 + 1334 + 789 + + + + + 0 + 0 + + + + MainWindow + + + + + + + 100 + 100 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + 6 + + + QLayout::SetFixedSize + + + 0 + + + 0 + + + + + Qt::Horizontal + + + QSizePolicy::Fixed + + + + 120 + 13 + + + + + + + + + 0 + 0 + + + + + 560 + 0 + + + + Qt::DefaultContextMenu + + + color: white; +font-weight: bold; +font-size: 24pt; + + + + + QFrame::NoFrame + + + QFrame::Plain + + + 自动检定系统 + + + Qt::AutoText + + + false + + + Qt::AlignCenter + + + + + + + Qt::Horizontal + + + QSizePolicy::Fixed + + + + 40 + 13 + + + + + + + + + + Qt::Vertical + + + QSizePolicy::Fixed + + + + 50 + 80 + + + + + + + + + + Qt::Vertical + + + QSizePolicy::Fixed + + + + 20 + 120 + + + + + + + + Qt::Horizontal + + + + 100 + 20 + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + 0 + 0 + + + + + 310 + 190 + + + + OpenHandCursor + + + margin-right: 0px; + + + 信息管理 + + + + 60 + 60 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + Qt::Horizontal + + + + 327 + 20 + + + + + + + + + 0 + 0 + + + + + 490 + 190 + + + + OpenHandCursor + + + + + + 自动核查 + + + + 60 + 60 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + + 0 + 0 + + + + + 490 + 190 + + + + OpenHandCursor + + + + + + 自动检定 + + + + 60 + 60 + + + + false + + + false + + + Qt::ToolButtonTextUnderIcon + + + + + + + + 0 + 0 + + + + + 490 + 190 + + + + OpenHandCursor + + + + + + 核查程序管理 + + + + 60 + 60 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + Qt::Horizontal + + + + 327 + 20 + + + + + + + + + 0 + 0 + + + + + 310 + 190 + + + + OpenHandCursor + + + margin-right: 0px; + + + 数据同步 + + + + 60 + 60 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + Qt::Vertical + + + QSizePolicy::Fixed + + + + 20 + 120 + + + + + + + + Qt::Vertical + + + QSizePolicy::Fixed + + + + 20 + 120 + + + + + + + + + 0 + 0 + + + + + 490 + 190 + + + + OpenHandCursor + + + + + + 检定程序管理 + + + + 60 + 60 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + + + + + + 0 + 0 + + + + + 10 + 10 + + + + color: white; +font-weight: bold; +font-size: 14pt; + + + 欢迎您! 用户: admin + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + Qt::Horizontal + + + QSizePolicy::Fixed + + + + 270 + 20 + + + + + + + + + + + btnConfig + btnData + tbtnMain1 + tbtnMain2 + tbtnMain3 + tbtnConfig1 + tbtnConfig2 + tbtnConfig3 + tbtnConfig4 + tbtnConfig5 + tbtnConfig6 + btnMain + btnHelp + btnExit + + + + diff --git a/softwareDirectory/AutoVerScheme/loginwindow.cpp b/softwareDirectory/AutoVerScheme/loginwindow.cpp new file mode 100644 index 0000000..155988a --- /dev/null +++ b/softwareDirectory/AutoVerScheme/loginwindow.cpp @@ -0,0 +1,68 @@ +#include "loginwindow.h" +#include "ui_loginwindow.h" +#include +#include +#include + +#include "indexwindow.h" + +loginWindow::loginWindow(QWidget *parent): QMainWindow(parent), ui(new Ui::loginWindow) +{ + ui->setupUi(this); + this->initForm(); + ui->label->styleSheet(); + +} + +loginWindow::~loginWindow() +{ + delete ui; +} +void loginWindow::initForm() +{ + //this->setWindowFlags(Qt::FramelessWindowHint); + //调用样式 + loadStyle(":/qss/login.css"); +} + +void loginWindow::loadStyle(const QString &qssFile) +{ + //加载样式表 + QString qss; + + QFile file(qssFile); + + if (file.open(QFile::ReadOnly)) { + //用QTextStream读取样式文件不用区分文件编码 带bom也行 + QStringList list; + QTextStream in(&file); + //in.setCodec("utf-8"); + while (!in.atEnd()) { + QString line; + in >> line; + list << line; + } + + file.close(); + qss = list.join("\n"); + QString paletteColor = qss.mid(20, 7); + qApp->setPalette(QPalette(paletteColor)); + //用时主要在下面这句 + qApp->setStyleSheet(qss); + } + + +} + + +void loginWindow::on_Button_login_clicked() +{ + QMessageBox::information(this, "提示", "登录成功!"); + //查询数据库内是否有账号 + IndexWindow *indexWindow = new IndexWindow; + indexWindow->setWindowState(Qt::WindowMaximized); + indexWindow->show(); + this->close(); + +} + diff --git a/softwareDirectory/AutoVerScheme/loginwindow.h b/softwareDirectory/AutoVerScheme/loginwindow.h new file mode 100644 index 0000000..2695bc3 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/loginwindow.h @@ -0,0 +1,31 @@ +#ifndef MAINWINDOW_H +#define MAINWINDOW_H + +#include +#include + + + +namespace Ui { +class loginWindow; +} + +class loginWindow : public QMainWindow +{ + Q_OBJECT + +public: + explicit loginWindow(QWidget *parent = 0); + ~loginWindow(); +private slots: + void initForm(); + void loadStyle(const QString &qssFile); + void on_Button_login_clicked(); + + +private: + Ui::loginWindow *ui; +private: + QSqlQuery query; +}; +#endif // MAINWINDOW_H diff --git a/softwareDirectory/AutoVerScheme/loginwindow.ui b/softwareDirectory/AutoVerScheme/loginwindow.ui new file mode 100644 index 0000000..ca04751 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/loginwindow.ui @@ -0,0 +1,234 @@ + + + loginWindow + + + + 0 + 0 + 954 + 603 + + + + MainWindow + + + background-color: rgb(255, 255, 255) + + + + + + 110 + 110 + 271 + 231 + + + + background-image: url(:/image/login/u9.png); +background-repeat: no-repeat; background-position: center; +background-color: transparent; + + + + + + + + + 0 + 10 + 491 + 601 + + + + background-image: url(:/image/login/u2.png); +background-repeat: no-repeat; +background-color: transparent; +background-repeat: no-repeat; +background-position: center; +background-size: 100%; + + + + + + + + + 5 + 10 + 491 + 569 + + + + background-image: url(:/image/login/u0.png); +background-repeat: no-repeat; background-position: center; + + + + + + 170 + 350 + 241 + 51 + + + + background-color: transparent; + + + Metrology + + + + + + 490 + 10 + 471 + 571 + + + + + + + 610 + 70 + 271 + 61 + + + + 自动检定软件 + + + + + + 540 + 200 + 61 + 61 + + + + + + + + + + 490 + 10 + 461 + 571 + + + + + + + 540 + 290 + 61 + 61 + + + + + + + + + + 540 + 430 + 341 + 81 + + + + OpenHandCursor + + + + + + 登 录 + + + + + + 610 + 210 + 221 + 41 + + + + 请输入账号 + + + + + + 610 + 300 + 221 + 41 + + + + 请输入账号 + + + + + + 507 + 1 + 72 + 16 + + + + + + + label_4 + graphicsView + label_2 + label_3 + graphicsView_2 + textBrowser + lab_title + textBrowser_2 + textBrowser_3 + Button_login + textEdit_acc + textEdit_pass + label + + + + + 0 + 0 + 954 + 25 + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/main.cpp b/softwareDirectory/AutoVerScheme/main.cpp new file mode 100644 index 0000000..16b6d3f --- /dev/null +++ b/softwareDirectory/AutoVerScheme/main.cpp @@ -0,0 +1,23 @@ +#include "loginwindow.h" +#include "mainwindow.h" +#include +#include "indexWindow.h" +#include "testview.h" + +int main(int argc, char *argv[]) +{ + QApplication a(argc, argv); + // 加载外部的CSS文件 + a.setStyleSheet("file:///path/to/styles.css"); + //设置字体 + QFont font; + font.setFamily("Microsoft Yahei"); + font.setPixelSize(13); + a.setFont(font); + + //TestView s; + //s.show(); + loginWindow w; + w.show(); + return a.exec(); +} diff --git a/softwareDirectory/AutoVerScheme/mainwindow.cpp b/softwareDirectory/AutoVerScheme/mainwindow.cpp new file mode 100644 index 0000000..12d07c0 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/mainwindow.cpp @@ -0,0 +1,14 @@ +#include "mainwindow.h" +#include "ui_mainwindow.h" + +MainWindow::MainWindow(QWidget *parent) : + QMainWindow(parent), + ui(new Ui::MainWindow) +{ + ui->setupUi(this); +} + +MainWindow::~MainWindow() +{ + delete ui; +} diff --git a/softwareDirectory/AutoVerScheme/mainwindow.h b/softwareDirectory/AutoVerScheme/mainwindow.h new file mode 100644 index 0000000..40fd472 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/mainwindow.h @@ -0,0 +1,22 @@ +#ifndef MAINWINDOW_H +#define MAINWINDOW_H + +#include + +namespace Ui { +class MainWindow; +} + +class MainWindow : public QMainWindow +{ + Q_OBJECT + +public: + explicit MainWindow(QWidget *parent = nullptr); + ~MainWindow(); + +private: + Ui::MainWindow *ui; +}; + +#endif // MAINWINDOW_H diff --git a/softwareDirectory/AutoVerScheme/mainwindow.ui b/softwareDirectory/AutoVerScheme/mainwindow.ui new file mode 100644 index 0000000..dd4f1c8 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/mainwindow.ui @@ -0,0 +1,24 @@ + + + + + MainWindow + + + + 0 + 0 + 800 + 600 + + + + MainWindow + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u101.png b/softwareDirectory/AutoVerScheme/res/image/Index/u101.png new file mode 100644 index 0000000..9e371e3 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u101.png Binary files differ diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u102.png b/softwareDirectory/AutoVerScheme/res/image/Index/u102.png new file mode 100644 index 0000000..b288067 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u102.png Binary files differ diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u15.png b/softwareDirectory/AutoVerScheme/res/image/Index/u15.png new file mode 100644 index 0000000..7e699e6 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u15.png Binary files differ diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u17.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u17.svg new file mode 100644 index 0000000..acc0502 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u17.svg @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u18.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u18.svg new file mode 100644 index 0000000..6a00a10 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u18.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u19.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u19.svg new file mode 100644 index 0000000..42dea06 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u19.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u20.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u20.svg new file mode 100644 index 0000000..7426e62 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u20.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u21.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u21.svg new file mode 100644 index 0000000..cba8469 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u21.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u22.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u22.svg new file mode 100644 index 0000000..78843a0 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u22.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u23.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u23.svg new file mode 100644 index 0000000..c586b65 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u23.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u24.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u24.svg new file mode 100644 index 0000000..066e006 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u24.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u26.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u26.svg new file mode 100644 index 0000000..1834de5 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u26.svg @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u26_mouseOver.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u26_mouseOver.svg new file mode 100644 index 0000000..1420ba1 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u26_mouseOver.svg @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u33.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u33.svg new file mode 100644 index 0000000..e932d0a --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u33.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u34.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u34.svg new file mode 100644 index 0000000..0ab265b --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u34.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u35.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u35.svg new file mode 100644 index 0000000..7748314 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u35.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/login/u0.png b/softwareDirectory/AutoVerScheme/res/image/login/u0.png new file mode 100644 index 0000000..03d764f --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/login/u0.png Binary files differ diff --git a/softwareDirectory/AutoVerScheme/res/image/login/u2.png b/softwareDirectory/AutoVerScheme/res/image/login/u2.png new file mode 100644 index 0000000..9d8fed7 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/login/u2.png Binary files differ diff --git a/softwareDirectory/AutoVerScheme/res/image/login/u2.svg b/softwareDirectory/AutoVerScheme/res/image/login/u2.svg new file mode 100644 index 0000000..fc1bc92 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/login/u2.svg @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/login/u3.svg b/softwareDirectory/AutoVerScheme/res/image/login/u3.svg new file mode 100644 index 0000000..9d0f6ae --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/login/u3.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/login/u5.png b/softwareDirectory/AutoVerScheme/res/image/login/u5.png new file mode 100644 index 0000000..9b0e06f --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/login/u5.png Binary files differ diff --git a/softwareDirectory/AutoVerScheme/res/image/login/u6.png b/softwareDirectory/AutoVerScheme/res/image/login/u6.png new file mode 100644 index 0000000..de43ce9 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/login/u6.png Binary files differ diff --git a/softwareDirectory/AutoVerScheme/res/image/login/u7.svg b/softwareDirectory/AutoVerScheme/res/image/login/u7.svg new file mode 100644 index 0000000..31d19e1 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/login/u7.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/login/u9.png b/softwareDirectory/AutoVerScheme/res/image/login/u9.png new file mode 100644 index 0000000..7a5ec9f --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/login/u9.png Binary files differ diff --git a/softwareDirectory/AutoVerScheme/res/qss.qrc b/softwareDirectory/AutoVerScheme/res/qss.qrc new file mode 100644 index 0000000..3422463 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/qss.qrc @@ -0,0 +1,6 @@ + + + qss/login.css + qss/Index.css + + diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro new file mode 100644 index 0000000..5b8f852 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro @@ -0,0 +1,48 @@ +QT += core gui +QT += sql +greaterThan(QT_MAJOR_VERSION, 4): QT += widgets + +CONFIG += c++11 + +# The following define makes your compiler emit warnings if you use +# any Qt feature that has been marked deprecated (the exact warnings +# depend on your compiler). Please consult the documentation of the +# deprecated API in order to know how to port your code away from it. +DEFINES += QT_DEPRECATED_WARNINGS + +# You can also make your code fail to compile if it uses deprecated APIs. +# In order to do so, uncomment the following line. +# You can also select to disable deprecated APIs only up to a certain version of Qt. +#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 + +SOURCES += \ + indexwindow.cpp \ + loginwindow.cpp \ + main.cpp \ + mainwindow.cpp \ + testview.cpp + +HEADERS += \ + indexwindow.h \ + loginwindow.h \ + mainwindow.h \ + testview.h + +FORMS += \ + indexwindow.ui \ + loginwindow.ui \ + mainwindow.ui \ + testview.ui + +# Default rules for deployment. +qnx: target.path = /tmp/$${TARGET}/bin +else: unix:!android: target.path = /opt/$${TARGET}/bin +!isEmpty(target.path): INSTALLS += target + +RESOURCES += \ + res/qss.qrc \ + res/res.qrc + +DISTFILES += \ + res/image/u2.png + diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user new file mode 100644 index 0000000..1f5ec64 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user @@ -0,0 +1,562 @@ + + + + + + EnvironmentId + {c08df58c-84a7-4965-bca6-e98789474efa} + + + ProjectExplorer.Project.ActiveTarget + 0 + + + ProjectExplorer.Project.EditorSettings + + true + false + true + + Cpp + + CppGlobal + + + + QmlJS + + QmlJSGlobal + + + 2 + UTF-8 + false + 4 + false + 80 + true + true + 1 + true + false + 0 + true + true + 0 + 8 + true + 1 + true + true + true + false + + + + ProjectExplorer.Project.PluginSettings + + + -fno-delayed-template-parsing + + true + + + + ProjectExplorer.Project.Target.0 + + Desktop Qt 5.14.2 MinGW 64-bit + Desktop Qt 5.14.2 MinGW 64-bit + qt.qt5.5142.win64_mingw73_kit + 0 + 0 + 0 + + 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 + 0 + 0 + 0 + + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug + + + true + QtProjectManager.QMakeBuildStep + true + + false + false + false + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Debug + Qt4ProjectManager.Qt4BuildConfiguration + 2 + + + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Release + + + true + QtProjectManager.QMakeBuildStep + false + + false + false + true + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Release + Qt4ProjectManager.Qt4BuildConfiguration + 0 + + + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Profile + + + true + QtProjectManager.QMakeBuildStep + true + + false + true + true + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Profile + Qt4ProjectManager.Qt4BuildConfiguration + 0 + + 3 + + + 0 + Deploy + Deploy + ProjectExplorer.BuildSteps.Deploy + + 1 + ProjectExplorer.DefaultDeployConfiguration + + 1 + + + dwarf + + cpu-cycles + + + 250 + + -e + cpu-cycles + --call-graph + dwarf,4096 + -F + 250 + + -F + true + 4096 + false + false + 1000 + + true + + false + false + false + false + true + 0.01 + 10 + true + kcachegrind + 1 + 25 + + 1 + true + false + true + valgrind + + 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + + 2 + + Qt4ProjectManager.Qt4RunConfiguration:D:/Auto_verification_scheme/AutoVerScheme/AutoVerScheme.pro + D:/Auto_verification_scheme/AutoVerScheme/AutoVerScheme.pro + + false + + false + true + true + false + false + true + + + + 1 + + + + ProjectExplorer.Project.TargetCount + 2 + + + ProjectExplorer.Project.Updater.FileVersion + 22 + + + Version + 22 + + diff --git a/softwareDirectory/AutoVerScheme/indexwindow.cpp b/softwareDirectory/AutoVerScheme/indexwindow.cpp new file mode 100644 index 0000000..3e52c7b --- /dev/null +++ b/softwareDirectory/AutoVerScheme/indexwindow.cpp @@ -0,0 +1,55 @@ +#include "indexwindow.h" +#include "ui_indexwindow.h" +#include "QFile" +#include "QTextStream" + +IndexWindow::IndexWindow(QWidget *parent) : + QMainWindow(parent), + ui(new Ui::IndexWindow) +{ + ui->setupUi(this); + this->initForm(); +} + +IndexWindow::~IndexWindow() +{ + delete ui; +} +void IndexWindow::initForm() +{ + //this->setWindowFlags(Qt::FramelessWindowHint); + //调用样式 + loadStyle(":/qss/Index.css"); + +} + +void IndexWindow::loadStyle(const QString &qssFile) +{ + //加载样式表 + QString qss; + + QFile file(qssFile); + + if (file.open(QFile::ReadOnly)) { + //用QTextStream读取样式文件不用区分文件编码 带bom也行 + QStringList list; + QTextStream in(&file); + //in.setCodec("utf-8"); + while (!in.atEnd()) { + QString line; + in >> line; + list << line; + } + + file.close(); + qss = list.join("\n"); + QString paletteColor = qss.mid(20, 7); + qApp->setPalette(QPalette(paletteColor)); + //用时主要在下面这句 + qApp->setStyleSheet(qss); + } + + +} + + diff --git a/softwareDirectory/AutoVerScheme/indexwindow.h b/softwareDirectory/AutoVerScheme/indexwindow.h new file mode 100644 index 0000000..2aee958 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/indexwindow.h @@ -0,0 +1,26 @@ +#ifndef INDEXWINDOW_H +#define INDEXWINDOW_H + +#include + +namespace Ui { +class IndexWindow; +} + +class IndexWindow : public QMainWindow +{ + Q_OBJECT + +public: + explicit IndexWindow(QWidget *parent = nullptr); + ~IndexWindow(); +private slots: + void initForm(); + void loadStyle(const QString &qssFile); + + +private: + Ui::IndexWindow *ui; +}; + +#endif // INDEXWINDOW_H diff --git a/softwareDirectory/AutoVerScheme/indexwindow.ui b/softwareDirectory/AutoVerScheme/indexwindow.ui new file mode 100644 index 0000000..d7153e0 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/indexwindow.ui @@ -0,0 +1,539 @@ + + + IndexWindow + + + Qt::NonModal + + + + 0 + 0 + 1334 + 789 + + + + + 0 + 0 + + + + MainWindow + + + + + + + 100 + 100 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + 6 + + + QLayout::SetFixedSize + + + 0 + + + 0 + + + + + Qt::Horizontal + + + QSizePolicy::Fixed + + + + 120 + 13 + + + + + + + + + 0 + 0 + + + + + 560 + 0 + + + + Qt::DefaultContextMenu + + + color: white; +font-weight: bold; +font-size: 24pt; + + + + + QFrame::NoFrame + + + QFrame::Plain + + + 自动检定系统 + + + Qt::AutoText + + + false + + + Qt::AlignCenter + + + + + + + Qt::Horizontal + + + QSizePolicy::Fixed + + + + 40 + 13 + + + + + + + + + + Qt::Vertical + + + QSizePolicy::Fixed + + + + 50 + 80 + + + + + + + + + + Qt::Vertical + + + QSizePolicy::Fixed + + + + 20 + 120 + + + + + + + + Qt::Horizontal + + + + 100 + 20 + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + 0 + 0 + + + + + 310 + 190 + + + + OpenHandCursor + + + margin-right: 0px; + + + 信息管理 + + + + 60 + 60 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + Qt::Horizontal + + + + 327 + 20 + + + + + + + + + 0 + 0 + + + + + 490 + 190 + + + + OpenHandCursor + + + + + + 自动核查 + + + + 60 + 60 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + + 0 + 0 + + + + + 490 + 190 + + + + OpenHandCursor + + + + + + 自动检定 + + + + 60 + 60 + + + + false + + + false + + + Qt::ToolButtonTextUnderIcon + + + + + + + + 0 + 0 + + + + + 490 + 190 + + + + OpenHandCursor + + + + + + 核查程序管理 + + + + 60 + 60 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + Qt::Horizontal + + + + 327 + 20 + + + + + + + + + 0 + 0 + + + + + 310 + 190 + + + + OpenHandCursor + + + margin-right: 0px; + + + 数据同步 + + + + 60 + 60 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + Qt::Vertical + + + QSizePolicy::Fixed + + + + 20 + 120 + + + + + + + + Qt::Vertical + + + QSizePolicy::Fixed + + + + 20 + 120 + + + + + + + + + 0 + 0 + + + + + 490 + 190 + + + + OpenHandCursor + + + + + + 检定程序管理 + + + + 60 + 60 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + + + + + + 0 + 0 + + + + + 10 + 10 + + + + color: white; +font-weight: bold; +font-size: 14pt; + + + 欢迎您! 用户: admin + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + Qt::Horizontal + + + QSizePolicy::Fixed + + + + 270 + 20 + + + + + + + + + + + btnConfig + btnData + tbtnMain1 + tbtnMain2 + tbtnMain3 + tbtnConfig1 + tbtnConfig2 + tbtnConfig3 + tbtnConfig4 + tbtnConfig5 + tbtnConfig6 + btnMain + btnHelp + btnExit + + + + diff --git a/softwareDirectory/AutoVerScheme/loginwindow.cpp b/softwareDirectory/AutoVerScheme/loginwindow.cpp new file mode 100644 index 0000000..155988a --- /dev/null +++ b/softwareDirectory/AutoVerScheme/loginwindow.cpp @@ -0,0 +1,68 @@ +#include "loginwindow.h" +#include "ui_loginwindow.h" +#include +#include +#include + +#include "indexwindow.h" + +loginWindow::loginWindow(QWidget *parent): QMainWindow(parent), ui(new Ui::loginWindow) +{ + ui->setupUi(this); + this->initForm(); + ui->label->styleSheet(); + +} + +loginWindow::~loginWindow() +{ + delete ui; +} +void loginWindow::initForm() +{ + //this->setWindowFlags(Qt::FramelessWindowHint); + //调用样式 + loadStyle(":/qss/login.css"); +} + +void loginWindow::loadStyle(const QString &qssFile) +{ + //加载样式表 + QString qss; + + QFile file(qssFile); + + if (file.open(QFile::ReadOnly)) { + //用QTextStream读取样式文件不用区分文件编码 带bom也行 + QStringList list; + QTextStream in(&file); + //in.setCodec("utf-8"); + while (!in.atEnd()) { + QString line; + in >> line; + list << line; + } + + file.close(); + qss = list.join("\n"); + QString paletteColor = qss.mid(20, 7); + qApp->setPalette(QPalette(paletteColor)); + //用时主要在下面这句 + qApp->setStyleSheet(qss); + } + + +} + + +void loginWindow::on_Button_login_clicked() +{ + QMessageBox::information(this, "提示", "登录成功!"); + //查询数据库内是否有账号 + IndexWindow *indexWindow = new IndexWindow; + indexWindow->setWindowState(Qt::WindowMaximized); + indexWindow->show(); + this->close(); + +} + diff --git a/softwareDirectory/AutoVerScheme/loginwindow.h b/softwareDirectory/AutoVerScheme/loginwindow.h new file mode 100644 index 0000000..2695bc3 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/loginwindow.h @@ -0,0 +1,31 @@ +#ifndef MAINWINDOW_H +#define MAINWINDOW_H + +#include +#include + + + +namespace Ui { +class loginWindow; +} + +class loginWindow : public QMainWindow +{ + Q_OBJECT + +public: + explicit loginWindow(QWidget *parent = 0); + ~loginWindow(); +private slots: + void initForm(); + void loadStyle(const QString &qssFile); + void on_Button_login_clicked(); + + +private: + Ui::loginWindow *ui; +private: + QSqlQuery query; +}; +#endif // MAINWINDOW_H diff --git a/softwareDirectory/AutoVerScheme/loginwindow.ui b/softwareDirectory/AutoVerScheme/loginwindow.ui new file mode 100644 index 0000000..ca04751 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/loginwindow.ui @@ -0,0 +1,234 @@ + + + loginWindow + + + + 0 + 0 + 954 + 603 + + + + MainWindow + + + background-color: rgb(255, 255, 255) + + + + + + 110 + 110 + 271 + 231 + + + + background-image: url(:/image/login/u9.png); +background-repeat: no-repeat; background-position: center; +background-color: transparent; + + + + + + + + + 0 + 10 + 491 + 601 + + + + background-image: url(:/image/login/u2.png); +background-repeat: no-repeat; +background-color: transparent; +background-repeat: no-repeat; +background-position: center; +background-size: 100%; + + + + + + + + + 5 + 10 + 491 + 569 + + + + background-image: url(:/image/login/u0.png); +background-repeat: no-repeat; background-position: center; + + + + + + 170 + 350 + 241 + 51 + + + + background-color: transparent; + + + Metrology + + + + + + 490 + 10 + 471 + 571 + + + + + + + 610 + 70 + 271 + 61 + + + + 自动检定软件 + + + + + + 540 + 200 + 61 + 61 + + + + + + + + + + 490 + 10 + 461 + 571 + + + + + + + 540 + 290 + 61 + 61 + + + + + + + + + + 540 + 430 + 341 + 81 + + + + OpenHandCursor + + + + + + 登 录 + + + + + + 610 + 210 + 221 + 41 + + + + 请输入账号 + + + + + + 610 + 300 + 221 + 41 + + + + 请输入账号 + + + + + + 507 + 1 + 72 + 16 + + + + + + + label_4 + graphicsView + label_2 + label_3 + graphicsView_2 + textBrowser + lab_title + textBrowser_2 + textBrowser_3 + Button_login + textEdit_acc + textEdit_pass + label + + + + + 0 + 0 + 954 + 25 + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/main.cpp b/softwareDirectory/AutoVerScheme/main.cpp new file mode 100644 index 0000000..16b6d3f --- /dev/null +++ b/softwareDirectory/AutoVerScheme/main.cpp @@ -0,0 +1,23 @@ +#include "loginwindow.h" +#include "mainwindow.h" +#include +#include "indexWindow.h" +#include "testview.h" + +int main(int argc, char *argv[]) +{ + QApplication a(argc, argv); + // 加载外部的CSS文件 + a.setStyleSheet("file:///path/to/styles.css"); + //设置字体 + QFont font; + font.setFamily("Microsoft Yahei"); + font.setPixelSize(13); + a.setFont(font); + + //TestView s; + //s.show(); + loginWindow w; + w.show(); + return a.exec(); +} diff --git a/softwareDirectory/AutoVerScheme/mainwindow.cpp b/softwareDirectory/AutoVerScheme/mainwindow.cpp new file mode 100644 index 0000000..12d07c0 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/mainwindow.cpp @@ -0,0 +1,14 @@ +#include "mainwindow.h" +#include "ui_mainwindow.h" + +MainWindow::MainWindow(QWidget *parent) : + QMainWindow(parent), + ui(new Ui::MainWindow) +{ + ui->setupUi(this); +} + +MainWindow::~MainWindow() +{ + delete ui; +} diff --git a/softwareDirectory/AutoVerScheme/mainwindow.h b/softwareDirectory/AutoVerScheme/mainwindow.h new file mode 100644 index 0000000..40fd472 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/mainwindow.h @@ -0,0 +1,22 @@ +#ifndef MAINWINDOW_H +#define MAINWINDOW_H + +#include + +namespace Ui { +class MainWindow; +} + +class MainWindow : public QMainWindow +{ + Q_OBJECT + +public: + explicit MainWindow(QWidget *parent = nullptr); + ~MainWindow(); + +private: + Ui::MainWindow *ui; +}; + +#endif // MAINWINDOW_H diff --git a/softwareDirectory/AutoVerScheme/mainwindow.ui b/softwareDirectory/AutoVerScheme/mainwindow.ui new file mode 100644 index 0000000..dd4f1c8 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/mainwindow.ui @@ -0,0 +1,24 @@ + + + + + MainWindow + + + + 0 + 0 + 800 + 600 + + + + MainWindow + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u101.png b/softwareDirectory/AutoVerScheme/res/image/Index/u101.png new file mode 100644 index 0000000..9e371e3 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u101.png Binary files differ diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u102.png b/softwareDirectory/AutoVerScheme/res/image/Index/u102.png new file mode 100644 index 0000000..b288067 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u102.png Binary files differ diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u15.png b/softwareDirectory/AutoVerScheme/res/image/Index/u15.png new file mode 100644 index 0000000..7e699e6 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u15.png Binary files differ diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u17.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u17.svg new file mode 100644 index 0000000..acc0502 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u17.svg @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u18.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u18.svg new file mode 100644 index 0000000..6a00a10 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u18.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u19.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u19.svg new file mode 100644 index 0000000..42dea06 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u19.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u20.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u20.svg new file mode 100644 index 0000000..7426e62 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u20.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u21.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u21.svg new file mode 100644 index 0000000..cba8469 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u21.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u22.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u22.svg new file mode 100644 index 0000000..78843a0 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u22.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u23.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u23.svg new file mode 100644 index 0000000..c586b65 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u23.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u24.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u24.svg new file mode 100644 index 0000000..066e006 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u24.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u26.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u26.svg new file mode 100644 index 0000000..1834de5 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u26.svg @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u26_mouseOver.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u26_mouseOver.svg new file mode 100644 index 0000000..1420ba1 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u26_mouseOver.svg @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u33.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u33.svg new file mode 100644 index 0000000..e932d0a --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u33.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u34.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u34.svg new file mode 100644 index 0000000..0ab265b --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u34.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u35.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u35.svg new file mode 100644 index 0000000..7748314 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u35.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/login/u0.png b/softwareDirectory/AutoVerScheme/res/image/login/u0.png new file mode 100644 index 0000000..03d764f --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/login/u0.png Binary files differ diff --git a/softwareDirectory/AutoVerScheme/res/image/login/u2.png b/softwareDirectory/AutoVerScheme/res/image/login/u2.png new file mode 100644 index 0000000..9d8fed7 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/login/u2.png Binary files differ diff --git a/softwareDirectory/AutoVerScheme/res/image/login/u2.svg b/softwareDirectory/AutoVerScheme/res/image/login/u2.svg new file mode 100644 index 0000000..fc1bc92 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/login/u2.svg @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/login/u3.svg b/softwareDirectory/AutoVerScheme/res/image/login/u3.svg new file mode 100644 index 0000000..9d0f6ae --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/login/u3.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/login/u5.png b/softwareDirectory/AutoVerScheme/res/image/login/u5.png new file mode 100644 index 0000000..9b0e06f --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/login/u5.png Binary files differ diff --git a/softwareDirectory/AutoVerScheme/res/image/login/u6.png b/softwareDirectory/AutoVerScheme/res/image/login/u6.png new file mode 100644 index 0000000..de43ce9 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/login/u6.png Binary files differ diff --git a/softwareDirectory/AutoVerScheme/res/image/login/u7.svg b/softwareDirectory/AutoVerScheme/res/image/login/u7.svg new file mode 100644 index 0000000..31d19e1 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/login/u7.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/login/u9.png b/softwareDirectory/AutoVerScheme/res/image/login/u9.png new file mode 100644 index 0000000..7a5ec9f --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/login/u9.png Binary files differ diff --git a/softwareDirectory/AutoVerScheme/res/qss.qrc b/softwareDirectory/AutoVerScheme/res/qss.qrc new file mode 100644 index 0000000..3422463 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/qss.qrc @@ -0,0 +1,6 @@ + + + qss/login.css + qss/Index.css + + diff --git a/softwareDirectory/AutoVerScheme/res/qss/Index.css b/softwareDirectory/AutoVerScheme/res/qss/Index.css new file mode 100644 index 0000000..8fad195 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/qss/Index.css @@ -0,0 +1,23 @@ +*{ + +color:black; +font: 18pt 微软雅黑; + +} +QMainWindow +{ +background-image: url(:/image/Index/u15.png); +background-color:white; +} +QToolButton:hover{ + background-image: url(:/image/Index/u26_mouseOver.svg); +} +QToolButton{ +color: white; +background-image: url(:/image/Index/u26.svg); +font-weight: bold; +border-radius: 5px; +text-align: center; +margin:10; +margin-right: 180px; +} diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro new file mode 100644 index 0000000..5b8f852 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro @@ -0,0 +1,48 @@ +QT += core gui +QT += sql +greaterThan(QT_MAJOR_VERSION, 4): QT += widgets + +CONFIG += c++11 + +# The following define makes your compiler emit warnings if you use +# any Qt feature that has been marked deprecated (the exact warnings +# depend on your compiler). Please consult the documentation of the +# deprecated API in order to know how to port your code away from it. +DEFINES += QT_DEPRECATED_WARNINGS + +# You can also make your code fail to compile if it uses deprecated APIs. +# In order to do so, uncomment the following line. +# You can also select to disable deprecated APIs only up to a certain version of Qt. +#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 + +SOURCES += \ + indexwindow.cpp \ + loginwindow.cpp \ + main.cpp \ + mainwindow.cpp \ + testview.cpp + +HEADERS += \ + indexwindow.h \ + loginwindow.h \ + mainwindow.h \ + testview.h + +FORMS += \ + indexwindow.ui \ + loginwindow.ui \ + mainwindow.ui \ + testview.ui + +# Default rules for deployment. +qnx: target.path = /tmp/$${TARGET}/bin +else: unix:!android: target.path = /opt/$${TARGET}/bin +!isEmpty(target.path): INSTALLS += target + +RESOURCES += \ + res/qss.qrc \ + res/res.qrc + +DISTFILES += \ + res/image/u2.png + diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user new file mode 100644 index 0000000..1f5ec64 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user @@ -0,0 +1,562 @@ + + + + + + EnvironmentId + {c08df58c-84a7-4965-bca6-e98789474efa} + + + ProjectExplorer.Project.ActiveTarget + 0 + + + ProjectExplorer.Project.EditorSettings + + true + false + true + + Cpp + + CppGlobal + + + + QmlJS + + QmlJSGlobal + + + 2 + UTF-8 + false + 4 + false + 80 + true + true + 1 + true + false + 0 + true + true + 0 + 8 + true + 1 + true + true + true + false + + + + ProjectExplorer.Project.PluginSettings + + + -fno-delayed-template-parsing + + true + + + + ProjectExplorer.Project.Target.0 + + Desktop Qt 5.14.2 MinGW 64-bit + Desktop Qt 5.14.2 MinGW 64-bit + qt.qt5.5142.win64_mingw73_kit + 0 + 0 + 0 + + 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 + 0 + 0 + 0 + + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug + + + true + QtProjectManager.QMakeBuildStep + true + + false + false + false + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Debug + Qt4ProjectManager.Qt4BuildConfiguration + 2 + + + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Release + + + true + QtProjectManager.QMakeBuildStep + false + + false + false + true + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Release + Qt4ProjectManager.Qt4BuildConfiguration + 0 + + + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Profile + + + true + QtProjectManager.QMakeBuildStep + true + + false + true + true + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Profile + Qt4ProjectManager.Qt4BuildConfiguration + 0 + + 3 + + + 0 + Deploy + Deploy + ProjectExplorer.BuildSteps.Deploy + + 1 + ProjectExplorer.DefaultDeployConfiguration + + 1 + + + dwarf + + cpu-cycles + + + 250 + + -e + cpu-cycles + --call-graph + dwarf,4096 + -F + 250 + + -F + true + 4096 + false + false + 1000 + + true + + false + false + false + false + true + 0.01 + 10 + true + kcachegrind + 1 + 25 + + 1 + true + false + true + valgrind + + 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + + 2 + + Qt4ProjectManager.Qt4RunConfiguration:D:/Auto_verification_scheme/AutoVerScheme/AutoVerScheme.pro + D:/Auto_verification_scheme/AutoVerScheme/AutoVerScheme.pro + + false + + false + true + true + false + false + true + + + + 1 + + + + ProjectExplorer.Project.TargetCount + 2 + + + ProjectExplorer.Project.Updater.FileVersion + 22 + + + Version + 22 + + diff --git a/softwareDirectory/AutoVerScheme/indexwindow.cpp b/softwareDirectory/AutoVerScheme/indexwindow.cpp new file mode 100644 index 0000000..3e52c7b --- /dev/null +++ b/softwareDirectory/AutoVerScheme/indexwindow.cpp @@ -0,0 +1,55 @@ +#include "indexwindow.h" +#include "ui_indexwindow.h" +#include "QFile" +#include "QTextStream" + +IndexWindow::IndexWindow(QWidget *parent) : + QMainWindow(parent), + ui(new Ui::IndexWindow) +{ + ui->setupUi(this); + this->initForm(); +} + +IndexWindow::~IndexWindow() +{ + delete ui; +} +void IndexWindow::initForm() +{ + //this->setWindowFlags(Qt::FramelessWindowHint); + //调用样式 + loadStyle(":/qss/Index.css"); + +} + +void IndexWindow::loadStyle(const QString &qssFile) +{ + //加载样式表 + QString qss; + + QFile file(qssFile); + + if (file.open(QFile::ReadOnly)) { + //用QTextStream读取样式文件不用区分文件编码 带bom也行 + QStringList list; + QTextStream in(&file); + //in.setCodec("utf-8"); + while (!in.atEnd()) { + QString line; + in >> line; + list << line; + } + + file.close(); + qss = list.join("\n"); + QString paletteColor = qss.mid(20, 7); + qApp->setPalette(QPalette(paletteColor)); + //用时主要在下面这句 + qApp->setStyleSheet(qss); + } + + +} + + diff --git a/softwareDirectory/AutoVerScheme/indexwindow.h b/softwareDirectory/AutoVerScheme/indexwindow.h new file mode 100644 index 0000000..2aee958 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/indexwindow.h @@ -0,0 +1,26 @@ +#ifndef INDEXWINDOW_H +#define INDEXWINDOW_H + +#include + +namespace Ui { +class IndexWindow; +} + +class IndexWindow : public QMainWindow +{ + Q_OBJECT + +public: + explicit IndexWindow(QWidget *parent = nullptr); + ~IndexWindow(); +private slots: + void initForm(); + void loadStyle(const QString &qssFile); + + +private: + Ui::IndexWindow *ui; +}; + +#endif // INDEXWINDOW_H diff --git a/softwareDirectory/AutoVerScheme/indexwindow.ui b/softwareDirectory/AutoVerScheme/indexwindow.ui new file mode 100644 index 0000000..d7153e0 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/indexwindow.ui @@ -0,0 +1,539 @@ + + + IndexWindow + + + Qt::NonModal + + + + 0 + 0 + 1334 + 789 + + + + + 0 + 0 + + + + MainWindow + + + + + + + 100 + 100 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + 6 + + + QLayout::SetFixedSize + + + 0 + + + 0 + + + + + Qt::Horizontal + + + QSizePolicy::Fixed + + + + 120 + 13 + + + + + + + + + 0 + 0 + + + + + 560 + 0 + + + + Qt::DefaultContextMenu + + + color: white; +font-weight: bold; +font-size: 24pt; + + + + + QFrame::NoFrame + + + QFrame::Plain + + + 自动检定系统 + + + Qt::AutoText + + + false + + + Qt::AlignCenter + + + + + + + Qt::Horizontal + + + QSizePolicy::Fixed + + + + 40 + 13 + + + + + + + + + + Qt::Vertical + + + QSizePolicy::Fixed + + + + 50 + 80 + + + + + + + + + + Qt::Vertical + + + QSizePolicy::Fixed + + + + 20 + 120 + + + + + + + + Qt::Horizontal + + + + 100 + 20 + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + 0 + 0 + + + + + 310 + 190 + + + + OpenHandCursor + + + margin-right: 0px; + + + 信息管理 + + + + 60 + 60 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + Qt::Horizontal + + + + 327 + 20 + + + + + + + + + 0 + 0 + + + + + 490 + 190 + + + + OpenHandCursor + + + + + + 自动核查 + + + + 60 + 60 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + + 0 + 0 + + + + + 490 + 190 + + + + OpenHandCursor + + + + + + 自动检定 + + + + 60 + 60 + + + + false + + + false + + + Qt::ToolButtonTextUnderIcon + + + + + + + + 0 + 0 + + + + + 490 + 190 + + + + OpenHandCursor + + + + + + 核查程序管理 + + + + 60 + 60 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + Qt::Horizontal + + + + 327 + 20 + + + + + + + + + 0 + 0 + + + + + 310 + 190 + + + + OpenHandCursor + + + margin-right: 0px; + + + 数据同步 + + + + 60 + 60 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + Qt::Vertical + + + QSizePolicy::Fixed + + + + 20 + 120 + + + + + + + + Qt::Vertical + + + QSizePolicy::Fixed + + + + 20 + 120 + + + + + + + + + 0 + 0 + + + + + 490 + 190 + + + + OpenHandCursor + + + + + + 检定程序管理 + + + + 60 + 60 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + + + + + + 0 + 0 + + + + + 10 + 10 + + + + color: white; +font-weight: bold; +font-size: 14pt; + + + 欢迎您! 用户: admin + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + Qt::Horizontal + + + QSizePolicy::Fixed + + + + 270 + 20 + + + + + + + + + + + btnConfig + btnData + tbtnMain1 + tbtnMain2 + tbtnMain3 + tbtnConfig1 + tbtnConfig2 + tbtnConfig3 + tbtnConfig4 + tbtnConfig5 + tbtnConfig6 + btnMain + btnHelp + btnExit + + + + diff --git a/softwareDirectory/AutoVerScheme/loginwindow.cpp b/softwareDirectory/AutoVerScheme/loginwindow.cpp new file mode 100644 index 0000000..155988a --- /dev/null +++ b/softwareDirectory/AutoVerScheme/loginwindow.cpp @@ -0,0 +1,68 @@ +#include "loginwindow.h" +#include "ui_loginwindow.h" +#include +#include +#include + +#include "indexwindow.h" + +loginWindow::loginWindow(QWidget *parent): QMainWindow(parent), ui(new Ui::loginWindow) +{ + ui->setupUi(this); + this->initForm(); + ui->label->styleSheet(); + +} + +loginWindow::~loginWindow() +{ + delete ui; +} +void loginWindow::initForm() +{ + //this->setWindowFlags(Qt::FramelessWindowHint); + //调用样式 + loadStyle(":/qss/login.css"); +} + +void loginWindow::loadStyle(const QString &qssFile) +{ + //加载样式表 + QString qss; + + QFile file(qssFile); + + if (file.open(QFile::ReadOnly)) { + //用QTextStream读取样式文件不用区分文件编码 带bom也行 + QStringList list; + QTextStream in(&file); + //in.setCodec("utf-8"); + while (!in.atEnd()) { + QString line; + in >> line; + list << line; + } + + file.close(); + qss = list.join("\n"); + QString paletteColor = qss.mid(20, 7); + qApp->setPalette(QPalette(paletteColor)); + //用时主要在下面这句 + qApp->setStyleSheet(qss); + } + + +} + + +void loginWindow::on_Button_login_clicked() +{ + QMessageBox::information(this, "提示", "登录成功!"); + //查询数据库内是否有账号 + IndexWindow *indexWindow = new IndexWindow; + indexWindow->setWindowState(Qt::WindowMaximized); + indexWindow->show(); + this->close(); + +} + diff --git a/softwareDirectory/AutoVerScheme/loginwindow.h b/softwareDirectory/AutoVerScheme/loginwindow.h new file mode 100644 index 0000000..2695bc3 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/loginwindow.h @@ -0,0 +1,31 @@ +#ifndef MAINWINDOW_H +#define MAINWINDOW_H + +#include +#include + + + +namespace Ui { +class loginWindow; +} + +class loginWindow : public QMainWindow +{ + Q_OBJECT + +public: + explicit loginWindow(QWidget *parent = 0); + ~loginWindow(); +private slots: + void initForm(); + void loadStyle(const QString &qssFile); + void on_Button_login_clicked(); + + +private: + Ui::loginWindow *ui; +private: + QSqlQuery query; +}; +#endif // MAINWINDOW_H diff --git a/softwareDirectory/AutoVerScheme/loginwindow.ui b/softwareDirectory/AutoVerScheme/loginwindow.ui new file mode 100644 index 0000000..ca04751 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/loginwindow.ui @@ -0,0 +1,234 @@ + + + loginWindow + + + + 0 + 0 + 954 + 603 + + + + MainWindow + + + background-color: rgb(255, 255, 255) + + + + + + 110 + 110 + 271 + 231 + + + + background-image: url(:/image/login/u9.png); +background-repeat: no-repeat; background-position: center; +background-color: transparent; + + + + + + + + + 0 + 10 + 491 + 601 + + + + background-image: url(:/image/login/u2.png); +background-repeat: no-repeat; +background-color: transparent; +background-repeat: no-repeat; +background-position: center; +background-size: 100%; + + + + + + + + + 5 + 10 + 491 + 569 + + + + background-image: url(:/image/login/u0.png); +background-repeat: no-repeat; background-position: center; + + + + + + 170 + 350 + 241 + 51 + + + + background-color: transparent; + + + Metrology + + + + + + 490 + 10 + 471 + 571 + + + + + + + 610 + 70 + 271 + 61 + + + + 自动检定软件 + + + + + + 540 + 200 + 61 + 61 + + + + + + + + + + 490 + 10 + 461 + 571 + + + + + + + 540 + 290 + 61 + 61 + + + + + + + + + + 540 + 430 + 341 + 81 + + + + OpenHandCursor + + + + + + 登 录 + + + + + + 610 + 210 + 221 + 41 + + + + 请输入账号 + + + + + + 610 + 300 + 221 + 41 + + + + 请输入账号 + + + + + + 507 + 1 + 72 + 16 + + + + + + + label_4 + graphicsView + label_2 + label_3 + graphicsView_2 + textBrowser + lab_title + textBrowser_2 + textBrowser_3 + Button_login + textEdit_acc + textEdit_pass + label + + + + + 0 + 0 + 954 + 25 + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/main.cpp b/softwareDirectory/AutoVerScheme/main.cpp new file mode 100644 index 0000000..16b6d3f --- /dev/null +++ b/softwareDirectory/AutoVerScheme/main.cpp @@ -0,0 +1,23 @@ +#include "loginwindow.h" +#include "mainwindow.h" +#include +#include "indexWindow.h" +#include "testview.h" + +int main(int argc, char *argv[]) +{ + QApplication a(argc, argv); + // 加载外部的CSS文件 + a.setStyleSheet("file:///path/to/styles.css"); + //设置字体 + QFont font; + font.setFamily("Microsoft Yahei"); + font.setPixelSize(13); + a.setFont(font); + + //TestView s; + //s.show(); + loginWindow w; + w.show(); + return a.exec(); +} diff --git a/softwareDirectory/AutoVerScheme/mainwindow.cpp b/softwareDirectory/AutoVerScheme/mainwindow.cpp new file mode 100644 index 0000000..12d07c0 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/mainwindow.cpp @@ -0,0 +1,14 @@ +#include "mainwindow.h" +#include "ui_mainwindow.h" + +MainWindow::MainWindow(QWidget *parent) : + QMainWindow(parent), + ui(new Ui::MainWindow) +{ + ui->setupUi(this); +} + +MainWindow::~MainWindow() +{ + delete ui; +} diff --git a/softwareDirectory/AutoVerScheme/mainwindow.h b/softwareDirectory/AutoVerScheme/mainwindow.h new file mode 100644 index 0000000..40fd472 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/mainwindow.h @@ -0,0 +1,22 @@ +#ifndef MAINWINDOW_H +#define MAINWINDOW_H + +#include + +namespace Ui { +class MainWindow; +} + +class MainWindow : public QMainWindow +{ + Q_OBJECT + +public: + explicit MainWindow(QWidget *parent = nullptr); + ~MainWindow(); + +private: + Ui::MainWindow *ui; +}; + +#endif // MAINWINDOW_H diff --git a/softwareDirectory/AutoVerScheme/mainwindow.ui b/softwareDirectory/AutoVerScheme/mainwindow.ui new file mode 100644 index 0000000..dd4f1c8 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/mainwindow.ui @@ -0,0 +1,24 @@ + + + + + MainWindow + + + + 0 + 0 + 800 + 600 + + + + MainWindow + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u101.png b/softwareDirectory/AutoVerScheme/res/image/Index/u101.png new file mode 100644 index 0000000..9e371e3 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u101.png Binary files differ diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u102.png b/softwareDirectory/AutoVerScheme/res/image/Index/u102.png new file mode 100644 index 0000000..b288067 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u102.png Binary files differ diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u15.png b/softwareDirectory/AutoVerScheme/res/image/Index/u15.png new file mode 100644 index 0000000..7e699e6 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u15.png Binary files differ diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u17.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u17.svg new file mode 100644 index 0000000..acc0502 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u17.svg @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u18.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u18.svg new file mode 100644 index 0000000..6a00a10 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u18.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u19.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u19.svg new file mode 100644 index 0000000..42dea06 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u19.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u20.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u20.svg new file mode 100644 index 0000000..7426e62 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u20.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u21.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u21.svg new file mode 100644 index 0000000..cba8469 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u21.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u22.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u22.svg new file mode 100644 index 0000000..78843a0 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u22.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u23.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u23.svg new file mode 100644 index 0000000..c586b65 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u23.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u24.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u24.svg new file mode 100644 index 0000000..066e006 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u24.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u26.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u26.svg new file mode 100644 index 0000000..1834de5 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u26.svg @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u26_mouseOver.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u26_mouseOver.svg new file mode 100644 index 0000000..1420ba1 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u26_mouseOver.svg @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u33.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u33.svg new file mode 100644 index 0000000..e932d0a --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u33.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u34.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u34.svg new file mode 100644 index 0000000..0ab265b --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u34.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u35.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u35.svg new file mode 100644 index 0000000..7748314 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u35.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/login/u0.png b/softwareDirectory/AutoVerScheme/res/image/login/u0.png new file mode 100644 index 0000000..03d764f --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/login/u0.png Binary files differ diff --git a/softwareDirectory/AutoVerScheme/res/image/login/u2.png b/softwareDirectory/AutoVerScheme/res/image/login/u2.png new file mode 100644 index 0000000..9d8fed7 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/login/u2.png Binary files differ diff --git a/softwareDirectory/AutoVerScheme/res/image/login/u2.svg b/softwareDirectory/AutoVerScheme/res/image/login/u2.svg new file mode 100644 index 0000000..fc1bc92 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/login/u2.svg @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/login/u3.svg b/softwareDirectory/AutoVerScheme/res/image/login/u3.svg new file mode 100644 index 0000000..9d0f6ae --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/login/u3.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/login/u5.png b/softwareDirectory/AutoVerScheme/res/image/login/u5.png new file mode 100644 index 0000000..9b0e06f --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/login/u5.png Binary files differ diff --git a/softwareDirectory/AutoVerScheme/res/image/login/u6.png b/softwareDirectory/AutoVerScheme/res/image/login/u6.png new file mode 100644 index 0000000..de43ce9 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/login/u6.png Binary files differ diff --git a/softwareDirectory/AutoVerScheme/res/image/login/u7.svg b/softwareDirectory/AutoVerScheme/res/image/login/u7.svg new file mode 100644 index 0000000..31d19e1 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/login/u7.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/login/u9.png b/softwareDirectory/AutoVerScheme/res/image/login/u9.png new file mode 100644 index 0000000..7a5ec9f --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/login/u9.png Binary files differ diff --git a/softwareDirectory/AutoVerScheme/res/qss.qrc b/softwareDirectory/AutoVerScheme/res/qss.qrc new file mode 100644 index 0000000..3422463 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/qss.qrc @@ -0,0 +1,6 @@ + + + qss/login.css + qss/Index.css + + diff --git a/softwareDirectory/AutoVerScheme/res/qss/Index.css b/softwareDirectory/AutoVerScheme/res/qss/Index.css new file mode 100644 index 0000000..8fad195 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/qss/Index.css @@ -0,0 +1,23 @@ +*{ + +color:black; +font: 18pt 微软雅黑; + +} +QMainWindow +{ +background-image: url(:/image/Index/u15.png); +background-color:white; +} +QToolButton:hover{ + background-image: url(:/image/Index/u26_mouseOver.svg); +} +QToolButton{ +color: white; +background-image: url(:/image/Index/u26.svg); +font-weight: bold; +border-radius: 5px; +text-align: center; +margin:10; +margin-right: 180px; +} diff --git a/softwareDirectory/AutoVerScheme/res/qss/login.css b/softwareDirectory/AutoVerScheme/res/qss/login.css new file mode 100644 index 0000000..f9aea6c --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/qss/login.css @@ -0,0 +1,69 @@ +*{ + border:none; + color: black; +} +QTextBrowser#textBrowser_2{ +background-image: url(:/image/login/u5.png); +background-repeat: no-repeat; +background-color: transparent; +background-position: center; +border:none; +background-size: contain; + +} +QTextBrowser#textBrowser_3{ +background-image: url(:/image/login/u6.png); +background-repeat: no-repeat; +background-color: transparent; +background-position: center; +border:none; +background-size: contain; + +} + +QPushButton#Button_login{ +background-image: url(:/image/login/u7.svg); +background-repeat: no-repeat; +background-color: transparent; +background-position: center; +border:none; +background-size: contain; +color: white; +font-weight: bold; +font-size: 14pt; +} + +Qwidget{ +border:none; +} +QLabel { + + font-size: 12pt; /* 设置字体大小为12点 */ + /* 其他样式属性... */ +} + +QLabel#lab_title{ + + font-size: 18pt; /* 设置字体大小为12点 */ + /* 其他样式属性... */ +} + +QLabel#label_3{ + color: #D7D7D7; + font-size: 16pt; /* 设置字体大小为12点 */ + font-weight: bold; + /* 其他样式属性... */ +} + +QTextEdit#textEdit_acc +{ + border-bottom: 1px solid black; + font-size: 12pt; + vertical-align: middle; +} +QTextEdit#textEdit_pass +{ + border-bottom: 1px solid black; + font-size: 12pt; + vertical-align: middle; +} diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro new file mode 100644 index 0000000..5b8f852 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro @@ -0,0 +1,48 @@ +QT += core gui +QT += sql +greaterThan(QT_MAJOR_VERSION, 4): QT += widgets + +CONFIG += c++11 + +# The following define makes your compiler emit warnings if you use +# any Qt feature that has been marked deprecated (the exact warnings +# depend on your compiler). Please consult the documentation of the +# deprecated API in order to know how to port your code away from it. +DEFINES += QT_DEPRECATED_WARNINGS + +# You can also make your code fail to compile if it uses deprecated APIs. +# In order to do so, uncomment the following line. +# You can also select to disable deprecated APIs only up to a certain version of Qt. +#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 + +SOURCES += \ + indexwindow.cpp \ + loginwindow.cpp \ + main.cpp \ + mainwindow.cpp \ + testview.cpp + +HEADERS += \ + indexwindow.h \ + loginwindow.h \ + mainwindow.h \ + testview.h + +FORMS += \ + indexwindow.ui \ + loginwindow.ui \ + mainwindow.ui \ + testview.ui + +# Default rules for deployment. +qnx: target.path = /tmp/$${TARGET}/bin +else: unix:!android: target.path = /opt/$${TARGET}/bin +!isEmpty(target.path): INSTALLS += target + +RESOURCES += \ + res/qss.qrc \ + res/res.qrc + +DISTFILES += \ + res/image/u2.png + diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user new file mode 100644 index 0000000..1f5ec64 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user @@ -0,0 +1,562 @@ + + + + + + EnvironmentId + {c08df58c-84a7-4965-bca6-e98789474efa} + + + ProjectExplorer.Project.ActiveTarget + 0 + + + ProjectExplorer.Project.EditorSettings + + true + false + true + + Cpp + + CppGlobal + + + + QmlJS + + QmlJSGlobal + + + 2 + UTF-8 + false + 4 + false + 80 + true + true + 1 + true + false + 0 + true + true + 0 + 8 + true + 1 + true + true + true + false + + + + ProjectExplorer.Project.PluginSettings + + + -fno-delayed-template-parsing + + true + + + + ProjectExplorer.Project.Target.0 + + Desktop Qt 5.14.2 MinGW 64-bit + Desktop Qt 5.14.2 MinGW 64-bit + qt.qt5.5142.win64_mingw73_kit + 0 + 0 + 0 + + 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 + 0 + 0 + 0 + + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug + + + true + QtProjectManager.QMakeBuildStep + true + + false + false + false + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Debug + Qt4ProjectManager.Qt4BuildConfiguration + 2 + + + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Release + + + true + QtProjectManager.QMakeBuildStep + false + + false + false + true + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Release + Qt4ProjectManager.Qt4BuildConfiguration + 0 + + + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Profile + + + true + QtProjectManager.QMakeBuildStep + true + + false + true + true + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Profile + Qt4ProjectManager.Qt4BuildConfiguration + 0 + + 3 + + + 0 + Deploy + Deploy + ProjectExplorer.BuildSteps.Deploy + + 1 + ProjectExplorer.DefaultDeployConfiguration + + 1 + + + dwarf + + cpu-cycles + + + 250 + + -e + cpu-cycles + --call-graph + dwarf,4096 + -F + 250 + + -F + true + 4096 + false + false + 1000 + + true + + false + false + false + false + true + 0.01 + 10 + true + kcachegrind + 1 + 25 + + 1 + true + false + true + valgrind + + 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + + 2 + + Qt4ProjectManager.Qt4RunConfiguration:D:/Auto_verification_scheme/AutoVerScheme/AutoVerScheme.pro + D:/Auto_verification_scheme/AutoVerScheme/AutoVerScheme.pro + + false + + false + true + true + false + false + true + + + + 1 + + + + ProjectExplorer.Project.TargetCount + 2 + + + ProjectExplorer.Project.Updater.FileVersion + 22 + + + Version + 22 + + diff --git a/softwareDirectory/AutoVerScheme/indexwindow.cpp b/softwareDirectory/AutoVerScheme/indexwindow.cpp new file mode 100644 index 0000000..3e52c7b --- /dev/null +++ b/softwareDirectory/AutoVerScheme/indexwindow.cpp @@ -0,0 +1,55 @@ +#include "indexwindow.h" +#include "ui_indexwindow.h" +#include "QFile" +#include "QTextStream" + +IndexWindow::IndexWindow(QWidget *parent) : + QMainWindow(parent), + ui(new Ui::IndexWindow) +{ + ui->setupUi(this); + this->initForm(); +} + +IndexWindow::~IndexWindow() +{ + delete ui; +} +void IndexWindow::initForm() +{ + //this->setWindowFlags(Qt::FramelessWindowHint); + //调用样式 + loadStyle(":/qss/Index.css"); + +} + +void IndexWindow::loadStyle(const QString &qssFile) +{ + //加载样式表 + QString qss; + + QFile file(qssFile); + + if (file.open(QFile::ReadOnly)) { + //用QTextStream读取样式文件不用区分文件编码 带bom也行 + QStringList list; + QTextStream in(&file); + //in.setCodec("utf-8"); + while (!in.atEnd()) { + QString line; + in >> line; + list << line; + } + + file.close(); + qss = list.join("\n"); + QString paletteColor = qss.mid(20, 7); + qApp->setPalette(QPalette(paletteColor)); + //用时主要在下面这句 + qApp->setStyleSheet(qss); + } + + +} + + diff --git a/softwareDirectory/AutoVerScheme/indexwindow.h b/softwareDirectory/AutoVerScheme/indexwindow.h new file mode 100644 index 0000000..2aee958 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/indexwindow.h @@ -0,0 +1,26 @@ +#ifndef INDEXWINDOW_H +#define INDEXWINDOW_H + +#include + +namespace Ui { +class IndexWindow; +} + +class IndexWindow : public QMainWindow +{ + Q_OBJECT + +public: + explicit IndexWindow(QWidget *parent = nullptr); + ~IndexWindow(); +private slots: + void initForm(); + void loadStyle(const QString &qssFile); + + +private: + Ui::IndexWindow *ui; +}; + +#endif // INDEXWINDOW_H diff --git a/softwareDirectory/AutoVerScheme/indexwindow.ui b/softwareDirectory/AutoVerScheme/indexwindow.ui new file mode 100644 index 0000000..d7153e0 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/indexwindow.ui @@ -0,0 +1,539 @@ + + + IndexWindow + + + Qt::NonModal + + + + 0 + 0 + 1334 + 789 + + + + + 0 + 0 + + + + MainWindow + + + + + + + 100 + 100 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + 6 + + + QLayout::SetFixedSize + + + 0 + + + 0 + + + + + Qt::Horizontal + + + QSizePolicy::Fixed + + + + 120 + 13 + + + + + + + + + 0 + 0 + + + + + 560 + 0 + + + + Qt::DefaultContextMenu + + + color: white; +font-weight: bold; +font-size: 24pt; + + + + + QFrame::NoFrame + + + QFrame::Plain + + + 自动检定系统 + + + Qt::AutoText + + + false + + + Qt::AlignCenter + + + + + + + Qt::Horizontal + + + QSizePolicy::Fixed + + + + 40 + 13 + + + + + + + + + + Qt::Vertical + + + QSizePolicy::Fixed + + + + 50 + 80 + + + + + + + + + + Qt::Vertical + + + QSizePolicy::Fixed + + + + 20 + 120 + + + + + + + + Qt::Horizontal + + + + 100 + 20 + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + 0 + 0 + + + + + 310 + 190 + + + + OpenHandCursor + + + margin-right: 0px; + + + 信息管理 + + + + 60 + 60 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + Qt::Horizontal + + + + 327 + 20 + + + + + + + + + 0 + 0 + + + + + 490 + 190 + + + + OpenHandCursor + + + + + + 自动核查 + + + + 60 + 60 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + + 0 + 0 + + + + + 490 + 190 + + + + OpenHandCursor + + + + + + 自动检定 + + + + 60 + 60 + + + + false + + + false + + + Qt::ToolButtonTextUnderIcon + + + + + + + + 0 + 0 + + + + + 490 + 190 + + + + OpenHandCursor + + + + + + 核查程序管理 + + + + 60 + 60 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + Qt::Horizontal + + + + 327 + 20 + + + + + + + + + 0 + 0 + + + + + 310 + 190 + + + + OpenHandCursor + + + margin-right: 0px; + + + 数据同步 + + + + 60 + 60 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + Qt::Vertical + + + QSizePolicy::Fixed + + + + 20 + 120 + + + + + + + + Qt::Vertical + + + QSizePolicy::Fixed + + + + 20 + 120 + + + + + + + + + 0 + 0 + + + + + 490 + 190 + + + + OpenHandCursor + + + + + + 检定程序管理 + + + + 60 + 60 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + + + + + + 0 + 0 + + + + + 10 + 10 + + + + color: white; +font-weight: bold; +font-size: 14pt; + + + 欢迎您! 用户: admin + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + Qt::Horizontal + + + QSizePolicy::Fixed + + + + 270 + 20 + + + + + + + + + + + btnConfig + btnData + tbtnMain1 + tbtnMain2 + tbtnMain3 + tbtnConfig1 + tbtnConfig2 + tbtnConfig3 + tbtnConfig4 + tbtnConfig5 + tbtnConfig6 + btnMain + btnHelp + btnExit + + + + diff --git a/softwareDirectory/AutoVerScheme/loginwindow.cpp b/softwareDirectory/AutoVerScheme/loginwindow.cpp new file mode 100644 index 0000000..155988a --- /dev/null +++ b/softwareDirectory/AutoVerScheme/loginwindow.cpp @@ -0,0 +1,68 @@ +#include "loginwindow.h" +#include "ui_loginwindow.h" +#include +#include +#include + +#include "indexwindow.h" + +loginWindow::loginWindow(QWidget *parent): QMainWindow(parent), ui(new Ui::loginWindow) +{ + ui->setupUi(this); + this->initForm(); + ui->label->styleSheet(); + +} + +loginWindow::~loginWindow() +{ + delete ui; +} +void loginWindow::initForm() +{ + //this->setWindowFlags(Qt::FramelessWindowHint); + //调用样式 + loadStyle(":/qss/login.css"); +} + +void loginWindow::loadStyle(const QString &qssFile) +{ + //加载样式表 + QString qss; + + QFile file(qssFile); + + if (file.open(QFile::ReadOnly)) { + //用QTextStream读取样式文件不用区分文件编码 带bom也行 + QStringList list; + QTextStream in(&file); + //in.setCodec("utf-8"); + while (!in.atEnd()) { + QString line; + in >> line; + list << line; + } + + file.close(); + qss = list.join("\n"); + QString paletteColor = qss.mid(20, 7); + qApp->setPalette(QPalette(paletteColor)); + //用时主要在下面这句 + qApp->setStyleSheet(qss); + } + + +} + + +void loginWindow::on_Button_login_clicked() +{ + QMessageBox::information(this, "提示", "登录成功!"); + //查询数据库内是否有账号 + IndexWindow *indexWindow = new IndexWindow; + indexWindow->setWindowState(Qt::WindowMaximized); + indexWindow->show(); + this->close(); + +} + diff --git a/softwareDirectory/AutoVerScheme/loginwindow.h b/softwareDirectory/AutoVerScheme/loginwindow.h new file mode 100644 index 0000000..2695bc3 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/loginwindow.h @@ -0,0 +1,31 @@ +#ifndef MAINWINDOW_H +#define MAINWINDOW_H + +#include +#include + + + +namespace Ui { +class loginWindow; +} + +class loginWindow : public QMainWindow +{ + Q_OBJECT + +public: + explicit loginWindow(QWidget *parent = 0); + ~loginWindow(); +private slots: + void initForm(); + void loadStyle(const QString &qssFile); + void on_Button_login_clicked(); + + +private: + Ui::loginWindow *ui; +private: + QSqlQuery query; +}; +#endif // MAINWINDOW_H diff --git a/softwareDirectory/AutoVerScheme/loginwindow.ui b/softwareDirectory/AutoVerScheme/loginwindow.ui new file mode 100644 index 0000000..ca04751 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/loginwindow.ui @@ -0,0 +1,234 @@ + + + loginWindow + + + + 0 + 0 + 954 + 603 + + + + MainWindow + + + background-color: rgb(255, 255, 255) + + + + + + 110 + 110 + 271 + 231 + + + + background-image: url(:/image/login/u9.png); +background-repeat: no-repeat; background-position: center; +background-color: transparent; + + + + + + + + + 0 + 10 + 491 + 601 + + + + background-image: url(:/image/login/u2.png); +background-repeat: no-repeat; +background-color: transparent; +background-repeat: no-repeat; +background-position: center; +background-size: 100%; + + + + + + + + + 5 + 10 + 491 + 569 + + + + background-image: url(:/image/login/u0.png); +background-repeat: no-repeat; background-position: center; + + + + + + 170 + 350 + 241 + 51 + + + + background-color: transparent; + + + Metrology + + + + + + 490 + 10 + 471 + 571 + + + + + + + 610 + 70 + 271 + 61 + + + + 自动检定软件 + + + + + + 540 + 200 + 61 + 61 + + + + + + + + + + 490 + 10 + 461 + 571 + + + + + + + 540 + 290 + 61 + 61 + + + + + + + + + + 540 + 430 + 341 + 81 + + + + OpenHandCursor + + + + + + 登 录 + + + + + + 610 + 210 + 221 + 41 + + + + 请输入账号 + + + + + + 610 + 300 + 221 + 41 + + + + 请输入账号 + + + + + + 507 + 1 + 72 + 16 + + + + + + + label_4 + graphicsView + label_2 + label_3 + graphicsView_2 + textBrowser + lab_title + textBrowser_2 + textBrowser_3 + Button_login + textEdit_acc + textEdit_pass + label + + + + + 0 + 0 + 954 + 25 + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/main.cpp b/softwareDirectory/AutoVerScheme/main.cpp new file mode 100644 index 0000000..16b6d3f --- /dev/null +++ b/softwareDirectory/AutoVerScheme/main.cpp @@ -0,0 +1,23 @@ +#include "loginwindow.h" +#include "mainwindow.h" +#include +#include "indexWindow.h" +#include "testview.h" + +int main(int argc, char *argv[]) +{ + QApplication a(argc, argv); + // 加载外部的CSS文件 + a.setStyleSheet("file:///path/to/styles.css"); + //设置字体 + QFont font; + font.setFamily("Microsoft Yahei"); + font.setPixelSize(13); + a.setFont(font); + + //TestView s; + //s.show(); + loginWindow w; + w.show(); + return a.exec(); +} diff --git a/softwareDirectory/AutoVerScheme/mainwindow.cpp b/softwareDirectory/AutoVerScheme/mainwindow.cpp new file mode 100644 index 0000000..12d07c0 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/mainwindow.cpp @@ -0,0 +1,14 @@ +#include "mainwindow.h" +#include "ui_mainwindow.h" + +MainWindow::MainWindow(QWidget *parent) : + QMainWindow(parent), + ui(new Ui::MainWindow) +{ + ui->setupUi(this); +} + +MainWindow::~MainWindow() +{ + delete ui; +} diff --git a/softwareDirectory/AutoVerScheme/mainwindow.h b/softwareDirectory/AutoVerScheme/mainwindow.h new file mode 100644 index 0000000..40fd472 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/mainwindow.h @@ -0,0 +1,22 @@ +#ifndef MAINWINDOW_H +#define MAINWINDOW_H + +#include + +namespace Ui { +class MainWindow; +} + +class MainWindow : public QMainWindow +{ + Q_OBJECT + +public: + explicit MainWindow(QWidget *parent = nullptr); + ~MainWindow(); + +private: + Ui::MainWindow *ui; +}; + +#endif // MAINWINDOW_H diff --git a/softwareDirectory/AutoVerScheme/mainwindow.ui b/softwareDirectory/AutoVerScheme/mainwindow.ui new file mode 100644 index 0000000..dd4f1c8 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/mainwindow.ui @@ -0,0 +1,24 @@ + + + + + MainWindow + + + + 0 + 0 + 800 + 600 + + + + MainWindow + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u101.png b/softwareDirectory/AutoVerScheme/res/image/Index/u101.png new file mode 100644 index 0000000..9e371e3 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u101.png Binary files differ diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u102.png b/softwareDirectory/AutoVerScheme/res/image/Index/u102.png new file mode 100644 index 0000000..b288067 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u102.png Binary files differ diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u15.png b/softwareDirectory/AutoVerScheme/res/image/Index/u15.png new file mode 100644 index 0000000..7e699e6 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u15.png Binary files differ diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u17.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u17.svg new file mode 100644 index 0000000..acc0502 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u17.svg @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u18.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u18.svg new file mode 100644 index 0000000..6a00a10 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u18.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u19.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u19.svg new file mode 100644 index 0000000..42dea06 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u19.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u20.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u20.svg new file mode 100644 index 0000000..7426e62 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u20.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u21.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u21.svg new file mode 100644 index 0000000..cba8469 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u21.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u22.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u22.svg new file mode 100644 index 0000000..78843a0 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u22.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u23.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u23.svg new file mode 100644 index 0000000..c586b65 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u23.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u24.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u24.svg new file mode 100644 index 0000000..066e006 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u24.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u26.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u26.svg new file mode 100644 index 0000000..1834de5 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u26.svg @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u26_mouseOver.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u26_mouseOver.svg new file mode 100644 index 0000000..1420ba1 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u26_mouseOver.svg @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u33.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u33.svg new file mode 100644 index 0000000..e932d0a --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u33.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u34.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u34.svg new file mode 100644 index 0000000..0ab265b --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u34.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u35.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u35.svg new file mode 100644 index 0000000..7748314 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u35.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/login/u0.png b/softwareDirectory/AutoVerScheme/res/image/login/u0.png new file mode 100644 index 0000000..03d764f --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/login/u0.png Binary files differ diff --git a/softwareDirectory/AutoVerScheme/res/image/login/u2.png b/softwareDirectory/AutoVerScheme/res/image/login/u2.png new file mode 100644 index 0000000..9d8fed7 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/login/u2.png Binary files differ diff --git a/softwareDirectory/AutoVerScheme/res/image/login/u2.svg b/softwareDirectory/AutoVerScheme/res/image/login/u2.svg new file mode 100644 index 0000000..fc1bc92 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/login/u2.svg @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/login/u3.svg b/softwareDirectory/AutoVerScheme/res/image/login/u3.svg new file mode 100644 index 0000000..9d0f6ae --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/login/u3.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/login/u5.png b/softwareDirectory/AutoVerScheme/res/image/login/u5.png new file mode 100644 index 0000000..9b0e06f --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/login/u5.png Binary files differ diff --git a/softwareDirectory/AutoVerScheme/res/image/login/u6.png b/softwareDirectory/AutoVerScheme/res/image/login/u6.png new file mode 100644 index 0000000..de43ce9 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/login/u6.png Binary files differ diff --git a/softwareDirectory/AutoVerScheme/res/image/login/u7.svg b/softwareDirectory/AutoVerScheme/res/image/login/u7.svg new file mode 100644 index 0000000..31d19e1 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/login/u7.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/login/u9.png b/softwareDirectory/AutoVerScheme/res/image/login/u9.png new file mode 100644 index 0000000..7a5ec9f --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/login/u9.png Binary files differ diff --git a/softwareDirectory/AutoVerScheme/res/qss.qrc b/softwareDirectory/AutoVerScheme/res/qss.qrc new file mode 100644 index 0000000..3422463 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/qss.qrc @@ -0,0 +1,6 @@ + + + qss/login.css + qss/Index.css + + diff --git a/softwareDirectory/AutoVerScheme/res/qss/Index.css b/softwareDirectory/AutoVerScheme/res/qss/Index.css new file mode 100644 index 0000000..8fad195 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/qss/Index.css @@ -0,0 +1,23 @@ +*{ + +color:black; +font: 18pt 微软雅黑; + +} +QMainWindow +{ +background-image: url(:/image/Index/u15.png); +background-color:white; +} +QToolButton:hover{ + background-image: url(:/image/Index/u26_mouseOver.svg); +} +QToolButton{ +color: white; +background-image: url(:/image/Index/u26.svg); +font-weight: bold; +border-radius: 5px; +text-align: center; +margin:10; +margin-right: 180px; +} diff --git a/softwareDirectory/AutoVerScheme/res/qss/login.css b/softwareDirectory/AutoVerScheme/res/qss/login.css new file mode 100644 index 0000000..f9aea6c --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/qss/login.css @@ -0,0 +1,69 @@ +*{ + border:none; + color: black; +} +QTextBrowser#textBrowser_2{ +background-image: url(:/image/login/u5.png); +background-repeat: no-repeat; +background-color: transparent; +background-position: center; +border:none; +background-size: contain; + +} +QTextBrowser#textBrowser_3{ +background-image: url(:/image/login/u6.png); +background-repeat: no-repeat; +background-color: transparent; +background-position: center; +border:none; +background-size: contain; + +} + +QPushButton#Button_login{ +background-image: url(:/image/login/u7.svg); +background-repeat: no-repeat; +background-color: transparent; +background-position: center; +border:none; +background-size: contain; +color: white; +font-weight: bold; +font-size: 14pt; +} + +Qwidget{ +border:none; +} +QLabel { + + font-size: 12pt; /* 设置字体大小为12点 */ + /* 其他样式属性... */ +} + +QLabel#lab_title{ + + font-size: 18pt; /* 设置字体大小为12点 */ + /* 其他样式属性... */ +} + +QLabel#label_3{ + color: #D7D7D7; + font-size: 16pt; /* 设置字体大小为12点 */ + font-weight: bold; + /* 其他样式属性... */ +} + +QTextEdit#textEdit_acc +{ + border-bottom: 1px solid black; + font-size: 12pt; + vertical-align: middle; +} +QTextEdit#textEdit_pass +{ + border-bottom: 1px solid black; + font-size: 12pt; + vertical-align: middle; +} diff --git a/softwareDirectory/AutoVerScheme/res/qss/loginImage/1.keep b/softwareDirectory/AutoVerScheme/res/qss/loginImage/1.keep new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/qss/loginImage/1.keep diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro new file mode 100644 index 0000000..5b8f852 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro @@ -0,0 +1,48 @@ +QT += core gui +QT += sql +greaterThan(QT_MAJOR_VERSION, 4): QT += widgets + +CONFIG += c++11 + +# The following define makes your compiler emit warnings if you use +# any Qt feature that has been marked deprecated (the exact warnings +# depend on your compiler). Please consult the documentation of the +# deprecated API in order to know how to port your code away from it. +DEFINES += QT_DEPRECATED_WARNINGS + +# You can also make your code fail to compile if it uses deprecated APIs. +# In order to do so, uncomment the following line. +# You can also select to disable deprecated APIs only up to a certain version of Qt. +#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 + +SOURCES += \ + indexwindow.cpp \ + loginwindow.cpp \ + main.cpp \ + mainwindow.cpp \ + testview.cpp + +HEADERS += \ + indexwindow.h \ + loginwindow.h \ + mainwindow.h \ + testview.h + +FORMS += \ + indexwindow.ui \ + loginwindow.ui \ + mainwindow.ui \ + testview.ui + +# Default rules for deployment. +qnx: target.path = /tmp/$${TARGET}/bin +else: unix:!android: target.path = /opt/$${TARGET}/bin +!isEmpty(target.path): INSTALLS += target + +RESOURCES += \ + res/qss.qrc \ + res/res.qrc + +DISTFILES += \ + res/image/u2.png + diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user new file mode 100644 index 0000000..1f5ec64 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user @@ -0,0 +1,562 @@ + + + + + + EnvironmentId + {c08df58c-84a7-4965-bca6-e98789474efa} + + + ProjectExplorer.Project.ActiveTarget + 0 + + + ProjectExplorer.Project.EditorSettings + + true + false + true + + Cpp + + CppGlobal + + + + QmlJS + + QmlJSGlobal + + + 2 + UTF-8 + false + 4 + false + 80 + true + true + 1 + true + false + 0 + true + true + 0 + 8 + true + 1 + true + true + true + false + + + + ProjectExplorer.Project.PluginSettings + + + -fno-delayed-template-parsing + + true + + + + ProjectExplorer.Project.Target.0 + + Desktop Qt 5.14.2 MinGW 64-bit + Desktop Qt 5.14.2 MinGW 64-bit + qt.qt5.5142.win64_mingw73_kit + 0 + 0 + 0 + + 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 + 0 + 0 + 0 + + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug + + + true + QtProjectManager.QMakeBuildStep + true + + false + false + false + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Debug + Qt4ProjectManager.Qt4BuildConfiguration + 2 + + + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Release + + + true + QtProjectManager.QMakeBuildStep + false + + false + false + true + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Release + Qt4ProjectManager.Qt4BuildConfiguration + 0 + + + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Profile + + + true + QtProjectManager.QMakeBuildStep + true + + false + true + true + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Profile + Qt4ProjectManager.Qt4BuildConfiguration + 0 + + 3 + + + 0 + Deploy + Deploy + ProjectExplorer.BuildSteps.Deploy + + 1 + ProjectExplorer.DefaultDeployConfiguration + + 1 + + + dwarf + + cpu-cycles + + + 250 + + -e + cpu-cycles + --call-graph + dwarf,4096 + -F + 250 + + -F + true + 4096 + false + false + 1000 + + true + + false + false + false + false + true + 0.01 + 10 + true + kcachegrind + 1 + 25 + + 1 + true + false + true + valgrind + + 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + + 2 + + Qt4ProjectManager.Qt4RunConfiguration:D:/Auto_verification_scheme/AutoVerScheme/AutoVerScheme.pro + D:/Auto_verification_scheme/AutoVerScheme/AutoVerScheme.pro + + false + + false + true + true + false + false + true + + + + 1 + + + + ProjectExplorer.Project.TargetCount + 2 + + + ProjectExplorer.Project.Updater.FileVersion + 22 + + + Version + 22 + + diff --git a/softwareDirectory/AutoVerScheme/indexwindow.cpp b/softwareDirectory/AutoVerScheme/indexwindow.cpp new file mode 100644 index 0000000..3e52c7b --- /dev/null +++ b/softwareDirectory/AutoVerScheme/indexwindow.cpp @@ -0,0 +1,55 @@ +#include "indexwindow.h" +#include "ui_indexwindow.h" +#include "QFile" +#include "QTextStream" + +IndexWindow::IndexWindow(QWidget *parent) : + QMainWindow(parent), + ui(new Ui::IndexWindow) +{ + ui->setupUi(this); + this->initForm(); +} + +IndexWindow::~IndexWindow() +{ + delete ui; +} +void IndexWindow::initForm() +{ + //this->setWindowFlags(Qt::FramelessWindowHint); + //调用样式 + loadStyle(":/qss/Index.css"); + +} + +void IndexWindow::loadStyle(const QString &qssFile) +{ + //加载样式表 + QString qss; + + QFile file(qssFile); + + if (file.open(QFile::ReadOnly)) { + //用QTextStream读取样式文件不用区分文件编码 带bom也行 + QStringList list; + QTextStream in(&file); + //in.setCodec("utf-8"); + while (!in.atEnd()) { + QString line; + in >> line; + list << line; + } + + file.close(); + qss = list.join("\n"); + QString paletteColor = qss.mid(20, 7); + qApp->setPalette(QPalette(paletteColor)); + //用时主要在下面这句 + qApp->setStyleSheet(qss); + } + + +} + + diff --git a/softwareDirectory/AutoVerScheme/indexwindow.h b/softwareDirectory/AutoVerScheme/indexwindow.h new file mode 100644 index 0000000..2aee958 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/indexwindow.h @@ -0,0 +1,26 @@ +#ifndef INDEXWINDOW_H +#define INDEXWINDOW_H + +#include + +namespace Ui { +class IndexWindow; +} + +class IndexWindow : public QMainWindow +{ + Q_OBJECT + +public: + explicit IndexWindow(QWidget *parent = nullptr); + ~IndexWindow(); +private slots: + void initForm(); + void loadStyle(const QString &qssFile); + + +private: + Ui::IndexWindow *ui; +}; + +#endif // INDEXWINDOW_H diff --git a/softwareDirectory/AutoVerScheme/indexwindow.ui b/softwareDirectory/AutoVerScheme/indexwindow.ui new file mode 100644 index 0000000..d7153e0 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/indexwindow.ui @@ -0,0 +1,539 @@ + + + IndexWindow + + + Qt::NonModal + + + + 0 + 0 + 1334 + 789 + + + + + 0 + 0 + + + + MainWindow + + + + + + + 100 + 100 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + 6 + + + QLayout::SetFixedSize + + + 0 + + + 0 + + + + + Qt::Horizontal + + + QSizePolicy::Fixed + + + + 120 + 13 + + + + + + + + + 0 + 0 + + + + + 560 + 0 + + + + Qt::DefaultContextMenu + + + color: white; +font-weight: bold; +font-size: 24pt; + + + + + QFrame::NoFrame + + + QFrame::Plain + + + 自动检定系统 + + + Qt::AutoText + + + false + + + Qt::AlignCenter + + + + + + + Qt::Horizontal + + + QSizePolicy::Fixed + + + + 40 + 13 + + + + + + + + + + Qt::Vertical + + + QSizePolicy::Fixed + + + + 50 + 80 + + + + + + + + + + Qt::Vertical + + + QSizePolicy::Fixed + + + + 20 + 120 + + + + + + + + Qt::Horizontal + + + + 100 + 20 + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + 0 + 0 + + + + + 310 + 190 + + + + OpenHandCursor + + + margin-right: 0px; + + + 信息管理 + + + + 60 + 60 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + Qt::Horizontal + + + + 327 + 20 + + + + + + + + + 0 + 0 + + + + + 490 + 190 + + + + OpenHandCursor + + + + + + 自动核查 + + + + 60 + 60 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + + 0 + 0 + + + + + 490 + 190 + + + + OpenHandCursor + + + + + + 自动检定 + + + + 60 + 60 + + + + false + + + false + + + Qt::ToolButtonTextUnderIcon + + + + + + + + 0 + 0 + + + + + 490 + 190 + + + + OpenHandCursor + + + + + + 核查程序管理 + + + + 60 + 60 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + Qt::Horizontal + + + + 327 + 20 + + + + + + + + + 0 + 0 + + + + + 310 + 190 + + + + OpenHandCursor + + + margin-right: 0px; + + + 数据同步 + + + + 60 + 60 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + Qt::Vertical + + + QSizePolicy::Fixed + + + + 20 + 120 + + + + + + + + Qt::Vertical + + + QSizePolicy::Fixed + + + + 20 + 120 + + + + + + + + + 0 + 0 + + + + + 490 + 190 + + + + OpenHandCursor + + + + + + 检定程序管理 + + + + 60 + 60 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + + + + + + 0 + 0 + + + + + 10 + 10 + + + + color: white; +font-weight: bold; +font-size: 14pt; + + + 欢迎您! 用户: admin + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + Qt::Horizontal + + + QSizePolicy::Fixed + + + + 270 + 20 + + + + + + + + + + + btnConfig + btnData + tbtnMain1 + tbtnMain2 + tbtnMain3 + tbtnConfig1 + tbtnConfig2 + tbtnConfig3 + tbtnConfig4 + tbtnConfig5 + tbtnConfig6 + btnMain + btnHelp + btnExit + + + + diff --git a/softwareDirectory/AutoVerScheme/loginwindow.cpp b/softwareDirectory/AutoVerScheme/loginwindow.cpp new file mode 100644 index 0000000..155988a --- /dev/null +++ b/softwareDirectory/AutoVerScheme/loginwindow.cpp @@ -0,0 +1,68 @@ +#include "loginwindow.h" +#include "ui_loginwindow.h" +#include +#include +#include + +#include "indexwindow.h" + +loginWindow::loginWindow(QWidget *parent): QMainWindow(parent), ui(new Ui::loginWindow) +{ + ui->setupUi(this); + this->initForm(); + ui->label->styleSheet(); + +} + +loginWindow::~loginWindow() +{ + delete ui; +} +void loginWindow::initForm() +{ + //this->setWindowFlags(Qt::FramelessWindowHint); + //调用样式 + loadStyle(":/qss/login.css"); +} + +void loginWindow::loadStyle(const QString &qssFile) +{ + //加载样式表 + QString qss; + + QFile file(qssFile); + + if (file.open(QFile::ReadOnly)) { + //用QTextStream读取样式文件不用区分文件编码 带bom也行 + QStringList list; + QTextStream in(&file); + //in.setCodec("utf-8"); + while (!in.atEnd()) { + QString line; + in >> line; + list << line; + } + + file.close(); + qss = list.join("\n"); + QString paletteColor = qss.mid(20, 7); + qApp->setPalette(QPalette(paletteColor)); + //用时主要在下面这句 + qApp->setStyleSheet(qss); + } + + +} + + +void loginWindow::on_Button_login_clicked() +{ + QMessageBox::information(this, "提示", "登录成功!"); + //查询数据库内是否有账号 + IndexWindow *indexWindow = new IndexWindow; + indexWindow->setWindowState(Qt::WindowMaximized); + indexWindow->show(); + this->close(); + +} + diff --git a/softwareDirectory/AutoVerScheme/loginwindow.h b/softwareDirectory/AutoVerScheme/loginwindow.h new file mode 100644 index 0000000..2695bc3 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/loginwindow.h @@ -0,0 +1,31 @@ +#ifndef MAINWINDOW_H +#define MAINWINDOW_H + +#include +#include + + + +namespace Ui { +class loginWindow; +} + +class loginWindow : public QMainWindow +{ + Q_OBJECT + +public: + explicit loginWindow(QWidget *parent = 0); + ~loginWindow(); +private slots: + void initForm(); + void loadStyle(const QString &qssFile); + void on_Button_login_clicked(); + + +private: + Ui::loginWindow *ui; +private: + QSqlQuery query; +}; +#endif // MAINWINDOW_H diff --git a/softwareDirectory/AutoVerScheme/loginwindow.ui b/softwareDirectory/AutoVerScheme/loginwindow.ui new file mode 100644 index 0000000..ca04751 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/loginwindow.ui @@ -0,0 +1,234 @@ + + + loginWindow + + + + 0 + 0 + 954 + 603 + + + + MainWindow + + + background-color: rgb(255, 255, 255) + + + + + + 110 + 110 + 271 + 231 + + + + background-image: url(:/image/login/u9.png); +background-repeat: no-repeat; background-position: center; +background-color: transparent; + + + + + + + + + 0 + 10 + 491 + 601 + + + + background-image: url(:/image/login/u2.png); +background-repeat: no-repeat; +background-color: transparent; +background-repeat: no-repeat; +background-position: center; +background-size: 100%; + + + + + + + + + 5 + 10 + 491 + 569 + + + + background-image: url(:/image/login/u0.png); +background-repeat: no-repeat; background-position: center; + + + + + + 170 + 350 + 241 + 51 + + + + background-color: transparent; + + + Metrology + + + + + + 490 + 10 + 471 + 571 + + + + + + + 610 + 70 + 271 + 61 + + + + 自动检定软件 + + + + + + 540 + 200 + 61 + 61 + + + + + + + + + + 490 + 10 + 461 + 571 + + + + + + + 540 + 290 + 61 + 61 + + + + + + + + + + 540 + 430 + 341 + 81 + + + + OpenHandCursor + + + + + + 登 录 + + + + + + 610 + 210 + 221 + 41 + + + + 请输入账号 + + + + + + 610 + 300 + 221 + 41 + + + + 请输入账号 + + + + + + 507 + 1 + 72 + 16 + + + + + + + label_4 + graphicsView + label_2 + label_3 + graphicsView_2 + textBrowser + lab_title + textBrowser_2 + textBrowser_3 + Button_login + textEdit_acc + textEdit_pass + label + + + + + 0 + 0 + 954 + 25 + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/main.cpp b/softwareDirectory/AutoVerScheme/main.cpp new file mode 100644 index 0000000..16b6d3f --- /dev/null +++ b/softwareDirectory/AutoVerScheme/main.cpp @@ -0,0 +1,23 @@ +#include "loginwindow.h" +#include "mainwindow.h" +#include +#include "indexWindow.h" +#include "testview.h" + +int main(int argc, char *argv[]) +{ + QApplication a(argc, argv); + // 加载外部的CSS文件 + a.setStyleSheet("file:///path/to/styles.css"); + //设置字体 + QFont font; + font.setFamily("Microsoft Yahei"); + font.setPixelSize(13); + a.setFont(font); + + //TestView s; + //s.show(); + loginWindow w; + w.show(); + return a.exec(); +} diff --git a/softwareDirectory/AutoVerScheme/mainwindow.cpp b/softwareDirectory/AutoVerScheme/mainwindow.cpp new file mode 100644 index 0000000..12d07c0 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/mainwindow.cpp @@ -0,0 +1,14 @@ +#include "mainwindow.h" +#include "ui_mainwindow.h" + +MainWindow::MainWindow(QWidget *parent) : + QMainWindow(parent), + ui(new Ui::MainWindow) +{ + ui->setupUi(this); +} + +MainWindow::~MainWindow() +{ + delete ui; +} diff --git a/softwareDirectory/AutoVerScheme/mainwindow.h b/softwareDirectory/AutoVerScheme/mainwindow.h new file mode 100644 index 0000000..40fd472 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/mainwindow.h @@ -0,0 +1,22 @@ +#ifndef MAINWINDOW_H +#define MAINWINDOW_H + +#include + +namespace Ui { +class MainWindow; +} + +class MainWindow : public QMainWindow +{ + Q_OBJECT + +public: + explicit MainWindow(QWidget *parent = nullptr); + ~MainWindow(); + +private: + Ui::MainWindow *ui; +}; + +#endif // MAINWINDOW_H diff --git a/softwareDirectory/AutoVerScheme/mainwindow.ui b/softwareDirectory/AutoVerScheme/mainwindow.ui new file mode 100644 index 0000000..dd4f1c8 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/mainwindow.ui @@ -0,0 +1,24 @@ + + + + + MainWindow + + + + 0 + 0 + 800 + 600 + + + + MainWindow + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u101.png b/softwareDirectory/AutoVerScheme/res/image/Index/u101.png new file mode 100644 index 0000000..9e371e3 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u101.png Binary files differ diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u102.png b/softwareDirectory/AutoVerScheme/res/image/Index/u102.png new file mode 100644 index 0000000..b288067 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u102.png Binary files differ diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u15.png b/softwareDirectory/AutoVerScheme/res/image/Index/u15.png new file mode 100644 index 0000000..7e699e6 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u15.png Binary files differ diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u17.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u17.svg new file mode 100644 index 0000000..acc0502 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u17.svg @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u18.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u18.svg new file mode 100644 index 0000000..6a00a10 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u18.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u19.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u19.svg new file mode 100644 index 0000000..42dea06 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u19.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u20.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u20.svg new file mode 100644 index 0000000..7426e62 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u20.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u21.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u21.svg new file mode 100644 index 0000000..cba8469 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u21.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u22.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u22.svg new file mode 100644 index 0000000..78843a0 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u22.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u23.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u23.svg new file mode 100644 index 0000000..c586b65 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u23.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u24.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u24.svg new file mode 100644 index 0000000..066e006 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u24.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u26.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u26.svg new file mode 100644 index 0000000..1834de5 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u26.svg @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u26_mouseOver.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u26_mouseOver.svg new file mode 100644 index 0000000..1420ba1 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u26_mouseOver.svg @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u33.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u33.svg new file mode 100644 index 0000000..e932d0a --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u33.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u34.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u34.svg new file mode 100644 index 0000000..0ab265b --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u34.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u35.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u35.svg new file mode 100644 index 0000000..7748314 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u35.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/login/u0.png b/softwareDirectory/AutoVerScheme/res/image/login/u0.png new file mode 100644 index 0000000..03d764f --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/login/u0.png Binary files differ diff --git a/softwareDirectory/AutoVerScheme/res/image/login/u2.png b/softwareDirectory/AutoVerScheme/res/image/login/u2.png new file mode 100644 index 0000000..9d8fed7 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/login/u2.png Binary files differ diff --git a/softwareDirectory/AutoVerScheme/res/image/login/u2.svg b/softwareDirectory/AutoVerScheme/res/image/login/u2.svg new file mode 100644 index 0000000..fc1bc92 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/login/u2.svg @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/login/u3.svg b/softwareDirectory/AutoVerScheme/res/image/login/u3.svg new file mode 100644 index 0000000..9d0f6ae --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/login/u3.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/login/u5.png b/softwareDirectory/AutoVerScheme/res/image/login/u5.png new file mode 100644 index 0000000..9b0e06f --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/login/u5.png Binary files differ diff --git a/softwareDirectory/AutoVerScheme/res/image/login/u6.png b/softwareDirectory/AutoVerScheme/res/image/login/u6.png new file mode 100644 index 0000000..de43ce9 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/login/u6.png Binary files differ diff --git a/softwareDirectory/AutoVerScheme/res/image/login/u7.svg b/softwareDirectory/AutoVerScheme/res/image/login/u7.svg new file mode 100644 index 0000000..31d19e1 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/login/u7.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/login/u9.png b/softwareDirectory/AutoVerScheme/res/image/login/u9.png new file mode 100644 index 0000000..7a5ec9f --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/login/u9.png Binary files differ diff --git a/softwareDirectory/AutoVerScheme/res/qss.qrc b/softwareDirectory/AutoVerScheme/res/qss.qrc new file mode 100644 index 0000000..3422463 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/qss.qrc @@ -0,0 +1,6 @@ + + + qss/login.css + qss/Index.css + + diff --git a/softwareDirectory/AutoVerScheme/res/qss/Index.css b/softwareDirectory/AutoVerScheme/res/qss/Index.css new file mode 100644 index 0000000..8fad195 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/qss/Index.css @@ -0,0 +1,23 @@ +*{ + +color:black; +font: 18pt 微软雅黑; + +} +QMainWindow +{ +background-image: url(:/image/Index/u15.png); +background-color:white; +} +QToolButton:hover{ + background-image: url(:/image/Index/u26_mouseOver.svg); +} +QToolButton{ +color: white; +background-image: url(:/image/Index/u26.svg); +font-weight: bold; +border-radius: 5px; +text-align: center; +margin:10; +margin-right: 180px; +} diff --git a/softwareDirectory/AutoVerScheme/res/qss/login.css b/softwareDirectory/AutoVerScheme/res/qss/login.css new file mode 100644 index 0000000..f9aea6c --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/qss/login.css @@ -0,0 +1,69 @@ +*{ + border:none; + color: black; +} +QTextBrowser#textBrowser_2{ +background-image: url(:/image/login/u5.png); +background-repeat: no-repeat; +background-color: transparent; +background-position: center; +border:none; +background-size: contain; + +} +QTextBrowser#textBrowser_3{ +background-image: url(:/image/login/u6.png); +background-repeat: no-repeat; +background-color: transparent; +background-position: center; +border:none; +background-size: contain; + +} + +QPushButton#Button_login{ +background-image: url(:/image/login/u7.svg); +background-repeat: no-repeat; +background-color: transparent; +background-position: center; +border:none; +background-size: contain; +color: white; +font-weight: bold; +font-size: 14pt; +} + +Qwidget{ +border:none; +} +QLabel { + + font-size: 12pt; /* 设置字体大小为12点 */ + /* 其他样式属性... */ +} + +QLabel#lab_title{ + + font-size: 18pt; /* 设置字体大小为12点 */ + /* 其他样式属性... */ +} + +QLabel#label_3{ + color: #D7D7D7; + font-size: 16pt; /* 设置字体大小为12点 */ + font-weight: bold; + /* 其他样式属性... */ +} + +QTextEdit#textEdit_acc +{ + border-bottom: 1px solid black; + font-size: 12pt; + vertical-align: middle; +} +QTextEdit#textEdit_pass +{ + border-bottom: 1px solid black; + font-size: 12pt; + vertical-align: middle; +} diff --git a/softwareDirectory/AutoVerScheme/res/qss/loginImage/1.keep b/softwareDirectory/AutoVerScheme/res/qss/loginImage/1.keep new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/qss/loginImage/1.keep diff --git a/softwareDirectory/AutoVerScheme/res/qss/qss.qrc b/softwareDirectory/AutoVerScheme/res/qss/qss.qrc new file mode 100644 index 0000000..3fd215d --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/qss/qss.qrc @@ -0,0 +1 @@ + diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro new file mode 100644 index 0000000..5b8f852 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro @@ -0,0 +1,48 @@ +QT += core gui +QT += sql +greaterThan(QT_MAJOR_VERSION, 4): QT += widgets + +CONFIG += c++11 + +# The following define makes your compiler emit warnings if you use +# any Qt feature that has been marked deprecated (the exact warnings +# depend on your compiler). Please consult the documentation of the +# deprecated API in order to know how to port your code away from it. +DEFINES += QT_DEPRECATED_WARNINGS + +# You can also make your code fail to compile if it uses deprecated APIs. +# In order to do so, uncomment the following line. +# You can also select to disable deprecated APIs only up to a certain version of Qt. +#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 + +SOURCES += \ + indexwindow.cpp \ + loginwindow.cpp \ + main.cpp \ + mainwindow.cpp \ + testview.cpp + +HEADERS += \ + indexwindow.h \ + loginwindow.h \ + mainwindow.h \ + testview.h + +FORMS += \ + indexwindow.ui \ + loginwindow.ui \ + mainwindow.ui \ + testview.ui + +# Default rules for deployment. +qnx: target.path = /tmp/$${TARGET}/bin +else: unix:!android: target.path = /opt/$${TARGET}/bin +!isEmpty(target.path): INSTALLS += target + +RESOURCES += \ + res/qss.qrc \ + res/res.qrc + +DISTFILES += \ + res/image/u2.png + diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user new file mode 100644 index 0000000..1f5ec64 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user @@ -0,0 +1,562 @@ + + + + + + EnvironmentId + {c08df58c-84a7-4965-bca6-e98789474efa} + + + ProjectExplorer.Project.ActiveTarget + 0 + + + ProjectExplorer.Project.EditorSettings + + true + false + true + + Cpp + + CppGlobal + + + + QmlJS + + QmlJSGlobal + + + 2 + UTF-8 + false + 4 + false + 80 + true + true + 1 + true + false + 0 + true + true + 0 + 8 + true + 1 + true + true + true + false + + + + ProjectExplorer.Project.PluginSettings + + + -fno-delayed-template-parsing + + true + + + + ProjectExplorer.Project.Target.0 + + Desktop Qt 5.14.2 MinGW 64-bit + Desktop Qt 5.14.2 MinGW 64-bit + qt.qt5.5142.win64_mingw73_kit + 0 + 0 + 0 + + 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 + 0 + 0 + 0 + + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug + + + true + QtProjectManager.QMakeBuildStep + true + + false + false + false + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Debug + Qt4ProjectManager.Qt4BuildConfiguration + 2 + + + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Release + + + true + QtProjectManager.QMakeBuildStep + false + + false + false + true + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Release + Qt4ProjectManager.Qt4BuildConfiguration + 0 + + + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Profile + + + true + QtProjectManager.QMakeBuildStep + true + + false + true + true + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Profile + Qt4ProjectManager.Qt4BuildConfiguration + 0 + + 3 + + + 0 + Deploy + Deploy + ProjectExplorer.BuildSteps.Deploy + + 1 + ProjectExplorer.DefaultDeployConfiguration + + 1 + + + dwarf + + cpu-cycles + + + 250 + + -e + cpu-cycles + --call-graph + dwarf,4096 + -F + 250 + + -F + true + 4096 + false + false + 1000 + + true + + false + false + false + false + true + 0.01 + 10 + true + kcachegrind + 1 + 25 + + 1 + true + false + true + valgrind + + 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + + 2 + + Qt4ProjectManager.Qt4RunConfiguration:D:/Auto_verification_scheme/AutoVerScheme/AutoVerScheme.pro + D:/Auto_verification_scheme/AutoVerScheme/AutoVerScheme.pro + + false + + false + true + true + false + false + true + + + + 1 + + + + ProjectExplorer.Project.TargetCount + 2 + + + ProjectExplorer.Project.Updater.FileVersion + 22 + + + Version + 22 + + diff --git a/softwareDirectory/AutoVerScheme/indexwindow.cpp b/softwareDirectory/AutoVerScheme/indexwindow.cpp new file mode 100644 index 0000000..3e52c7b --- /dev/null +++ b/softwareDirectory/AutoVerScheme/indexwindow.cpp @@ -0,0 +1,55 @@ +#include "indexwindow.h" +#include "ui_indexwindow.h" +#include "QFile" +#include "QTextStream" + +IndexWindow::IndexWindow(QWidget *parent) : + QMainWindow(parent), + ui(new Ui::IndexWindow) +{ + ui->setupUi(this); + this->initForm(); +} + +IndexWindow::~IndexWindow() +{ + delete ui; +} +void IndexWindow::initForm() +{ + //this->setWindowFlags(Qt::FramelessWindowHint); + //调用样式 + loadStyle(":/qss/Index.css"); + +} + +void IndexWindow::loadStyle(const QString &qssFile) +{ + //加载样式表 + QString qss; + + QFile file(qssFile); + + if (file.open(QFile::ReadOnly)) { + //用QTextStream读取样式文件不用区分文件编码 带bom也行 + QStringList list; + QTextStream in(&file); + //in.setCodec("utf-8"); + while (!in.atEnd()) { + QString line; + in >> line; + list << line; + } + + file.close(); + qss = list.join("\n"); + QString paletteColor = qss.mid(20, 7); + qApp->setPalette(QPalette(paletteColor)); + //用时主要在下面这句 + qApp->setStyleSheet(qss); + } + + +} + + diff --git a/softwareDirectory/AutoVerScheme/indexwindow.h b/softwareDirectory/AutoVerScheme/indexwindow.h new file mode 100644 index 0000000..2aee958 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/indexwindow.h @@ -0,0 +1,26 @@ +#ifndef INDEXWINDOW_H +#define INDEXWINDOW_H + +#include + +namespace Ui { +class IndexWindow; +} + +class IndexWindow : public QMainWindow +{ + Q_OBJECT + +public: + explicit IndexWindow(QWidget *parent = nullptr); + ~IndexWindow(); +private slots: + void initForm(); + void loadStyle(const QString &qssFile); + + +private: + Ui::IndexWindow *ui; +}; + +#endif // INDEXWINDOW_H diff --git a/softwareDirectory/AutoVerScheme/indexwindow.ui b/softwareDirectory/AutoVerScheme/indexwindow.ui new file mode 100644 index 0000000..d7153e0 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/indexwindow.ui @@ -0,0 +1,539 @@ + + + IndexWindow + + + Qt::NonModal + + + + 0 + 0 + 1334 + 789 + + + + + 0 + 0 + + + + MainWindow + + + + + + + 100 + 100 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + 6 + + + QLayout::SetFixedSize + + + 0 + + + 0 + + + + + Qt::Horizontal + + + QSizePolicy::Fixed + + + + 120 + 13 + + + + + + + + + 0 + 0 + + + + + 560 + 0 + + + + Qt::DefaultContextMenu + + + color: white; +font-weight: bold; +font-size: 24pt; + + + + + QFrame::NoFrame + + + QFrame::Plain + + + 自动检定系统 + + + Qt::AutoText + + + false + + + Qt::AlignCenter + + + + + + + Qt::Horizontal + + + QSizePolicy::Fixed + + + + 40 + 13 + + + + + + + + + + Qt::Vertical + + + QSizePolicy::Fixed + + + + 50 + 80 + + + + + + + + + + Qt::Vertical + + + QSizePolicy::Fixed + + + + 20 + 120 + + + + + + + + Qt::Horizontal + + + + 100 + 20 + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + 0 + 0 + + + + + 310 + 190 + + + + OpenHandCursor + + + margin-right: 0px; + + + 信息管理 + + + + 60 + 60 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + Qt::Horizontal + + + + 327 + 20 + + + + + + + + + 0 + 0 + + + + + 490 + 190 + + + + OpenHandCursor + + + + + + 自动核查 + + + + 60 + 60 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + + 0 + 0 + + + + + 490 + 190 + + + + OpenHandCursor + + + + + + 自动检定 + + + + 60 + 60 + + + + false + + + false + + + Qt::ToolButtonTextUnderIcon + + + + + + + + 0 + 0 + + + + + 490 + 190 + + + + OpenHandCursor + + + + + + 核查程序管理 + + + + 60 + 60 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + Qt::Horizontal + + + + 327 + 20 + + + + + + + + + 0 + 0 + + + + + 310 + 190 + + + + OpenHandCursor + + + margin-right: 0px; + + + 数据同步 + + + + 60 + 60 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + Qt::Vertical + + + QSizePolicy::Fixed + + + + 20 + 120 + + + + + + + + Qt::Vertical + + + QSizePolicy::Fixed + + + + 20 + 120 + + + + + + + + + 0 + 0 + + + + + 490 + 190 + + + + OpenHandCursor + + + + + + 检定程序管理 + + + + 60 + 60 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + + + + + + 0 + 0 + + + + + 10 + 10 + + + + color: white; +font-weight: bold; +font-size: 14pt; + + + 欢迎您! 用户: admin + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + Qt::Horizontal + + + QSizePolicy::Fixed + + + + 270 + 20 + + + + + + + + + + + btnConfig + btnData + tbtnMain1 + tbtnMain2 + tbtnMain3 + tbtnConfig1 + tbtnConfig2 + tbtnConfig3 + tbtnConfig4 + tbtnConfig5 + tbtnConfig6 + btnMain + btnHelp + btnExit + + + + diff --git a/softwareDirectory/AutoVerScheme/loginwindow.cpp b/softwareDirectory/AutoVerScheme/loginwindow.cpp new file mode 100644 index 0000000..155988a --- /dev/null +++ b/softwareDirectory/AutoVerScheme/loginwindow.cpp @@ -0,0 +1,68 @@ +#include "loginwindow.h" +#include "ui_loginwindow.h" +#include +#include +#include + +#include "indexwindow.h" + +loginWindow::loginWindow(QWidget *parent): QMainWindow(parent), ui(new Ui::loginWindow) +{ + ui->setupUi(this); + this->initForm(); + ui->label->styleSheet(); + +} + +loginWindow::~loginWindow() +{ + delete ui; +} +void loginWindow::initForm() +{ + //this->setWindowFlags(Qt::FramelessWindowHint); + //调用样式 + loadStyle(":/qss/login.css"); +} + +void loginWindow::loadStyle(const QString &qssFile) +{ + //加载样式表 + QString qss; + + QFile file(qssFile); + + if (file.open(QFile::ReadOnly)) { + //用QTextStream读取样式文件不用区分文件编码 带bom也行 + QStringList list; + QTextStream in(&file); + //in.setCodec("utf-8"); + while (!in.atEnd()) { + QString line; + in >> line; + list << line; + } + + file.close(); + qss = list.join("\n"); + QString paletteColor = qss.mid(20, 7); + qApp->setPalette(QPalette(paletteColor)); + //用时主要在下面这句 + qApp->setStyleSheet(qss); + } + + +} + + +void loginWindow::on_Button_login_clicked() +{ + QMessageBox::information(this, "提示", "登录成功!"); + //查询数据库内是否有账号 + IndexWindow *indexWindow = new IndexWindow; + indexWindow->setWindowState(Qt::WindowMaximized); + indexWindow->show(); + this->close(); + +} + diff --git a/softwareDirectory/AutoVerScheme/loginwindow.h b/softwareDirectory/AutoVerScheme/loginwindow.h new file mode 100644 index 0000000..2695bc3 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/loginwindow.h @@ -0,0 +1,31 @@ +#ifndef MAINWINDOW_H +#define MAINWINDOW_H + +#include +#include + + + +namespace Ui { +class loginWindow; +} + +class loginWindow : public QMainWindow +{ + Q_OBJECT + +public: + explicit loginWindow(QWidget *parent = 0); + ~loginWindow(); +private slots: + void initForm(); + void loadStyle(const QString &qssFile); + void on_Button_login_clicked(); + + +private: + Ui::loginWindow *ui; +private: + QSqlQuery query; +}; +#endif // MAINWINDOW_H diff --git a/softwareDirectory/AutoVerScheme/loginwindow.ui b/softwareDirectory/AutoVerScheme/loginwindow.ui new file mode 100644 index 0000000..ca04751 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/loginwindow.ui @@ -0,0 +1,234 @@ + + + loginWindow + + + + 0 + 0 + 954 + 603 + + + + MainWindow + + + background-color: rgb(255, 255, 255) + + + + + + 110 + 110 + 271 + 231 + + + + background-image: url(:/image/login/u9.png); +background-repeat: no-repeat; background-position: center; +background-color: transparent; + + + + + + + + + 0 + 10 + 491 + 601 + + + + background-image: url(:/image/login/u2.png); +background-repeat: no-repeat; +background-color: transparent; +background-repeat: no-repeat; +background-position: center; +background-size: 100%; + + + + + + + + + 5 + 10 + 491 + 569 + + + + background-image: url(:/image/login/u0.png); +background-repeat: no-repeat; background-position: center; + + + + + + 170 + 350 + 241 + 51 + + + + background-color: transparent; + + + Metrology + + + + + + 490 + 10 + 471 + 571 + + + + + + + 610 + 70 + 271 + 61 + + + + 自动检定软件 + + + + + + 540 + 200 + 61 + 61 + + + + + + + + + + 490 + 10 + 461 + 571 + + + + + + + 540 + 290 + 61 + 61 + + + + + + + + + + 540 + 430 + 341 + 81 + + + + OpenHandCursor + + + + + + 登 录 + + + + + + 610 + 210 + 221 + 41 + + + + 请输入账号 + + + + + + 610 + 300 + 221 + 41 + + + + 请输入账号 + + + + + + 507 + 1 + 72 + 16 + + + + + + + label_4 + graphicsView + label_2 + label_3 + graphicsView_2 + textBrowser + lab_title + textBrowser_2 + textBrowser_3 + Button_login + textEdit_acc + textEdit_pass + label + + + + + 0 + 0 + 954 + 25 + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/main.cpp b/softwareDirectory/AutoVerScheme/main.cpp new file mode 100644 index 0000000..16b6d3f --- /dev/null +++ b/softwareDirectory/AutoVerScheme/main.cpp @@ -0,0 +1,23 @@ +#include "loginwindow.h" +#include "mainwindow.h" +#include +#include "indexWindow.h" +#include "testview.h" + +int main(int argc, char *argv[]) +{ + QApplication a(argc, argv); + // 加载外部的CSS文件 + a.setStyleSheet("file:///path/to/styles.css"); + //设置字体 + QFont font; + font.setFamily("Microsoft Yahei"); + font.setPixelSize(13); + a.setFont(font); + + //TestView s; + //s.show(); + loginWindow w; + w.show(); + return a.exec(); +} diff --git a/softwareDirectory/AutoVerScheme/mainwindow.cpp b/softwareDirectory/AutoVerScheme/mainwindow.cpp new file mode 100644 index 0000000..12d07c0 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/mainwindow.cpp @@ -0,0 +1,14 @@ +#include "mainwindow.h" +#include "ui_mainwindow.h" + +MainWindow::MainWindow(QWidget *parent) : + QMainWindow(parent), + ui(new Ui::MainWindow) +{ + ui->setupUi(this); +} + +MainWindow::~MainWindow() +{ + delete ui; +} diff --git a/softwareDirectory/AutoVerScheme/mainwindow.h b/softwareDirectory/AutoVerScheme/mainwindow.h new file mode 100644 index 0000000..40fd472 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/mainwindow.h @@ -0,0 +1,22 @@ +#ifndef MAINWINDOW_H +#define MAINWINDOW_H + +#include + +namespace Ui { +class MainWindow; +} + +class MainWindow : public QMainWindow +{ + Q_OBJECT + +public: + explicit MainWindow(QWidget *parent = nullptr); + ~MainWindow(); + +private: + Ui::MainWindow *ui; +}; + +#endif // MAINWINDOW_H diff --git a/softwareDirectory/AutoVerScheme/mainwindow.ui b/softwareDirectory/AutoVerScheme/mainwindow.ui new file mode 100644 index 0000000..dd4f1c8 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/mainwindow.ui @@ -0,0 +1,24 @@ + + + + + MainWindow + + + + 0 + 0 + 800 + 600 + + + + MainWindow + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u101.png b/softwareDirectory/AutoVerScheme/res/image/Index/u101.png new file mode 100644 index 0000000..9e371e3 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u101.png Binary files differ diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u102.png b/softwareDirectory/AutoVerScheme/res/image/Index/u102.png new file mode 100644 index 0000000..b288067 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u102.png Binary files differ diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u15.png b/softwareDirectory/AutoVerScheme/res/image/Index/u15.png new file mode 100644 index 0000000..7e699e6 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u15.png Binary files differ diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u17.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u17.svg new file mode 100644 index 0000000..acc0502 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u17.svg @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u18.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u18.svg new file mode 100644 index 0000000..6a00a10 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u18.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u19.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u19.svg new file mode 100644 index 0000000..42dea06 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u19.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u20.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u20.svg new file mode 100644 index 0000000..7426e62 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u20.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u21.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u21.svg new file mode 100644 index 0000000..cba8469 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u21.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u22.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u22.svg new file mode 100644 index 0000000..78843a0 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u22.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u23.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u23.svg new file mode 100644 index 0000000..c586b65 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u23.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u24.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u24.svg new file mode 100644 index 0000000..066e006 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u24.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u26.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u26.svg new file mode 100644 index 0000000..1834de5 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u26.svg @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u26_mouseOver.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u26_mouseOver.svg new file mode 100644 index 0000000..1420ba1 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u26_mouseOver.svg @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u33.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u33.svg new file mode 100644 index 0000000..e932d0a --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u33.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u34.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u34.svg new file mode 100644 index 0000000..0ab265b --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u34.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u35.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u35.svg new file mode 100644 index 0000000..7748314 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u35.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/login/u0.png b/softwareDirectory/AutoVerScheme/res/image/login/u0.png new file mode 100644 index 0000000..03d764f --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/login/u0.png Binary files differ diff --git a/softwareDirectory/AutoVerScheme/res/image/login/u2.png b/softwareDirectory/AutoVerScheme/res/image/login/u2.png new file mode 100644 index 0000000..9d8fed7 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/login/u2.png Binary files differ diff --git a/softwareDirectory/AutoVerScheme/res/image/login/u2.svg b/softwareDirectory/AutoVerScheme/res/image/login/u2.svg new file mode 100644 index 0000000..fc1bc92 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/login/u2.svg @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/login/u3.svg b/softwareDirectory/AutoVerScheme/res/image/login/u3.svg new file mode 100644 index 0000000..9d0f6ae --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/login/u3.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/login/u5.png b/softwareDirectory/AutoVerScheme/res/image/login/u5.png new file mode 100644 index 0000000..9b0e06f --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/login/u5.png Binary files differ diff --git a/softwareDirectory/AutoVerScheme/res/image/login/u6.png b/softwareDirectory/AutoVerScheme/res/image/login/u6.png new file mode 100644 index 0000000..de43ce9 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/login/u6.png Binary files differ diff --git a/softwareDirectory/AutoVerScheme/res/image/login/u7.svg b/softwareDirectory/AutoVerScheme/res/image/login/u7.svg new file mode 100644 index 0000000..31d19e1 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/login/u7.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/login/u9.png b/softwareDirectory/AutoVerScheme/res/image/login/u9.png new file mode 100644 index 0000000..7a5ec9f --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/login/u9.png Binary files differ diff --git a/softwareDirectory/AutoVerScheme/res/qss.qrc b/softwareDirectory/AutoVerScheme/res/qss.qrc new file mode 100644 index 0000000..3422463 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/qss.qrc @@ -0,0 +1,6 @@ + + + qss/login.css + qss/Index.css + + diff --git a/softwareDirectory/AutoVerScheme/res/qss/Index.css b/softwareDirectory/AutoVerScheme/res/qss/Index.css new file mode 100644 index 0000000..8fad195 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/qss/Index.css @@ -0,0 +1,23 @@ +*{ + +color:black; +font: 18pt 微软雅黑; + +} +QMainWindow +{ +background-image: url(:/image/Index/u15.png); +background-color:white; +} +QToolButton:hover{ + background-image: url(:/image/Index/u26_mouseOver.svg); +} +QToolButton{ +color: white; +background-image: url(:/image/Index/u26.svg); +font-weight: bold; +border-radius: 5px; +text-align: center; +margin:10; +margin-right: 180px; +} diff --git a/softwareDirectory/AutoVerScheme/res/qss/login.css b/softwareDirectory/AutoVerScheme/res/qss/login.css new file mode 100644 index 0000000..f9aea6c --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/qss/login.css @@ -0,0 +1,69 @@ +*{ + border:none; + color: black; +} +QTextBrowser#textBrowser_2{ +background-image: url(:/image/login/u5.png); +background-repeat: no-repeat; +background-color: transparent; +background-position: center; +border:none; +background-size: contain; + +} +QTextBrowser#textBrowser_3{ +background-image: url(:/image/login/u6.png); +background-repeat: no-repeat; +background-color: transparent; +background-position: center; +border:none; +background-size: contain; + +} + +QPushButton#Button_login{ +background-image: url(:/image/login/u7.svg); +background-repeat: no-repeat; +background-color: transparent; +background-position: center; +border:none; +background-size: contain; +color: white; +font-weight: bold; +font-size: 14pt; +} + +Qwidget{ +border:none; +} +QLabel { + + font-size: 12pt; /* 设置字体大小为12点 */ + /* 其他样式属性... */ +} + +QLabel#lab_title{ + + font-size: 18pt; /* 设置字体大小为12点 */ + /* 其他样式属性... */ +} + +QLabel#label_3{ + color: #D7D7D7; + font-size: 16pt; /* 设置字体大小为12点 */ + font-weight: bold; + /* 其他样式属性... */ +} + +QTextEdit#textEdit_acc +{ + border-bottom: 1px solid black; + font-size: 12pt; + vertical-align: middle; +} +QTextEdit#textEdit_pass +{ + border-bottom: 1px solid black; + font-size: 12pt; + vertical-align: middle; +} diff --git a/softwareDirectory/AutoVerScheme/res/qss/loginImage/1.keep b/softwareDirectory/AutoVerScheme/res/qss/loginImage/1.keep new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/qss/loginImage/1.keep diff --git a/softwareDirectory/AutoVerScheme/res/qss/qss.qrc b/softwareDirectory/AutoVerScheme/res/qss/qss.qrc new file mode 100644 index 0000000..3fd215d --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/qss/qss.qrc @@ -0,0 +1 @@ + diff --git a/softwareDirectory/AutoVerScheme/res/res.qrc b/softwareDirectory/AutoVerScheme/res/res.qrc new file mode 100644 index 0000000..5a9e304 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/res.qrc @@ -0,0 +1,28 @@ + + + image/Index/u15.png + image/Index/u17.svg + image/Index/u18.svg + image/Index/u19.svg + image/Index/u20.svg + image/Index/u21.svg + image/Index/u22.svg + image/Index/u23.svg + image/Index/u24.svg + image/Index/u26.svg + image/Index/u26_mouseOver.svg + image/Index/u33.svg + image/Index/u34.svg + image/Index/u35.svg + image/login/u0.png + image/login/u2.png + image/login/u2.svg + image/login/u3.svg + image/login/u5.png + image/login/u6.png + image/login/u7.svg + image/login/u9.png + image/Index/u101.png + image/Index/u102.png + + diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro new file mode 100644 index 0000000..5b8f852 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro @@ -0,0 +1,48 @@ +QT += core gui +QT += sql +greaterThan(QT_MAJOR_VERSION, 4): QT += widgets + +CONFIG += c++11 + +# The following define makes your compiler emit warnings if you use +# any Qt feature that has been marked deprecated (the exact warnings +# depend on your compiler). Please consult the documentation of the +# deprecated API in order to know how to port your code away from it. +DEFINES += QT_DEPRECATED_WARNINGS + +# You can also make your code fail to compile if it uses deprecated APIs. +# In order to do so, uncomment the following line. +# You can also select to disable deprecated APIs only up to a certain version of Qt. +#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 + +SOURCES += \ + indexwindow.cpp \ + loginwindow.cpp \ + main.cpp \ + mainwindow.cpp \ + testview.cpp + +HEADERS += \ + indexwindow.h \ + loginwindow.h \ + mainwindow.h \ + testview.h + +FORMS += \ + indexwindow.ui \ + loginwindow.ui \ + mainwindow.ui \ + testview.ui + +# Default rules for deployment. +qnx: target.path = /tmp/$${TARGET}/bin +else: unix:!android: target.path = /opt/$${TARGET}/bin +!isEmpty(target.path): INSTALLS += target + +RESOURCES += \ + res/qss.qrc \ + res/res.qrc + +DISTFILES += \ + res/image/u2.png + diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user new file mode 100644 index 0000000..1f5ec64 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user @@ -0,0 +1,562 @@ + + + + + + EnvironmentId + {c08df58c-84a7-4965-bca6-e98789474efa} + + + ProjectExplorer.Project.ActiveTarget + 0 + + + ProjectExplorer.Project.EditorSettings + + true + false + true + + Cpp + + CppGlobal + + + + QmlJS + + QmlJSGlobal + + + 2 + UTF-8 + false + 4 + false + 80 + true + true + 1 + true + false + 0 + true + true + 0 + 8 + true + 1 + true + true + true + false + + + + ProjectExplorer.Project.PluginSettings + + + -fno-delayed-template-parsing + + true + + + + ProjectExplorer.Project.Target.0 + + Desktop Qt 5.14.2 MinGW 64-bit + Desktop Qt 5.14.2 MinGW 64-bit + qt.qt5.5142.win64_mingw73_kit + 0 + 0 + 0 + + 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 + 0 + 0 + 0 + + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug + + + true + QtProjectManager.QMakeBuildStep + true + + false + false + false + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Debug + Qt4ProjectManager.Qt4BuildConfiguration + 2 + + + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Release + + + true + QtProjectManager.QMakeBuildStep + false + + false + false + true + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Release + Qt4ProjectManager.Qt4BuildConfiguration + 0 + + + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Profile + + + true + QtProjectManager.QMakeBuildStep + true + + false + true + true + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Profile + Qt4ProjectManager.Qt4BuildConfiguration + 0 + + 3 + + + 0 + Deploy + Deploy + ProjectExplorer.BuildSteps.Deploy + + 1 + ProjectExplorer.DefaultDeployConfiguration + + 1 + + + dwarf + + cpu-cycles + + + 250 + + -e + cpu-cycles + --call-graph + dwarf,4096 + -F + 250 + + -F + true + 4096 + false + false + 1000 + + true + + false + false + false + false + true + 0.01 + 10 + true + kcachegrind + 1 + 25 + + 1 + true + false + true + valgrind + + 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + + 2 + + Qt4ProjectManager.Qt4RunConfiguration:D:/Auto_verification_scheme/AutoVerScheme/AutoVerScheme.pro + D:/Auto_verification_scheme/AutoVerScheme/AutoVerScheme.pro + + false + + false + true + true + false + false + true + + + + 1 + + + + ProjectExplorer.Project.TargetCount + 2 + + + ProjectExplorer.Project.Updater.FileVersion + 22 + + + Version + 22 + + diff --git a/softwareDirectory/AutoVerScheme/indexwindow.cpp b/softwareDirectory/AutoVerScheme/indexwindow.cpp new file mode 100644 index 0000000..3e52c7b --- /dev/null +++ b/softwareDirectory/AutoVerScheme/indexwindow.cpp @@ -0,0 +1,55 @@ +#include "indexwindow.h" +#include "ui_indexwindow.h" +#include "QFile" +#include "QTextStream" + +IndexWindow::IndexWindow(QWidget *parent) : + QMainWindow(parent), + ui(new Ui::IndexWindow) +{ + ui->setupUi(this); + this->initForm(); +} + +IndexWindow::~IndexWindow() +{ + delete ui; +} +void IndexWindow::initForm() +{ + //this->setWindowFlags(Qt::FramelessWindowHint); + //调用样式 + loadStyle(":/qss/Index.css"); + +} + +void IndexWindow::loadStyle(const QString &qssFile) +{ + //加载样式表 + QString qss; + + QFile file(qssFile); + + if (file.open(QFile::ReadOnly)) { + //用QTextStream读取样式文件不用区分文件编码 带bom也行 + QStringList list; + QTextStream in(&file); + //in.setCodec("utf-8"); + while (!in.atEnd()) { + QString line; + in >> line; + list << line; + } + + file.close(); + qss = list.join("\n"); + QString paletteColor = qss.mid(20, 7); + qApp->setPalette(QPalette(paletteColor)); + //用时主要在下面这句 + qApp->setStyleSheet(qss); + } + + +} + + diff --git a/softwareDirectory/AutoVerScheme/indexwindow.h b/softwareDirectory/AutoVerScheme/indexwindow.h new file mode 100644 index 0000000..2aee958 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/indexwindow.h @@ -0,0 +1,26 @@ +#ifndef INDEXWINDOW_H +#define INDEXWINDOW_H + +#include + +namespace Ui { +class IndexWindow; +} + +class IndexWindow : public QMainWindow +{ + Q_OBJECT + +public: + explicit IndexWindow(QWidget *parent = nullptr); + ~IndexWindow(); +private slots: + void initForm(); + void loadStyle(const QString &qssFile); + + +private: + Ui::IndexWindow *ui; +}; + +#endif // INDEXWINDOW_H diff --git a/softwareDirectory/AutoVerScheme/indexwindow.ui b/softwareDirectory/AutoVerScheme/indexwindow.ui new file mode 100644 index 0000000..d7153e0 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/indexwindow.ui @@ -0,0 +1,539 @@ + + + IndexWindow + + + Qt::NonModal + + + + 0 + 0 + 1334 + 789 + + + + + 0 + 0 + + + + MainWindow + + + + + + + 100 + 100 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + 6 + + + QLayout::SetFixedSize + + + 0 + + + 0 + + + + + Qt::Horizontal + + + QSizePolicy::Fixed + + + + 120 + 13 + + + + + + + + + 0 + 0 + + + + + 560 + 0 + + + + Qt::DefaultContextMenu + + + color: white; +font-weight: bold; +font-size: 24pt; + + + + + QFrame::NoFrame + + + QFrame::Plain + + + 自动检定系统 + + + Qt::AutoText + + + false + + + Qt::AlignCenter + + + + + + + Qt::Horizontal + + + QSizePolicy::Fixed + + + + 40 + 13 + + + + + + + + + + Qt::Vertical + + + QSizePolicy::Fixed + + + + 50 + 80 + + + + + + + + + + Qt::Vertical + + + QSizePolicy::Fixed + + + + 20 + 120 + + + + + + + + Qt::Horizontal + + + + 100 + 20 + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + 0 + 0 + + + + + 310 + 190 + + + + OpenHandCursor + + + margin-right: 0px; + + + 信息管理 + + + + 60 + 60 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + Qt::Horizontal + + + + 327 + 20 + + + + + + + + + 0 + 0 + + + + + 490 + 190 + + + + OpenHandCursor + + + + + + 自动核查 + + + + 60 + 60 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + + 0 + 0 + + + + + 490 + 190 + + + + OpenHandCursor + + + + + + 自动检定 + + + + 60 + 60 + + + + false + + + false + + + Qt::ToolButtonTextUnderIcon + + + + + + + + 0 + 0 + + + + + 490 + 190 + + + + OpenHandCursor + + + + + + 核查程序管理 + + + + 60 + 60 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + Qt::Horizontal + + + + 327 + 20 + + + + + + + + + 0 + 0 + + + + + 310 + 190 + + + + OpenHandCursor + + + margin-right: 0px; + + + 数据同步 + + + + 60 + 60 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + Qt::Vertical + + + QSizePolicy::Fixed + + + + 20 + 120 + + + + + + + + Qt::Vertical + + + QSizePolicy::Fixed + + + + 20 + 120 + + + + + + + + + 0 + 0 + + + + + 490 + 190 + + + + OpenHandCursor + + + + + + 检定程序管理 + + + + 60 + 60 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + + + + + + 0 + 0 + + + + + 10 + 10 + + + + color: white; +font-weight: bold; +font-size: 14pt; + + + 欢迎您! 用户: admin + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + Qt::Horizontal + + + QSizePolicy::Fixed + + + + 270 + 20 + + + + + + + + + + + btnConfig + btnData + tbtnMain1 + tbtnMain2 + tbtnMain3 + tbtnConfig1 + tbtnConfig2 + tbtnConfig3 + tbtnConfig4 + tbtnConfig5 + tbtnConfig6 + btnMain + btnHelp + btnExit + + + + diff --git a/softwareDirectory/AutoVerScheme/loginwindow.cpp b/softwareDirectory/AutoVerScheme/loginwindow.cpp new file mode 100644 index 0000000..155988a --- /dev/null +++ b/softwareDirectory/AutoVerScheme/loginwindow.cpp @@ -0,0 +1,68 @@ +#include "loginwindow.h" +#include "ui_loginwindow.h" +#include +#include +#include + +#include "indexwindow.h" + +loginWindow::loginWindow(QWidget *parent): QMainWindow(parent), ui(new Ui::loginWindow) +{ + ui->setupUi(this); + this->initForm(); + ui->label->styleSheet(); + +} + +loginWindow::~loginWindow() +{ + delete ui; +} +void loginWindow::initForm() +{ + //this->setWindowFlags(Qt::FramelessWindowHint); + //调用样式 + loadStyle(":/qss/login.css"); +} + +void loginWindow::loadStyle(const QString &qssFile) +{ + //加载样式表 + QString qss; + + QFile file(qssFile); + + if (file.open(QFile::ReadOnly)) { + //用QTextStream读取样式文件不用区分文件编码 带bom也行 + QStringList list; + QTextStream in(&file); + //in.setCodec("utf-8"); + while (!in.atEnd()) { + QString line; + in >> line; + list << line; + } + + file.close(); + qss = list.join("\n"); + QString paletteColor = qss.mid(20, 7); + qApp->setPalette(QPalette(paletteColor)); + //用时主要在下面这句 + qApp->setStyleSheet(qss); + } + + +} + + +void loginWindow::on_Button_login_clicked() +{ + QMessageBox::information(this, "提示", "登录成功!"); + //查询数据库内是否有账号 + IndexWindow *indexWindow = new IndexWindow; + indexWindow->setWindowState(Qt::WindowMaximized); + indexWindow->show(); + this->close(); + +} + diff --git a/softwareDirectory/AutoVerScheme/loginwindow.h b/softwareDirectory/AutoVerScheme/loginwindow.h new file mode 100644 index 0000000..2695bc3 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/loginwindow.h @@ -0,0 +1,31 @@ +#ifndef MAINWINDOW_H +#define MAINWINDOW_H + +#include +#include + + + +namespace Ui { +class loginWindow; +} + +class loginWindow : public QMainWindow +{ + Q_OBJECT + +public: + explicit loginWindow(QWidget *parent = 0); + ~loginWindow(); +private slots: + void initForm(); + void loadStyle(const QString &qssFile); + void on_Button_login_clicked(); + + +private: + Ui::loginWindow *ui; +private: + QSqlQuery query; +}; +#endif // MAINWINDOW_H diff --git a/softwareDirectory/AutoVerScheme/loginwindow.ui b/softwareDirectory/AutoVerScheme/loginwindow.ui new file mode 100644 index 0000000..ca04751 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/loginwindow.ui @@ -0,0 +1,234 @@ + + + loginWindow + + + + 0 + 0 + 954 + 603 + + + + MainWindow + + + background-color: rgb(255, 255, 255) + + + + + + 110 + 110 + 271 + 231 + + + + background-image: url(:/image/login/u9.png); +background-repeat: no-repeat; background-position: center; +background-color: transparent; + + + + + + + + + 0 + 10 + 491 + 601 + + + + background-image: url(:/image/login/u2.png); +background-repeat: no-repeat; +background-color: transparent; +background-repeat: no-repeat; +background-position: center; +background-size: 100%; + + + + + + + + + 5 + 10 + 491 + 569 + + + + background-image: url(:/image/login/u0.png); +background-repeat: no-repeat; background-position: center; + + + + + + 170 + 350 + 241 + 51 + + + + background-color: transparent; + + + Metrology + + + + + + 490 + 10 + 471 + 571 + + + + + + + 610 + 70 + 271 + 61 + + + + 自动检定软件 + + + + + + 540 + 200 + 61 + 61 + + + + + + + + + + 490 + 10 + 461 + 571 + + + + + + + 540 + 290 + 61 + 61 + + + + + + + + + + 540 + 430 + 341 + 81 + + + + OpenHandCursor + + + + + + 登 录 + + + + + + 610 + 210 + 221 + 41 + + + + 请输入账号 + + + + + + 610 + 300 + 221 + 41 + + + + 请输入账号 + + + + + + 507 + 1 + 72 + 16 + + + + + + + label_4 + graphicsView + label_2 + label_3 + graphicsView_2 + textBrowser + lab_title + textBrowser_2 + textBrowser_3 + Button_login + textEdit_acc + textEdit_pass + label + + + + + 0 + 0 + 954 + 25 + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/main.cpp b/softwareDirectory/AutoVerScheme/main.cpp new file mode 100644 index 0000000..16b6d3f --- /dev/null +++ b/softwareDirectory/AutoVerScheme/main.cpp @@ -0,0 +1,23 @@ +#include "loginwindow.h" +#include "mainwindow.h" +#include +#include "indexWindow.h" +#include "testview.h" + +int main(int argc, char *argv[]) +{ + QApplication a(argc, argv); + // 加载外部的CSS文件 + a.setStyleSheet("file:///path/to/styles.css"); + //设置字体 + QFont font; + font.setFamily("Microsoft Yahei"); + font.setPixelSize(13); + a.setFont(font); + + //TestView s; + //s.show(); + loginWindow w; + w.show(); + return a.exec(); +} diff --git a/softwareDirectory/AutoVerScheme/mainwindow.cpp b/softwareDirectory/AutoVerScheme/mainwindow.cpp new file mode 100644 index 0000000..12d07c0 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/mainwindow.cpp @@ -0,0 +1,14 @@ +#include "mainwindow.h" +#include "ui_mainwindow.h" + +MainWindow::MainWindow(QWidget *parent) : + QMainWindow(parent), + ui(new Ui::MainWindow) +{ + ui->setupUi(this); +} + +MainWindow::~MainWindow() +{ + delete ui; +} diff --git a/softwareDirectory/AutoVerScheme/mainwindow.h b/softwareDirectory/AutoVerScheme/mainwindow.h new file mode 100644 index 0000000..40fd472 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/mainwindow.h @@ -0,0 +1,22 @@ +#ifndef MAINWINDOW_H +#define MAINWINDOW_H + +#include + +namespace Ui { +class MainWindow; +} + +class MainWindow : public QMainWindow +{ + Q_OBJECT + +public: + explicit MainWindow(QWidget *parent = nullptr); + ~MainWindow(); + +private: + Ui::MainWindow *ui; +}; + +#endif // MAINWINDOW_H diff --git a/softwareDirectory/AutoVerScheme/mainwindow.ui b/softwareDirectory/AutoVerScheme/mainwindow.ui new file mode 100644 index 0000000..dd4f1c8 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/mainwindow.ui @@ -0,0 +1,24 @@ + + + + + MainWindow + + + + 0 + 0 + 800 + 600 + + + + MainWindow + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u101.png b/softwareDirectory/AutoVerScheme/res/image/Index/u101.png new file mode 100644 index 0000000..9e371e3 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u101.png Binary files differ diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u102.png b/softwareDirectory/AutoVerScheme/res/image/Index/u102.png new file mode 100644 index 0000000..b288067 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u102.png Binary files differ diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u15.png b/softwareDirectory/AutoVerScheme/res/image/Index/u15.png new file mode 100644 index 0000000..7e699e6 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u15.png Binary files differ diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u17.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u17.svg new file mode 100644 index 0000000..acc0502 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u17.svg @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u18.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u18.svg new file mode 100644 index 0000000..6a00a10 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u18.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u19.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u19.svg new file mode 100644 index 0000000..42dea06 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u19.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u20.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u20.svg new file mode 100644 index 0000000..7426e62 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u20.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u21.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u21.svg new file mode 100644 index 0000000..cba8469 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u21.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u22.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u22.svg new file mode 100644 index 0000000..78843a0 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u22.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u23.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u23.svg new file mode 100644 index 0000000..c586b65 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u23.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u24.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u24.svg new file mode 100644 index 0000000..066e006 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u24.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u26.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u26.svg new file mode 100644 index 0000000..1834de5 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u26.svg @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u26_mouseOver.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u26_mouseOver.svg new file mode 100644 index 0000000..1420ba1 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u26_mouseOver.svg @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u33.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u33.svg new file mode 100644 index 0000000..e932d0a --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u33.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u34.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u34.svg new file mode 100644 index 0000000..0ab265b --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u34.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u35.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u35.svg new file mode 100644 index 0000000..7748314 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u35.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/login/u0.png b/softwareDirectory/AutoVerScheme/res/image/login/u0.png new file mode 100644 index 0000000..03d764f --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/login/u0.png Binary files differ diff --git a/softwareDirectory/AutoVerScheme/res/image/login/u2.png b/softwareDirectory/AutoVerScheme/res/image/login/u2.png new file mode 100644 index 0000000..9d8fed7 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/login/u2.png Binary files differ diff --git a/softwareDirectory/AutoVerScheme/res/image/login/u2.svg b/softwareDirectory/AutoVerScheme/res/image/login/u2.svg new file mode 100644 index 0000000..fc1bc92 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/login/u2.svg @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/login/u3.svg b/softwareDirectory/AutoVerScheme/res/image/login/u3.svg new file mode 100644 index 0000000..9d0f6ae --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/login/u3.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/login/u5.png b/softwareDirectory/AutoVerScheme/res/image/login/u5.png new file mode 100644 index 0000000..9b0e06f --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/login/u5.png Binary files differ diff --git a/softwareDirectory/AutoVerScheme/res/image/login/u6.png b/softwareDirectory/AutoVerScheme/res/image/login/u6.png new file mode 100644 index 0000000..de43ce9 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/login/u6.png Binary files differ diff --git a/softwareDirectory/AutoVerScheme/res/image/login/u7.svg b/softwareDirectory/AutoVerScheme/res/image/login/u7.svg new file mode 100644 index 0000000..31d19e1 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/login/u7.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/login/u9.png b/softwareDirectory/AutoVerScheme/res/image/login/u9.png new file mode 100644 index 0000000..7a5ec9f --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/login/u9.png Binary files differ diff --git a/softwareDirectory/AutoVerScheme/res/qss.qrc b/softwareDirectory/AutoVerScheme/res/qss.qrc new file mode 100644 index 0000000..3422463 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/qss.qrc @@ -0,0 +1,6 @@ + + + qss/login.css + qss/Index.css + + diff --git a/softwareDirectory/AutoVerScheme/res/qss/Index.css b/softwareDirectory/AutoVerScheme/res/qss/Index.css new file mode 100644 index 0000000..8fad195 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/qss/Index.css @@ -0,0 +1,23 @@ +*{ + +color:black; +font: 18pt 微软雅黑; + +} +QMainWindow +{ +background-image: url(:/image/Index/u15.png); +background-color:white; +} +QToolButton:hover{ + background-image: url(:/image/Index/u26_mouseOver.svg); +} +QToolButton{ +color: white; +background-image: url(:/image/Index/u26.svg); +font-weight: bold; +border-radius: 5px; +text-align: center; +margin:10; +margin-right: 180px; +} diff --git a/softwareDirectory/AutoVerScheme/res/qss/login.css b/softwareDirectory/AutoVerScheme/res/qss/login.css new file mode 100644 index 0000000..f9aea6c --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/qss/login.css @@ -0,0 +1,69 @@ +*{ + border:none; + color: black; +} +QTextBrowser#textBrowser_2{ +background-image: url(:/image/login/u5.png); +background-repeat: no-repeat; +background-color: transparent; +background-position: center; +border:none; +background-size: contain; + +} +QTextBrowser#textBrowser_3{ +background-image: url(:/image/login/u6.png); +background-repeat: no-repeat; +background-color: transparent; +background-position: center; +border:none; +background-size: contain; + +} + +QPushButton#Button_login{ +background-image: url(:/image/login/u7.svg); +background-repeat: no-repeat; +background-color: transparent; +background-position: center; +border:none; +background-size: contain; +color: white; +font-weight: bold; +font-size: 14pt; +} + +Qwidget{ +border:none; +} +QLabel { + + font-size: 12pt; /* 设置字体大小为12点 */ + /* 其他样式属性... */ +} + +QLabel#lab_title{ + + font-size: 18pt; /* 设置字体大小为12点 */ + /* 其他样式属性... */ +} + +QLabel#label_3{ + color: #D7D7D7; + font-size: 16pt; /* 设置字体大小为12点 */ + font-weight: bold; + /* 其他样式属性... */ +} + +QTextEdit#textEdit_acc +{ + border-bottom: 1px solid black; + font-size: 12pt; + vertical-align: middle; +} +QTextEdit#textEdit_pass +{ + border-bottom: 1px solid black; + font-size: 12pt; + vertical-align: middle; +} diff --git a/softwareDirectory/AutoVerScheme/res/qss/loginImage/1.keep b/softwareDirectory/AutoVerScheme/res/qss/loginImage/1.keep new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/qss/loginImage/1.keep diff --git a/softwareDirectory/AutoVerScheme/res/qss/qss.qrc b/softwareDirectory/AutoVerScheme/res/qss/qss.qrc new file mode 100644 index 0000000..3fd215d --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/qss/qss.qrc @@ -0,0 +1 @@ + diff --git a/softwareDirectory/AutoVerScheme/res/res.qrc b/softwareDirectory/AutoVerScheme/res/res.qrc new file mode 100644 index 0000000..5a9e304 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/res.qrc @@ -0,0 +1,28 @@ + + + image/Index/u15.png + image/Index/u17.svg + image/Index/u18.svg + image/Index/u19.svg + image/Index/u20.svg + image/Index/u21.svg + image/Index/u22.svg + image/Index/u23.svg + image/Index/u24.svg + image/Index/u26.svg + image/Index/u26_mouseOver.svg + image/Index/u33.svg + image/Index/u34.svg + image/Index/u35.svg + image/login/u0.png + image/login/u2.png + image/login/u2.svg + image/login/u3.svg + image/login/u5.png + image/login/u6.png + image/login/u7.svg + image/login/u9.png + image/Index/u101.png + image/Index/u102.png + + diff --git a/softwareDirectory/AutoVerScheme/testview.cpp b/softwareDirectory/AutoVerScheme/testview.cpp new file mode 100644 index 0000000..466134d --- /dev/null +++ b/softwareDirectory/AutoVerScheme/testview.cpp @@ -0,0 +1,29 @@ +#include "testview.h" +#include "ui_testview.h" + +TestView::TestView(QWidget *parent) : + QMainWindow(parent), + ui(new Ui::TestView) +{ + ui->setupUi(this); + this->initForm(); +} + +TestView::~TestView() +{ + delete ui; +} +void TestView::initForm() +{ + QPushButton *button1 = new QPushButton("Button 1"); + QPushButton *button2 = new QPushButton("Button 2"); + ui->horizontalLayout_2->addWidget(button1); + ui->horizontalLayout_2->addWidget(button2); + ui->horizontalLayout_2->setStretchFactor(button1,1); + ui->horizontalLayout_2->setStretchFactor(button2,2); + + this->setWindowTitle("软件标题"); + this->setWindowFlags(Qt::WindowMaximizeButtonHint|Qt::WindowCloseButtonHint); + this->setWindowFlag(Qt::CustomizeWindowHint,true); + this->setWindowFlag(Qt::WindowSystemMenuHint,true); +} diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro new file mode 100644 index 0000000..5b8f852 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro @@ -0,0 +1,48 @@ +QT += core gui +QT += sql +greaterThan(QT_MAJOR_VERSION, 4): QT += widgets + +CONFIG += c++11 + +# The following define makes your compiler emit warnings if you use +# any Qt feature that has been marked deprecated (the exact warnings +# depend on your compiler). Please consult the documentation of the +# deprecated API in order to know how to port your code away from it. +DEFINES += QT_DEPRECATED_WARNINGS + +# You can also make your code fail to compile if it uses deprecated APIs. +# In order to do so, uncomment the following line. +# You can also select to disable deprecated APIs only up to a certain version of Qt. +#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 + +SOURCES += \ + indexwindow.cpp \ + loginwindow.cpp \ + main.cpp \ + mainwindow.cpp \ + testview.cpp + +HEADERS += \ + indexwindow.h \ + loginwindow.h \ + mainwindow.h \ + testview.h + +FORMS += \ + indexwindow.ui \ + loginwindow.ui \ + mainwindow.ui \ + testview.ui + +# Default rules for deployment. +qnx: target.path = /tmp/$${TARGET}/bin +else: unix:!android: target.path = /opt/$${TARGET}/bin +!isEmpty(target.path): INSTALLS += target + +RESOURCES += \ + res/qss.qrc \ + res/res.qrc + +DISTFILES += \ + res/image/u2.png + diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user new file mode 100644 index 0000000..1f5ec64 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user @@ -0,0 +1,562 @@ + + + + + + EnvironmentId + {c08df58c-84a7-4965-bca6-e98789474efa} + + + ProjectExplorer.Project.ActiveTarget + 0 + + + ProjectExplorer.Project.EditorSettings + + true + false + true + + Cpp + + CppGlobal + + + + QmlJS + + QmlJSGlobal + + + 2 + UTF-8 + false + 4 + false + 80 + true + true + 1 + true + false + 0 + true + true + 0 + 8 + true + 1 + true + true + true + false + + + + ProjectExplorer.Project.PluginSettings + + + -fno-delayed-template-parsing + + true + + + + ProjectExplorer.Project.Target.0 + + Desktop Qt 5.14.2 MinGW 64-bit + Desktop Qt 5.14.2 MinGW 64-bit + qt.qt5.5142.win64_mingw73_kit + 0 + 0 + 0 + + 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 + 0 + 0 + 0 + + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug + + + true + QtProjectManager.QMakeBuildStep + true + + false + false + false + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Debug + Qt4ProjectManager.Qt4BuildConfiguration + 2 + + + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Release + + + true + QtProjectManager.QMakeBuildStep + false + + false + false + true + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Release + Qt4ProjectManager.Qt4BuildConfiguration + 0 + + + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Profile + + + true + QtProjectManager.QMakeBuildStep + true + + false + true + true + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Profile + Qt4ProjectManager.Qt4BuildConfiguration + 0 + + 3 + + + 0 + Deploy + Deploy + ProjectExplorer.BuildSteps.Deploy + + 1 + ProjectExplorer.DefaultDeployConfiguration + + 1 + + + dwarf + + cpu-cycles + + + 250 + + -e + cpu-cycles + --call-graph + dwarf,4096 + -F + 250 + + -F + true + 4096 + false + false + 1000 + + true + + false + false + false + false + true + 0.01 + 10 + true + kcachegrind + 1 + 25 + + 1 + true + false + true + valgrind + + 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + + 2 + + Qt4ProjectManager.Qt4RunConfiguration:D:/Auto_verification_scheme/AutoVerScheme/AutoVerScheme.pro + D:/Auto_verification_scheme/AutoVerScheme/AutoVerScheme.pro + + false + + false + true + true + false + false + true + + + + 1 + + + + ProjectExplorer.Project.TargetCount + 2 + + + ProjectExplorer.Project.Updater.FileVersion + 22 + + + Version + 22 + + diff --git a/softwareDirectory/AutoVerScheme/indexwindow.cpp b/softwareDirectory/AutoVerScheme/indexwindow.cpp new file mode 100644 index 0000000..3e52c7b --- /dev/null +++ b/softwareDirectory/AutoVerScheme/indexwindow.cpp @@ -0,0 +1,55 @@ +#include "indexwindow.h" +#include "ui_indexwindow.h" +#include "QFile" +#include "QTextStream" + +IndexWindow::IndexWindow(QWidget *parent) : + QMainWindow(parent), + ui(new Ui::IndexWindow) +{ + ui->setupUi(this); + this->initForm(); +} + +IndexWindow::~IndexWindow() +{ + delete ui; +} +void IndexWindow::initForm() +{ + //this->setWindowFlags(Qt::FramelessWindowHint); + //调用样式 + loadStyle(":/qss/Index.css"); + +} + +void IndexWindow::loadStyle(const QString &qssFile) +{ + //加载样式表 + QString qss; + + QFile file(qssFile); + + if (file.open(QFile::ReadOnly)) { + //用QTextStream读取样式文件不用区分文件编码 带bom也行 + QStringList list; + QTextStream in(&file); + //in.setCodec("utf-8"); + while (!in.atEnd()) { + QString line; + in >> line; + list << line; + } + + file.close(); + qss = list.join("\n"); + QString paletteColor = qss.mid(20, 7); + qApp->setPalette(QPalette(paletteColor)); + //用时主要在下面这句 + qApp->setStyleSheet(qss); + } + + +} + + diff --git a/softwareDirectory/AutoVerScheme/indexwindow.h b/softwareDirectory/AutoVerScheme/indexwindow.h new file mode 100644 index 0000000..2aee958 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/indexwindow.h @@ -0,0 +1,26 @@ +#ifndef INDEXWINDOW_H +#define INDEXWINDOW_H + +#include + +namespace Ui { +class IndexWindow; +} + +class IndexWindow : public QMainWindow +{ + Q_OBJECT + +public: + explicit IndexWindow(QWidget *parent = nullptr); + ~IndexWindow(); +private slots: + void initForm(); + void loadStyle(const QString &qssFile); + + +private: + Ui::IndexWindow *ui; +}; + +#endif // INDEXWINDOW_H diff --git a/softwareDirectory/AutoVerScheme/indexwindow.ui b/softwareDirectory/AutoVerScheme/indexwindow.ui new file mode 100644 index 0000000..d7153e0 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/indexwindow.ui @@ -0,0 +1,539 @@ + + + IndexWindow + + + Qt::NonModal + + + + 0 + 0 + 1334 + 789 + + + + + 0 + 0 + + + + MainWindow + + + + + + + 100 + 100 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + 6 + + + QLayout::SetFixedSize + + + 0 + + + 0 + + + + + Qt::Horizontal + + + QSizePolicy::Fixed + + + + 120 + 13 + + + + + + + + + 0 + 0 + + + + + 560 + 0 + + + + Qt::DefaultContextMenu + + + color: white; +font-weight: bold; +font-size: 24pt; + + + + + QFrame::NoFrame + + + QFrame::Plain + + + 自动检定系统 + + + Qt::AutoText + + + false + + + Qt::AlignCenter + + + + + + + Qt::Horizontal + + + QSizePolicy::Fixed + + + + 40 + 13 + + + + + + + + + + Qt::Vertical + + + QSizePolicy::Fixed + + + + 50 + 80 + + + + + + + + + + Qt::Vertical + + + QSizePolicy::Fixed + + + + 20 + 120 + + + + + + + + Qt::Horizontal + + + + 100 + 20 + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + 0 + 0 + + + + + 310 + 190 + + + + OpenHandCursor + + + margin-right: 0px; + + + 信息管理 + + + + 60 + 60 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + Qt::Horizontal + + + + 327 + 20 + + + + + + + + + 0 + 0 + + + + + 490 + 190 + + + + OpenHandCursor + + + + + + 自动核查 + + + + 60 + 60 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + + 0 + 0 + + + + + 490 + 190 + + + + OpenHandCursor + + + + + + 自动检定 + + + + 60 + 60 + + + + false + + + false + + + Qt::ToolButtonTextUnderIcon + + + + + + + + 0 + 0 + + + + + 490 + 190 + + + + OpenHandCursor + + + + + + 核查程序管理 + + + + 60 + 60 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + Qt::Horizontal + + + + 327 + 20 + + + + + + + + + 0 + 0 + + + + + 310 + 190 + + + + OpenHandCursor + + + margin-right: 0px; + + + 数据同步 + + + + 60 + 60 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + Qt::Vertical + + + QSizePolicy::Fixed + + + + 20 + 120 + + + + + + + + Qt::Vertical + + + QSizePolicy::Fixed + + + + 20 + 120 + + + + + + + + + 0 + 0 + + + + + 490 + 190 + + + + OpenHandCursor + + + + + + 检定程序管理 + + + + 60 + 60 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + + + + + + 0 + 0 + + + + + 10 + 10 + + + + color: white; +font-weight: bold; +font-size: 14pt; + + + 欢迎您! 用户: admin + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + Qt::Horizontal + + + QSizePolicy::Fixed + + + + 270 + 20 + + + + + + + + + + + btnConfig + btnData + tbtnMain1 + tbtnMain2 + tbtnMain3 + tbtnConfig1 + tbtnConfig2 + tbtnConfig3 + tbtnConfig4 + tbtnConfig5 + tbtnConfig6 + btnMain + btnHelp + btnExit + + + + diff --git a/softwareDirectory/AutoVerScheme/loginwindow.cpp b/softwareDirectory/AutoVerScheme/loginwindow.cpp new file mode 100644 index 0000000..155988a --- /dev/null +++ b/softwareDirectory/AutoVerScheme/loginwindow.cpp @@ -0,0 +1,68 @@ +#include "loginwindow.h" +#include "ui_loginwindow.h" +#include +#include +#include + +#include "indexwindow.h" + +loginWindow::loginWindow(QWidget *parent): QMainWindow(parent), ui(new Ui::loginWindow) +{ + ui->setupUi(this); + this->initForm(); + ui->label->styleSheet(); + +} + +loginWindow::~loginWindow() +{ + delete ui; +} +void loginWindow::initForm() +{ + //this->setWindowFlags(Qt::FramelessWindowHint); + //调用样式 + loadStyle(":/qss/login.css"); +} + +void loginWindow::loadStyle(const QString &qssFile) +{ + //加载样式表 + QString qss; + + QFile file(qssFile); + + if (file.open(QFile::ReadOnly)) { + //用QTextStream读取样式文件不用区分文件编码 带bom也行 + QStringList list; + QTextStream in(&file); + //in.setCodec("utf-8"); + while (!in.atEnd()) { + QString line; + in >> line; + list << line; + } + + file.close(); + qss = list.join("\n"); + QString paletteColor = qss.mid(20, 7); + qApp->setPalette(QPalette(paletteColor)); + //用时主要在下面这句 + qApp->setStyleSheet(qss); + } + + +} + + +void loginWindow::on_Button_login_clicked() +{ + QMessageBox::information(this, "提示", "登录成功!"); + //查询数据库内是否有账号 + IndexWindow *indexWindow = new IndexWindow; + indexWindow->setWindowState(Qt::WindowMaximized); + indexWindow->show(); + this->close(); + +} + diff --git a/softwareDirectory/AutoVerScheme/loginwindow.h b/softwareDirectory/AutoVerScheme/loginwindow.h new file mode 100644 index 0000000..2695bc3 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/loginwindow.h @@ -0,0 +1,31 @@ +#ifndef MAINWINDOW_H +#define MAINWINDOW_H + +#include +#include + + + +namespace Ui { +class loginWindow; +} + +class loginWindow : public QMainWindow +{ + Q_OBJECT + +public: + explicit loginWindow(QWidget *parent = 0); + ~loginWindow(); +private slots: + void initForm(); + void loadStyle(const QString &qssFile); + void on_Button_login_clicked(); + + +private: + Ui::loginWindow *ui; +private: + QSqlQuery query; +}; +#endif // MAINWINDOW_H diff --git a/softwareDirectory/AutoVerScheme/loginwindow.ui b/softwareDirectory/AutoVerScheme/loginwindow.ui new file mode 100644 index 0000000..ca04751 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/loginwindow.ui @@ -0,0 +1,234 @@ + + + loginWindow + + + + 0 + 0 + 954 + 603 + + + + MainWindow + + + background-color: rgb(255, 255, 255) + + + + + + 110 + 110 + 271 + 231 + + + + background-image: url(:/image/login/u9.png); +background-repeat: no-repeat; background-position: center; +background-color: transparent; + + + + + + + + + 0 + 10 + 491 + 601 + + + + background-image: url(:/image/login/u2.png); +background-repeat: no-repeat; +background-color: transparent; +background-repeat: no-repeat; +background-position: center; +background-size: 100%; + + + + + + + + + 5 + 10 + 491 + 569 + + + + background-image: url(:/image/login/u0.png); +background-repeat: no-repeat; background-position: center; + + + + + + 170 + 350 + 241 + 51 + + + + background-color: transparent; + + + Metrology + + + + + + 490 + 10 + 471 + 571 + + + + + + + 610 + 70 + 271 + 61 + + + + 自动检定软件 + + + + + + 540 + 200 + 61 + 61 + + + + + + + + + + 490 + 10 + 461 + 571 + + + + + + + 540 + 290 + 61 + 61 + + + + + + + + + + 540 + 430 + 341 + 81 + + + + OpenHandCursor + + + + + + 登 录 + + + + + + 610 + 210 + 221 + 41 + + + + 请输入账号 + + + + + + 610 + 300 + 221 + 41 + + + + 请输入账号 + + + + + + 507 + 1 + 72 + 16 + + + + + + + label_4 + graphicsView + label_2 + label_3 + graphicsView_2 + textBrowser + lab_title + textBrowser_2 + textBrowser_3 + Button_login + textEdit_acc + textEdit_pass + label + + + + + 0 + 0 + 954 + 25 + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/main.cpp b/softwareDirectory/AutoVerScheme/main.cpp new file mode 100644 index 0000000..16b6d3f --- /dev/null +++ b/softwareDirectory/AutoVerScheme/main.cpp @@ -0,0 +1,23 @@ +#include "loginwindow.h" +#include "mainwindow.h" +#include +#include "indexWindow.h" +#include "testview.h" + +int main(int argc, char *argv[]) +{ + QApplication a(argc, argv); + // 加载外部的CSS文件 + a.setStyleSheet("file:///path/to/styles.css"); + //设置字体 + QFont font; + font.setFamily("Microsoft Yahei"); + font.setPixelSize(13); + a.setFont(font); + + //TestView s; + //s.show(); + loginWindow w; + w.show(); + return a.exec(); +} diff --git a/softwareDirectory/AutoVerScheme/mainwindow.cpp b/softwareDirectory/AutoVerScheme/mainwindow.cpp new file mode 100644 index 0000000..12d07c0 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/mainwindow.cpp @@ -0,0 +1,14 @@ +#include "mainwindow.h" +#include "ui_mainwindow.h" + +MainWindow::MainWindow(QWidget *parent) : + QMainWindow(parent), + ui(new Ui::MainWindow) +{ + ui->setupUi(this); +} + +MainWindow::~MainWindow() +{ + delete ui; +} diff --git a/softwareDirectory/AutoVerScheme/mainwindow.h b/softwareDirectory/AutoVerScheme/mainwindow.h new file mode 100644 index 0000000..40fd472 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/mainwindow.h @@ -0,0 +1,22 @@ +#ifndef MAINWINDOW_H +#define MAINWINDOW_H + +#include + +namespace Ui { +class MainWindow; +} + +class MainWindow : public QMainWindow +{ + Q_OBJECT + +public: + explicit MainWindow(QWidget *parent = nullptr); + ~MainWindow(); + +private: + Ui::MainWindow *ui; +}; + +#endif // MAINWINDOW_H diff --git a/softwareDirectory/AutoVerScheme/mainwindow.ui b/softwareDirectory/AutoVerScheme/mainwindow.ui new file mode 100644 index 0000000..dd4f1c8 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/mainwindow.ui @@ -0,0 +1,24 @@ + + + + + MainWindow + + + + 0 + 0 + 800 + 600 + + + + MainWindow + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u101.png b/softwareDirectory/AutoVerScheme/res/image/Index/u101.png new file mode 100644 index 0000000..9e371e3 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u101.png Binary files differ diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u102.png b/softwareDirectory/AutoVerScheme/res/image/Index/u102.png new file mode 100644 index 0000000..b288067 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u102.png Binary files differ diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u15.png b/softwareDirectory/AutoVerScheme/res/image/Index/u15.png new file mode 100644 index 0000000..7e699e6 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u15.png Binary files differ diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u17.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u17.svg new file mode 100644 index 0000000..acc0502 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u17.svg @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u18.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u18.svg new file mode 100644 index 0000000..6a00a10 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u18.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u19.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u19.svg new file mode 100644 index 0000000..42dea06 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u19.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u20.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u20.svg new file mode 100644 index 0000000..7426e62 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u20.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u21.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u21.svg new file mode 100644 index 0000000..cba8469 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u21.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u22.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u22.svg new file mode 100644 index 0000000..78843a0 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u22.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u23.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u23.svg new file mode 100644 index 0000000..c586b65 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u23.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u24.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u24.svg new file mode 100644 index 0000000..066e006 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u24.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u26.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u26.svg new file mode 100644 index 0000000..1834de5 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u26.svg @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u26_mouseOver.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u26_mouseOver.svg new file mode 100644 index 0000000..1420ba1 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u26_mouseOver.svg @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u33.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u33.svg new file mode 100644 index 0000000..e932d0a --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u33.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u34.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u34.svg new file mode 100644 index 0000000..0ab265b --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u34.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u35.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u35.svg new file mode 100644 index 0000000..7748314 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u35.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/login/u0.png b/softwareDirectory/AutoVerScheme/res/image/login/u0.png new file mode 100644 index 0000000..03d764f --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/login/u0.png Binary files differ diff --git a/softwareDirectory/AutoVerScheme/res/image/login/u2.png b/softwareDirectory/AutoVerScheme/res/image/login/u2.png new file mode 100644 index 0000000..9d8fed7 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/login/u2.png Binary files differ diff --git a/softwareDirectory/AutoVerScheme/res/image/login/u2.svg b/softwareDirectory/AutoVerScheme/res/image/login/u2.svg new file mode 100644 index 0000000..fc1bc92 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/login/u2.svg @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/login/u3.svg b/softwareDirectory/AutoVerScheme/res/image/login/u3.svg new file mode 100644 index 0000000..9d0f6ae --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/login/u3.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/login/u5.png b/softwareDirectory/AutoVerScheme/res/image/login/u5.png new file mode 100644 index 0000000..9b0e06f --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/login/u5.png Binary files differ diff --git a/softwareDirectory/AutoVerScheme/res/image/login/u6.png b/softwareDirectory/AutoVerScheme/res/image/login/u6.png new file mode 100644 index 0000000..de43ce9 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/login/u6.png Binary files differ diff --git a/softwareDirectory/AutoVerScheme/res/image/login/u7.svg b/softwareDirectory/AutoVerScheme/res/image/login/u7.svg new file mode 100644 index 0000000..31d19e1 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/login/u7.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/login/u9.png b/softwareDirectory/AutoVerScheme/res/image/login/u9.png new file mode 100644 index 0000000..7a5ec9f --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/login/u9.png Binary files differ diff --git a/softwareDirectory/AutoVerScheme/res/qss.qrc b/softwareDirectory/AutoVerScheme/res/qss.qrc new file mode 100644 index 0000000..3422463 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/qss.qrc @@ -0,0 +1,6 @@ + + + qss/login.css + qss/Index.css + + diff --git a/softwareDirectory/AutoVerScheme/res/qss/Index.css b/softwareDirectory/AutoVerScheme/res/qss/Index.css new file mode 100644 index 0000000..8fad195 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/qss/Index.css @@ -0,0 +1,23 @@ +*{ + +color:black; +font: 18pt 微软雅黑; + +} +QMainWindow +{ +background-image: url(:/image/Index/u15.png); +background-color:white; +} +QToolButton:hover{ + background-image: url(:/image/Index/u26_mouseOver.svg); +} +QToolButton{ +color: white; +background-image: url(:/image/Index/u26.svg); +font-weight: bold; +border-radius: 5px; +text-align: center; +margin:10; +margin-right: 180px; +} diff --git a/softwareDirectory/AutoVerScheme/res/qss/login.css b/softwareDirectory/AutoVerScheme/res/qss/login.css new file mode 100644 index 0000000..f9aea6c --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/qss/login.css @@ -0,0 +1,69 @@ +*{ + border:none; + color: black; +} +QTextBrowser#textBrowser_2{ +background-image: url(:/image/login/u5.png); +background-repeat: no-repeat; +background-color: transparent; +background-position: center; +border:none; +background-size: contain; + +} +QTextBrowser#textBrowser_3{ +background-image: url(:/image/login/u6.png); +background-repeat: no-repeat; +background-color: transparent; +background-position: center; +border:none; +background-size: contain; + +} + +QPushButton#Button_login{ +background-image: url(:/image/login/u7.svg); +background-repeat: no-repeat; +background-color: transparent; +background-position: center; +border:none; +background-size: contain; +color: white; +font-weight: bold; +font-size: 14pt; +} + +Qwidget{ +border:none; +} +QLabel { + + font-size: 12pt; /* 设置字体大小为12点 */ + /* 其他样式属性... */ +} + +QLabel#lab_title{ + + font-size: 18pt; /* 设置字体大小为12点 */ + /* 其他样式属性... */ +} + +QLabel#label_3{ + color: #D7D7D7; + font-size: 16pt; /* 设置字体大小为12点 */ + font-weight: bold; + /* 其他样式属性... */ +} + +QTextEdit#textEdit_acc +{ + border-bottom: 1px solid black; + font-size: 12pt; + vertical-align: middle; +} +QTextEdit#textEdit_pass +{ + border-bottom: 1px solid black; + font-size: 12pt; + vertical-align: middle; +} diff --git a/softwareDirectory/AutoVerScheme/res/qss/loginImage/1.keep b/softwareDirectory/AutoVerScheme/res/qss/loginImage/1.keep new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/qss/loginImage/1.keep diff --git a/softwareDirectory/AutoVerScheme/res/qss/qss.qrc b/softwareDirectory/AutoVerScheme/res/qss/qss.qrc new file mode 100644 index 0000000..3fd215d --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/qss/qss.qrc @@ -0,0 +1 @@ + diff --git a/softwareDirectory/AutoVerScheme/res/res.qrc b/softwareDirectory/AutoVerScheme/res/res.qrc new file mode 100644 index 0000000..5a9e304 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/res.qrc @@ -0,0 +1,28 @@ + + + image/Index/u15.png + image/Index/u17.svg + image/Index/u18.svg + image/Index/u19.svg + image/Index/u20.svg + image/Index/u21.svg + image/Index/u22.svg + image/Index/u23.svg + image/Index/u24.svg + image/Index/u26.svg + image/Index/u26_mouseOver.svg + image/Index/u33.svg + image/Index/u34.svg + image/Index/u35.svg + image/login/u0.png + image/login/u2.png + image/login/u2.svg + image/login/u3.svg + image/login/u5.png + image/login/u6.png + image/login/u7.svg + image/login/u9.png + image/Index/u101.png + image/Index/u102.png + + diff --git a/softwareDirectory/AutoVerScheme/testview.cpp b/softwareDirectory/AutoVerScheme/testview.cpp new file mode 100644 index 0000000..466134d --- /dev/null +++ b/softwareDirectory/AutoVerScheme/testview.cpp @@ -0,0 +1,29 @@ +#include "testview.h" +#include "ui_testview.h" + +TestView::TestView(QWidget *parent) : + QMainWindow(parent), + ui(new Ui::TestView) +{ + ui->setupUi(this); + this->initForm(); +} + +TestView::~TestView() +{ + delete ui; +} +void TestView::initForm() +{ + QPushButton *button1 = new QPushButton("Button 1"); + QPushButton *button2 = new QPushButton("Button 2"); + ui->horizontalLayout_2->addWidget(button1); + ui->horizontalLayout_2->addWidget(button2); + ui->horizontalLayout_2->setStretchFactor(button1,1); + ui->horizontalLayout_2->setStretchFactor(button2,2); + + this->setWindowTitle("软件标题"); + this->setWindowFlags(Qt::WindowMaximizeButtonHint|Qt::WindowCloseButtonHint); + this->setWindowFlag(Qt::CustomizeWindowHint,true); + this->setWindowFlag(Qt::WindowSystemMenuHint,true); +} diff --git a/softwareDirectory/AutoVerScheme/testview.h b/softwareDirectory/AutoVerScheme/testview.h new file mode 100644 index 0000000..683eaf2 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/testview.h @@ -0,0 +1,25 @@ +#ifndef TESTVIEW_H +#define TESTVIEW_H + +#include + +namespace Ui { +class TestView; +} + +class TestView : public QMainWindow +{ + Q_OBJECT + +public: + explicit TestView(QWidget *parent = nullptr); + ~TestView(); +private slots: + void initForm(); + + +private: + Ui::TestView *ui; +}; + +#endif // TESTVIEW_H diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro new file mode 100644 index 0000000..5b8f852 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro @@ -0,0 +1,48 @@ +QT += core gui +QT += sql +greaterThan(QT_MAJOR_VERSION, 4): QT += widgets + +CONFIG += c++11 + +# The following define makes your compiler emit warnings if you use +# any Qt feature that has been marked deprecated (the exact warnings +# depend on your compiler). Please consult the documentation of the +# deprecated API in order to know how to port your code away from it. +DEFINES += QT_DEPRECATED_WARNINGS + +# You can also make your code fail to compile if it uses deprecated APIs. +# In order to do so, uncomment the following line. +# You can also select to disable deprecated APIs only up to a certain version of Qt. +#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 + +SOURCES += \ + indexwindow.cpp \ + loginwindow.cpp \ + main.cpp \ + mainwindow.cpp \ + testview.cpp + +HEADERS += \ + indexwindow.h \ + loginwindow.h \ + mainwindow.h \ + testview.h + +FORMS += \ + indexwindow.ui \ + loginwindow.ui \ + mainwindow.ui \ + testview.ui + +# Default rules for deployment. +qnx: target.path = /tmp/$${TARGET}/bin +else: unix:!android: target.path = /opt/$${TARGET}/bin +!isEmpty(target.path): INSTALLS += target + +RESOURCES += \ + res/qss.qrc \ + res/res.qrc + +DISTFILES += \ + res/image/u2.png + diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user new file mode 100644 index 0000000..1f5ec64 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user @@ -0,0 +1,562 @@ + + + + + + EnvironmentId + {c08df58c-84a7-4965-bca6-e98789474efa} + + + ProjectExplorer.Project.ActiveTarget + 0 + + + ProjectExplorer.Project.EditorSettings + + true + false + true + + Cpp + + CppGlobal + + + + QmlJS + + QmlJSGlobal + + + 2 + UTF-8 + false + 4 + false + 80 + true + true + 1 + true + false + 0 + true + true + 0 + 8 + true + 1 + true + true + true + false + + + + ProjectExplorer.Project.PluginSettings + + + -fno-delayed-template-parsing + + true + + + + ProjectExplorer.Project.Target.0 + + Desktop Qt 5.14.2 MinGW 64-bit + Desktop Qt 5.14.2 MinGW 64-bit + qt.qt5.5142.win64_mingw73_kit + 0 + 0 + 0 + + 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 + 0 + 0 + 0 + + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug + + + true + QtProjectManager.QMakeBuildStep + true + + false + false + false + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Debug + Qt4ProjectManager.Qt4BuildConfiguration + 2 + + + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Release + + + true + QtProjectManager.QMakeBuildStep + false + + false + false + true + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Release + Qt4ProjectManager.Qt4BuildConfiguration + 0 + + + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Profile + + + true + QtProjectManager.QMakeBuildStep + true + + false + true + true + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Profile + Qt4ProjectManager.Qt4BuildConfiguration + 0 + + 3 + + + 0 + Deploy + Deploy + ProjectExplorer.BuildSteps.Deploy + + 1 + ProjectExplorer.DefaultDeployConfiguration + + 1 + + + dwarf + + cpu-cycles + + + 250 + + -e + cpu-cycles + --call-graph + dwarf,4096 + -F + 250 + + -F + true + 4096 + false + false + 1000 + + true + + false + false + false + false + true + 0.01 + 10 + true + kcachegrind + 1 + 25 + + 1 + true + false + true + valgrind + + 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + + 2 + + Qt4ProjectManager.Qt4RunConfiguration:D:/Auto_verification_scheme/AutoVerScheme/AutoVerScheme.pro + D:/Auto_verification_scheme/AutoVerScheme/AutoVerScheme.pro + + false + + false + true + true + false + false + true + + + + 1 + + + + ProjectExplorer.Project.TargetCount + 2 + + + ProjectExplorer.Project.Updater.FileVersion + 22 + + + Version + 22 + + diff --git a/softwareDirectory/AutoVerScheme/indexwindow.cpp b/softwareDirectory/AutoVerScheme/indexwindow.cpp new file mode 100644 index 0000000..3e52c7b --- /dev/null +++ b/softwareDirectory/AutoVerScheme/indexwindow.cpp @@ -0,0 +1,55 @@ +#include "indexwindow.h" +#include "ui_indexwindow.h" +#include "QFile" +#include "QTextStream" + +IndexWindow::IndexWindow(QWidget *parent) : + QMainWindow(parent), + ui(new Ui::IndexWindow) +{ + ui->setupUi(this); + this->initForm(); +} + +IndexWindow::~IndexWindow() +{ + delete ui; +} +void IndexWindow::initForm() +{ + //this->setWindowFlags(Qt::FramelessWindowHint); + //调用样式 + loadStyle(":/qss/Index.css"); + +} + +void IndexWindow::loadStyle(const QString &qssFile) +{ + //加载样式表 + QString qss; + + QFile file(qssFile); + + if (file.open(QFile::ReadOnly)) { + //用QTextStream读取样式文件不用区分文件编码 带bom也行 + QStringList list; + QTextStream in(&file); + //in.setCodec("utf-8"); + while (!in.atEnd()) { + QString line; + in >> line; + list << line; + } + + file.close(); + qss = list.join("\n"); + QString paletteColor = qss.mid(20, 7); + qApp->setPalette(QPalette(paletteColor)); + //用时主要在下面这句 + qApp->setStyleSheet(qss); + } + + +} + + diff --git a/softwareDirectory/AutoVerScheme/indexwindow.h b/softwareDirectory/AutoVerScheme/indexwindow.h new file mode 100644 index 0000000..2aee958 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/indexwindow.h @@ -0,0 +1,26 @@ +#ifndef INDEXWINDOW_H +#define INDEXWINDOW_H + +#include + +namespace Ui { +class IndexWindow; +} + +class IndexWindow : public QMainWindow +{ + Q_OBJECT + +public: + explicit IndexWindow(QWidget *parent = nullptr); + ~IndexWindow(); +private slots: + void initForm(); + void loadStyle(const QString &qssFile); + + +private: + Ui::IndexWindow *ui; +}; + +#endif // INDEXWINDOW_H diff --git a/softwareDirectory/AutoVerScheme/indexwindow.ui b/softwareDirectory/AutoVerScheme/indexwindow.ui new file mode 100644 index 0000000..d7153e0 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/indexwindow.ui @@ -0,0 +1,539 @@ + + + IndexWindow + + + Qt::NonModal + + + + 0 + 0 + 1334 + 789 + + + + + 0 + 0 + + + + MainWindow + + + + + + + 100 + 100 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + 6 + + + QLayout::SetFixedSize + + + 0 + + + 0 + + + + + Qt::Horizontal + + + QSizePolicy::Fixed + + + + 120 + 13 + + + + + + + + + 0 + 0 + + + + + 560 + 0 + + + + Qt::DefaultContextMenu + + + color: white; +font-weight: bold; +font-size: 24pt; + + + + + QFrame::NoFrame + + + QFrame::Plain + + + 自动检定系统 + + + Qt::AutoText + + + false + + + Qt::AlignCenter + + + + + + + Qt::Horizontal + + + QSizePolicy::Fixed + + + + 40 + 13 + + + + + + + + + + Qt::Vertical + + + QSizePolicy::Fixed + + + + 50 + 80 + + + + + + + + + + Qt::Vertical + + + QSizePolicy::Fixed + + + + 20 + 120 + + + + + + + + Qt::Horizontal + + + + 100 + 20 + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + 0 + 0 + + + + + 310 + 190 + + + + OpenHandCursor + + + margin-right: 0px; + + + 信息管理 + + + + 60 + 60 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + Qt::Horizontal + + + + 327 + 20 + + + + + + + + + 0 + 0 + + + + + 490 + 190 + + + + OpenHandCursor + + + + + + 自动核查 + + + + 60 + 60 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + + 0 + 0 + + + + + 490 + 190 + + + + OpenHandCursor + + + + + + 自动检定 + + + + 60 + 60 + + + + false + + + false + + + Qt::ToolButtonTextUnderIcon + + + + + + + + 0 + 0 + + + + + 490 + 190 + + + + OpenHandCursor + + + + + + 核查程序管理 + + + + 60 + 60 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + Qt::Horizontal + + + + 327 + 20 + + + + + + + + + 0 + 0 + + + + + 310 + 190 + + + + OpenHandCursor + + + margin-right: 0px; + + + 数据同步 + + + + 60 + 60 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + Qt::Vertical + + + QSizePolicy::Fixed + + + + 20 + 120 + + + + + + + + Qt::Vertical + + + QSizePolicy::Fixed + + + + 20 + 120 + + + + + + + + + 0 + 0 + + + + + 490 + 190 + + + + OpenHandCursor + + + + + + 检定程序管理 + + + + 60 + 60 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + + + + + + 0 + 0 + + + + + 10 + 10 + + + + color: white; +font-weight: bold; +font-size: 14pt; + + + 欢迎您! 用户: admin + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + Qt::Horizontal + + + QSizePolicy::Fixed + + + + 270 + 20 + + + + + + + + + + + btnConfig + btnData + tbtnMain1 + tbtnMain2 + tbtnMain3 + tbtnConfig1 + tbtnConfig2 + tbtnConfig3 + tbtnConfig4 + tbtnConfig5 + tbtnConfig6 + btnMain + btnHelp + btnExit + + + + diff --git a/softwareDirectory/AutoVerScheme/loginwindow.cpp b/softwareDirectory/AutoVerScheme/loginwindow.cpp new file mode 100644 index 0000000..155988a --- /dev/null +++ b/softwareDirectory/AutoVerScheme/loginwindow.cpp @@ -0,0 +1,68 @@ +#include "loginwindow.h" +#include "ui_loginwindow.h" +#include +#include +#include + +#include "indexwindow.h" + +loginWindow::loginWindow(QWidget *parent): QMainWindow(parent), ui(new Ui::loginWindow) +{ + ui->setupUi(this); + this->initForm(); + ui->label->styleSheet(); + +} + +loginWindow::~loginWindow() +{ + delete ui; +} +void loginWindow::initForm() +{ + //this->setWindowFlags(Qt::FramelessWindowHint); + //调用样式 + loadStyle(":/qss/login.css"); +} + +void loginWindow::loadStyle(const QString &qssFile) +{ + //加载样式表 + QString qss; + + QFile file(qssFile); + + if (file.open(QFile::ReadOnly)) { + //用QTextStream读取样式文件不用区分文件编码 带bom也行 + QStringList list; + QTextStream in(&file); + //in.setCodec("utf-8"); + while (!in.atEnd()) { + QString line; + in >> line; + list << line; + } + + file.close(); + qss = list.join("\n"); + QString paletteColor = qss.mid(20, 7); + qApp->setPalette(QPalette(paletteColor)); + //用时主要在下面这句 + qApp->setStyleSheet(qss); + } + + +} + + +void loginWindow::on_Button_login_clicked() +{ + QMessageBox::information(this, "提示", "登录成功!"); + //查询数据库内是否有账号 + IndexWindow *indexWindow = new IndexWindow; + indexWindow->setWindowState(Qt::WindowMaximized); + indexWindow->show(); + this->close(); + +} + diff --git a/softwareDirectory/AutoVerScheme/loginwindow.h b/softwareDirectory/AutoVerScheme/loginwindow.h new file mode 100644 index 0000000..2695bc3 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/loginwindow.h @@ -0,0 +1,31 @@ +#ifndef MAINWINDOW_H +#define MAINWINDOW_H + +#include +#include + + + +namespace Ui { +class loginWindow; +} + +class loginWindow : public QMainWindow +{ + Q_OBJECT + +public: + explicit loginWindow(QWidget *parent = 0); + ~loginWindow(); +private slots: + void initForm(); + void loadStyle(const QString &qssFile); + void on_Button_login_clicked(); + + +private: + Ui::loginWindow *ui; +private: + QSqlQuery query; +}; +#endif // MAINWINDOW_H diff --git a/softwareDirectory/AutoVerScheme/loginwindow.ui b/softwareDirectory/AutoVerScheme/loginwindow.ui new file mode 100644 index 0000000..ca04751 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/loginwindow.ui @@ -0,0 +1,234 @@ + + + loginWindow + + + + 0 + 0 + 954 + 603 + + + + MainWindow + + + background-color: rgb(255, 255, 255) + + + + + + 110 + 110 + 271 + 231 + + + + background-image: url(:/image/login/u9.png); +background-repeat: no-repeat; background-position: center; +background-color: transparent; + + + + + + + + + 0 + 10 + 491 + 601 + + + + background-image: url(:/image/login/u2.png); +background-repeat: no-repeat; +background-color: transparent; +background-repeat: no-repeat; +background-position: center; +background-size: 100%; + + + + + + + + + 5 + 10 + 491 + 569 + + + + background-image: url(:/image/login/u0.png); +background-repeat: no-repeat; background-position: center; + + + + + + 170 + 350 + 241 + 51 + + + + background-color: transparent; + + + Metrology + + + + + + 490 + 10 + 471 + 571 + + + + + + + 610 + 70 + 271 + 61 + + + + 自动检定软件 + + + + + + 540 + 200 + 61 + 61 + + + + + + + + + + 490 + 10 + 461 + 571 + + + + + + + 540 + 290 + 61 + 61 + + + + + + + + + + 540 + 430 + 341 + 81 + + + + OpenHandCursor + + + + + + 登 录 + + + + + + 610 + 210 + 221 + 41 + + + + 请输入账号 + + + + + + 610 + 300 + 221 + 41 + + + + 请输入账号 + + + + + + 507 + 1 + 72 + 16 + + + + + + + label_4 + graphicsView + label_2 + label_3 + graphicsView_2 + textBrowser + lab_title + textBrowser_2 + textBrowser_3 + Button_login + textEdit_acc + textEdit_pass + label + + + + + 0 + 0 + 954 + 25 + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/main.cpp b/softwareDirectory/AutoVerScheme/main.cpp new file mode 100644 index 0000000..16b6d3f --- /dev/null +++ b/softwareDirectory/AutoVerScheme/main.cpp @@ -0,0 +1,23 @@ +#include "loginwindow.h" +#include "mainwindow.h" +#include +#include "indexWindow.h" +#include "testview.h" + +int main(int argc, char *argv[]) +{ + QApplication a(argc, argv); + // 加载外部的CSS文件 + a.setStyleSheet("file:///path/to/styles.css"); + //设置字体 + QFont font; + font.setFamily("Microsoft Yahei"); + font.setPixelSize(13); + a.setFont(font); + + //TestView s; + //s.show(); + loginWindow w; + w.show(); + return a.exec(); +} diff --git a/softwareDirectory/AutoVerScheme/mainwindow.cpp b/softwareDirectory/AutoVerScheme/mainwindow.cpp new file mode 100644 index 0000000..12d07c0 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/mainwindow.cpp @@ -0,0 +1,14 @@ +#include "mainwindow.h" +#include "ui_mainwindow.h" + +MainWindow::MainWindow(QWidget *parent) : + QMainWindow(parent), + ui(new Ui::MainWindow) +{ + ui->setupUi(this); +} + +MainWindow::~MainWindow() +{ + delete ui; +} diff --git a/softwareDirectory/AutoVerScheme/mainwindow.h b/softwareDirectory/AutoVerScheme/mainwindow.h new file mode 100644 index 0000000..40fd472 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/mainwindow.h @@ -0,0 +1,22 @@ +#ifndef MAINWINDOW_H +#define MAINWINDOW_H + +#include + +namespace Ui { +class MainWindow; +} + +class MainWindow : public QMainWindow +{ + Q_OBJECT + +public: + explicit MainWindow(QWidget *parent = nullptr); + ~MainWindow(); + +private: + Ui::MainWindow *ui; +}; + +#endif // MAINWINDOW_H diff --git a/softwareDirectory/AutoVerScheme/mainwindow.ui b/softwareDirectory/AutoVerScheme/mainwindow.ui new file mode 100644 index 0000000..dd4f1c8 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/mainwindow.ui @@ -0,0 +1,24 @@ + + + + + MainWindow + + + + 0 + 0 + 800 + 600 + + + + MainWindow + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u101.png b/softwareDirectory/AutoVerScheme/res/image/Index/u101.png new file mode 100644 index 0000000..9e371e3 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u101.png Binary files differ diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u102.png b/softwareDirectory/AutoVerScheme/res/image/Index/u102.png new file mode 100644 index 0000000..b288067 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u102.png Binary files differ diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u15.png b/softwareDirectory/AutoVerScheme/res/image/Index/u15.png new file mode 100644 index 0000000..7e699e6 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u15.png Binary files differ diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u17.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u17.svg new file mode 100644 index 0000000..acc0502 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u17.svg @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u18.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u18.svg new file mode 100644 index 0000000..6a00a10 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u18.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u19.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u19.svg new file mode 100644 index 0000000..42dea06 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u19.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u20.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u20.svg new file mode 100644 index 0000000..7426e62 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u20.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u21.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u21.svg new file mode 100644 index 0000000..cba8469 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u21.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u22.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u22.svg new file mode 100644 index 0000000..78843a0 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u22.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u23.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u23.svg new file mode 100644 index 0000000..c586b65 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u23.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u24.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u24.svg new file mode 100644 index 0000000..066e006 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u24.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u26.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u26.svg new file mode 100644 index 0000000..1834de5 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u26.svg @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u26_mouseOver.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u26_mouseOver.svg new file mode 100644 index 0000000..1420ba1 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u26_mouseOver.svg @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u33.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u33.svg new file mode 100644 index 0000000..e932d0a --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u33.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u34.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u34.svg new file mode 100644 index 0000000..0ab265b --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u34.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u35.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u35.svg new file mode 100644 index 0000000..7748314 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u35.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/login/u0.png b/softwareDirectory/AutoVerScheme/res/image/login/u0.png new file mode 100644 index 0000000..03d764f --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/login/u0.png Binary files differ diff --git a/softwareDirectory/AutoVerScheme/res/image/login/u2.png b/softwareDirectory/AutoVerScheme/res/image/login/u2.png new file mode 100644 index 0000000..9d8fed7 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/login/u2.png Binary files differ diff --git a/softwareDirectory/AutoVerScheme/res/image/login/u2.svg b/softwareDirectory/AutoVerScheme/res/image/login/u2.svg new file mode 100644 index 0000000..fc1bc92 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/login/u2.svg @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/login/u3.svg b/softwareDirectory/AutoVerScheme/res/image/login/u3.svg new file mode 100644 index 0000000..9d0f6ae --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/login/u3.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/login/u5.png b/softwareDirectory/AutoVerScheme/res/image/login/u5.png new file mode 100644 index 0000000..9b0e06f --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/login/u5.png Binary files differ diff --git a/softwareDirectory/AutoVerScheme/res/image/login/u6.png b/softwareDirectory/AutoVerScheme/res/image/login/u6.png new file mode 100644 index 0000000..de43ce9 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/login/u6.png Binary files differ diff --git a/softwareDirectory/AutoVerScheme/res/image/login/u7.svg b/softwareDirectory/AutoVerScheme/res/image/login/u7.svg new file mode 100644 index 0000000..31d19e1 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/login/u7.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/login/u9.png b/softwareDirectory/AutoVerScheme/res/image/login/u9.png new file mode 100644 index 0000000..7a5ec9f --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/login/u9.png Binary files differ diff --git a/softwareDirectory/AutoVerScheme/res/qss.qrc b/softwareDirectory/AutoVerScheme/res/qss.qrc new file mode 100644 index 0000000..3422463 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/qss.qrc @@ -0,0 +1,6 @@ + + + qss/login.css + qss/Index.css + + diff --git a/softwareDirectory/AutoVerScheme/res/qss/Index.css b/softwareDirectory/AutoVerScheme/res/qss/Index.css new file mode 100644 index 0000000..8fad195 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/qss/Index.css @@ -0,0 +1,23 @@ +*{ + +color:black; +font: 18pt 微软雅黑; + +} +QMainWindow +{ +background-image: url(:/image/Index/u15.png); +background-color:white; +} +QToolButton:hover{ + background-image: url(:/image/Index/u26_mouseOver.svg); +} +QToolButton{ +color: white; +background-image: url(:/image/Index/u26.svg); +font-weight: bold; +border-radius: 5px; +text-align: center; +margin:10; +margin-right: 180px; +} diff --git a/softwareDirectory/AutoVerScheme/res/qss/login.css b/softwareDirectory/AutoVerScheme/res/qss/login.css new file mode 100644 index 0000000..f9aea6c --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/qss/login.css @@ -0,0 +1,69 @@ +*{ + border:none; + color: black; +} +QTextBrowser#textBrowser_2{ +background-image: url(:/image/login/u5.png); +background-repeat: no-repeat; +background-color: transparent; +background-position: center; +border:none; +background-size: contain; + +} +QTextBrowser#textBrowser_3{ +background-image: url(:/image/login/u6.png); +background-repeat: no-repeat; +background-color: transparent; +background-position: center; +border:none; +background-size: contain; + +} + +QPushButton#Button_login{ +background-image: url(:/image/login/u7.svg); +background-repeat: no-repeat; +background-color: transparent; +background-position: center; +border:none; +background-size: contain; +color: white; +font-weight: bold; +font-size: 14pt; +} + +Qwidget{ +border:none; +} +QLabel { + + font-size: 12pt; /* 设置字体大小为12点 */ + /* 其他样式属性... */ +} + +QLabel#lab_title{ + + font-size: 18pt; /* 设置字体大小为12点 */ + /* 其他样式属性... */ +} + +QLabel#label_3{ + color: #D7D7D7; + font-size: 16pt; /* 设置字体大小为12点 */ + font-weight: bold; + /* 其他样式属性... */ +} + +QTextEdit#textEdit_acc +{ + border-bottom: 1px solid black; + font-size: 12pt; + vertical-align: middle; +} +QTextEdit#textEdit_pass +{ + border-bottom: 1px solid black; + font-size: 12pt; + vertical-align: middle; +} diff --git a/softwareDirectory/AutoVerScheme/res/qss/loginImage/1.keep b/softwareDirectory/AutoVerScheme/res/qss/loginImage/1.keep new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/qss/loginImage/1.keep diff --git a/softwareDirectory/AutoVerScheme/res/qss/qss.qrc b/softwareDirectory/AutoVerScheme/res/qss/qss.qrc new file mode 100644 index 0000000..3fd215d --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/qss/qss.qrc @@ -0,0 +1 @@ + diff --git a/softwareDirectory/AutoVerScheme/res/res.qrc b/softwareDirectory/AutoVerScheme/res/res.qrc new file mode 100644 index 0000000..5a9e304 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/res.qrc @@ -0,0 +1,28 @@ + + + image/Index/u15.png + image/Index/u17.svg + image/Index/u18.svg + image/Index/u19.svg + image/Index/u20.svg + image/Index/u21.svg + image/Index/u22.svg + image/Index/u23.svg + image/Index/u24.svg + image/Index/u26.svg + image/Index/u26_mouseOver.svg + image/Index/u33.svg + image/Index/u34.svg + image/Index/u35.svg + image/login/u0.png + image/login/u2.png + image/login/u2.svg + image/login/u3.svg + image/login/u5.png + image/login/u6.png + image/login/u7.svg + image/login/u9.png + image/Index/u101.png + image/Index/u102.png + + diff --git a/softwareDirectory/AutoVerScheme/testview.cpp b/softwareDirectory/AutoVerScheme/testview.cpp new file mode 100644 index 0000000..466134d --- /dev/null +++ b/softwareDirectory/AutoVerScheme/testview.cpp @@ -0,0 +1,29 @@ +#include "testview.h" +#include "ui_testview.h" + +TestView::TestView(QWidget *parent) : + QMainWindow(parent), + ui(new Ui::TestView) +{ + ui->setupUi(this); + this->initForm(); +} + +TestView::~TestView() +{ + delete ui; +} +void TestView::initForm() +{ + QPushButton *button1 = new QPushButton("Button 1"); + QPushButton *button2 = new QPushButton("Button 2"); + ui->horizontalLayout_2->addWidget(button1); + ui->horizontalLayout_2->addWidget(button2); + ui->horizontalLayout_2->setStretchFactor(button1,1); + ui->horizontalLayout_2->setStretchFactor(button2,2); + + this->setWindowTitle("软件标题"); + this->setWindowFlags(Qt::WindowMaximizeButtonHint|Qt::WindowCloseButtonHint); + this->setWindowFlag(Qt::CustomizeWindowHint,true); + this->setWindowFlag(Qt::WindowSystemMenuHint,true); +} diff --git a/softwareDirectory/AutoVerScheme/testview.h b/softwareDirectory/AutoVerScheme/testview.h new file mode 100644 index 0000000..683eaf2 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/testview.h @@ -0,0 +1,25 @@ +#ifndef TESTVIEW_H +#define TESTVIEW_H + +#include + +namespace Ui { +class TestView; +} + +class TestView : public QMainWindow +{ + Q_OBJECT + +public: + explicit TestView(QWidget *parent = nullptr); + ~TestView(); +private slots: + void initForm(); + + +private: + Ui::TestView *ui; +}; + +#endif // TESTVIEW_H diff --git a/softwareDirectory/AutoVerScheme/testview.ui b/softwareDirectory/AutoVerScheme/testview.ui new file mode 100644 index 0000000..4541c23 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/testview.ui @@ -0,0 +1,272 @@ + + + TestView + + + + 0 + 0 + 888 + 580 + + + + + 0 + 0 + + + + MainWindow + + + color:black; + + + + + + + + 0 + 60 + + + + + 0 + 50 + + + + background-color:#FFC0CB; + + + + + + + 0 + + + + + + + + TOP + + + + + + + + 0 + 0 + + + + TOPbutton + + + + + + + + + + background-color:#FFECB3; + + + + + + + + + + 0 + 0 + + + + + 0 + 0 + + + + Body + + + Qt::AutoText + + + Qt::LinksAccessibleByKeyboard + + + + + + + + + CheckBox + + + + + + + CheckBox + + + + + + + CheckBox + + + + + + + TextLabel + + + + + + + PushButton + + + + + + + + + 6 + + + + + PushButton + + + + + + + PushButton + + + + + + + PushButton + + + + + + + PushButton + + + + + + + + 0 + 0 + + + + + 30 + 30 + + + + PushButton + + + + + + + + + + 0 + 0 + + + + TextLabel + + + + + + + + + + + 0 + 0 + + + + + 50 + 50 + + + + background-color:#90ee90; + + + + + + + + + + 0 + 0 + + + + + 20 + 20 + + + + + + + Bottom + + + + + + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro new file mode 100644 index 0000000..5b8f852 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro @@ -0,0 +1,48 @@ +QT += core gui +QT += sql +greaterThan(QT_MAJOR_VERSION, 4): QT += widgets + +CONFIG += c++11 + +# The following define makes your compiler emit warnings if you use +# any Qt feature that has been marked deprecated (the exact warnings +# depend on your compiler). Please consult the documentation of the +# deprecated API in order to know how to port your code away from it. +DEFINES += QT_DEPRECATED_WARNINGS + +# You can also make your code fail to compile if it uses deprecated APIs. +# In order to do so, uncomment the following line. +# You can also select to disable deprecated APIs only up to a certain version of Qt. +#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 + +SOURCES += \ + indexwindow.cpp \ + loginwindow.cpp \ + main.cpp \ + mainwindow.cpp \ + testview.cpp + +HEADERS += \ + indexwindow.h \ + loginwindow.h \ + mainwindow.h \ + testview.h + +FORMS += \ + indexwindow.ui \ + loginwindow.ui \ + mainwindow.ui \ + testview.ui + +# Default rules for deployment. +qnx: target.path = /tmp/$${TARGET}/bin +else: unix:!android: target.path = /opt/$${TARGET}/bin +!isEmpty(target.path): INSTALLS += target + +RESOURCES += \ + res/qss.qrc \ + res/res.qrc + +DISTFILES += \ + res/image/u2.png + diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user new file mode 100644 index 0000000..1f5ec64 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user @@ -0,0 +1,562 @@ + + + + + + EnvironmentId + {c08df58c-84a7-4965-bca6-e98789474efa} + + + ProjectExplorer.Project.ActiveTarget + 0 + + + ProjectExplorer.Project.EditorSettings + + true + false + true + + Cpp + + CppGlobal + + + + QmlJS + + QmlJSGlobal + + + 2 + UTF-8 + false + 4 + false + 80 + true + true + 1 + true + false + 0 + true + true + 0 + 8 + true + 1 + true + true + true + false + + + + ProjectExplorer.Project.PluginSettings + + + -fno-delayed-template-parsing + + true + + + + ProjectExplorer.Project.Target.0 + + Desktop Qt 5.14.2 MinGW 64-bit + Desktop Qt 5.14.2 MinGW 64-bit + qt.qt5.5142.win64_mingw73_kit + 0 + 0 + 0 + + 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 + 0 + 0 + 0 + + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug + + + true + QtProjectManager.QMakeBuildStep + true + + false + false + false + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Debug + Qt4ProjectManager.Qt4BuildConfiguration + 2 + + + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Release + + + true + QtProjectManager.QMakeBuildStep + false + + false + false + true + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Release + Qt4ProjectManager.Qt4BuildConfiguration + 0 + + + D:/Auto_verification_scheme/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Profile + + + true + QtProjectManager.QMakeBuildStep + true + + false + true + true + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Profile + Qt4ProjectManager.Qt4BuildConfiguration + 0 + + 3 + + + 0 + Deploy + Deploy + ProjectExplorer.BuildSteps.Deploy + + 1 + ProjectExplorer.DefaultDeployConfiguration + + 1 + + + dwarf + + cpu-cycles + + + 250 + + -e + cpu-cycles + --call-graph + dwarf,4096 + -F + 250 + + -F + true + 4096 + false + false + 1000 + + true + + false + false + false + false + true + 0.01 + 10 + true + kcachegrind + 1 + 25 + + 1 + true + false + true + valgrind + + 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + + 2 + + Qt4ProjectManager.Qt4RunConfiguration:D:/Auto_verification_scheme/AutoVerScheme/AutoVerScheme.pro + D:/Auto_verification_scheme/AutoVerScheme/AutoVerScheme.pro + + false + + false + true + true + false + false + true + + + + 1 + + + + ProjectExplorer.Project.TargetCount + 2 + + + ProjectExplorer.Project.Updater.FileVersion + 22 + + + Version + 22 + + diff --git a/softwareDirectory/AutoVerScheme/indexwindow.cpp b/softwareDirectory/AutoVerScheme/indexwindow.cpp new file mode 100644 index 0000000..3e52c7b --- /dev/null +++ b/softwareDirectory/AutoVerScheme/indexwindow.cpp @@ -0,0 +1,55 @@ +#include "indexwindow.h" +#include "ui_indexwindow.h" +#include "QFile" +#include "QTextStream" + +IndexWindow::IndexWindow(QWidget *parent) : + QMainWindow(parent), + ui(new Ui::IndexWindow) +{ + ui->setupUi(this); + this->initForm(); +} + +IndexWindow::~IndexWindow() +{ + delete ui; +} +void IndexWindow::initForm() +{ + //this->setWindowFlags(Qt::FramelessWindowHint); + //调用样式 + loadStyle(":/qss/Index.css"); + +} + +void IndexWindow::loadStyle(const QString &qssFile) +{ + //加载样式表 + QString qss; + + QFile file(qssFile); + + if (file.open(QFile::ReadOnly)) { + //用QTextStream读取样式文件不用区分文件编码 带bom也行 + QStringList list; + QTextStream in(&file); + //in.setCodec("utf-8"); + while (!in.atEnd()) { + QString line; + in >> line; + list << line; + } + + file.close(); + qss = list.join("\n"); + QString paletteColor = qss.mid(20, 7); + qApp->setPalette(QPalette(paletteColor)); + //用时主要在下面这句 + qApp->setStyleSheet(qss); + } + + +} + + diff --git a/softwareDirectory/AutoVerScheme/indexwindow.h b/softwareDirectory/AutoVerScheme/indexwindow.h new file mode 100644 index 0000000..2aee958 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/indexwindow.h @@ -0,0 +1,26 @@ +#ifndef INDEXWINDOW_H +#define INDEXWINDOW_H + +#include + +namespace Ui { +class IndexWindow; +} + +class IndexWindow : public QMainWindow +{ + Q_OBJECT + +public: + explicit IndexWindow(QWidget *parent = nullptr); + ~IndexWindow(); +private slots: + void initForm(); + void loadStyle(const QString &qssFile); + + +private: + Ui::IndexWindow *ui; +}; + +#endif // INDEXWINDOW_H diff --git a/softwareDirectory/AutoVerScheme/indexwindow.ui b/softwareDirectory/AutoVerScheme/indexwindow.ui new file mode 100644 index 0000000..d7153e0 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/indexwindow.ui @@ -0,0 +1,539 @@ + + + IndexWindow + + + Qt::NonModal + + + + 0 + 0 + 1334 + 789 + + + + + 0 + 0 + + + + MainWindow + + + + + + + 100 + 100 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + 6 + + + QLayout::SetFixedSize + + + 0 + + + 0 + + + + + Qt::Horizontal + + + QSizePolicy::Fixed + + + + 120 + 13 + + + + + + + + + 0 + 0 + + + + + 560 + 0 + + + + Qt::DefaultContextMenu + + + color: white; +font-weight: bold; +font-size: 24pt; + + + + + QFrame::NoFrame + + + QFrame::Plain + + + 自动检定系统 + + + Qt::AutoText + + + false + + + Qt::AlignCenter + + + + + + + Qt::Horizontal + + + QSizePolicy::Fixed + + + + 40 + 13 + + + + + + + + + + Qt::Vertical + + + QSizePolicy::Fixed + + + + 50 + 80 + + + + + + + + + + Qt::Vertical + + + QSizePolicy::Fixed + + + + 20 + 120 + + + + + + + + Qt::Horizontal + + + + 100 + 20 + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + 0 + 0 + + + + + 310 + 190 + + + + OpenHandCursor + + + margin-right: 0px; + + + 信息管理 + + + + 60 + 60 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + Qt::Horizontal + + + + 327 + 20 + + + + + + + + + 0 + 0 + + + + + 490 + 190 + + + + OpenHandCursor + + + + + + 自动核查 + + + + 60 + 60 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + + 0 + 0 + + + + + 490 + 190 + + + + OpenHandCursor + + + + + + 自动检定 + + + + 60 + 60 + + + + false + + + false + + + Qt::ToolButtonTextUnderIcon + + + + + + + + 0 + 0 + + + + + 490 + 190 + + + + OpenHandCursor + + + + + + 核查程序管理 + + + + 60 + 60 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + Qt::Horizontal + + + + 327 + 20 + + + + + + + + + 0 + 0 + + + + + 310 + 190 + + + + OpenHandCursor + + + margin-right: 0px; + + + 数据同步 + + + + 60 + 60 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + Qt::Vertical + + + QSizePolicy::Fixed + + + + 20 + 120 + + + + + + + + Qt::Vertical + + + QSizePolicy::Fixed + + + + 20 + 120 + + + + + + + + + 0 + 0 + + + + + 490 + 190 + + + + OpenHandCursor + + + + + + 检定程序管理 + + + + 60 + 60 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + + + + + + 0 + 0 + + + + + 10 + 10 + + + + color: white; +font-weight: bold; +font-size: 14pt; + + + 欢迎您! 用户: admin + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + Qt::Horizontal + + + QSizePolicy::Fixed + + + + 270 + 20 + + + + + + + + + + + btnConfig + btnData + tbtnMain1 + tbtnMain2 + tbtnMain3 + tbtnConfig1 + tbtnConfig2 + tbtnConfig3 + tbtnConfig4 + tbtnConfig5 + tbtnConfig6 + btnMain + btnHelp + btnExit + + + + diff --git a/softwareDirectory/AutoVerScheme/loginwindow.cpp b/softwareDirectory/AutoVerScheme/loginwindow.cpp new file mode 100644 index 0000000..155988a --- /dev/null +++ b/softwareDirectory/AutoVerScheme/loginwindow.cpp @@ -0,0 +1,68 @@ +#include "loginwindow.h" +#include "ui_loginwindow.h" +#include +#include +#include + +#include "indexwindow.h" + +loginWindow::loginWindow(QWidget *parent): QMainWindow(parent), ui(new Ui::loginWindow) +{ + ui->setupUi(this); + this->initForm(); + ui->label->styleSheet(); + +} + +loginWindow::~loginWindow() +{ + delete ui; +} +void loginWindow::initForm() +{ + //this->setWindowFlags(Qt::FramelessWindowHint); + //调用样式 + loadStyle(":/qss/login.css"); +} + +void loginWindow::loadStyle(const QString &qssFile) +{ + //加载样式表 + QString qss; + + QFile file(qssFile); + + if (file.open(QFile::ReadOnly)) { + //用QTextStream读取样式文件不用区分文件编码 带bom也行 + QStringList list; + QTextStream in(&file); + //in.setCodec("utf-8"); + while (!in.atEnd()) { + QString line; + in >> line; + list << line; + } + + file.close(); + qss = list.join("\n"); + QString paletteColor = qss.mid(20, 7); + qApp->setPalette(QPalette(paletteColor)); + //用时主要在下面这句 + qApp->setStyleSheet(qss); + } + + +} + + +void loginWindow::on_Button_login_clicked() +{ + QMessageBox::information(this, "提示", "登录成功!"); + //查询数据库内是否有账号 + IndexWindow *indexWindow = new IndexWindow; + indexWindow->setWindowState(Qt::WindowMaximized); + indexWindow->show(); + this->close(); + +} + diff --git a/softwareDirectory/AutoVerScheme/loginwindow.h b/softwareDirectory/AutoVerScheme/loginwindow.h new file mode 100644 index 0000000..2695bc3 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/loginwindow.h @@ -0,0 +1,31 @@ +#ifndef MAINWINDOW_H +#define MAINWINDOW_H + +#include +#include + + + +namespace Ui { +class loginWindow; +} + +class loginWindow : public QMainWindow +{ + Q_OBJECT + +public: + explicit loginWindow(QWidget *parent = 0); + ~loginWindow(); +private slots: + void initForm(); + void loadStyle(const QString &qssFile); + void on_Button_login_clicked(); + + +private: + Ui::loginWindow *ui; +private: + QSqlQuery query; +}; +#endif // MAINWINDOW_H diff --git a/softwareDirectory/AutoVerScheme/loginwindow.ui b/softwareDirectory/AutoVerScheme/loginwindow.ui new file mode 100644 index 0000000..ca04751 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/loginwindow.ui @@ -0,0 +1,234 @@ + + + loginWindow + + + + 0 + 0 + 954 + 603 + + + + MainWindow + + + background-color: rgb(255, 255, 255) + + + + + + 110 + 110 + 271 + 231 + + + + background-image: url(:/image/login/u9.png); +background-repeat: no-repeat; background-position: center; +background-color: transparent; + + + + + + + + + 0 + 10 + 491 + 601 + + + + background-image: url(:/image/login/u2.png); +background-repeat: no-repeat; +background-color: transparent; +background-repeat: no-repeat; +background-position: center; +background-size: 100%; + + + + + + + + + 5 + 10 + 491 + 569 + + + + background-image: url(:/image/login/u0.png); +background-repeat: no-repeat; background-position: center; + + + + + + 170 + 350 + 241 + 51 + + + + background-color: transparent; + + + Metrology + + + + + + 490 + 10 + 471 + 571 + + + + + + + 610 + 70 + 271 + 61 + + + + 自动检定软件 + + + + + + 540 + 200 + 61 + 61 + + + + + + + + + + 490 + 10 + 461 + 571 + + + + + + + 540 + 290 + 61 + 61 + + + + + + + + + + 540 + 430 + 341 + 81 + + + + OpenHandCursor + + + + + + 登 录 + + + + + + 610 + 210 + 221 + 41 + + + + 请输入账号 + + + + + + 610 + 300 + 221 + 41 + + + + 请输入账号 + + + + + + 507 + 1 + 72 + 16 + + + + + + + label_4 + graphicsView + label_2 + label_3 + graphicsView_2 + textBrowser + lab_title + textBrowser_2 + textBrowser_3 + Button_login + textEdit_acc + textEdit_pass + label + + + + + 0 + 0 + 954 + 25 + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/main.cpp b/softwareDirectory/AutoVerScheme/main.cpp new file mode 100644 index 0000000..16b6d3f --- /dev/null +++ b/softwareDirectory/AutoVerScheme/main.cpp @@ -0,0 +1,23 @@ +#include "loginwindow.h" +#include "mainwindow.h" +#include +#include "indexWindow.h" +#include "testview.h" + +int main(int argc, char *argv[]) +{ + QApplication a(argc, argv); + // 加载外部的CSS文件 + a.setStyleSheet("file:///path/to/styles.css"); + //设置字体 + QFont font; + font.setFamily("Microsoft Yahei"); + font.setPixelSize(13); + a.setFont(font); + + //TestView s; + //s.show(); + loginWindow w; + w.show(); + return a.exec(); +} diff --git a/softwareDirectory/AutoVerScheme/mainwindow.cpp b/softwareDirectory/AutoVerScheme/mainwindow.cpp new file mode 100644 index 0000000..12d07c0 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/mainwindow.cpp @@ -0,0 +1,14 @@ +#include "mainwindow.h" +#include "ui_mainwindow.h" + +MainWindow::MainWindow(QWidget *parent) : + QMainWindow(parent), + ui(new Ui::MainWindow) +{ + ui->setupUi(this); +} + +MainWindow::~MainWindow() +{ + delete ui; +} diff --git a/softwareDirectory/AutoVerScheme/mainwindow.h b/softwareDirectory/AutoVerScheme/mainwindow.h new file mode 100644 index 0000000..40fd472 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/mainwindow.h @@ -0,0 +1,22 @@ +#ifndef MAINWINDOW_H +#define MAINWINDOW_H + +#include + +namespace Ui { +class MainWindow; +} + +class MainWindow : public QMainWindow +{ + Q_OBJECT + +public: + explicit MainWindow(QWidget *parent = nullptr); + ~MainWindow(); + +private: + Ui::MainWindow *ui; +}; + +#endif // MAINWINDOW_H diff --git a/softwareDirectory/AutoVerScheme/mainwindow.ui b/softwareDirectory/AutoVerScheme/mainwindow.ui new file mode 100644 index 0000000..dd4f1c8 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/mainwindow.ui @@ -0,0 +1,24 @@ + + + + + MainWindow + + + + 0 + 0 + 800 + 600 + + + + MainWindow + + + + + + + + diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u101.png b/softwareDirectory/AutoVerScheme/res/image/Index/u101.png new file mode 100644 index 0000000..9e371e3 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u101.png Binary files differ diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u102.png b/softwareDirectory/AutoVerScheme/res/image/Index/u102.png new file mode 100644 index 0000000..b288067 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u102.png Binary files differ diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u15.png b/softwareDirectory/AutoVerScheme/res/image/Index/u15.png new file mode 100644 index 0000000..7e699e6 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u15.png Binary files differ diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u17.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u17.svg new file mode 100644 index 0000000..acc0502 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u17.svg @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u18.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u18.svg new file mode 100644 index 0000000..6a00a10 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u18.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u19.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u19.svg new file mode 100644 index 0000000..42dea06 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u19.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u20.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u20.svg new file mode 100644 index 0000000..7426e62 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u20.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u21.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u21.svg new file mode 100644 index 0000000..cba8469 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u21.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u22.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u22.svg new file mode 100644 index 0000000..78843a0 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u22.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u23.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u23.svg new file mode 100644 index 0000000..c586b65 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u23.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u24.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u24.svg new file mode 100644 index 0000000..066e006 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u24.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u26.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u26.svg new file mode 100644 index 0000000..1834de5 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u26.svg @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u26_mouseOver.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u26_mouseOver.svg new file mode 100644 index 0000000..1420ba1 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u26_mouseOver.svg @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u33.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u33.svg new file mode 100644 index 0000000..e932d0a --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u33.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u34.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u34.svg new file mode 100644 index 0000000..0ab265b --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u34.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/Index/u35.svg b/softwareDirectory/AutoVerScheme/res/image/Index/u35.svg new file mode 100644 index 0000000..7748314 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/Index/u35.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/login/u0.png b/softwareDirectory/AutoVerScheme/res/image/login/u0.png new file mode 100644 index 0000000..03d764f --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/login/u0.png Binary files differ diff --git a/softwareDirectory/AutoVerScheme/res/image/login/u2.png b/softwareDirectory/AutoVerScheme/res/image/login/u2.png new file mode 100644 index 0000000..9d8fed7 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/login/u2.png Binary files differ diff --git a/softwareDirectory/AutoVerScheme/res/image/login/u2.svg b/softwareDirectory/AutoVerScheme/res/image/login/u2.svg new file mode 100644 index 0000000..fc1bc92 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/login/u2.svg @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/login/u3.svg b/softwareDirectory/AutoVerScheme/res/image/login/u3.svg new file mode 100644 index 0000000..9d0f6ae --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/login/u3.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/login/u5.png b/softwareDirectory/AutoVerScheme/res/image/login/u5.png new file mode 100644 index 0000000..9b0e06f --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/login/u5.png Binary files differ diff --git a/softwareDirectory/AutoVerScheme/res/image/login/u6.png b/softwareDirectory/AutoVerScheme/res/image/login/u6.png new file mode 100644 index 0000000..de43ce9 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/login/u6.png Binary files differ diff --git a/softwareDirectory/AutoVerScheme/res/image/login/u7.svg b/softwareDirectory/AutoVerScheme/res/image/login/u7.svg new file mode 100644 index 0000000..31d19e1 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/login/u7.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/softwareDirectory/AutoVerScheme/res/image/login/u9.png b/softwareDirectory/AutoVerScheme/res/image/login/u9.png new file mode 100644 index 0000000..7a5ec9f --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/image/login/u9.png Binary files differ diff --git a/softwareDirectory/AutoVerScheme/res/qss.qrc b/softwareDirectory/AutoVerScheme/res/qss.qrc new file mode 100644 index 0000000..3422463 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/qss.qrc @@ -0,0 +1,6 @@ + + + qss/login.css + qss/Index.css + + diff --git a/softwareDirectory/AutoVerScheme/res/qss/Index.css b/softwareDirectory/AutoVerScheme/res/qss/Index.css new file mode 100644 index 0000000..8fad195 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/qss/Index.css @@ -0,0 +1,23 @@ +*{ + +color:black; +font: 18pt 微软雅黑; + +} +QMainWindow +{ +background-image: url(:/image/Index/u15.png); +background-color:white; +} +QToolButton:hover{ + background-image: url(:/image/Index/u26_mouseOver.svg); +} +QToolButton{ +color: white; +background-image: url(:/image/Index/u26.svg); +font-weight: bold; +border-radius: 5px; +text-align: center; +margin:10; +margin-right: 180px; +} diff --git a/softwareDirectory/AutoVerScheme/res/qss/login.css b/softwareDirectory/AutoVerScheme/res/qss/login.css new file mode 100644 index 0000000..f9aea6c --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/qss/login.css @@ -0,0 +1,69 @@ +*{ + border:none; + color: black; +} +QTextBrowser#textBrowser_2{ +background-image: url(:/image/login/u5.png); +background-repeat: no-repeat; +background-color: transparent; +background-position: center; +border:none; +background-size: contain; + +} +QTextBrowser#textBrowser_3{ +background-image: url(:/image/login/u6.png); +background-repeat: no-repeat; +background-color: transparent; +background-position: center; +border:none; +background-size: contain; + +} + +QPushButton#Button_login{ +background-image: url(:/image/login/u7.svg); +background-repeat: no-repeat; +background-color: transparent; +background-position: center; +border:none; +background-size: contain; +color: white; +font-weight: bold; +font-size: 14pt; +} + +Qwidget{ +border:none; +} +QLabel { + + font-size: 12pt; /* 设置字体大小为12点 */ + /* 其他样式属性... */ +} + +QLabel#lab_title{ + + font-size: 18pt; /* 设置字体大小为12点 */ + /* 其他样式属性... */ +} + +QLabel#label_3{ + color: #D7D7D7; + font-size: 16pt; /* 设置字体大小为12点 */ + font-weight: bold; + /* 其他样式属性... */ +} + +QTextEdit#textEdit_acc +{ + border-bottom: 1px solid black; + font-size: 12pt; + vertical-align: middle; +} +QTextEdit#textEdit_pass +{ + border-bottom: 1px solid black; + font-size: 12pt; + vertical-align: middle; +} diff --git a/softwareDirectory/AutoVerScheme/res/qss/loginImage/1.keep b/softwareDirectory/AutoVerScheme/res/qss/loginImage/1.keep new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/qss/loginImage/1.keep diff --git a/softwareDirectory/AutoVerScheme/res/qss/qss.qrc b/softwareDirectory/AutoVerScheme/res/qss/qss.qrc new file mode 100644 index 0000000..3fd215d --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/qss/qss.qrc @@ -0,0 +1 @@ + diff --git a/softwareDirectory/AutoVerScheme/res/res.qrc b/softwareDirectory/AutoVerScheme/res/res.qrc new file mode 100644 index 0000000..5a9e304 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/res/res.qrc @@ -0,0 +1,28 @@ + + + image/Index/u15.png + image/Index/u17.svg + image/Index/u18.svg + image/Index/u19.svg + image/Index/u20.svg + image/Index/u21.svg + image/Index/u22.svg + image/Index/u23.svg + image/Index/u24.svg + image/Index/u26.svg + image/Index/u26_mouseOver.svg + image/Index/u33.svg + image/Index/u34.svg + image/Index/u35.svg + image/login/u0.png + image/login/u2.png + image/login/u2.svg + image/login/u3.svg + image/login/u5.png + image/login/u6.png + image/login/u7.svg + image/login/u9.png + image/Index/u101.png + image/Index/u102.png + + diff --git a/softwareDirectory/AutoVerScheme/testview.cpp b/softwareDirectory/AutoVerScheme/testview.cpp new file mode 100644 index 0000000..466134d --- /dev/null +++ b/softwareDirectory/AutoVerScheme/testview.cpp @@ -0,0 +1,29 @@ +#include "testview.h" +#include "ui_testview.h" + +TestView::TestView(QWidget *parent) : + QMainWindow(parent), + ui(new Ui::TestView) +{ + ui->setupUi(this); + this->initForm(); +} + +TestView::~TestView() +{ + delete ui; +} +void TestView::initForm() +{ + QPushButton *button1 = new QPushButton("Button 1"); + QPushButton *button2 = new QPushButton("Button 2"); + ui->horizontalLayout_2->addWidget(button1); + ui->horizontalLayout_2->addWidget(button2); + ui->horizontalLayout_2->setStretchFactor(button1,1); + ui->horizontalLayout_2->setStretchFactor(button2,2); + + this->setWindowTitle("软件标题"); + this->setWindowFlags(Qt::WindowMaximizeButtonHint|Qt::WindowCloseButtonHint); + this->setWindowFlag(Qt::CustomizeWindowHint,true); + this->setWindowFlag(Qt::WindowSystemMenuHint,true); +} diff --git a/softwareDirectory/AutoVerScheme/testview.h b/softwareDirectory/AutoVerScheme/testview.h new file mode 100644 index 0000000..683eaf2 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/testview.h @@ -0,0 +1,25 @@ +#ifndef TESTVIEW_H +#define TESTVIEW_H + +#include + +namespace Ui { +class TestView; +} + +class TestView : public QMainWindow +{ + Q_OBJECT + +public: + explicit TestView(QWidget *parent = nullptr); + ~TestView(); +private slots: + void initForm(); + + +private: + Ui::TestView *ui; +}; + +#endif // TESTVIEW_H diff --git a/softwareDirectory/AutoVerScheme/testview.ui b/softwareDirectory/AutoVerScheme/testview.ui new file mode 100644 index 0000000..4541c23 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/testview.ui @@ -0,0 +1,272 @@ + + + TestView + + + + 0 + 0 + 888 + 580 + + + + + 0 + 0 + + + + MainWindow + + + color:black; + + + + + + + + 0 + 60 + + + + + 0 + 50 + + + + background-color:#FFC0CB; + + + + + + + 0 + + + + + + + + TOP + + + + + + + + 0 + 0 + + + + TOPbutton + + + + + + + + + + background-color:#FFECB3; + + + + + + + + + + 0 + 0 + + + + + 0 + 0 + + + + Body + + + Qt::AutoText + + + Qt::LinksAccessibleByKeyboard + + + + + + + + + CheckBox + + + + + + + CheckBox + + + + + + + CheckBox + + + + + + + TextLabel + + + + + + + PushButton + + + + + + + + + 6 + + + + + PushButton + + + + + + + PushButton + + + + + + + PushButton + + + + + + + PushButton + + + + + + + + 0 + 0 + + + + + 30 + 30 + + + + PushButton + + + + + + + + + + 0 + 0 + + + + TextLabel + + + + + + + + + + + 0 + 0 + + + + + 50 + 50 + + + + background-color:#90ee90; + + + + + + + + + + 0 + 0 + + + + + 20 + 20 + + + + + + + Bottom + + + + + + + + + + + + + diff --git a/softwareDirectory/test.txt b/softwareDirectory/test.txt deleted file mode 100644 index e69de29..0000000 --- a/softwareDirectory/test.txt +++ /dev/null