Dev
This commit is contained in:
@@ -35,6 +35,9 @@
|
||||
<height>1031</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="currentIndex">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<widget class="QWidget" name="Test">
|
||||
<attribute name="title">
|
||||
<string>Tab 1</string>
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
@@ -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
|
||||
@@ -2,10 +2,10 @@
|
||||
#include <QDateTime>
|
||||
|
||||
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();
|
||||
}
|
||||
|
||||
@@ -3,6 +3,10 @@
|
||||
|
||||
#include <QObject>
|
||||
#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:
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
#include "CableTestEngine.h"
|
||||
|
||||
CCableTestEngine::CCableTestEngine()
|
||||
{
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
#ifndef CABLETESTENGINE_H
|
||||
#define CABLETESTENGINE_H
|
||||
|
||||
class CCableTestEngine
|
||||
{
|
||||
public:
|
||||
CCableTestEngine();
|
||||
};
|
||||
|
||||
#endif // CABLETESTENGINE_H
|
||||
@@ -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());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
#define CABLETESTPAGE_H
|
||||
|
||||
#include <QWidget>
|
||||
#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
|
||||
|
||||
+222
-17
@@ -6,8 +6,8 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>1800</width>
|
||||
<height>880</height>
|
||||
<width>1366</width>
|
||||
<height>768</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
@@ -16,8 +16,8 @@
|
||||
<widget class="CConnectorSelectWidget" name="mConnectorSelectWidget" native="true">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>850</x>
|
||||
<y>20</y>
|
||||
<x>970</x>
|
||||
<y>10</y>
|
||||
<width>376</width>
|
||||
<height>537</height>
|
||||
</rect>
|
||||
@@ -168,8 +168,8 @@
|
||||
<widget class="QLabel" name="mCableConfigLabel">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>50</x>
|
||||
<y>30</y>
|
||||
<x>60</x>
|
||||
<y>20</y>
|
||||
<width>271</width>
|
||||
<height>20</height>
|
||||
</rect>
|
||||
@@ -186,8 +186,8 @@
|
||||
<widget class="QLabel" name="mInspVisuelleLabel">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>60</x>
|
||||
<y>200</y>
|
||||
<x>600</x>
|
||||
<y>20</y>
|
||||
<width>271</width>
|
||||
<height>20</height>
|
||||
</rect>
|
||||
@@ -204,8 +204,8 @@
|
||||
<widget class="QFrame" name="mInspVisuelleFrame">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>50</x>
|
||||
<y>220</y>
|
||||
<x>600</x>
|
||||
<y>40</y>
|
||||
<width>291</width>
|
||||
<height>121</height>
|
||||
</rect>
|
||||
@@ -246,22 +246,25 @@
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
<widget class="CConnectorTestVisualizationWidget" name="mConnectorTestVisualisationWidget" native="true">
|
||||
<widget class="CConnectorTestVisualizationWidget" name="mInputTestVisualisationWidget" native="true">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>60</x>
|
||||
<x>10</x>
|
||||
<y>410</y>
|
||||
<width>741</width>
|
||||
<height>231</height>
|
||||
<width>471</width>
|
||||
<height>351</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="autoFillBackground">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="Line" name="line">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>57</x>
|
||||
<y>380</y>
|
||||
<width>751</width>
|
||||
<x>30</x>
|
||||
<y>360</y>
|
||||
<width>901</width>
|
||||
<height>20</height>
|
||||
</rect>
|
||||
</property>
|
||||
@@ -269,6 +272,208 @@
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="CConnectorTestVisualizationWidget" name="mOutputTestVisualisationWidget" native="true">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>510</x>
|
||||
<y>410</y>
|
||||
<width>441</width>
|
||||
<height>351</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="autoFillBackground">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="Line" name="line_2">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>490</x>
|
||||
<y>390</y>
|
||||
<width>20</width>
|
||||
<height>371</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="mInputContactsTextLabel">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>130</x>
|
||||
<y>370</y>
|
||||
<width>161</width>
|
||||
<height>41</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>16</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Contacts entrée</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="mOutputContactsTextLabel">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>670</x>
|
||||
<y>370</y>
|
||||
<width>161</width>
|
||||
<height>41</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>16</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Contacts sortie</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QPushButton" name="mNewCableBtn">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>430</x>
|
||||
<y>20</y>
|
||||
<width>91</width>
|
||||
<height>23</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Nouveau Câble</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QFrame" name="frame">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>50</x>
|
||||
<y>220</y>
|
||||
<width>471</width>
|
||||
<height>131</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::Box</enum>
|
||||
</property>
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Raised</enum>
|
||||
</property>
|
||||
<widget class="QPushButton" name="mStartTestBtn">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>260</x>
|
||||
<y>20</y>
|
||||
<width>91</width>
|
||||
<height>23</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Démarrer test</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QPushButton" name="mReinitTestBtn">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>260</x>
|
||||
<y>70</y>
|
||||
<width>91</width>
|
||||
<height>23</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Réinitialiser test</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QCheckBox" name="mCableIdentStepChkBx">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>20</x>
|
||||
<y>20</y>
|
||||
<width>151</width>
|
||||
<height>17</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>1. Identification du câble</string>
|
||||
</property>
|
||||
<property name="checkable">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QCheckBox" name="mVisualInspStepChkBx">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>20</x>
|
||||
<y>50</y>
|
||||
<width>151</width>
|
||||
<height>17</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string extracomment="Test"/>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>2. Inspection visuelle</string>
|
||||
</property>
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QCheckBox" name="mConSelStepChkBx">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>20</x>
|
||||
<y>80</y>
|
||||
<width>191</width>
|
||||
<height>17</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>3. Sélection du connecteur d'entrée</string>
|
||||
</property>
|
||||
<property name="checkable">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
<widget class="QLabel" name="mInspVisuelleLabel_2">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>50</x>
|
||||
<y>200</y>
|
||||
<width>221</width>
|
||||
<height>20</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>12</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Contrôle du test</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QTextBrowser" name="mTestLogTextBox">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>970</x>
|
||||
<y>550</y>
|
||||
<width>381</width>
|
||||
<height>201</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::Box</enum>
|
||||
</property>
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Plain</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
<customwidgets>
|
||||
<customwidget>
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
@@ -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
|
||||
@@ -46,4 +46,6 @@ CMainPage::~CMainPage()
|
||||
int CMainPage::SetTestPageWidget(QWidget *PageHandle)
|
||||
{
|
||||
ui->mMainTabWidget->addTab(PageHandle,QIcon(),QString("Câble"));
|
||||
return RET_OK;
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -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;
|
||||
|
||||
+19
-2
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -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:
|
||||
|
||||
};
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
#include "TestReport.h"
|
||||
|
||||
CTestReport::CTestReport()
|
||||
{
|
||||
}
|
||||
|
||||
CVisualInspectionResult * CTestReport::GetInspectionResult()
|
||||
{
|
||||
return &mVisualInspectionResultReport;
|
||||
}
|
||||
@@ -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
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
#define VISUALINSPECTIONPAGE_H
|
||||
|
||||
#include <QWidget>
|
||||
#include <QButtonGroup>
|
||||
#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
|
||||
|
||||
+340
-16
@@ -13,13 +13,33 @@
|
||||
<property name="windowTitle">
|
||||
<string>Form</string>
|
||||
</property>
|
||||
<widget class="QCheckBox" name="checkBox">
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>100</x>
|
||||
<y>50</y>
|
||||
<width>211</width>
|
||||
<height>17</height>
|
||||
<x>250</x>
|
||||
<y>10</y>
|
||||
<width>601</width>
|
||||
<height>81</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>14</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>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é)</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>380</x>
|
||||
<y>230</y>
|
||||
<width>261</width>
|
||||
<height>16</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="font">
|
||||
@@ -28,33 +48,337 @@
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Vérifiez ceci</string>
|
||||
<string>5.2 Vérifications avant le sertissage</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QCheckBox" name="checkBox_2">
|
||||
<widget class="QLabel" name="label_3">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>100</x>
|
||||
<y>90</y>
|
||||
<width>70</width>
|
||||
<height>17</height>
|
||||
<x>380</x>
|
||||
<y>280</y>
|
||||
<width>311</width>
|
||||
<height>16</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>12</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>CheckBox</string>
|
||||
<string>5.3 Vérifications après chaque sertissage</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QCheckBox" name="checkBox_3">
|
||||
<widget class="QLabel" name="label_4">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>100</x>
|
||||
<x>380</x>
|
||||
<y>330</y>
|
||||
<width>311</width>
|
||||
<height>16</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>12</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>5.4 Après l'insertion de chaque contact</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="label_5">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>380</x>
|
||||
<y>380</y>
|
||||
<width>471</width>
|
||||
<height>16</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>12</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>5.5 Vérifications avant de refermer le couvercle du connecteur</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="label_6">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>380</x>
|
||||
<y>430</y>
|
||||
<width>471</width>
|
||||
<height>16</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>12</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>5.6 Vérifications après la fermeture du couvercle</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="label_7">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>120</x>
|
||||
<y>140</y>
|
||||
<width>70</width>
|
||||
<width>811</width>
|
||||
<height>20</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>12</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Pour chaque section de la procédure, indiquez si les vérifications ont été effectuées lors de la fabrication</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="label_8">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>330</x>
|
||||
<y>200</y>
|
||||
<width>46</width>
|
||||
<height>13</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Effectuée</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="label_9">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>230</x>
|
||||
<y>200</y>
|
||||
<width>71</width>
|
||||
<height>16</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Non effectuée</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QCheckBox" name="mVerif52DoneChkBx">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>340</x>
|
||||
<y>230</y>
|
||||
<width>21</width>
|
||||
<height>17</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>CheckBox</string>
|
||||
<string/>
|
||||
</property>
|
||||
<property name="tristate">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QCheckBox" name="mVerif52NotDoneChkBx">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>260</x>
|
||||
<y>230</y>
|
||||
<width>21</width>
|
||||
<height>17</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="tristate">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QCheckBox" name="mVerif53NotDoneChkBx">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>260</x>
|
||||
<y>280</y>
|
||||
<width>21</width>
|
||||
<height>17</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="tristate">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QCheckBox" name="mVerif53DoneChkBx">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>340</x>
|
||||
<y>280</y>
|
||||
<width>21</width>
|
||||
<height>17</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="tristate">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QCheckBox" name="mVerif54DoneChkBx">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>340</x>
|
||||
<y>330</y>
|
||||
<width>21</width>
|
||||
<height>17</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="tristate">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QCheckBox" name="mVerif54NotDoneChkBx">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>260</x>
|
||||
<y>330</y>
|
||||
<width>21</width>
|
||||
<height>17</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="tristate">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QCheckBox" name="mVerif55NotDoneChkBx">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>260</x>
|
||||
<y>380</y>
|
||||
<width>21</width>
|
||||
<height>17</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="tristate">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QCheckBox" name="mVerif55DoneChkBx">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>340</x>
|
||||
<y>380</y>
|
||||
<width>21</width>
|
||||
<height>17</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="tristate">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QCheckBox" name="mVerif56NotDoneChkBx">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>260</x>
|
||||
<y>430</y>
|
||||
<width>21</width>
|
||||
<height>17</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="tristate">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QCheckBox" name="mVerif56DoneChkBx">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>340</x>
|
||||
<y>430</y>
|
||||
<width>21</width>
|
||||
<height>17</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="tristate">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QPushButton" name="mOKBtn">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>110</x>
|
||||
<y>580</y>
|
||||
<width>75</width>
|
||||
<height>23</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>OK</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QTextEdit" name="mNotesTextEditBx">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>260</x>
|
||||
<y>530</y>
|
||||
<width>611</width>
|
||||
<height>141</height>
|
||||
</rect>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="label_10">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>260</x>
|
||||
<y>500</y>
|
||||
<width>811</width>
|
||||
<height>20</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>12</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Notes</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QPushButton" name="mResetInspectionFormBtn">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>790</x>
|
||||
<y>260</y>
|
||||
<width>75</width>
|
||||
<height>23</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Réinitialiser</string>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
#include "VisualInspectionResult.h"
|
||||
#include <QString>
|
||||
|
||||
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;
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
#ifndef VISUALINSPECTIONRESULT_H
|
||||
#define VISUALINSPECTIONRESULT_H
|
||||
|
||||
#include "GlobalDefine.h"
|
||||
#include <QString>
|
||||
|
||||
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
|
||||
@@ -183,6 +183,8 @@ void CConnectorSelectWidget::InputConnectorZoneClicked(CConnectorClickZoneWidget
|
||||
ConClickZone->SelectConnector();
|
||||
mCurSelConnector = ConClickZone->GetConnectorType();
|
||||
}
|
||||
|
||||
emit ConnectorSelected(mCurSelConnector);
|
||||
}
|
||||
|
||||
CConnectorSelectWidget::~CConnectorSelectWidget()
|
||||
|
||||
@@ -30,6 +30,7 @@ public:
|
||||
private:
|
||||
CConnectorDefs::eConnectorType mCurSelConnector;
|
||||
signals:
|
||||
void ConnectorSelected(CConnectorDefs::eConnectorType ConType);
|
||||
|
||||
public slots:
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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<CONOFFStatusWidget*> mInputCtorPinsWidgetsList;
|
||||
QList<CONOFFStatusWidget*> mOutputCtorPinsWidgetsList;
|
||||
QList<CONOFFStatusWidget*> mPinsWidgetsList;
|
||||
|
||||
int SetConnectorPinCount(int count);
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user