123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101 |
- #ifndef ANSWERWIDGET_H
- #define ANSWERWIDGET_H
- #include <QWidget>
- #include <QTimer>
- #include "CHttpBll.h"
- #include "question.h"
- #include "questionSet.h"
- #include "awHandinPaper.h"
- #include "awResumeExam.h"
- #include "faceLiveness.h"
- #include <opencv2/opencv.hpp>
- namespace Ui {
- class answerWidget;
- }
- class answerWidget : public QWidget
- {
- Q_OBJECT
- signals:
- void showExamScore();
- void showPracticeInfo();
- void gobackCourseList();
- public:
- explicit answerWidget(QWidget *parent = nullptr);
- ~answerWidget();
- void setUI(const int nLeft, const int nTop, const int nWidth, const int nHeight);
- private slots:
- void onGetExamProperty(CGetExamProperty getExamProperty);
- void onWeiXinAnswerEnabled(CWeiXinAnswerEnabled weiXinAnswerEnabled);
- void onGetExamById(CGetExamById getExamById);
- void onFindExamQuestionList(CFindExamQuestionList findExamQuestionList);
- void onGetExamRecordPaperStruct(CGetExamRecordPaperStruct getExamRecordPaperStruct);
- void onGetQuestionContent(CGetQuestionContent getQuestionContent);
- void onStartAnswer(CStartAnswer startAnswer);
- void onExamHeartbeat(CExamHeartbeat examHeartbeat);
- void onSubmitQuestionAnswer(CSubmitQuestionAnswer submitQuestionAnswer);
- void onEndExam(CEndExam endExam);
- void onGetOrgPropertiesByGroupWithoutCache(CGetOrgPropertiesByGroupWithoutCache orgProperties);
- void onStartFaceLiveVerify(CStartFaceLiveVerify startFaceLiveVerify);
- void on_btn_handInPaper_clicked();
- void on_btn_all_clicked();
- void on_btn_answered_clicked();
- void on_btn_unanswered_clicked();
- void on_btn_marked_clicked();
- void on_btn_allNum_clicked();
- void on_btn_answeredNum_clicked();
- void on_btn_unansweredNum_clicked();
- void on_btn_markedNum_clicked();
- private:
- void getQuestionContent(QString sQuestionId, int nOrder);
- void showSubQuestion(CQuestionStruct &qs, int nOrder, QString sTitle, QString sProgress);
- CAnsweredQuestion findQuestionByOrder(CFindExamQuestionList &feql, int nOrder);
- void heartBreat();
- void uploadAnswer(int nIndex, QString sAnswer);
- void showQuestionByOrder(int nOrder);
- void handinPaper();
- void refreshStatus();
- bool checkAnswer();
- void startCapture();
- void stopCapture();
- Ui::answerWidget *ui;
-
- int m_nSnapshotInterval;
- QString m_sPracticeType;
- int m_nFreezeTime;
- std::vector<CPaperGroupStruct> m_vPaperGroupStruct;
- std::shared_ptr<question> m_pQuestion;
- std::shared_ptr<questionSet> m_pQuestionSet;
- std::shared_ptr<QTimer> m_pCountDownTimer;
- std::shared_ptr<QTimer> m_pHeartbeatTimer;
- std::shared_ptr<awHandinPaper> m_pHandinPaper;
- std::shared_ptr<awResumeExam> m_pResumeExam;
- std::shared_ptr<QTimer> m_pHandinPaperTimer;
- std::shared_ptr<faceLiveness> m_pFaceLiveness;
- int m_nLeftSeconds;
- bool bShowLivenessTip;
- std::shared_ptr<QTimer> m_pVideoTimer;
- std::shared_ptr<QTimer> m_pinitTimer;
- cv::VideoCapture m_cam;
- int m_nLastCaptureSecond;
- };
- #endif // ANSWERWIDGET_H
|