skipFaceCompare.cpp 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. #include "skipFaceCompare.h"
  2. #include "ui_skipFaceCompare.h"
  3. #include <QDesktopWidget>
  4. #include <CAppInfo.h>
  5. skipFaceCompare::skipFaceCompare(QWidget *parent) :
  6. QWidget(parent),
  7. ui(new Ui::skipFaceCompare)
  8. {
  9. ui->setupUi(this);
  10. setStyleSheet(g_appInfoPtr->m_sQssStr);
  11. initUI();
  12. }
  13. skipFaceCompare::~skipFaceCompare()
  14. {
  15. delete ui;
  16. }
  17. void skipFaceCompare::initUI()
  18. {
  19. QDesktopWidget *dekwiget = QApplication::desktop();
  20. setGeometry(0, 0, dekwiget->width(), dekwiget->height());
  21. ui->widget_mask->setGeometry(0, 0, dekwiget->width(), dekwiget->height());
  22. ui->widget_wcw_BG->setGeometry((width() - g_appInfoPtr->m_fRate*420)/2, (height() - g_appInfoPtr->m_fRate*212)/2,
  23. g_appInfoPtr->m_fRate*420, g_appInfoPtr->m_fRate*212);
  24. ui->label_wec_tips->adjustSize();
  25. ui->label_wec_tips->setGeometry(g_appInfoPtr->m_fRate*20,
  26. g_appInfoPtr->m_fRate*20, ui->label_wec_tips->width(), ui->label_wec_tips->height());
  27. ui->label_wec_content->setFixedWidth(ui->widget_wcw_BG->width() - g_appInfoPtr->m_fRate*20*2);
  28. ui->label_wec_content->adjustSize();
  29. ui->label_wec_content->setGeometry(ui->label_wec_tips->x(), ui->label_wec_tips->y() + ui->label_wec_tips->height() + g_appInfoPtr->m_fRate*20,
  30. ui->label_wec_content->width(), ui->label_wec_content->height());
  31. ui->btn_startEnvTest->setGeometry(ui->widget_wcw_BG->width() - g_appInfoPtr->m_fRate*(20 + 80), ui->widget_wcw_BG->height() - g_appInfoPtr->m_fRate*(20 + 30),
  32. g_appInfoPtr->m_fRate*80, g_appInfoPtr->m_fRate*30);
  33. ui->btn_skipEnvTest->setGeometry(ui->btn_startEnvTest->x() - ui->btn_startEnvTest->width() - g_appInfoPtr->m_fRate*10,
  34. ui->btn_startEnvTest->y(), ui->btn_startEnvTest->width(), ui->btn_startEnvTest->height());
  35. }
  36. void skipFaceCompare::on_btn_skipEnvTest_clicked()
  37. {
  38. emit cancel();
  39. }
  40. void skipFaceCompare::on_btn_startEnvTest_clicked()
  41. {
  42. emit confirm();
  43. }