From de3a417dd3a6fc368414c3e3c18920db06fb685b Mon Sep 17 00:00:00 2001 From: JF Date: Thu, 2 May 2019 16:10:58 -0400 Subject: [PATCH] Dev --- CableTestBench.pro | 14 +- CableTestBench.pro.user | 2 +- Makefile | 2 +- Makefile.Debug | 93 ++++- Makefile.Release | 93 ++++- Sources/CMainPage.ui | 3 + Sources/Cable.cpp | 75 ++++ Sources/Cable.h | 26 ++ Sources/CableTestBench.cpp | 33 +- Sources/CableTestBench.h | 13 + Sources/CableTestBenchDefs.h | 73 +++- Sources/CableTestEngine.cpp | 5 + Sources/CableTestEngine.h | 10 + Sources/CableTestPage.cpp | 23 +- Sources/CableTestPage.h | 4 + Sources/CableTestPage.ui | 239 +++++++++++- Sources/Connector.cpp | 26 ++ Sources/Connector.h | 22 ++ Sources/MainPage.cpp | 2 + Sources/MainPage.h | 4 +- Sources/MainWindow.cpp | 21 +- Sources/MainWindow.h | 5 + Sources/TestReport.cpp | 10 + Sources/TestReport.h | 18 + Sources/VisualInspectionPage.cpp | 125 ++++++ Sources/VisualInspectionPage.h | 10 + Sources/VisualInspectionPage.ui | 356 +++++++++++++++++- Sources/VisualInspectionResult.cpp | 40 ++ Sources/VisualInspectionResult.h | 31 ++ Sources/Widgets/ConnectorSelectWidget.cpp | 2 + Sources/Widgets/ConnectorSelectWidget.h | 1 + .../ConnectorTestVisualizationWidget.cpp | 39 +- .../ConnectorTestVisualizationWidget.h | 4 +- Sources/Widgets/ONOFFStatusWidget.cpp | 24 +- object_script.CableTestBench.Debug | 4 + object_script.CableTestBench.Release | 4 + ui_CMainPage.h | 5 +- ui_CableTestPage.h | 104 ++++- ui_VisualInspectionPage.h | 159 +++++++- 39 files changed, 1597 insertions(+), 127 deletions(-) create mode 100644 Sources/Cable.cpp create mode 100644 Sources/Cable.h create mode 100644 Sources/CableTestEngine.cpp create mode 100644 Sources/CableTestEngine.h create mode 100644 Sources/Connector.cpp create mode 100644 Sources/Connector.h create mode 100644 Sources/TestReport.cpp create mode 100644 Sources/TestReport.h create mode 100644 Sources/VisualInspectionResult.cpp create mode 100644 Sources/VisualInspectionResult.h diff --git a/CableTestBench.pro b/CableTestBench.pro index 42d775e..88801c8 100644 --- a/CableTestBench.pro +++ b/CableTestBench.pro @@ -25,7 +25,12 @@ SOURCES += \ Sources/CableTestPage.cpp \ Sources/Widgets/ConnectorClickZoneWidget.cpp \ Sources/Widgets/ONOFFStatusWidget.cpp \ - Sources/Widgets/ConnectorTestVisualizationWidget.cpp + Sources/Widgets/ConnectorTestVisualizationWidget.cpp \ + Sources/Connector.cpp \ + Sources/Cable.cpp \ + Sources/VisualInspectionResult.cpp \ + Sources/TestReport.cpp \ + Sources/CableTestEngine.cpp HEADERS += \ Sources/MainWindow.h \ @@ -38,7 +43,12 @@ HEADERS += \ Sources/Widgets/ConnectorClickZoneWidget.h \ Sources/CableTestBenchDefs.h \ Sources/Widgets/ONOFFStatusWidget.h \ - Sources/Widgets/ConnectorTestVisualizationWidget.h + Sources/Widgets/ConnectorTestVisualizationWidget.h \ + Sources/Connector.h \ + Sources/Cable.h \ + Sources/VisualInspectionResult.h \ + Sources/TestReport.h \ + Sources/CableTestEngine.h FORMS += \ Sources/CMainPage.ui \ diff --git a/CableTestBench.pro.user b/CableTestBench.pro.user index ba9ee97..2108df9 100644 --- a/CableTestBench.pro.user +++ b/CableTestBench.pro.user @@ -1,6 +1,6 @@ - + ProjectExplorer.Project.ActiveTarget diff --git a/Makefile b/Makefile index c24aaab..3e6bef2 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ ############################################################################# # Makefile for building: CableTestBench -# Generated by qmake (2.01a) (Qt 4.8.1) on: Wed May 1 16:11:22 2019 +# Generated by qmake (2.01a) (Qt 4.8.1) on: Thu May 2 14:55:50 2019 # Project: CableTestBench.pro # Template: app # Command: c:\Qt\4.8.1\bin\qmake.exe -spec ..\..\Qt\4.8.1\mkspecs\win32-g++ CONFIG+=declarative_debug -o Makefile CableTestBench.pro diff --git a/Makefile.Debug b/Makefile.Debug index 4cbfaa1..d926d57 100644 --- a/Makefile.Debug +++ b/Makefile.Debug @@ -1,6 +1,6 @@ ############################################################################# # Makefile for building: CableTestBench -# Generated by qmake (2.01a) (Qt 4.8.1) on: Wed May 1 16:11:22 2019 +# Generated by qmake (2.01a) (Qt 4.8.1) on: Thu May 2 14:55:50 2019 # Project: CableTestBench.pro # Template: app ############################################################################# @@ -50,7 +50,11 @@ SOURCES = Sources\MainWindow.cpp \ Sources\CableTestPage.cpp \ Sources\Widgets\ConnectorClickZoneWidget.cpp \ Sources\Widgets\ONOFFStatusWidget.cpp \ - Sources\Widgets\ConnectorTestVisualizationWidget.cpp debug\moc_MainWindow.cpp \ + Sources\Widgets\ConnectorTestVisualizationWidget.cpp \ + Sources\Connector.cpp \ + Sources\Cable.cpp \ + Sources\VisualInspectionResult.cpp \ + Sources\TestReport.cpp debug\moc_MainWindow.cpp \ debug\moc_MainPage.cpp \ debug\moc_CableTestBench.cpp \ debug\moc_VisualInspectionPage.cpp \ @@ -69,6 +73,10 @@ OBJECTS = debug/MainWindow.o \ debug/ConnectorClickZoneWidget.o \ debug/ONOFFStatusWidget.o \ debug/ConnectorTestVisualizationWidget.o \ + debug/Connector.o \ + debug/Cable.o \ + debug/VisualInspectionResult.o \ + debug/TestReport.o \ debug/moc_MainWindow.o \ debug/moc_MainPage.o \ debug/moc_CableTestBench.o \ @@ -115,7 +123,7 @@ dist: $(ZIP) CableTestBench.zip $(SOURCES) $(DIST) CableTestBench.pro ..\..\Qt\4.8.1\mkspecs\qconfig.pri ..\..\Qt\4.8.1\mkspecs\modules\qt_webkit_version.pri ..\..\Qt\4.8.1\mkspecs\features\qt_functions.prf ..\..\Qt\4.8.1\mkspecs\features\qt_config.prf ..\..\Qt\4.8.1\mkspecs\features\exclusive_builds.prf ..\..\Qt\4.8.1\mkspecs\features\default_pre.prf ..\..\Qt\4.8.1\mkspecs\features\win32\default_pre.prf ..\..\Qt\4.8.1\mkspecs\features\debug.prf ..\..\Qt\4.8.1\mkspecs\features\debug_and_release.prf ..\..\Qt\4.8.1\mkspecs\features\default_post.prf ..\..\Qt\4.8.1\mkspecs\features\win32\default_post.prf ..\..\Qt\4.8.1\mkspecs\features\build_pass.prf ..\..\Qt\4.8.1\mkspecs\features\declarative_debug.prf ..\..\Qt\4.8.1\mkspecs\features\win32\rtti.prf ..\..\Qt\4.8.1\mkspecs\features\win32\exceptions.prf ..\..\Qt\4.8.1\mkspecs\features\win32\stl.prf ..\..\Qt\4.8.1\mkspecs\features\shared.prf ..\..\Qt\4.8.1\mkspecs\features\warn_on.prf ..\..\Qt\4.8.1\mkspecs\features\qt.prf ..\..\Qt\4.8.1\mkspecs\features\win32\thread.prf ..\..\Qt\4.8.1\mkspecs\features\moc.prf ..\..\Qt\4.8.1\mkspecs\features\win32\windows.prf ..\..\Qt\4.8.1\mkspecs\features\resources.prf ..\..\Qt\4.8.1\mkspecs\features\uic.prf ..\..\Qt\4.8.1\mkspecs\features\yacc.prf ..\..\Qt\4.8.1\mkspecs\features\lex.prf ..\..\Qt\4.8.1\mkspecs\features\include_source_dir.prf c:\Qt\4.8.1\lib\qtmaind.prl HEADERS RESOURCES IMAGES SOURCES OBJECTIVE_SOURCES FORMS YACCSOURCES YACCSOURCES LEXSOURCES clean: compiler_clean - -$(DEL_FILE) debug\MainWindow.o debug\main.o debug\MainPage.o debug\CableTestBench.o debug\VisualInspectionPage.o debug\ConnectorSelectWidget.o debug\CableTestPage.o debug\ConnectorClickZoneWidget.o debug\ONOFFStatusWidget.o debug\ConnectorTestVisualizationWidget.o debug\moc_MainWindow.o debug\moc_MainPage.o debug\moc_CableTestBench.o debug\moc_VisualInspectionPage.o debug\moc_ConnectorSelectWidget.o debug\moc_CableTestPage.o debug\moc_ConnectorClickZoneWidget.o debug\moc_ONOFFStatusWidget.o debug\moc_ConnectorTestVisualizationWidget.o + -$(DEL_FILE) debug\MainWindow.o debug\main.o debug\MainPage.o debug\CableTestBench.o debug\VisualInspectionPage.o debug\ConnectorSelectWidget.o debug\CableTestPage.o debug\ConnectorClickZoneWidget.o debug\ONOFFStatusWidget.o debug\ConnectorTestVisualizationWidget.o debug\Connector.o debug\Cable.o debug\VisualInspectionResult.o debug\TestReport.o debug\moc_MainWindow.o debug\moc_MainPage.o debug\moc_CableTestBench.o debug\moc_VisualInspectionPage.o debug\moc_ConnectorSelectWidget.o debug\moc_CableTestPage.o debug\moc_ConnectorClickZoneWidget.o debug\moc_ONOFFStatusWidget.o debug\moc_ConnectorTestVisualizationWidget.o distclean: clean -$(DEL_FILE) $(DESTDIR_TARGET) @@ -132,7 +140,10 @@ compiler_moc_header_clean: -$(DEL_FILE) debug\moc_MainWindow.cpp debug\moc_MainPage.cpp debug\moc_CableTestBench.cpp debug\moc_VisualInspectionPage.cpp debug\moc_ConnectorSelectWidget.cpp debug\moc_CableTestPage.cpp debug\moc_ConnectorClickZoneWidget.cpp debug\moc_ONOFFStatusWidget.cpp debug\moc_ConnectorTestVisualizationWidget.cpp debug/moc_MainWindow.cpp: Sources/MainPage.h \ Sources/VisualInspectionPage.h \ + Sources/VisualInspectionResult.h \ + Sources/GlobalDefine.h \ Sources/CableTestPage.h \ + Sources/CableTestBenchDefs.h \ Sources/MainWindow.h C:\Qt\4.8.1\bin\moc.exe $(DEFINES) $(INCPATH) -D__GNUC__ -DWIN32 Sources\MainWindow.h -o debug\moc_MainWindow.cpp @@ -142,18 +153,27 @@ debug/moc_MainPage.cpp: Sources/MainPage.h debug/moc_CableTestBench.cpp: Sources/MainWindow.h \ Sources/MainPage.h \ Sources/VisualInspectionPage.h \ + Sources/VisualInspectionResult.h \ + Sources/GlobalDefine.h \ Sources/CableTestPage.h \ + Sources/CableTestBenchDefs.h \ + Sources/Connector.h \ + Sources/Cable.h \ + Sources/TestReport.h \ Sources/CableTestBench.h C:\Qt\4.8.1\bin\moc.exe $(DEFINES) $(INCPATH) -D__GNUC__ -DWIN32 Sources\CableTestBench.h -o debug\moc_CableTestBench.cpp -debug/moc_VisualInspectionPage.cpp: Sources/VisualInspectionPage.h +debug/moc_VisualInspectionPage.cpp: Sources/VisualInspectionResult.h \ + Sources/GlobalDefine.h \ + Sources/VisualInspectionPage.h C:\Qt\4.8.1\bin\moc.exe $(DEFINES) $(INCPATH) -D__GNUC__ -DWIN32 Sources\VisualInspectionPage.h -o debug\moc_VisualInspectionPage.cpp debug/moc_ConnectorSelectWidget.cpp: Sources/Widgets/ConnectorClickZoneWidget.h \ Sources/Widgets/ConnectorSelectWidget.h C:\Qt\4.8.1\bin\moc.exe $(DEFINES) $(INCPATH) -D__GNUC__ -DWIN32 Sources\Widgets\ConnectorSelectWidget.h -o debug\moc_ConnectorSelectWidget.cpp -debug/moc_CableTestPage.cpp: Sources/CableTestPage.h +debug/moc_CableTestPage.cpp: Sources/CableTestBenchDefs.h \ + Sources/CableTestPage.h C:\Qt\4.8.1\bin\moc.exe $(DEFINES) $(INCPATH) -D__GNUC__ -DWIN32 Sources\CableTestPage.h -o debug\moc_CableTestPage.cpp debug/moc_ConnectorClickZoneWidget.cpp: Sources/Widgets/ConnectorClickZoneWidget.h @@ -200,15 +220,27 @@ compiler_clean: compiler_moc_header_clean compiler_uic_clean debug/MainWindow.o: Sources/MainWindow.cpp Sources/MainWindow.h \ Sources/MainPage.h \ Sources/VisualInspectionPage.h \ + Sources/VisualInspectionResult.h \ + Sources/GlobalDefine.h \ Sources/CableTestPage.h \ - Sources/CableTestBench.h + Sources/CableTestBenchDefs.h \ + Sources/CableTestBench.h \ + Sources/Connector.h \ + Sources/Cable.h \ + Sources/TestReport.h $(CXX) -c $(CXXFLAGS) $(INCPATH) -o debug\MainWindow.o Sources\MainWindow.cpp debug/main.o: Sources/main.cpp Sources/CableTestBench.h \ Sources/MainWindow.h \ Sources/MainPage.h \ Sources/VisualInspectionPage.h \ - Sources/CableTestPage.h + Sources/VisualInspectionResult.h \ + Sources/GlobalDefine.h \ + Sources/CableTestPage.h \ + Sources/CableTestBenchDefs.h \ + Sources/Connector.h \ + Sources/Cable.h \ + Sources/TestReport.h $(CXX) -c $(CXXFLAGS) $(INCPATH) -o debug\main.o Sources\main.cpp debug/MainPage.o: Sources/MainPage.cpp Sources/MainPage.h \ @@ -219,11 +251,27 @@ debug/CableTestBench.o: Sources/CableTestBench.cpp Sources/CableTestBench.h \ Sources/MainWindow.h \ Sources/MainPage.h \ Sources/VisualInspectionPage.h \ - Sources/CableTestPage.h + Sources/VisualInspectionResult.h \ + Sources/GlobalDefine.h \ + Sources/CableTestPage.h \ + Sources/CableTestBenchDefs.h \ + Sources/Connector.h \ + Sources/Cable.h \ + Sources/TestReport.h $(CXX) -c $(CXXFLAGS) $(INCPATH) -o debug\CableTestBench.o Sources\CableTestBench.cpp debug/VisualInspectionPage.o: Sources/VisualInspectionPage.cpp Sources/VisualInspectionPage.h \ - ui_VisualInspectionPage.h + Sources/VisualInspectionResult.h \ + Sources/GlobalDefine.h \ + ui_VisualInspectionPage.h \ + Sources/CableTestBench.h \ + Sources/MainWindow.h \ + Sources/MainPage.h \ + Sources/CableTestPage.h \ + Sources/CableTestBenchDefs.h \ + Sources/Connector.h \ + Sources/Cable.h \ + Sources/TestReport.h $(CXX) -c $(CXXFLAGS) $(INCPATH) -o debug\VisualInspectionPage.o Sources\VisualInspectionPage.cpp debug/ConnectorSelectWidget.o: Sources/Widgets/ConnectorSelectWidget.cpp Sources/Widgets/ConnectorSelectWidget.h \ @@ -231,11 +279,17 @@ debug/ConnectorSelectWidget.o: Sources/Widgets/ConnectorSelectWidget.cpp Sources $(CXX) -c $(CXXFLAGS) $(INCPATH) -o debug\ConnectorSelectWidget.o Sources\Widgets\ConnectorSelectWidget.cpp debug/CableTestPage.o: Sources/CableTestPage.cpp Sources/CableTestPage.h \ + Sources/CableTestBenchDefs.h \ ui_CableTestPage.h \ Sources/CableTestBench.h \ Sources/MainWindow.h \ Sources/MainPage.h \ - Sources/VisualInspectionPage.h + Sources/VisualInspectionPage.h \ + Sources/VisualInspectionResult.h \ + Sources/GlobalDefine.h \ + Sources/Connector.h \ + Sources/Cable.h \ + Sources/TestReport.h $(CXX) -c $(CXXFLAGS) $(INCPATH) -o debug\CableTestPage.o Sources\CableTestPage.cpp debug/ConnectorClickZoneWidget.o: Sources/Widgets/ConnectorClickZoneWidget.cpp Sources/Widgets/ConnectorClickZoneWidget.h @@ -248,6 +302,25 @@ debug/ConnectorTestVisualizationWidget.o: Sources/Widgets/ConnectorTestVisualiza Sources/Widgets/ONOFFStatusWidget.h $(CXX) -c $(CXXFLAGS) $(INCPATH) -o debug\ConnectorTestVisualizationWidget.o Sources\Widgets\ConnectorTestVisualizationWidget.cpp +debug/Connector.o: Sources/Connector.cpp Sources/Connector.h \ + Sources/CableTestBenchDefs.h + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o debug\Connector.o Sources\Connector.cpp + +debug/Cable.o: Sources/Cable.cpp Sources/Cable.h \ + Sources/CableTestBenchDefs.h \ + Sources/Connector.h \ + Sources/GlobalDefine.h + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o debug\Cable.o Sources\Cable.cpp + +debug/VisualInspectionResult.o: Sources/VisualInspectionResult.cpp Sources/VisualInspectionResult.h \ + Sources/GlobalDefine.h + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o debug\VisualInspectionResult.o Sources\VisualInspectionResult.cpp + +debug/TestReport.o: Sources/TestReport.cpp Sources/TestReport.h \ + Sources/GlobalDefine.h \ + Sources/VisualInspectionResult.h + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o debug\TestReport.o Sources\TestReport.cpp + debug/moc_MainWindow.o: debug/moc_MainWindow.cpp $(CXX) -c $(CXXFLAGS) $(INCPATH) -o debug\moc_MainWindow.o debug\moc_MainWindow.cpp diff --git a/Makefile.Release b/Makefile.Release index ec4b999..0abe6ad 100644 --- a/Makefile.Release +++ b/Makefile.Release @@ -1,6 +1,6 @@ ############################################################################# # Makefile for building: CableTestBench -# Generated by qmake (2.01a) (Qt 4.8.1) on: Wed May 1 16:11:22 2019 +# Generated by qmake (2.01a) (Qt 4.8.1) on: Thu May 2 14:55:50 2019 # Project: CableTestBench.pro # Template: app ############################################################################# @@ -50,7 +50,11 @@ SOURCES = Sources\MainWindow.cpp \ Sources\CableTestPage.cpp \ Sources\Widgets\ConnectorClickZoneWidget.cpp \ Sources\Widgets\ONOFFStatusWidget.cpp \ - Sources\Widgets\ConnectorTestVisualizationWidget.cpp release\moc_MainWindow.cpp \ + Sources\Widgets\ConnectorTestVisualizationWidget.cpp \ + Sources\Connector.cpp \ + Sources\Cable.cpp \ + Sources\VisualInspectionResult.cpp \ + Sources\TestReport.cpp release\moc_MainWindow.cpp \ release\moc_MainPage.cpp \ release\moc_CableTestBench.cpp \ release\moc_VisualInspectionPage.cpp \ @@ -69,6 +73,10 @@ OBJECTS = release/MainWindow.o \ release/ConnectorClickZoneWidget.o \ release/ONOFFStatusWidget.o \ release/ConnectorTestVisualizationWidget.o \ + release/Connector.o \ + release/Cable.o \ + release/VisualInspectionResult.o \ + release/TestReport.o \ release/moc_MainWindow.o \ release/moc_MainPage.o \ release/moc_CableTestBench.o \ @@ -115,7 +123,7 @@ dist: $(ZIP) CableTestBench.zip $(SOURCES) $(DIST) CableTestBench.pro ..\..\Qt\4.8.1\mkspecs\qconfig.pri ..\..\Qt\4.8.1\mkspecs\modules\qt_webkit_version.pri ..\..\Qt\4.8.1\mkspecs\features\qt_functions.prf ..\..\Qt\4.8.1\mkspecs\features\qt_config.prf ..\..\Qt\4.8.1\mkspecs\features\exclusive_builds.prf ..\..\Qt\4.8.1\mkspecs\features\default_pre.prf ..\..\Qt\4.8.1\mkspecs\features\win32\default_pre.prf ..\..\Qt\4.8.1\mkspecs\features\release.prf ..\..\Qt\4.8.1\mkspecs\features\debug_and_release.prf ..\..\Qt\4.8.1\mkspecs\features\default_post.prf ..\..\Qt\4.8.1\mkspecs\features\win32\default_post.prf ..\..\Qt\4.8.1\mkspecs\features\build_pass.prf ..\..\Qt\4.8.1\mkspecs\features\declarative_debug.prf ..\..\Qt\4.8.1\mkspecs\features\win32\rtti.prf ..\..\Qt\4.8.1\mkspecs\features\win32\exceptions.prf ..\..\Qt\4.8.1\mkspecs\features\win32\stl.prf ..\..\Qt\4.8.1\mkspecs\features\shared.prf ..\..\Qt\4.8.1\mkspecs\features\warn_on.prf ..\..\Qt\4.8.1\mkspecs\features\qt.prf ..\..\Qt\4.8.1\mkspecs\features\win32\thread.prf ..\..\Qt\4.8.1\mkspecs\features\moc.prf ..\..\Qt\4.8.1\mkspecs\features\win32\windows.prf ..\..\Qt\4.8.1\mkspecs\features\resources.prf ..\..\Qt\4.8.1\mkspecs\features\uic.prf ..\..\Qt\4.8.1\mkspecs\features\yacc.prf ..\..\Qt\4.8.1\mkspecs\features\lex.prf ..\..\Qt\4.8.1\mkspecs\features\include_source_dir.prf c:\Qt\4.8.1\lib\qtmain.prl HEADERS RESOURCES IMAGES SOURCES OBJECTIVE_SOURCES FORMS YACCSOURCES YACCSOURCES LEXSOURCES clean: compiler_clean - -$(DEL_FILE) release\MainWindow.o release\main.o release\MainPage.o release\CableTestBench.o release\VisualInspectionPage.o release\ConnectorSelectWidget.o release\CableTestPage.o release\ConnectorClickZoneWidget.o release\ONOFFStatusWidget.o release\ConnectorTestVisualizationWidget.o release\moc_MainWindow.o release\moc_MainPage.o release\moc_CableTestBench.o release\moc_VisualInspectionPage.o release\moc_ConnectorSelectWidget.o release\moc_CableTestPage.o release\moc_ConnectorClickZoneWidget.o release\moc_ONOFFStatusWidget.o release\moc_ConnectorTestVisualizationWidget.o + -$(DEL_FILE) release\MainWindow.o release\main.o release\MainPage.o release\CableTestBench.o release\VisualInspectionPage.o release\ConnectorSelectWidget.o release\CableTestPage.o release\ConnectorClickZoneWidget.o release\ONOFFStatusWidget.o release\ConnectorTestVisualizationWidget.o release\Connector.o release\Cable.o release\VisualInspectionResult.o release\TestReport.o release\moc_MainWindow.o release\moc_MainPage.o release\moc_CableTestBench.o release\moc_VisualInspectionPage.o release\moc_ConnectorSelectWidget.o release\moc_CableTestPage.o release\moc_ConnectorClickZoneWidget.o release\moc_ONOFFStatusWidget.o release\moc_ConnectorTestVisualizationWidget.o distclean: clean -$(DEL_FILE) $(DESTDIR_TARGET) @@ -132,7 +140,10 @@ compiler_moc_header_clean: -$(DEL_FILE) release\moc_MainWindow.cpp release\moc_MainPage.cpp release\moc_CableTestBench.cpp release\moc_VisualInspectionPage.cpp release\moc_ConnectorSelectWidget.cpp release\moc_CableTestPage.cpp release\moc_ConnectorClickZoneWidget.cpp release\moc_ONOFFStatusWidget.cpp release\moc_ConnectorTestVisualizationWidget.cpp release/moc_MainWindow.cpp: Sources/MainPage.h \ Sources/VisualInspectionPage.h \ + Sources/VisualInspectionResult.h \ + Sources/GlobalDefine.h \ Sources/CableTestPage.h \ + Sources/CableTestBenchDefs.h \ Sources/MainWindow.h C:\Qt\4.8.1\bin\moc.exe $(DEFINES) $(INCPATH) -D__GNUC__ -DWIN32 Sources\MainWindow.h -o release\moc_MainWindow.cpp @@ -142,18 +153,27 @@ release/moc_MainPage.cpp: Sources/MainPage.h release/moc_CableTestBench.cpp: Sources/MainWindow.h \ Sources/MainPage.h \ Sources/VisualInspectionPage.h \ + Sources/VisualInspectionResult.h \ + Sources/GlobalDefine.h \ Sources/CableTestPage.h \ + Sources/CableTestBenchDefs.h \ + Sources/Connector.h \ + Sources/Cable.h \ + Sources/TestReport.h \ Sources/CableTestBench.h C:\Qt\4.8.1\bin\moc.exe $(DEFINES) $(INCPATH) -D__GNUC__ -DWIN32 Sources\CableTestBench.h -o release\moc_CableTestBench.cpp -release/moc_VisualInspectionPage.cpp: Sources/VisualInspectionPage.h +release/moc_VisualInspectionPage.cpp: Sources/VisualInspectionResult.h \ + Sources/GlobalDefine.h \ + Sources/VisualInspectionPage.h C:\Qt\4.8.1\bin\moc.exe $(DEFINES) $(INCPATH) -D__GNUC__ -DWIN32 Sources\VisualInspectionPage.h -o release\moc_VisualInspectionPage.cpp release/moc_ConnectorSelectWidget.cpp: Sources/Widgets/ConnectorClickZoneWidget.h \ Sources/Widgets/ConnectorSelectWidget.h C:\Qt\4.8.1\bin\moc.exe $(DEFINES) $(INCPATH) -D__GNUC__ -DWIN32 Sources\Widgets\ConnectorSelectWidget.h -o release\moc_ConnectorSelectWidget.cpp -release/moc_CableTestPage.cpp: Sources/CableTestPage.h +release/moc_CableTestPage.cpp: Sources/CableTestBenchDefs.h \ + Sources/CableTestPage.h C:\Qt\4.8.1\bin\moc.exe $(DEFINES) $(INCPATH) -D__GNUC__ -DWIN32 Sources\CableTestPage.h -o release\moc_CableTestPage.cpp release/moc_ConnectorClickZoneWidget.cpp: Sources/Widgets/ConnectorClickZoneWidget.h @@ -200,15 +220,27 @@ compiler_clean: compiler_moc_header_clean compiler_uic_clean release/MainWindow.o: Sources/MainWindow.cpp Sources/MainWindow.h \ Sources/MainPage.h \ Sources/VisualInspectionPage.h \ + Sources/VisualInspectionResult.h \ + Sources/GlobalDefine.h \ Sources/CableTestPage.h \ - Sources/CableTestBench.h + Sources/CableTestBenchDefs.h \ + Sources/CableTestBench.h \ + Sources/Connector.h \ + Sources/Cable.h \ + Sources/TestReport.h $(CXX) -c $(CXXFLAGS) $(INCPATH) -o release\MainWindow.o Sources\MainWindow.cpp release/main.o: Sources/main.cpp Sources/CableTestBench.h \ Sources/MainWindow.h \ Sources/MainPage.h \ Sources/VisualInspectionPage.h \ - Sources/CableTestPage.h + Sources/VisualInspectionResult.h \ + Sources/GlobalDefine.h \ + Sources/CableTestPage.h \ + Sources/CableTestBenchDefs.h \ + Sources/Connector.h \ + Sources/Cable.h \ + Sources/TestReport.h $(CXX) -c $(CXXFLAGS) $(INCPATH) -o release\main.o Sources\main.cpp release/MainPage.o: Sources/MainPage.cpp Sources/MainPage.h \ @@ -219,11 +251,27 @@ release/CableTestBench.o: Sources/CableTestBench.cpp Sources/CableTestBench.h \ Sources/MainWindow.h \ Sources/MainPage.h \ Sources/VisualInspectionPage.h \ - Sources/CableTestPage.h + Sources/VisualInspectionResult.h \ + Sources/GlobalDefine.h \ + Sources/CableTestPage.h \ + Sources/CableTestBenchDefs.h \ + Sources/Connector.h \ + Sources/Cable.h \ + Sources/TestReport.h $(CXX) -c $(CXXFLAGS) $(INCPATH) -o release\CableTestBench.o Sources\CableTestBench.cpp release/VisualInspectionPage.o: Sources/VisualInspectionPage.cpp Sources/VisualInspectionPage.h \ - ui_VisualInspectionPage.h + Sources/VisualInspectionResult.h \ + Sources/GlobalDefine.h \ + ui_VisualInspectionPage.h \ + Sources/CableTestBench.h \ + Sources/MainWindow.h \ + Sources/MainPage.h \ + Sources/CableTestPage.h \ + Sources/CableTestBenchDefs.h \ + Sources/Connector.h \ + Sources/Cable.h \ + Sources/TestReport.h $(CXX) -c $(CXXFLAGS) $(INCPATH) -o release\VisualInspectionPage.o Sources\VisualInspectionPage.cpp release/ConnectorSelectWidget.o: Sources/Widgets/ConnectorSelectWidget.cpp Sources/Widgets/ConnectorSelectWidget.h \ @@ -231,11 +279,17 @@ release/ConnectorSelectWidget.o: Sources/Widgets/ConnectorSelectWidget.cpp Sourc $(CXX) -c $(CXXFLAGS) $(INCPATH) -o release\ConnectorSelectWidget.o Sources\Widgets\ConnectorSelectWidget.cpp release/CableTestPage.o: Sources/CableTestPage.cpp Sources/CableTestPage.h \ + Sources/CableTestBenchDefs.h \ ui_CableTestPage.h \ Sources/CableTestBench.h \ Sources/MainWindow.h \ Sources/MainPage.h \ - Sources/VisualInspectionPage.h + Sources/VisualInspectionPage.h \ + Sources/VisualInspectionResult.h \ + Sources/GlobalDefine.h \ + Sources/Connector.h \ + Sources/Cable.h \ + Sources/TestReport.h $(CXX) -c $(CXXFLAGS) $(INCPATH) -o release\CableTestPage.o Sources\CableTestPage.cpp release/ConnectorClickZoneWidget.o: Sources/Widgets/ConnectorClickZoneWidget.cpp Sources/Widgets/ConnectorClickZoneWidget.h @@ -248,6 +302,25 @@ release/ConnectorTestVisualizationWidget.o: Sources/Widgets/ConnectorTestVisuali Sources/Widgets/ONOFFStatusWidget.h $(CXX) -c $(CXXFLAGS) $(INCPATH) -o release\ConnectorTestVisualizationWidget.o Sources\Widgets\ConnectorTestVisualizationWidget.cpp +release/Connector.o: Sources/Connector.cpp Sources/Connector.h \ + Sources/CableTestBenchDefs.h + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o release\Connector.o Sources\Connector.cpp + +release/Cable.o: Sources/Cable.cpp Sources/Cable.h \ + Sources/CableTestBenchDefs.h \ + Sources/Connector.h \ + Sources/GlobalDefine.h + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o release\Cable.o Sources\Cable.cpp + +release/VisualInspectionResult.o: Sources/VisualInspectionResult.cpp Sources/VisualInspectionResult.h \ + Sources/GlobalDefine.h + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o release\VisualInspectionResult.o Sources\VisualInspectionResult.cpp + +release/TestReport.o: Sources/TestReport.cpp Sources/TestReport.h \ + Sources/GlobalDefine.h \ + Sources/VisualInspectionResult.h + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o release\TestReport.o Sources\TestReport.cpp + release/moc_MainWindow.o: release/moc_MainWindow.cpp $(CXX) -c $(CXXFLAGS) $(INCPATH) -o release\moc_MainWindow.o release\moc_MainWindow.cpp diff --git a/Sources/CMainPage.ui b/Sources/CMainPage.ui index 0e32cd6..cb7c745 100644 --- a/Sources/CMainPage.ui +++ b/Sources/CMainPage.ui @@ -35,6 +35,9 @@ 1031 + + 0 + Tab 1 diff --git a/Sources/Cable.cpp b/Sources/Cable.cpp new file mode 100644 index 0000000..e473c82 --- /dev/null +++ b/Sources/Cable.cpp @@ -0,0 +1,75 @@ +#include "Cable.h" + +CCable::CCable(CConnectorDefs::eConnectorType InputConnectorType) +{ + mInputConnector.SetConnectorType(CConnectorDefs::UNKNOWN_CONNECTOR_TYPE); + mOutputConnector.SetConnectorType(CConnectorDefs::UNKNOWN_CONNECTOR_TYPE); + mCableDefined = false; +} + +int CCable::DefineCableByInputConnector(CConnectorDefs::eConnectorType InputConnectorType) +{ + switch(InputConnectorType) + { + case CConnectorDefs::INPUT_6_PINS_CONNECTOR_TYPE: + { + mInputConnector.SetConnectorType(InputConnectorType); + mOutputConnector.SetConnectorType(CConnectorDefs::OUTPUT_6_PINS_CONNECTOR_TYPE); + break; + } + case CConnectorDefs::INPUT_14_PINS_CONNECTOR_TYPE: + { + mInputConnector.SetConnectorType(InputConnectorType); + mOutputConnector.SetConnectorType(CConnectorDefs::OUTPUT_14_PINS_CONNECTOR_TYPE); + break; + } + case CConnectorDefs::INPUT_24_PINS_CONNECTOR_TYPE: + { + mInputConnector.SetConnectorType(InputConnectorType); + mOutputConnector.SetConnectorType(CConnectorDefs::OUTPUT_24_PINS_CONNECTOR_TYPE); + break; + } + case CConnectorDefs::INPUT_72_PINS_CONNECTOR_TYPE: + { + mInputConnector.SetConnectorType(InputConnectorType); + mOutputConnector.SetConnectorType(CConnectorDefs::OUTPUT_72_PINS_CONNECTOR_TYPE); + break; + } + case CConnectorDefs::INPUT_90_PINS_CONNECTOR_TYPE: + case CConnectorDefs::INPUT_108_PINS_CONNECTOR_TYPE: + case CConnectorDefs::INPUT_120_PINS_CONNECTOR_TYPE: + { + mInputConnector.SetConnectorType(InputConnectorType); + mOutputConnector.SetConnectorType(CConnectorDefs::OUTPUT_108_PINS_CONNECTOR_TYPE); + break; + } + default: + { + mInputConnector.SetConnectorType(CConnectorDefs::UNKNOWN_CONNECTOR_TYPE); + mOutputConnector.SetConnectorType(CConnectorDefs::UNKNOWN_CONNECTOR_TYPE); + mCableDefined = false; + return RET_ERROR; + break; + } + + } + + mCableDefined = true; + return RET_OK; + +} + +bool CCable::IsCableDefined() +{ + return mCableDefined; +} + +CConnector *CCable::GetInputConnector() +{ + return &mInputConnector; +} + +CConnector *CCable::GetOutputConnector() +{ + return &mOutputConnector; +} diff --git a/Sources/Cable.h b/Sources/Cable.h new file mode 100644 index 0000000..06630ec --- /dev/null +++ b/Sources/Cable.h @@ -0,0 +1,26 @@ +#ifndef CABLE_H +#define CABLE_H + +#include "CableTestBenchDefs.h" +#include "Connector.h" +#include "GlobalDefine.h" + +class CCable +{ +public: + CCable(CConnectorDefs::eConnectorType InputConnectorType); + + int DefineCableByInputConnector(CConnectorDefs::eConnectorType InputConnectorType); + CConnector *GetInputConnector(); + CConnector *GetOutputConnector(); + + bool IsCableDefined(); + + +private: + CConnector mInputConnector, mOutputConnector; + bool mCableDefined; + +}; + +#endif // CABLE_H diff --git a/Sources/CableTestBench.cpp b/Sources/CableTestBench.cpp index 8049893..6a43398 100644 --- a/Sources/CableTestBench.cpp +++ b/Sources/CableTestBench.cpp @@ -2,10 +2,10 @@ #include CCableTestBench::CCableTestBench(QObject *parent) : - QObject(parent) + QObject(parent), + mActualCable(CConnectorDefs::UNKNOWN_CONNECTOR_TYPE) { w = new MainWindow(0,this); - } CCableTestBench::~CCableTestBench() @@ -58,5 +58,32 @@ int CCableTestBench::ExecVisualInspectionRequest() { qDebug("Exec Visual Inspection clicked"); - mCableTestPageHandle->SetVisualInspectionDone(true); + // mCableTestPageHandle->SetVisualInspectionDone(true); + w->ShowInspectVisuellePage(); + return RET_OK; +} + +CCable* CCableTestBench::SetSelectedConnector(CConnectorDefs::eConnectorType ConType) +{ + if(mActualCable.DefineCableByInputConnector(ConType) == RET_ERROR) + { + return 0; + } + + return &mActualCable; +} + +int CCableTestBench::VisualInspectionQuitRequest() +{ + mVisualInspPageHandle->FillVisualInspectionResultReport(mCableTestReport.GetInspectionResult()); + if(mCableTestReport.GetInspectionResult()->IsVisualInspectionResultComplete() == true) + { + mCableTestPageHandle->SetVisualInspectionDone(true); + } + else + { + mCableTestPageHandle->SetVisualInspectionDone(false); + } + + w->ShowCableTestPage(); } diff --git a/Sources/CableTestBench.h b/Sources/CableTestBench.h index 02f94bf..e7d16a2 100644 --- a/Sources/CableTestBench.h +++ b/Sources/CableTestBench.h @@ -3,6 +3,10 @@ #include #include "MainWindow.h" +#include "CableTestBenchDefs.h" +#include "Connector.h" +#include "Cable.h" +#include "TestReport.h" class CMainPage; @@ -22,14 +26,23 @@ public: CMainPage *mMainPageHandle; CVisualInspectionPage *mVisualInspPageHandle; CCableTestPage *mCableTestPageHandle; + CCable mActualCable; int ExecVisualInspectionRequest(); + int VisualInspectionQuitRequest(); + + CCable *SetSelectedConnector(CConnectorDefs::eConnectorType ConType); + + CCable *GetActualCable(); private: quint16 DecToBCDWord(const quint16 word); quint8 DecToBCDByte(const quint8 byte); + + CTestReport mCableTestReport; + signals: public slots: diff --git a/Sources/CableTestBenchDefs.h b/Sources/CableTestBenchDefs.h index b524542..3156303 100644 --- a/Sources/CableTestBenchDefs.h +++ b/Sources/CableTestBenchDefs.h @@ -4,7 +4,7 @@ class CConnectorDefs { -#define MAX_CONNECTOR_PIN_COUNT 108 +#define MAX_CONNECTOR_PIN_COUNT 120 public: enum eConnectorType @@ -24,7 +24,78 @@ public: OUTPUT_108_PINS_CONNECTOR_TYPE }; + static int GetPinCount(eConnectorType type) + { + switch(type) + { + case INPUT_6_PINS_CONNECTOR_TYPE: + { + return 6; + break; + } + case INPUT_14_PINS_CONNECTOR_TYPE: + { + return 14; + break; + } + case INPUT_24_PINS_CONNECTOR_TYPE: + { + return 24; + break; + } + case INPUT_72_PINS_CONNECTOR_TYPE: + { + return 72; + break; + } + case INPUT_90_PINS_CONNECTOR_TYPE: + { + return 90; + break; + } + case INPUT_108_PINS_CONNECTOR_TYPE: + { + return 108; + break; + } + case INPUT_120_PINS_CONNECTOR_TYPE: + { + return 120; + break; + } + case OUTPUT_6_PINS_CONNECTOR_TYPE: + { + return 6; + break; + } + case OUTPUT_14_PINS_CONNECTOR_TYPE: + { + return 14; + break; + } + case OUTPUT_24_PINS_CONNECTOR_TYPE: + { + return 24; + break; + } + case OUTPUT_72_PINS_CONNECTOR_TYPE: + { + return 72; + break; + } + case OUTPUT_108_PINS_CONNECTOR_TYPE: + { + return 108; + break; + } + default: + { + return 0; + break; + } + } + } }; diff --git a/Sources/CableTestEngine.cpp b/Sources/CableTestEngine.cpp new file mode 100644 index 0000000..e0fc71e --- /dev/null +++ b/Sources/CableTestEngine.cpp @@ -0,0 +1,5 @@ +#include "CableTestEngine.h" + +CCableTestEngine::CCableTestEngine() +{ +} diff --git a/Sources/CableTestEngine.h b/Sources/CableTestEngine.h new file mode 100644 index 0000000..8d96d0a --- /dev/null +++ b/Sources/CableTestEngine.h @@ -0,0 +1,10 @@ +#ifndef CABLETESTENGINE_H +#define CABLETESTENGINE_H + +class CCableTestEngine +{ +public: + CCableTestEngine(); +}; + +#endif // CABLETESTENGINE_H diff --git a/Sources/CableTestPage.cpp b/Sources/CableTestPage.cpp index 60349f6..a745097 100644 --- a/Sources/CableTestPage.cpp +++ b/Sources/CableTestPage.cpp @@ -18,7 +18,10 @@ CCableTestPage::CCableTestPage(QWidget *parent) : ui->mInspectionDoneIcon->setPixmap(mInspectionNotDonePixmap); connect(ui->mExecInspVisuelleBtn,SIGNAL(clicked()),this,SLOT(InspVisuelleBtnClicked())); - ui->mConnectorTestVisualisationWidget->SetConnectorPinCount(108); + connect(ui->mConnectorSelectWidget,SIGNAL(ConnectorSelected(CConnectorDefs::eConnectorType)),this,SLOT(ConnectorSelectionChanged(CConnectorDefs::eConnectorType))); + ui->mInputTestVisualisationWidget->SetConnectorPinCount(0); + ui->mOutputTestVisualisationWidget->SetConnectorPinCount(0); + ui->mVisualInspStepChkBx->setCheckable(false); } CCableTestPage::~CCableTestPage() @@ -38,11 +41,27 @@ int CCableTestPage::SetVisualInspectionDone(bool Done) { ui->mInspectionDoneIcon->setPixmap(mInspectionDonePixmap); ui->mExecInspVisuelleBtn->setText(QString("Réviser Inspection").toUtf8()); + ui->mVisualInspStepChkBx->setCheckable(true); + ui->mVisualInspStepChkBx->setChecked(true); + ui->mVisualInspStepChkBx->setCheckable(false); } else { - ui->mInspectionDoneIcon->setPixmap(mInspectionDonePixmap); + ui->mInspectionDoneIcon->setPixmap(mInspectionNotDonePixmap); ui->mExecInspVisuelleBtn->setText("Effectuer Inspection"); + ui->mVisualInspStepChkBx->setChecked(false); } return RET_OK; } + +void CCableTestPage::ConnectorSelectionChanged(CConnectorDefs::eConnectorType ConType) +{ + CCable* Cable; + Cable = mProgramHandle->SetSelectedConnector(ConType); + + if(Cable != 0) + { + ui->mInputTestVisualisationWidget->SetConnectorPinCount(Cable->GetInputConnector()->GetPinCount()); + ui->mOutputTestVisualisationWidget->SetConnectorPinCount(Cable->GetOutputConnector()->GetPinCount()); + } +} diff --git a/Sources/CableTestPage.h b/Sources/CableTestPage.h index 1f907b4..6cd2b33 100644 --- a/Sources/CableTestPage.h +++ b/Sources/CableTestPage.h @@ -2,6 +2,7 @@ #define CABLETESTPAGE_H #include +#include "CableTestBenchDefs.h" class CCableTestBench; @@ -20,6 +21,8 @@ public: CCableTestBench *mProgramHandle; int SetVisualInspectionDone(bool Done = true); + + private: Ui::CCableTestPage *ui; @@ -28,6 +31,7 @@ private: public slots: void InspVisuelleBtnClicked(); + void ConnectorSelectionChanged(CConnectorDefs::eConnectorType ConType); }; #endif // CABLETESTPAGE_H diff --git a/Sources/CableTestPage.ui b/Sources/CableTestPage.ui index 818b7a8..da750b5 100644 --- a/Sources/CableTestPage.ui +++ b/Sources/CableTestPage.ui @@ -6,8 +6,8 @@ 0 0 - 1800 - 880 + 1366 + 768 @@ -16,8 +16,8 @@ - 850 - 20 + 970 + 10 376 537 @@ -168,8 +168,8 @@ - 50 - 30 + 60 + 20 271 20 @@ -186,8 +186,8 @@ - 60 - 200 + 600 + 20 271 20 @@ -204,8 +204,8 @@ - 50 - 220 + 600 + 40 291 121 @@ -246,22 +246,25 @@ - + - 60 + 10 410 - 741 - 231 + 471 + 351 + + false + - 57 - 380 - 751 + 30 + 360 + 901 20 @@ -269,6 +272,208 @@ Qt::Horizontal + + + + 510 + 410 + 441 + 351 + + + + false + + + + + + 490 + 390 + 20 + 371 + + + + Qt::Vertical + + + + + + 130 + 370 + 161 + 41 + + + + + 16 + + + + Contacts entrée + + + + + + 670 + 370 + 161 + 41 + + + + + 16 + + + + Contacts sortie + + + + + + 430 + 20 + 91 + 23 + + + + Nouveau Câble + + + + + + 50 + 220 + 471 + 131 + + + + QFrame::Box + + + QFrame::Raised + + + + + 260 + 20 + 91 + 23 + + + + Démarrer test + + + + + + 260 + 70 + 91 + 23 + + + + Réinitialiser test + + + + + + 20 + 20 + 151 + 17 + + + + 1. Identification du câble + + + false + + + + + + 20 + 50 + 151 + 17 + + + + + + + 2. Inspection visuelle + + + true + + + + + + 20 + 80 + 191 + 17 + + + + 3. Sélection du connecteur d'entrée + + + false + + + + + + + 50 + 200 + 221 + 20 + + + + + 12 + + + + Contrôle du test + + + + + + 970 + 550 + 381 + 201 + + + + QFrame::Box + + + QFrame::Plain + + diff --git a/Sources/Connector.cpp b/Sources/Connector.cpp new file mode 100644 index 0000000..9ef9e60 --- /dev/null +++ b/Sources/Connector.cpp @@ -0,0 +1,26 @@ +#include "Connector.h" + +CConnector::CConnector() +{ + mPinCount = 0; +} + +int CConnector::GetPinCount() +{ + return mPinCount; +} + +int CConnector::SetConnectorType(CConnectorDefs::eConnectorType type) +{ + mPinCount = CConnectorDefs::GetPinCount(type); +} + +bool CConnector::IsConnectorDefined() +{ + if(mPinCount == 0) + { + return false; + } + + return true; +} diff --git a/Sources/Connector.h b/Sources/Connector.h new file mode 100644 index 0000000..b89d263 --- /dev/null +++ b/Sources/Connector.h @@ -0,0 +1,22 @@ +#ifndef CONNECTOR_H +#define CONNECTOR_H + +#include "CableTestBenchDefs.h" + +class CConnector +{ +public: + CConnector(); + + int GetPinCount(); + int SetConnectorType(CConnectorDefs::eConnectorType type); + bool IsConnectorDefined(); + +private: + int mPinCount; + CConnectorDefs::eConnectorType mConnectorType; + + +}; + +#endif // CONNECTOR_H diff --git a/Sources/MainPage.cpp b/Sources/MainPage.cpp index 534d41c..d3f7da5 100644 --- a/Sources/MainPage.cpp +++ b/Sources/MainPage.cpp @@ -46,4 +46,6 @@ CMainPage::~CMainPage() int CMainPage::SetTestPageWidget(QWidget *PageHandle) { ui->mMainTabWidget->addTab(PageHandle,QIcon(),QString("Câble")); + return RET_OK; } + diff --git a/Sources/MainPage.h b/Sources/MainPage.h index 6f0f337..fcbdd65 100644 --- a/Sources/MainPage.h +++ b/Sources/MainPage.h @@ -21,12 +21,12 @@ public: explicit CMainPage(QWidget *parent = 0); ~CMainPage(); CCableTestBench *mProgramHandle; - QPixmap mLedONPixmap, mLedOFFPixmap; - QLabel *test; // CConnectorSelectWidget *mConnectorSelWidget; int SetTestPageWidget(QWidget *PageHandle); + + private: Ui::CMainPage *ui; diff --git a/Sources/MainWindow.cpp b/Sources/MainWindow.cpp index 5ad505b..bfd6299 100644 --- a/Sources/MainWindow.cpp +++ b/Sources/MainWindow.cpp @@ -9,7 +9,8 @@ MainWindow::MainWindow(QWidget *parent,CCableTestBench* ProgramHandle) resize(1800,890); mMainPage = new CMainPage(); - mVisualInspPage = new CVisualInspectionPage(); + mVisualInspPage = new CVisualInspectionPage(this); + mVisualInspPage->hide(); mCableTestPage = new CCableTestPage(this); @@ -17,7 +18,7 @@ MainWindow::MainWindow(QWidget *parent,CCableTestBench* ProgramHandle) mVisualInspPage->mProgramHandle = ProgramHandle; mCableTestPage->mProgramHandle = ProgramHandle; - // mMainPage->SetTestPageWidget(mCableTestPage); + //mMainPage->SetTestPageWidget(mCableTestPage); //setCentralWidget(mVisualInspPage); @@ -32,3 +33,19 @@ MainWindow::~MainWindow() delete mMainPage; delete mVisualInspPage; } + +int MainWindow::ShowInspectVisuellePage() +{ + mCableTestPage->hide(); + mVisualInspPage->show(); + return RET_OK; +} + +int MainWindow::ShowCableTestPage() +{ + mVisualInspPage->hide(); + mCableTestPage->show(); + return RET_OK; +} + + diff --git a/Sources/MainWindow.h b/Sources/MainWindow.h index 8e17411..08fa9a8 100644 --- a/Sources/MainWindow.h +++ b/Sources/MainWindow.h @@ -9,6 +9,7 @@ #include "MainPage.h" #include "VisualInspectionPage.h" #include "CableTestPage.h" +#include "VisualInspectionResult.h" class CCableTestBench; @@ -25,6 +26,10 @@ public: CVisualInspectionPage *mVisualInspPage; CCableTestPage *mCableTestPage; + int ShowInspectVisuellePage(); + int ShowCableTestPage(); + + public slots: }; diff --git a/Sources/TestReport.cpp b/Sources/TestReport.cpp new file mode 100644 index 0000000..0547f5d --- /dev/null +++ b/Sources/TestReport.cpp @@ -0,0 +1,10 @@ +#include "TestReport.h" + +CTestReport::CTestReport() +{ +} + +CVisualInspectionResult * CTestReport::GetInspectionResult() +{ + return &mVisualInspectionResultReport; +} diff --git a/Sources/TestReport.h b/Sources/TestReport.h new file mode 100644 index 0000000..7f7a2fa --- /dev/null +++ b/Sources/TestReport.h @@ -0,0 +1,18 @@ +#ifndef TESTREPORT_H +#define TESTREPORT_H + +#include "GlobalDefine.h" +#include "VisualInspectionResult.h" + +class CTestReport +{ +public: + CTestReport(); + + CVisualInspectionResult* GetInspectionResult(); + +private: + CVisualInspectionResult mVisualInspectionResultReport; +}; + +#endif // TESTREPORT_H diff --git a/Sources/VisualInspectionPage.cpp b/Sources/VisualInspectionPage.cpp index 7d1ded6..c986485 100644 --- a/Sources/VisualInspectionPage.cpp +++ b/Sources/VisualInspectionPage.cpp @@ -1,5 +1,7 @@ #include "VisualInspectionPage.h" #include "ui_VisualInspectionPage.h" +#include "CableTestBench.h" + CVisualInspectionPage::CVisualInspectionPage(QWidget *parent) : QWidget(parent), @@ -8,9 +10,132 @@ CVisualInspectionPage::CVisualInspectionPage(QWidget *parent) : mProgramHandle = 0; ui->setupUi(this); + mVerif52BtnGroup.addButton(ui->mVerif52DoneChkBx); + mVerif52BtnGroup.addButton(ui->mVerif52NotDoneChkBx); + mVerif53BtnGroup.addButton(ui->mVerif53DoneChkBx); + mVerif53BtnGroup.addButton(ui->mVerif53NotDoneChkBx); + mVerif54BtnGroup.addButton(ui->mVerif54DoneChkBx); + mVerif54BtnGroup.addButton(ui->mVerif54NotDoneChkBx); + mVerif55BtnGroup.addButton(ui->mVerif55DoneChkBx); + mVerif55BtnGroup.addButton(ui->mVerif55NotDoneChkBx); + mVerif56BtnGroup.addButton(ui->mVerif56DoneChkBx); + mVerif56BtnGroup.addButton(ui->mVerif56NotDoneChkBx); + + connect(ui->mOKBtn,SIGNAL(clicked()),this,SLOT(OKBtnClicked())); + connect(ui->mResetInspectionFormBtn,SIGNAL(clicked()),this,SLOT(ResetFormClicked())); + } CVisualInspectionPage::~CVisualInspectionPage() { delete ui; } + +void CVisualInspectionPage::OKBtnClicked() +{ + mProgramHandle->VisualInspectionQuitRequest(); +} + +int CVisualInspectionPage::FillVisualInspectionResultReport(CVisualInspectionResult *Report) +{ + CVisualInspectionResult::eVerifExecResult Verif52Result, Verif53Result, Verif54Result, Verif55Result, Verif56Result; + + Verif52Result = Verif53Result = Verif54Result = Verif55Result = Verif56Result = CVisualInspectionResult::VERIF_UNKNOWN_RESULT; + + if(ui->mVerif52DoneChkBx->isChecked()) + { + Verif52Result = CVisualInspectionResult::VERIF_DONE_RESULT; + } + else if(ui->mVerif52NotDoneChkBx->isChecked()) + { + Verif52Result = CVisualInspectionResult::VERIF_NOT_DONE_RESULT; + } + + if(ui->mVerif53DoneChkBx->isChecked()) + { + Verif53Result = CVisualInspectionResult::VERIF_DONE_RESULT; + } + else if(ui->mVerif53NotDoneChkBx->isChecked()) + { + Verif53Result = CVisualInspectionResult::VERIF_NOT_DONE_RESULT; + } + + if(ui->mVerif54DoneChkBx->isChecked()) + { + Verif54Result = CVisualInspectionResult::VERIF_DONE_RESULT; + } + else if(ui->mVerif54NotDoneChkBx->isChecked()) + { + Verif54Result = CVisualInspectionResult::VERIF_NOT_DONE_RESULT; + } + + if(ui->mVerif55DoneChkBx->isChecked()) + { + Verif55Result = CVisualInspectionResult::VERIF_DONE_RESULT; + } + else if(ui->mVerif55NotDoneChkBx->isChecked()) + { + Verif55Result = CVisualInspectionResult::VERIF_NOT_DONE_RESULT; + } + + if(ui->mVerif56DoneChkBx->isChecked()) + { + Verif56Result = CVisualInspectionResult::VERIF_DONE_RESULT; + } + else if(ui->mVerif56NotDoneChkBx->isChecked()) + { + Verif56Result = CVisualInspectionResult::VERIF_NOT_DONE_RESULT; + } + + + Report->SetVisualInspectionResult(Verif52Result, Verif53Result, Verif54Result, Verif55Result, Verif56Result,ui->mNotesTextEditBx->toPlainText()); + + return RET_OK; +} + +void CVisualInspectionPage::ResetFormClicked() +{ + ResetForm(); +} + +int CVisualInspectionPage::ResetForm() +{ + //Necessary to uncheck the boxes... + mVerif52BtnGroup.setExclusive(false); + mVerif53BtnGroup.setExclusive(false); + mVerif54BtnGroup.setExclusive(false); + mVerif55BtnGroup.setExclusive(false); + mVerif56BtnGroup.setExclusive(false); + +// ui->mVerif52DoneChkBx->setChecked(false); +// ui->mVerif52NotDoneChkBx->setCheckState(Qt::Unchecked); +// ui->mVerif53DoneChkBx->setCheckState(Qt::Unchecked); +// ui->mVerif53NotDoneChkBx->setCheckState(Qt::Unchecked); +// ui->mVerif54DoneChkBx->setCheckState(Qt::Unchecked); +// ui->mVerif54NotDoneChkBx->setCheckState(Qt::Unchecked); +// ui->mVerif55DoneChkBx->setCheckState(Qt::Unchecked); +// ui->mVerif55NotDoneChkBx->setCheckState(Qt::Unchecked); +// ui->mVerif56DoneChkBx->setCheckState(Qt::Unchecked); +// ui->mVerif56NotDoneChkBx->setCheckState(Qt::Unchecked); + + ui->mVerif52DoneChkBx->setChecked(false); + ui->mVerif52NotDoneChkBx->setChecked(false); + ui->mVerif53DoneChkBx->setChecked(false); + ui->mVerif53NotDoneChkBx->setChecked(false); + ui->mVerif54DoneChkBx->setChecked(false); + ui->mVerif54NotDoneChkBx->setChecked(false); + ui->mVerif55DoneChkBx->setChecked(false); + ui->mVerif55NotDoneChkBx->setChecked(false); + ui->mVerif56DoneChkBx->setChecked(false); + ui->mVerif56NotDoneChkBx->setChecked(false); + + mVerif52BtnGroup.setExclusive(true); + mVerif53BtnGroup.setExclusive(true); + mVerif54BtnGroup.setExclusive(true); + mVerif55BtnGroup.setExclusive(true); + mVerif56BtnGroup.setExclusive(true); + + ui->mNotesTextEditBx->setText(QString()); + + return RET_OK; +} diff --git a/Sources/VisualInspectionPage.h b/Sources/VisualInspectionPage.h index ed8dfac..6f649a6 100644 --- a/Sources/VisualInspectionPage.h +++ b/Sources/VisualInspectionPage.h @@ -2,6 +2,8 @@ #define VISUALINSPECTIONPAGE_H #include +#include +#include "VisualInspectionResult.h" class CCableTestBench; @@ -18,10 +20,18 @@ public: ~CVisualInspectionPage(); CCableTestBench *mProgramHandle; + int FillVisualInspectionResultReport(CVisualInspectionResult *Report); + int ResetForm(); + + private: Ui::CVisualInspectionPage *ui; + QButtonGroup mVerif52BtnGroup, mVerif53BtnGroup, mVerif54BtnGroup, mVerif55BtnGroup, mVerif56BtnGroup; +public slots: + void OKBtnClicked(); + void ResetFormClicked(); }; #endif // VISUALINSPECTIONPAGE_H diff --git a/Sources/VisualInspectionPage.ui b/Sources/VisualInspectionPage.ui index 1df32f8..104b9bc 100644 --- a/Sources/VisualInspectionPage.ui +++ b/Sources/VisualInspectionPage.ui @@ -13,13 +13,33 @@ Form - + - 100 - 50 - 211 - 17 + 250 + 10 + 601 + 81 + + + + + 14 + + + + Confirmer que les vérifications décrites dans la procédure +de fabrication des câbles PRO-EF-CT-CT-PDS-9999-53525 +ont été complétés (chaque câble doit être vérifié) + + + + + + 380 + 230 + 261 + 16 @@ -28,33 +48,337 @@ - Vérifiez ceci + 5.2 Vérifications avant le sertissage - + - 100 - 90 - 70 - 17 + 380 + 280 + 311 + 16 + + + 12 + + - CheckBox + 5.3 Vérifications après chaque sertissage - + - 100 + 380 + 330 + 311 + 16 + + + + + 12 + + + + 5.4 Après l'insertion de chaque contact + + + + + + 380 + 380 + 471 + 16 + + + + + 12 + + + + 5.5 Vérifications avant de refermer le couvercle du connecteur + + + + + + 380 + 430 + 471 + 16 + + + + + 12 + + + + 5.6 Vérifications après la fermeture du couvercle + + + + + + 120 140 - 70 + 811 + 20 + + + + + 12 + + + + Pour chaque section de la procédure, indiquez si les vérifications ont été effectuées lors de la fabrication + + + + + + 330 + 200 + 46 + 13 + + + + Effectuée + + + + + + 230 + 200 + 71 + 16 + + + + Non effectuée + + + + + + 340 + 230 + 21 17 - CheckBox + + + + false + + + + + + 260 + 230 + 21 + 17 + + + + + + + false + + + + + + 260 + 280 + 21 + 17 + + + + + + + false + + + + + + 340 + 280 + 21 + 17 + + + + + + + false + + + + + + 340 + 330 + 21 + 17 + + + + + + + false + + + + + + 260 + 330 + 21 + 17 + + + + + + + false + + + + + + 260 + 380 + 21 + 17 + + + + + + + false + + + + + + 340 + 380 + 21 + 17 + + + + + + + false + + + + + + 260 + 430 + 21 + 17 + + + + + + + false + + + + + + 340 + 430 + 21 + 17 + + + + + + + false + + + + + + 110 + 580 + 75 + 23 + + + + OK + + + + + + 260 + 530 + 611 + 141 + + + + + + + 260 + 500 + 811 + 20 + + + + + 12 + + + + Notes + + + + + + 790 + 260 + 75 + 23 + + + + Réinitialiser diff --git a/Sources/VisualInspectionResult.cpp b/Sources/VisualInspectionResult.cpp new file mode 100644 index 0000000..ff1d44a --- /dev/null +++ b/Sources/VisualInspectionResult.cpp @@ -0,0 +1,40 @@ +#include "VisualInspectionResult.h" +#include + +CVisualInspectionResult::CVisualInspectionResult() +{ + ClearResults(); +} + +int CVisualInspectionResult::ClearResults() +{ + mVerif52ExecResult = mVerif53ExecResult = mVerif54ExecResult = mVerif55ExecResult = mVerif56ExecResult = VERIF_UNKNOWN_RESULT; + mVerifNotesText.clear(); + + return RET_OK; +} + +bool CVisualInspectionResult::IsVisualInspectionResultComplete() +{ + if(mVerif52ExecResult != VERIF_UNKNOWN_RESULT && + mVerif53ExecResult != VERIF_UNKNOWN_RESULT && + mVerif54ExecResult != VERIF_UNKNOWN_RESULT && + mVerif55ExecResult != VERIF_UNKNOWN_RESULT && + mVerif56ExecResult != VERIF_UNKNOWN_RESULT ) + { + return true; + } + + return false; +} + +int CVisualInspectionResult::SetVisualInspectionResult(eVerifExecResult Verif52, eVerifExecResult Verif53, eVerifExecResult Verif54, eVerifExecResult Verif55, eVerifExecResult Verif56, QString Notes) +{ + mVerif52ExecResult = Verif52; + mVerif53ExecResult = Verif53; + mVerif54ExecResult = Verif54; + mVerif55ExecResult = Verif55; + mVerif56ExecResult = Verif56; + mVerifNotesText = Notes; + return RET_OK; +} diff --git a/Sources/VisualInspectionResult.h b/Sources/VisualInspectionResult.h new file mode 100644 index 0000000..6cde2a9 --- /dev/null +++ b/Sources/VisualInspectionResult.h @@ -0,0 +1,31 @@ +#ifndef VISUALINSPECTIONRESULT_H +#define VISUALINSPECTIONRESULT_H + +#include "GlobalDefine.h" +#include + +class CVisualInspectionResult +{ + +public: + enum eVerifExecResult + { + VERIF_UNKNOWN_RESULT, + VERIF_DONE_RESULT, + VERIF_NOT_DONE_RESULT + }; + + + CVisualInspectionResult(); + + eVerifExecResult mVerif52ExecResult, mVerif53ExecResult, mVerif54ExecResult, mVerif55ExecResult, mVerif56ExecResult; + QString mVerifNotesText; + + int ClearResults(); + bool IsVisualInspectionResultComplete(); + + int SetVisualInspectionResult(eVerifExecResult Verif52, eVerifExecResult Verif53, eVerifExecResult Verif54, eVerifExecResult Verif55, eVerifExecResult Verif56, QString Notes); + +}; + +#endif // VISUALINSPECTIONRESULT_H diff --git a/Sources/Widgets/ConnectorSelectWidget.cpp b/Sources/Widgets/ConnectorSelectWidget.cpp index 0673c02..b9b1424 100644 --- a/Sources/Widgets/ConnectorSelectWidget.cpp +++ b/Sources/Widgets/ConnectorSelectWidget.cpp @@ -183,6 +183,8 @@ void CConnectorSelectWidget::InputConnectorZoneClicked(CConnectorClickZoneWidget ConClickZone->SelectConnector(); mCurSelConnector = ConClickZone->GetConnectorType(); } + + emit ConnectorSelected(mCurSelConnector); } CConnectorSelectWidget::~CConnectorSelectWidget() diff --git a/Sources/Widgets/ConnectorSelectWidget.h b/Sources/Widgets/ConnectorSelectWidget.h index 3080af7..dc156f5 100644 --- a/Sources/Widgets/ConnectorSelectWidget.h +++ b/Sources/Widgets/ConnectorSelectWidget.h @@ -30,6 +30,7 @@ public: private: CConnectorDefs::eConnectorType mCurSelConnector; signals: + void ConnectorSelected(CConnectorDefs::eConnectorType ConType); public slots: diff --git a/Sources/Widgets/ConnectorTestVisualizationWidget.cpp b/Sources/Widgets/ConnectorTestVisualizationWidget.cpp index 063c182..cd27411 100644 --- a/Sources/Widgets/ConnectorTestVisualizationWidget.cpp +++ b/Sources/Widgets/ConnectorTestVisualizationWidget.cpp @@ -8,7 +8,7 @@ CConnectorTestVisualizationWidget::CConnectorTestVisualizationWidget(QWidget *pa int CConnectorTestVisualizationWidget::SetConnectorPinCount(int Count) { - if(Count <= 0 || Count > MAX_CONNECTOR_PIN_COUNT) + if(Count <= 0) { return RET_ERROR; } @@ -16,36 +16,39 @@ int CConnectorTestVisualizationWidget::SetConnectorPinCount(int Count) ClearConnectorsLists(); CONOFFStatusWidget *NewWidget; + + int row = 0, col = 0; for(int i = 0; i < Count; i++) { - QString pin = QString("pin %1").arg(i); + QString pin = QString("%1").arg(i+1); NewWidget = new CONOFFStatusWidget(CONOFFStatusWidget::ON_OFF_LED_COLOR_GREEN,this,pin); NewWidget->resize(ON_OFF_WIDGET_SIZE,ON_OFF_WIDGET_SIZE); - NewWidget->move((i+1)*(ON_OFF_WIDGET_SIZE+5),((i/10)*(ON_OFF_WIDGET_SIZE+5))); - mOutputCtorPinsWidgetsList.append(NewWidget); -// NewWidget = new CONOFFStatusWidget(CONOFFStatusWidget::ON_OFF_LED_COLOR_GREEN,this,pin); -// NewWidget->resize(ON_OFF_WIDGET_SIZE,ON_OFF_WIDGET_SIZE); -// NewWidget->move((i+1)*(ON_OFF_WIDGET_SIZE+5),((i%10)*(ON_OFF_WIDGET_SIZE+5))); -// mInputCtorPinsWidgetsList.append(NewWidget); + +// NewWidget->move((col)*(ON_OFF_WIDGET_SIZE + col_offset),((row) * (ON_OFF_WIDGET_SIZE + row_offset))); + NewWidget->move(col,row); + NewWidget->show(); + mPinsWidgetsList.append(NewWidget); + + col += ON_OFF_WIDGET_SIZE+5; + if((col + ON_OFF_WIDGET_SIZE+5) >= geometry().width()) + { + col = 0; + row += ON_OFF_WIDGET_SIZE + 5; + } + } - repaint(); + // repaint(); return RET_OK; } int CConnectorTestVisualizationWidget::ClearConnectorsLists() { - for(int i = 0; i < mOutputCtorPinsWidgetsList.size(); i++) + for(int i = 0; i < mPinsWidgetsList.size(); i++) { - delete mOutputCtorPinsWidgetsList.at(i); + delete mPinsWidgetsList.at(i); } - mOutputCtorPinsWidgetsList.clear(); - - for(int i = 0; i < mInputCtorPinsWidgetsList.size(); i++) - { - delete mInputCtorPinsWidgetsList.at(i); - } - mInputCtorPinsWidgetsList.clear(); + mPinsWidgetsList.clear(); return RET_OK; } diff --git a/Sources/Widgets/ConnectorTestVisualizationWidget.h b/Sources/Widgets/ConnectorTestVisualizationWidget.h index e3d0eb4..5dfdff9 100644 --- a/Sources/Widgets/ConnectorTestVisualizationWidget.h +++ b/Sources/Widgets/ConnectorTestVisualizationWidget.h @@ -7,14 +7,14 @@ #include "CableTestBenchDefs.h" #define ON_OFF_WIDGET_SIZE 30 +#define LED_PER_LINE_COUNT 10 class CConnectorTestVisualizationWidget : public QWidget { Q_OBJECT public: explicit CConnectorTestVisualizationWidget(QWidget *parent = 0); - QList mInputCtorPinsWidgetsList; - QList mOutputCtorPinsWidgetsList; + QList mPinsWidgetsList; int SetConnectorPinCount(int count); diff --git a/Sources/Widgets/ONOFFStatusWidget.cpp b/Sources/Widgets/ONOFFStatusWidget.cpp index b73ff44..ad47e28 100644 --- a/Sources/Widgets/ONOFFStatusWidget.cpp +++ b/Sources/Widgets/ONOFFStatusWidget.cpp @@ -23,13 +23,13 @@ CONOFFStatusWidget::CONOFFStatusWidget(eONOFFLedColor Color, QWidget *Parent, QS setParent(Parent); if(Color == ON_OFF_LED_COLOR_GREEN) { - mLedOffPixmap = QPixmap("./Images/green-led-off-md.png").scaled(10,10); - mLedOnPixmap = QPixmap("./Images/green-led-on-md.png").scaled(10,10); + mLedOffPixmap = QPixmap("./Images/green-led-off-md.png");//.scaled(10,10); + mLedOnPixmap = QPixmap("./Images/green-led-on-md.png");//.scaled(10,10); } else { - mLedOffPixmap = QPixmap("./Images/red-led-off-md.png").scaled(10,10); - mLedOnPixmap = QPixmap("./Images/red-led-on-md.png").scaled(10,10); + mLedOffPixmap = QPixmap("./Images/red-led-off-md.png");//.scaled(10,10); + mLedOnPixmap = QPixmap("./Images/red-led-on-md.png");//.scaled(10,10); } mLabel = new QLabel(Label,this); @@ -79,15 +79,19 @@ void CONOFFStatusWidget::paintEvent(QPaintEvent *PaintEvent) void CONOFFStatusWidget::resizeEvent(QResizeEvent *event) { int width = geometry().width(); - int height; - if(mLabel->text().isEmpty()) - { - height = geometry().height(); - } - else + int height = geometry().height(); + bool square = height == width; + + if(mLabel->text().isEmpty() == false) { height = geometry().height() - mLabel->fontMetrics().height(); } + + if(square) + { + width = height; + } + mLedOffPixmap = QPixmap("./Images/green-led-off-md.png").scaled(width,height); mLedOnPixmap = QPixmap("./Images/green-led-on-md.png").scaled(width,height); diff --git a/object_script.CableTestBench.Debug b/object_script.CableTestBench.Debug index f7c7d7e..47e67de 100644 --- a/object_script.CableTestBench.Debug +++ b/object_script.CableTestBench.Debug @@ -9,6 +9,10 @@ INPUT( ./debug\ConnectorClickZoneWidget.o ./debug\ONOFFStatusWidget.o ./debug\ConnectorTestVisualizationWidget.o +./debug\Connector.o +./debug\Cable.o +./debug\VisualInspectionResult.o +./debug\TestReport.o ./debug\moc_MainWindow.o ./debug\moc_MainPage.o ./debug\moc_CableTestBench.o diff --git a/object_script.CableTestBench.Release b/object_script.CableTestBench.Release index a414918..81ac902 100644 --- a/object_script.CableTestBench.Release +++ b/object_script.CableTestBench.Release @@ -9,6 +9,10 @@ INPUT( ./release\ConnectorClickZoneWidget.o ./release\ONOFFStatusWidget.o ./release\ConnectorTestVisualizationWidget.o +./release\Connector.o +./release\Cable.o +./release\VisualInspectionResult.o +./release\TestReport.o ./release\moc_MainWindow.o ./release\moc_MainPage.o ./release\moc_CableTestBench.o diff --git a/ui_CMainPage.h b/ui_CMainPage.h index a8fdd88..d6b7342 100644 --- a/ui_CMainPage.h +++ b/ui_CMainPage.h @@ -1,7 +1,7 @@ /******************************************************************************** ** Form generated from reading UI file 'CMainPage.ui' ** -** Created: Wed May 1 16:11:28 2019 +** Created: Thu May 2 15:47:48 2019 ** by: Qt User Interface Compiler version 4.8.1 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! @@ -49,6 +49,9 @@ public: retranslateUi(CMainPage); + mMainTabWidget->setCurrentIndex(0); + + QMetaObject::connectSlotsByName(CMainPage); } // setupUi diff --git a/ui_CableTestPage.h b/ui_CableTestPage.h index 03a9e32..c56ae0c 100644 --- a/ui_CableTestPage.h +++ b/ui_CableTestPage.h @@ -1,7 +1,7 @@ /******************************************************************************** ** Form generated from reading UI file 'CableTestPage.ui' ** -** Created: Wed May 1 16:26:00 2019 +** Created: Thu May 2 16:01:47 2019 ** by: Qt User Interface Compiler version 4.8.1 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! @@ -14,6 +14,7 @@ #include #include #include +#include #include #include #include @@ -21,6 +22,7 @@ #include #include #include +#include #include #include "connectorselectwidget.h" #include "connectortestvisualizationwidget.h" @@ -47,17 +49,30 @@ public: QFrame *mInspVisuelleFrame; QPushButton *mExecInspVisuelleBtn; QLabel *mInspectionDoneIcon; - CConnectorTestVisualizationWidget *mConnectorTestVisualisationWidget; + CConnectorTestVisualizationWidget *mInputTestVisualisationWidget; QFrame *line; + CConnectorTestVisualizationWidget *mOutputTestVisualisationWidget; + QFrame *line_2; + QLabel *mInputContactsTextLabel; + QLabel *mOutputContactsTextLabel; + QPushButton *mNewCableBtn; + QFrame *frame; + QPushButton *mStartTestBtn; + QPushButton *mReinitTestBtn; + QCheckBox *mCableIdentStepChkBx; + QCheckBox *mVisualInspStepChkBx; + QCheckBox *mConSelStepChkBx; + QLabel *mInspVisuelleLabel_2; + QTextBrowser *mTestLogTextBox; void setupUi(QWidget *CCableTestPage) { if (CCableTestPage->objectName().isEmpty()) CCableTestPage->setObjectName(QString::fromUtf8("CCableTestPage")); - CCableTestPage->resize(1800, 880); + CCableTestPage->resize(1366, 768); mConnectorSelectWidget = new CConnectorSelectWidget(CCableTestPage); mConnectorSelectWidget->setObjectName(QString::fromUtf8("mConnectorSelectWidget")); - mConnectorSelectWidget->setGeometry(QRect(850, 20, 376, 537)); + mConnectorSelectWidget->setGeometry(QRect(970, 10, 376, 537)); mCableConfigFrame = new QFrame(CCableTestPage); mCableConfigFrame->setObjectName(QString::fromUtf8("mCableConfigFrame")); mCableConfigFrame->setGeometry(QRect(50, 50, 471, 121)); @@ -118,15 +133,15 @@ public: mCableConfigLabel = new QLabel(CCableTestPage); mCableConfigLabel->setObjectName(QString::fromUtf8("mCableConfigLabel")); - mCableConfigLabel->setGeometry(QRect(50, 30, 271, 20)); + mCableConfigLabel->setGeometry(QRect(60, 20, 271, 20)); mCableConfigLabel->setFont(font); mInspVisuelleLabel = new QLabel(CCableTestPage); mInspVisuelleLabel->setObjectName(QString::fromUtf8("mInspVisuelleLabel")); - mInspVisuelleLabel->setGeometry(QRect(60, 200, 271, 20)); + mInspVisuelleLabel->setGeometry(QRect(600, 20, 271, 20)); mInspVisuelleLabel->setFont(font); mInspVisuelleFrame = new QFrame(CCableTestPage); mInspVisuelleFrame->setObjectName(QString::fromUtf8("mInspVisuelleFrame")); - mInspVisuelleFrame->setGeometry(QRect(50, 220, 291, 121)); + mInspVisuelleFrame->setGeometry(QRect(600, 40, 291, 121)); mInspVisuelleFrame->setFrameShape(QFrame::StyledPanel); mInspVisuelleFrame->setFrameShadow(QFrame::Plain); mInspVisuelleFrame->setLineWidth(3); @@ -136,14 +151,69 @@ public: mInspectionDoneIcon = new QLabel(mInspVisuelleFrame); mInspectionDoneIcon->setObjectName(QString::fromUtf8("mInspectionDoneIcon")); mInspectionDoneIcon->setGeometry(QRect(160, 20, 101, 91)); - mConnectorTestVisualisationWidget = new CConnectorTestVisualizationWidget(CCableTestPage); - mConnectorTestVisualisationWidget->setObjectName(QString::fromUtf8("mConnectorTestVisualisationWidget")); - mConnectorTestVisualisationWidget->setGeometry(QRect(60, 410, 741, 231)); + mInputTestVisualisationWidget = new CConnectorTestVisualizationWidget(CCableTestPage); + mInputTestVisualisationWidget->setObjectName(QString::fromUtf8("mInputTestVisualisationWidget")); + mInputTestVisualisationWidget->setGeometry(QRect(10, 410, 471, 351)); + mInputTestVisualisationWidget->setAutoFillBackground(false); line = new QFrame(CCableTestPage); line->setObjectName(QString::fromUtf8("line")); - line->setGeometry(QRect(57, 380, 751, 20)); + line->setGeometry(QRect(30, 360, 901, 20)); line->setFrameShape(QFrame::HLine); line->setFrameShadow(QFrame::Sunken); + mOutputTestVisualisationWidget = new CConnectorTestVisualizationWidget(CCableTestPage); + mOutputTestVisualisationWidget->setObjectName(QString::fromUtf8("mOutputTestVisualisationWidget")); + mOutputTestVisualisationWidget->setGeometry(QRect(510, 410, 441, 351)); + mOutputTestVisualisationWidget->setAutoFillBackground(false); + line_2 = new QFrame(CCableTestPage); + line_2->setObjectName(QString::fromUtf8("line_2")); + line_2->setGeometry(QRect(490, 390, 20, 371)); + line_2->setFrameShape(QFrame::VLine); + line_2->setFrameShadow(QFrame::Sunken); + mInputContactsTextLabel = new QLabel(CCableTestPage); + mInputContactsTextLabel->setObjectName(QString::fromUtf8("mInputContactsTextLabel")); + mInputContactsTextLabel->setGeometry(QRect(130, 370, 161, 41)); + QFont font1; + font1.setPointSize(16); + mInputContactsTextLabel->setFont(font1); + mOutputContactsTextLabel = new QLabel(CCableTestPage); + mOutputContactsTextLabel->setObjectName(QString::fromUtf8("mOutputContactsTextLabel")); + mOutputContactsTextLabel->setGeometry(QRect(670, 370, 161, 41)); + mOutputContactsTextLabel->setFont(font1); + mNewCableBtn = new QPushButton(CCableTestPage); + mNewCableBtn->setObjectName(QString::fromUtf8("mNewCableBtn")); + mNewCableBtn->setGeometry(QRect(430, 20, 91, 23)); + frame = new QFrame(CCableTestPage); + frame->setObjectName(QString::fromUtf8("frame")); + frame->setGeometry(QRect(50, 220, 471, 131)); + frame->setFrameShape(QFrame::Box); + frame->setFrameShadow(QFrame::Raised); + mStartTestBtn = new QPushButton(frame); + mStartTestBtn->setObjectName(QString::fromUtf8("mStartTestBtn")); + mStartTestBtn->setGeometry(QRect(260, 20, 91, 23)); + mReinitTestBtn = new QPushButton(frame); + mReinitTestBtn->setObjectName(QString::fromUtf8("mReinitTestBtn")); + mReinitTestBtn->setGeometry(QRect(260, 70, 91, 23)); + mCableIdentStepChkBx = new QCheckBox(frame); + mCableIdentStepChkBx->setObjectName(QString::fromUtf8("mCableIdentStepChkBx")); + mCableIdentStepChkBx->setGeometry(QRect(20, 20, 151, 17)); + mCableIdentStepChkBx->setCheckable(false); + mVisualInspStepChkBx = new QCheckBox(frame); + mVisualInspStepChkBx->setObjectName(QString::fromUtf8("mVisualInspStepChkBx")); + mVisualInspStepChkBx->setGeometry(QRect(20, 50, 151, 17)); + mVisualInspStepChkBx->setCheckable(true); + mConSelStepChkBx = new QCheckBox(frame); + mConSelStepChkBx->setObjectName(QString::fromUtf8("mConSelStepChkBx")); + mConSelStepChkBx->setGeometry(QRect(20, 80, 191, 17)); + mConSelStepChkBx->setCheckable(false); + mInspVisuelleLabel_2 = new QLabel(CCableTestPage); + mInspVisuelleLabel_2->setObjectName(QString::fromUtf8("mInspVisuelleLabel_2")); + mInspVisuelleLabel_2->setGeometry(QRect(50, 200, 221, 20)); + mInspVisuelleLabel_2->setFont(font); + mTestLogTextBox = new QTextBrowser(CCableTestPage); + mTestLogTextBox->setObjectName(QString::fromUtf8("mTestLogTextBox")); + mTestLogTextBox->setGeometry(QRect(970, 550, 381, 201)); + mTestLogTextBox->setFrameShape(QFrame::Box); + mTestLogTextBox->setFrameShadow(QFrame::Plain); retranslateUi(CCableTestPage); @@ -177,6 +247,18 @@ public: mInspVisuelleLabel->setText(QApplication::translate("CCableTestPage", "Inspection visuelle", 0, QApplication::UnicodeUTF8)); mExecInspVisuelleBtn->setText(QApplication::translate("CCableTestPage", "Effectuer Inspection", 0, QApplication::UnicodeUTF8)); mInspectionDoneIcon->setText(QApplication::translate("CCableTestPage", "TextLabel", 0, QApplication::UnicodeUTF8)); + mInputContactsTextLabel->setText(QApplication::translate("CCableTestPage", "Contacts entr\303\251e", 0, QApplication::UnicodeUTF8)); + mOutputContactsTextLabel->setText(QApplication::translate("CCableTestPage", "Contacts sortie", 0, QApplication::UnicodeUTF8)); + mNewCableBtn->setText(QApplication::translate("CCableTestPage", "Nouveau C\303\242ble", 0, QApplication::UnicodeUTF8)); + mStartTestBtn->setText(QApplication::translate("CCableTestPage", "D\303\251marrer test", 0, QApplication::UnicodeUTF8)); + mReinitTestBtn->setText(QApplication::translate("CCableTestPage", "R\303\251initialiser test", 0, QApplication::UnicodeUTF8)); + mCableIdentStepChkBx->setText(QApplication::translate("CCableTestPage", "1. Identification du c\303\242ble", 0, QApplication::UnicodeUTF8)); +#ifndef QT_NO_TOOLTIP + mVisualInspStepChkBx->setToolTip(QString()); +#endif // QT_NO_TOOLTIP + mVisualInspStepChkBx->setText(QApplication::translate("CCableTestPage", "2. Inspection visuelle", 0, QApplication::UnicodeUTF8)); + mConSelStepChkBx->setText(QApplication::translate("CCableTestPage", "3. S\303\251lection du connecteur d'entr\303\251e", 0, QApplication::UnicodeUTF8)); + mInspVisuelleLabel_2->setText(QApplication::translate("CCableTestPage", "Contr\303\264le du test", 0, QApplication::UnicodeUTF8)); } // retranslateUi }; diff --git a/ui_VisualInspectionPage.h b/ui_VisualInspectionPage.h index fc23469..716eb8e 100644 --- a/ui_VisualInspectionPage.h +++ b/ui_VisualInspectionPage.h @@ -1,7 +1,7 @@ /******************************************************************************** ** Form generated from reading UI file 'VisualInspectionPage.ui' ** -** Created: Wed May 1 16:11:28 2019 +** Created: Thu May 2 15:11:16 2019 ** by: Qt User Interface Compiler version 4.8.1 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! @@ -16,6 +16,9 @@ #include #include #include +#include +#include +#include #include QT_BEGIN_NAMESPACE @@ -23,27 +26,126 @@ QT_BEGIN_NAMESPACE class Ui_CVisualInspectionPage { public: - QCheckBox *checkBox; - QCheckBox *checkBox_2; - QCheckBox *checkBox_3; + QLabel *label; + QLabel *label_2; + QLabel *label_3; + QLabel *label_4; + QLabel *label_5; + QLabel *label_6; + QLabel *label_7; + QLabel *label_8; + QLabel *label_9; + QCheckBox *mVerif52DoneChkBx; + QCheckBox *mVerif52NotDoneChkBx; + QCheckBox *mVerif53NotDoneChkBx; + QCheckBox *mVerif53DoneChkBx; + QCheckBox *mVerif54DoneChkBx; + QCheckBox *mVerif54NotDoneChkBx; + QCheckBox *mVerif55NotDoneChkBx; + QCheckBox *mVerif55DoneChkBx; + QCheckBox *mVerif56NotDoneChkBx; + QCheckBox *mVerif56DoneChkBx; + QPushButton *mOKBtn; + QTextEdit *mNotesTextEditBx; + QLabel *label_10; + QPushButton *mResetInspectionFormBtn; void setupUi(QWidget *CVisualInspectionPage) { if (CVisualInspectionPage->objectName().isEmpty()) CVisualInspectionPage->setObjectName(QString::fromUtf8("CVisualInspectionPage")); CVisualInspectionPage->resize(1103, 710); - checkBox = new QCheckBox(CVisualInspectionPage); - checkBox->setObjectName(QString::fromUtf8("checkBox")); - checkBox->setGeometry(QRect(100, 50, 211, 17)); + label = new QLabel(CVisualInspectionPage); + label->setObjectName(QString::fromUtf8("label")); + label->setGeometry(QRect(250, 10, 601, 81)); QFont font; - font.setPointSize(12); - checkBox->setFont(font); - checkBox_2 = new QCheckBox(CVisualInspectionPage); - checkBox_2->setObjectName(QString::fromUtf8("checkBox_2")); - checkBox_2->setGeometry(QRect(100, 90, 70, 17)); - checkBox_3 = new QCheckBox(CVisualInspectionPage); - checkBox_3->setObjectName(QString::fromUtf8("checkBox_3")); - checkBox_3->setGeometry(QRect(100, 140, 70, 17)); + font.setPointSize(14); + label->setFont(font); + label_2 = new QLabel(CVisualInspectionPage); + label_2->setObjectName(QString::fromUtf8("label_2")); + label_2->setGeometry(QRect(380, 230, 261, 16)); + QFont font1; + font1.setPointSize(12); + label_2->setFont(font1); + label_3 = new QLabel(CVisualInspectionPage); + label_3->setObjectName(QString::fromUtf8("label_3")); + label_3->setGeometry(QRect(380, 280, 311, 16)); + label_3->setFont(font1); + label_4 = new QLabel(CVisualInspectionPage); + label_4->setObjectName(QString::fromUtf8("label_4")); + label_4->setGeometry(QRect(380, 330, 311, 16)); + label_4->setFont(font1); + label_5 = new QLabel(CVisualInspectionPage); + label_5->setObjectName(QString::fromUtf8("label_5")); + label_5->setGeometry(QRect(380, 380, 471, 16)); + label_5->setFont(font1); + label_6 = new QLabel(CVisualInspectionPage); + label_6->setObjectName(QString::fromUtf8("label_6")); + label_6->setGeometry(QRect(380, 430, 471, 16)); + label_6->setFont(font1); + label_7 = new QLabel(CVisualInspectionPage); + label_7->setObjectName(QString::fromUtf8("label_7")); + label_7->setGeometry(QRect(120, 140, 811, 20)); + label_7->setFont(font1); + label_8 = new QLabel(CVisualInspectionPage); + label_8->setObjectName(QString::fromUtf8("label_8")); + label_8->setGeometry(QRect(330, 200, 46, 13)); + label_9 = new QLabel(CVisualInspectionPage); + label_9->setObjectName(QString::fromUtf8("label_9")); + label_9->setGeometry(QRect(230, 200, 71, 16)); + mVerif52DoneChkBx = new QCheckBox(CVisualInspectionPage); + mVerif52DoneChkBx->setObjectName(QString::fromUtf8("mVerif52DoneChkBx")); + mVerif52DoneChkBx->setGeometry(QRect(340, 230, 21, 17)); + mVerif52DoneChkBx->setTristate(false); + mVerif52NotDoneChkBx = new QCheckBox(CVisualInspectionPage); + mVerif52NotDoneChkBx->setObjectName(QString::fromUtf8("mVerif52NotDoneChkBx")); + mVerif52NotDoneChkBx->setGeometry(QRect(260, 230, 21, 17)); + mVerif52NotDoneChkBx->setTristate(false); + mVerif53NotDoneChkBx = new QCheckBox(CVisualInspectionPage); + mVerif53NotDoneChkBx->setObjectName(QString::fromUtf8("mVerif53NotDoneChkBx")); + mVerif53NotDoneChkBx->setGeometry(QRect(260, 280, 21, 17)); + mVerif53NotDoneChkBx->setTristate(false); + mVerif53DoneChkBx = new QCheckBox(CVisualInspectionPage); + mVerif53DoneChkBx->setObjectName(QString::fromUtf8("mVerif53DoneChkBx")); + mVerif53DoneChkBx->setGeometry(QRect(340, 280, 21, 17)); + mVerif53DoneChkBx->setTristate(false); + mVerif54DoneChkBx = new QCheckBox(CVisualInspectionPage); + mVerif54DoneChkBx->setObjectName(QString::fromUtf8("mVerif54DoneChkBx")); + mVerif54DoneChkBx->setGeometry(QRect(340, 330, 21, 17)); + mVerif54DoneChkBx->setTristate(false); + mVerif54NotDoneChkBx = new QCheckBox(CVisualInspectionPage); + mVerif54NotDoneChkBx->setObjectName(QString::fromUtf8("mVerif54NotDoneChkBx")); + mVerif54NotDoneChkBx->setGeometry(QRect(260, 330, 21, 17)); + mVerif54NotDoneChkBx->setTristate(false); + mVerif55NotDoneChkBx = new QCheckBox(CVisualInspectionPage); + mVerif55NotDoneChkBx->setObjectName(QString::fromUtf8("mVerif55NotDoneChkBx")); + mVerif55NotDoneChkBx->setGeometry(QRect(260, 380, 21, 17)); + mVerif55NotDoneChkBx->setTristate(false); + mVerif55DoneChkBx = new QCheckBox(CVisualInspectionPage); + mVerif55DoneChkBx->setObjectName(QString::fromUtf8("mVerif55DoneChkBx")); + mVerif55DoneChkBx->setGeometry(QRect(340, 380, 21, 17)); + mVerif55DoneChkBx->setTristate(false); + mVerif56NotDoneChkBx = new QCheckBox(CVisualInspectionPage); + mVerif56NotDoneChkBx->setObjectName(QString::fromUtf8("mVerif56NotDoneChkBx")); + mVerif56NotDoneChkBx->setGeometry(QRect(260, 430, 21, 17)); + mVerif56NotDoneChkBx->setTristate(false); + mVerif56DoneChkBx = new QCheckBox(CVisualInspectionPage); + mVerif56DoneChkBx->setObjectName(QString::fromUtf8("mVerif56DoneChkBx")); + mVerif56DoneChkBx->setGeometry(QRect(340, 430, 21, 17)); + mVerif56DoneChkBx->setTristate(false); + mOKBtn = new QPushButton(CVisualInspectionPage); + mOKBtn->setObjectName(QString::fromUtf8("mOKBtn")); + mOKBtn->setGeometry(QRect(110, 580, 75, 23)); + mNotesTextEditBx = new QTextEdit(CVisualInspectionPage); + mNotesTextEditBx->setObjectName(QString::fromUtf8("mNotesTextEditBx")); + mNotesTextEditBx->setGeometry(QRect(260, 530, 611, 141)); + label_10 = new QLabel(CVisualInspectionPage); + label_10->setObjectName(QString::fromUtf8("label_10")); + label_10->setGeometry(QRect(260, 500, 811, 20)); + label_10->setFont(font1); + mResetInspectionFormBtn = new QPushButton(CVisualInspectionPage); + mResetInspectionFormBtn->setObjectName(QString::fromUtf8("mResetInspectionFormBtn")); + mResetInspectionFormBtn->setGeometry(QRect(790, 260, 75, 23)); retranslateUi(CVisualInspectionPage); @@ -53,9 +155,30 @@ public: void retranslateUi(QWidget *CVisualInspectionPage) { CVisualInspectionPage->setWindowTitle(QApplication::translate("CVisualInspectionPage", "Form", 0, QApplication::UnicodeUTF8)); - checkBox->setText(QApplication::translate("CVisualInspectionPage", "V\303\251rifiez ceci", 0, QApplication::UnicodeUTF8)); - checkBox_2->setText(QApplication::translate("CVisualInspectionPage", "CheckBox", 0, QApplication::UnicodeUTF8)); - checkBox_3->setText(QApplication::translate("CVisualInspectionPage", "CheckBox", 0, QApplication::UnicodeUTF8)); + label->setText(QApplication::translate("CVisualInspectionPage", "Confirmer que les v\303\251rifications d\303\251crites dans la proc\303\251dure\n" +"de fabrication des c\303\242bles PRO-EF-CT-CT-PDS-9999-53525 \n" +"ont \303\251t\303\251 compl\303\251t\303\251s (chaque c\303\242ble doit \303\252tre v\303\251rifi\303\251)", 0, QApplication::UnicodeUTF8)); + label_2->setText(QApplication::translate("CVisualInspectionPage", "5.2 V\303\251rifications avant le sertissage", 0, QApplication::UnicodeUTF8)); + label_3->setText(QApplication::translate("CVisualInspectionPage", "5.3 V\303\251rifications apr\303\250s chaque sertissage", 0, QApplication::UnicodeUTF8)); + label_4->setText(QApplication::translate("CVisualInspectionPage", "5.4 Apr\303\250s l'insertion de chaque contact", 0, QApplication::UnicodeUTF8)); + label_5->setText(QApplication::translate("CVisualInspectionPage", "5.5 V\303\251rifications avant de refermer le couvercle du connecteur", 0, QApplication::UnicodeUTF8)); + label_6->setText(QApplication::translate("CVisualInspectionPage", "5.6 V\303\251rifications apr\303\250s la fermeture du couvercle", 0, QApplication::UnicodeUTF8)); + label_7->setText(QApplication::translate("CVisualInspectionPage", "Pour chaque section de la proc\303\251dure, indiquez si les v\303\251rifications ont \303\251t\303\251 effectu\303\251es lors de la fabrication", 0, QApplication::UnicodeUTF8)); + label_8->setText(QApplication::translate("CVisualInspectionPage", "Effectu\303\251e", 0, QApplication::UnicodeUTF8)); + label_9->setText(QApplication::translate("CVisualInspectionPage", "Non effectu\303\251e", 0, QApplication::UnicodeUTF8)); + mVerif52DoneChkBx->setText(QString()); + mVerif52NotDoneChkBx->setText(QString()); + mVerif53NotDoneChkBx->setText(QString()); + mVerif53DoneChkBx->setText(QString()); + mVerif54DoneChkBx->setText(QString()); + mVerif54NotDoneChkBx->setText(QString()); + mVerif55NotDoneChkBx->setText(QString()); + mVerif55DoneChkBx->setText(QString()); + mVerif56NotDoneChkBx->setText(QString()); + mVerif56DoneChkBx->setText(QString()); + mOKBtn->setText(QApplication::translate("CVisualInspectionPage", "OK", 0, QApplication::UnicodeUTF8)); + label_10->setText(QApplication::translate("CVisualInspectionPage", "Notes", 0, QApplication::UnicodeUTF8)); + mResetInspectionFormBtn->setText(QApplication::translate("CVisualInspectionPage", "R\303\251initialiser", 0, QApplication::UnicodeUTF8)); } // retranslateUi };