#ifndef CLONLINEHOMEWORK_H
#define CLONLINEHOMEWORK_H

#include <QWidget>
#include <QTimer>
#include "clObjectiveScore.h"
#include "CHttpBll.h"
#include "clOperation.h"

namespace Ui {
class clOnlineHomework;
}

class clOnlineHomework : public QWidget
{
    Q_OBJECT
signals:
    void enterExam(CL_OPERATION_TYPE cot, __int64 nExamId, __int64 nExamStudentId,
                   QString sCourseCode, QString sCourseName);
public:
    explicit clOnlineHomework(QWidget *parent = nullptr);
    ~clOnlineHomework();

    void setUI(const int nWidth, const int nHeight);
    void refreshExam();
private slots:
	void onQueryHomeworkList(CQueryHomeworkList queryHomeworkList);
private:
    void showEvent(QShowEvent *);

    Ui::clOnlineHomework *ui;
    std::vector<CExamCourseInfo> m_vHomeworkExamList;

    std::shared_ptr<QTimer> m_pObjectiveScoreTimer;
    std::shared_ptr<clObjectiveScore> m_pObjectiveScore;
};

#endif // CLONLINEHOMEWORK_H
