clOnlineExam.h 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. #ifndef CLONLINEEXAM_H
  2. #define CLONLINEEXAM_H
  3. #include <QWidget>
  4. #include <QTimer>
  5. #include "clObjectiveScore.h"
  6. #include "CHttpBll.h"
  7. #include "clOperation.h"
  8. namespace Ui {
  9. class clOnlineExam;
  10. }
  11. class clOnlineExam : public QWidget
  12. {
  13. Q_OBJECT
  14. signals:
  15. void enterExam(CL_OPERATION_TYPE cot, __int64 nExamId, __int64 nExamStudentId,
  16. QString sCourseCode, QString sCourseName);
  17. public:
  18. explicit clOnlineExam(QWidget *parent = nullptr);
  19. ~clOnlineExam();
  20. void setUI(const int nWidth, const int nHeight);
  21. void refreshExam();
  22. private slots:
  23. void onQueryExamList(CQueryExamList queryExamList);
  24. void onQueryExamEndList(CQueryExamEndList queryExamEndList);
  25. void on_btn_examList_clicked();
  26. void on_btn_endExamList_clicked();
  27. void on_btn_refresh_clicked();
  28. private:
  29. void showEvent(QShowEvent *event);
  30. QString getWeekCycles(std::vector<int> vWeek);
  31. Ui::clOnlineExam *ui;
  32. std::shared_ptr<QTimer> m_pObjectiveScoreTimer;
  33. std::shared_ptr<QTimer> m_pRefreshTimer;
  34. std::shared_ptr<clObjectiveScore> m_pObjectiveScore;
  35. std::vector<CExamCourseInfo> m_vOnlieExamList;
  36. std::vector<CExamCourseInfo> m_vOnlieEndExamList;
  37. int m_nRefreshSeconds = 20;
  38. };
  39. #endif // CLONLINEEXAM_H