78 lines
1.7 KiB
C++
78 lines
1.7 KiB
C++
#ifndef CABLETESTPAGE_H
|
|
#define CABLETESTPAGE_H
|
|
|
|
#include <QWidget>
|
|
#include "CableTestBenchDefs.h"
|
|
#include <QBitArray>
|
|
#include <QTimer>
|
|
|
|
|
|
class CCableTestBench;
|
|
class CCableParametersData;
|
|
|
|
|
|
namespace Ui {
|
|
class CCableTestPage;
|
|
}
|
|
|
|
class CCableTestPage : public QWidget
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
explicit CCableTestPage(QWidget *parent = 0);
|
|
~CCableTestPage();
|
|
|
|
CCableTestBench *mProgramHandle;
|
|
QTimer mGuiRefreshTimer;
|
|
void showEvent(QShowEvent *event);
|
|
void hideEvent(QHideEvent *event);
|
|
|
|
int SetVisualInspectionDone(bool Done = true);
|
|
int ResetCable();
|
|
int EnableStartTestBtn();
|
|
int DisableStartTestBtn();
|
|
int CableAutomaticTestStarted();
|
|
int CableAutomaticTestPaused();
|
|
int CableTestEnded();
|
|
int CableManualTestStarted();
|
|
|
|
int SetAutoTestResult(QString Result, QColor color = Qt::black);
|
|
int EnableOpenReportBtn();
|
|
|
|
int SetInputConnectorState(QBitArray PinStates);
|
|
int SetOutputConnectorState(QBitArray PinStates);
|
|
|
|
int FillReportCableParametersData(CCableParametersData* ReportPtr);
|
|
|
|
|
|
|
|
private:
|
|
Ui::CCableTestPage *ui;
|
|
|
|
QPixmap mInspectionDonePixmap, mInspectionNotDonePixmap;
|
|
|
|
QString mDefaultCableName, mDefaultInspectorName;
|
|
|
|
|
|
int DisableGuiForTest();
|
|
int EnableGuiAfterTest();
|
|
|
|
|
|
|
|
public slots:
|
|
void InspVisuelleBtnClicked();
|
|
void ConnectorSelectionChanged(CConnectorDefs::eConnectorType ConType);
|
|
void StartTestBtnClicked();
|
|
void ResetTestBtnClicked();
|
|
void NewCableBtnClicked();
|
|
void StartManualTestBtnClicked();
|
|
void OutputConnectorPinClicked(int PinNbr);
|
|
void GuiRefreshTimerExpired();
|
|
void AddTestLogEntry(QString Entry);
|
|
void SaveReportBtnClicked();
|
|
void OpenReportBtnClicked();
|
|
};
|
|
|
|
#endif // CABLETESTPAGE_H
|