etCameraTest.h 727 B

123456789101112131415161718192021222324252627282930313233343536
  1. #ifndef ETCAMERATEST_H
  2. #define ETCAMERATEST_H
  3. #include <QWidget>
  4. #include <opencv2/opencv.hpp>
  5. #include <QTimer>
  6. namespace Ui {
  7. class etCameraTest;
  8. }
  9. class etCameraTest : public QWidget
  10. {
  11. Q_OBJECT
  12. public:
  13. explicit etCameraTest(QWidget *parent = nullptr);
  14. ~etCameraTest();
  15. int setUI(const int nLeft, const int nTop, const int nWidth);
  16. int widgetHeight();
  17. int getCheckStatus();//0:false 1:true 2:未检测
  18. private slots:
  19. void on_btn_IsSelf_clicked();
  20. void on_btn_IsNotSelf_clicked();
  21. private:
  22. Ui::etCameraTest *ui;
  23. std::shared_ptr<QTimer> m_pVideoTimer;
  24. std::shared_ptr<QTimer> m_pinitTimer;
  25. cv::VideoCapture m_cam;
  26. int m_nCameraOpenStatus;
  27. };
  28. #endif // ETCAMERATEST_H