diff --git a/Sources/Cable.cpp b/Sources/Cable.cpp index 4d1b30a..106159d 100644 --- a/Sources/Cable.cpp +++ b/Sources/Cable.cpp @@ -29,6 +29,7 @@ int CCable::DefineCableByInputConnector(CConnectorDefs::eConnectorType InputConn mOutputConnector.SetConnectorType(CConnectorDefs::OUTPUT_14_PINS_CONNECTOR_TYPE); break; } + case CConnectorDefs::INPUT_10_PINS_CONNECTOR_TYPE: case CConnectorDefs::INPUT_24_PINS_CONNECTOR_TYPE: { mInputConnector.SetConnectorType(InputConnectorType); diff --git a/Sources/CableTestBenchDefs.cpp b/Sources/CableTestBenchDefs.cpp index 43f5220..f4ef6a1 100644 --- a/Sources/CableTestBenchDefs.cpp +++ b/Sources/CableTestBenchDefs.cpp @@ -3,23 +3,25 @@ const int CConnectorDefs::ConnIOMapping[CConnectorDefs::NB_CONNECTOR_TYPE][2] = { //Connectors pins mapping (zero based index) {0,0}, //Unknown {96,101}, //in 6 pins - {90,103}, //in 14 pins - {72,95}, //in 24 pins - {0,71}, //in 72 pins - {0,89}, //in 90 pins - {0,107}, //in 108 pins - {0,107}, //in 120 pins - {96,101}, //out 6 pins - {90,103}, //out 14 pins - {72,95}, //out 24 pins - {0,71}, //out 72 pins - {0,107}, //out 108 pins + {72,81}, //in 10 pins + {90,103}, //in 14 pins + {72,95}, //in 24 pins + {0,71}, //in 72 pins + {0,89}, //in 90 pins + {0,107}, //in 108 pins + {0,107}, //in 120 pins + {96,101}, //out 6 pins + {90,103}, //out 14 pins + {72,95}, //out 24 pins + {0,71}, //out 72 pins + {0,107}, //out 108 pins }; -const int CConnectorDefs::ConnPinCount[NB_CONNECTOR_TYPE] = {0, 6, 14, 24, 72, 90, 108, 120, 6, 14, 24, 72, 108}; +const int CConnectorDefs::ConnPinCount[CConnectorDefs::NB_CONNECTOR_TYPE] = {0, 6, 10, 14, 24, 72, 90, 108, 120, 6, 14, 24, 72, 108}; -const char* CConnectorDefs::ConnectorDescription[NB_CONNECTOR_TYPE] = {"Connecteur inconnu ou invalide", +const char* CConnectorDefs::ConnectorDescription[CConnectorDefs::NB_CONNECTOR_TYPE] = {"Connecteur inconnu ou invalide", "Connecteur circulaire 6 contacts", + "Connecteur Entrelec 10 contacts", "Connecteur circulaire 14 contacts", "Connecteur Amphenol rectangulaire 24 contacts", "Connecteur Amphenol rectangulaire 72 contacts", diff --git a/Sources/CableTestBenchDefs.h b/Sources/CableTestBenchDefs.h index da9b4e4..d699404 100644 --- a/Sources/CableTestBenchDefs.h +++ b/Sources/CableTestBenchDefs.h @@ -14,6 +14,7 @@ public: { UNKNOWN_CONNECTOR_TYPE, INPUT_6_PINS_CONNECTOR_TYPE, + INPUT_10_PINS_CONNECTOR_TYPE, INPUT_14_PINS_CONNECTOR_TYPE, INPUT_24_PINS_CONNECTOR_TYPE, INPUT_72_PINS_CONNECTOR_TYPE, diff --git a/Sources/CableTestPage.cpp b/Sources/CableTestPage.cpp index 14fb22d..95f487f 100644 --- a/Sources/CableTestPage.cpp +++ b/Sources/CableTestPage.cpp @@ -23,13 +23,16 @@ CCableTestPage::CCableTestPage(QWidget *parent) : ui->mStationNameCombo->insertItem(5,"Lionel-Groulx",QVariant("1S32")); ui->mStationNameCombo->insertItem(6,"Viau",QVariant("1S60")); - ui->mStationNameCombo->insertItem(6,"Terminus Beaugrand",QVariant("1S70")); - ui->mStationNameCombo->insertItem(6,"Bonaventure",QVariant("2S53")); - ui->mStationNameCombo->insertItem(6,"Lionel-Groulx L2",QVariant("2S46")); - ui->mStationNameCombo->insertItem(6,"Garage Bourassa",QVariant("2G81")); - ui->mStationNameCombo->insertItem(6,"Garage Beaugrand",QVariant("1G71")); - ui->mStationNameCombo->insertItem(6,"Longueuil",QVariant("4S54")); - ui->mStationNameCombo->insertItem(6,"Berri L4 et L2-L4",QVariant("4S50")); + ui->mStationNameCombo->insertItem(7,"Terminus Beaugrand",QVariant("1S70")); + ui->mStationNameCombo->insertItem(8,"Bonaventure",QVariant("2S53")); + ui->mStationNameCombo->insertItem(9,"Lionel-Groulx L2",QVariant("2S46")); + ui->mStationNameCombo->insertItem(10,"Garage Bourassa",QVariant("2G81")); + ui->mStationNameCombo->insertItem(11,"Garage Beaugrand",QVariant("1G71")); + ui->mStationNameCombo->insertItem(12,"Longueuil",QVariant("4S54")); + ui->mStationNameCombo->insertItem(13,"Berri L4 et L2-L4",QVariant("4S50")); + + ui->mStationNameCombo->insertItem(14,"Projet L1-L2 - Berri L1",QVariant("1S46")); + ui->mStationNameCombo->insertItem(15,"Projet L1-L2 - Berri L2",QVariant("2S60")); mInspectionNotDonePixmap = QPixmap("./images/todo.png").scaled(ui->mInspectionDoneIcon->geometry().width(),ui->mInspectionDoneIcon->geometry().height()); diff --git a/Sources/Widgets/ConnectorSelectWidget.cpp b/Sources/Widgets/ConnectorSelectWidget.cpp index 9a37d22..6386ac8 100644 --- a/Sources/Widgets/ConnectorSelectWidget.cpp +++ b/Sources/Widgets/ConnectorSelectWidget.cpp @@ -14,7 +14,7 @@ CConnectorSelectWidget::CConnectorSelectWidget(QWidget *parent) : //6 pins InputClickZoneHandle = new CConnectorClickZoneWidget(CConnectorDefs::INPUT_6_PINS_CONNECTOR_TYPE,this); - InputClickZoneHandle->setGeometry(316,152,53,54); + InputClickZoneHandle->setGeometry(316,153,53,54); InputClickZoneHandle->show(); InputClickZoneHandle->raise(); connect(InputClickZoneHandle,SIGNAL(ConnectorZoneClicked(CConnectorClickZoneWidget*)),this,SLOT(InputConnectorZoneClicked(CConnectorClickZoneWidget*))); @@ -22,7 +22,15 @@ CConnectorSelectWidget::CConnectorSelectWidget(QWidget *parent) : //14 pins InputClickZoneHandle = new CConnectorClickZoneWidget(CConnectorDefs::INPUT_14_PINS_CONNECTOR_TYPE,this); - InputClickZoneHandle->setGeometry(316,21,53,54); + InputClickZoneHandle->setGeometry(316,31,53,54); + InputClickZoneHandle->show(); + InputClickZoneHandle->raise(); + connect(InputClickZoneHandle,SIGNAL(ConnectorZoneClicked(CConnectorClickZoneWidget*)),this,SLOT(InputConnectorZoneClicked(CConnectorClickZoneWidget*))); + mInputClickZoneList.append(InputClickZoneHandle); + + //10 pins + InputClickZoneHandle = new CConnectorClickZoneWidget(CConnectorDefs::INPUT_10_PINS_CONNECTOR_TYPE,this); + InputClickZoneHandle->setGeometry(202,32,28,86); InputClickZoneHandle->show(); InputClickZoneHandle->raise(); connect(InputClickZoneHandle,SIGNAL(ConnectorZoneClicked(CConnectorClickZoneWidget*)),this,SLOT(InputConnectorZoneClicked(CConnectorClickZoneWidget*))); @@ -30,7 +38,7 @@ CConnectorSelectWidget::CConnectorSelectWidget(QWidget *parent) : //24 pins InputClickZoneHandle = new CConnectorClickZoneWidget(CConnectorDefs::INPUT_24_PINS_CONNECTOR_TYPE,this); - InputClickZoneHandle->setGeometry(236,23,48,86); + InputClickZoneHandle->setGeometry(245,33,48,86); InputClickZoneHandle->show(); InputClickZoneHandle->raise(); connect(InputClickZoneHandle,SIGNAL(ConnectorZoneClicked(CConnectorClickZoneWidget*)),this,SLOT(InputConnectorZoneClicked(CConnectorClickZoneWidget*))); @@ -38,7 +46,7 @@ CConnectorSelectWidget::CConnectorSelectWidget(QWidget *parent) : //72 pins InputClickZoneHandle = new CConnectorClickZoneWidget(CConnectorDefs::INPUT_72_PINS_CONNECTOR_TYPE,this); - InputClickZoneHandle->setGeometry(234,150,47,120); + InputClickZoneHandle->setGeometry(245,150,47,120); InputClickZoneHandle->show(); InputClickZoneHandle->raise(); connect(InputClickZoneHandle,SIGNAL(ConnectorZoneClicked(CConnectorClickZoneWidget*)),this,SLOT(InputConnectorZoneClicked(CConnectorClickZoneWidget*))); @@ -46,7 +54,7 @@ CConnectorSelectWidget::CConnectorSelectWidget(QWidget *parent) : //90 pins InputClickZoneHandle = new CConnectorClickZoneWidget(CConnectorDefs::INPUT_90_PINS_CONNECTOR_TYPE,this); - InputClickZoneHandle->setGeometry(320,306,33,73); + InputClickZoneHandle->setGeometry(324,286,33,73); InputClickZoneHandle->show(); InputClickZoneHandle->raise(); connect(InputClickZoneHandle,SIGNAL(ConnectorZoneClicked(CConnectorClickZoneWidget*)),this,SLOT(InputConnectorZoneClicked(CConnectorClickZoneWidget*))); @@ -54,7 +62,7 @@ CConnectorSelectWidget::CConnectorSelectWidget(QWidget *parent) : //108 pins InputClickZoneHandle = new CConnectorClickZoneWidget(CConnectorDefs::INPUT_108_PINS_CONNECTOR_TYPE,this); - InputClickZoneHandle->setGeometry(235,308,47,149); + InputClickZoneHandle->setGeometry(245,308,47,149); InputClickZoneHandle->show(); InputClickZoneHandle->raise(); connect(InputClickZoneHandle,SIGNAL(ConnectorZoneClicked(CConnectorClickZoneWidget*)),this,SLOT(InputConnectorZoneClicked(CConnectorClickZoneWidget*))); @@ -62,7 +70,7 @@ CConnectorSelectWidget::CConnectorSelectWidget(QWidget *parent) : //120 pins InputClickZoneHandle = new CConnectorClickZoneWidget(CConnectorDefs::INPUT_120_PINS_CONNECTOR_TYPE,this); - InputClickZoneHandle->setGeometry(316,403,42,74); + InputClickZoneHandle->setGeometry(319,380,42,74); InputClickZoneHandle->show(); InputClickZoneHandle->raise(); connect(InputClickZoneHandle,SIGNAL(ConnectorZoneClicked(CConnectorClickZoneWidget*)),this,SLOT(InputConnectorZoneClicked(CConnectorClickZoneWidget*))); @@ -73,35 +81,35 @@ CConnectorSelectWidget::CConnectorSelectWidget(QWidget *parent) : //6 pins OutputSelectZoneHandle = new CConnectorClickZoneWidget(CConnectorDefs::OUTPUT_6_PINS_CONNECTOR_TYPE,this); - OutputSelectZoneHandle->setGeometry(12,148,38,38); + OutputSelectZoneHandle->setGeometry(2,152,43,43); OutputSelectZoneHandle->show(); OutputSelectZoneHandle->raise(); mOutputSelectZoneList.append(OutputSelectZoneHandle); //14 pins OutputSelectZoneHandle = new CConnectorClickZoneWidget(CConnectorDefs::OUTPUT_14_PINS_CONNECTOR_TYPE,this); - OutputSelectZoneHandle->setGeometry(13,24,41,42); + OutputSelectZoneHandle->setGeometry(2,30,45,47); OutputSelectZoneHandle->show(); OutputSelectZoneHandle->raise(); mOutputSelectZoneList.append(OutputSelectZoneHandle); //24 pins OutputSelectZoneHandle = new CConnectorClickZoneWidget(CConnectorDefs::OUTPUT_24_PINS_CONNECTOR_TYPE,this); - OutputSelectZoneHandle->setGeometry(91,23,48,86); + OutputSelectZoneHandle->setGeometry(80,33,48,86); OutputSelectZoneHandle->show(); OutputSelectZoneHandle->raise(); mOutputSelectZoneList.append(OutputSelectZoneHandle); //72 pins OutputSelectZoneHandle = new CConnectorClickZoneWidget(CConnectorDefs::OUTPUT_72_PINS_CONNECTOR_TYPE,this); - OutputSelectZoneHandle->setGeometry(92,150,46,121); + OutputSelectZoneHandle->setGeometry(80,150,46,121); OutputSelectZoneHandle->show(); OutputSelectZoneHandle->raise(); mOutputSelectZoneList.append(OutputSelectZoneHandle); //108 pins OutputSelectZoneHandle = new CConnectorClickZoneWidget(CConnectorDefs::OUTPUT_108_PINS_CONNECTOR_TYPE,this); - OutputSelectZoneHandle->setGeometry(92,308,47,148); + OutputSelectZoneHandle->setGeometry(80,308,47,148); OutputSelectZoneHandle->show(); OutputSelectZoneHandle->raise(); mOutputSelectZoneList.append(OutputSelectZoneHandle); @@ -116,13 +124,13 @@ void CConnectorSelectWidget::paintEvent(QPaintEvent *event) QPen pen; -// pen.setStyle(Qt::SolidLine); -// pen.setWidth(10); -// pen.setBrush(Qt::red); -// painter.setPen(pen); + pen.setStyle(Qt::SolidLine); + pen.setWidth(10); + pen.setBrush(Qt::red); + painter.setPen(pen); - //painter.drawRect(this->geometry()); - // painter.drawRect(QRect(7,149,53,54)); +// painter.drawRect(this->geometry()); +// painter.drawRect(QRect(320,306,33,73)); } @@ -153,6 +161,7 @@ void CConnectorSelectWidget::InputConnectorZoneClicked(CConnectorClickZoneWidget OutputSelZone = FindOutputSelectionZone(CConnectorDefs::OUTPUT_14_PINS_CONNECTOR_TYPE); break; } + case CConnectorDefs::INPUT_10_PINS_CONNECTOR_TYPE: case CConnectorDefs::INPUT_24_PINS_CONNECTOR_TYPE: { OutputSelZone = FindOutputSelectionZone(CConnectorDefs::OUTPUT_24_PINS_CONNECTOR_TYPE); diff --git a/images/connecteurs - Copy.png b/images/connecteurs - Copy.png new file mode 100644 index 0000000..02f9254 Binary files /dev/null and b/images/connecteurs - Copy.png differ diff --git a/images/connecteurs.png b/images/connecteurs.png index 02f9254..b9dc707 100644 Binary files a/images/connecteurs.png and b/images/connecteurs.png differ diff --git a/ui_CMainPage.h b/ui_CMainPage.h index 502efa7..d63fef1 100644 --- a/ui_CMainPage.h +++ b/ui_CMainPage.h @@ -1,7 +1,7 @@ /******************************************************************************** ** Form generated from reading UI file 'CMainPage.ui' ** -** Created: Fri Dec 6 12:10:43 2019 +** Created: Tue Jul 16 13:17:58 2024 ** by: Qt User Interface Compiler version 4.8.1 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! diff --git a/ui_CableTestPage.h b/ui_CableTestPage.h index 49c217b..c979311 100644 --- a/ui_CableTestPage.h +++ b/ui_CableTestPage.h @@ -1,7 +1,7 @@ /******************************************************************************** ** Form generated from reading UI file 'CableTestPage.ui' ** -** Created: Fri Dec 6 12:10:44 2019 +** Created: Tue Jul 16 13:17:58 2024 ** by: Qt User Interface Compiler version 4.8.1 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! diff --git a/ui_OptionsPage.h b/ui_OptionsPage.h index cdd4725..c17c69d 100644 --- a/ui_OptionsPage.h +++ b/ui_OptionsPage.h @@ -1,7 +1,7 @@ /******************************************************************************** ** Form generated from reading UI file 'OptionsPage.ui' ** -** Created: Fri Dec 6 12:10:44 2019 +** Created: Tue Jul 16 13:17:58 2024 ** by: Qt User Interface Compiler version 4.8.1 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! diff --git a/ui_VisualInspectionPage.h b/ui_VisualInspectionPage.h index eb8430a..c4909e3 100644 --- a/ui_VisualInspectionPage.h +++ b/ui_VisualInspectionPage.h @@ -1,7 +1,7 @@ /******************************************************************************** ** Form generated from reading UI file 'VisualInspectionPage.ui' ** -** Created: Fri Dec 6 12:10:44 2019 +** Created: Tue Jul 16 13:17:58 2024 ** by: Qt User Interface Compiler version 4.8.1 ** ** WARNING! All changes made in this file will be lost when recompiling UI file!