You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

49 rivejä
1.4 KiB

  1. #include "CableTestPage.h"
  2. #include "ui_CableTestPage.h"
  3. #include "CableTestBench.h"
  4. #include <QTextCodec>
  5. CCableTestPage::CCableTestPage(QWidget *parent) :
  6. QWidget(parent),
  7. ui(new Ui::CCableTestPage)
  8. {
  9. QTextCodec::setCodecForCStrings(QTextCodec::codecForName("UTF-8"));
  10. ui->setupUi(this);
  11. mProgramHandle = 0;
  12. mInspectionNotDonePixmap = QPixmap("./images/todo.png").scaled(ui->mInspectionDoneIcon->geometry().width(),ui->mInspectionDoneIcon->geometry().height());
  13. mInspectionDonePixmap = QPixmap("./images/done1.png").scaled(ui->mInspectionDoneIcon->geometry().width(),ui->mInspectionDoneIcon->geometry().height());
  14. ui->mInspectionDoneIcon->setPixmap(mInspectionNotDonePixmap);
  15. connect(ui->mExecInspVisuelleBtn,SIGNAL(clicked()),this,SLOT(InspVisuelleBtnClicked()));
  16. ui->mConnectorTestVisualisationWidget->SetConnectorPinCount(108);
  17. }
  18. CCableTestPage::~CCableTestPage()
  19. {
  20. delete ui;
  21. }
  22. void CCableTestPage::InspVisuelleBtnClicked()
  23. {
  24. mProgramHandle->ExecVisualInspectionRequest();
  25. }
  26. int CCableTestPage::SetVisualInspectionDone(bool Done)
  27. {
  28. if(Done)
  29. {
  30. ui->mInspectionDoneIcon->setPixmap(mInspectionDonePixmap);
  31. ui->mExecInspVisuelleBtn->setText(QString("Réviser Inspection").toUtf8());
  32. }
  33. else
  34. {
  35. ui->mInspectionDoneIcon->setPixmap(mInspectionDonePixmap);
  36. ui->mExecInspVisuelleBtn->setText("Effectuer Inspection");
  37. }
  38. return RET_OK;
  39. }