#ifndef CLONLINEPRACTICE_H
#define CLONLINEPRACTICE_H

#include <QWidget>
#include "CHttpBll.h"
#include "clopResultList.h"
#include "clOperation.h"
namespace Ui {
class clOnlinePractice;
}

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

    void setUI(const int nWidth, const int nHeight);
    void releaseClopResult();
    void refreshExamInfo();
private slots:
	void onQueryBatchList(CQueryBatchList queryBatchList);
	void onQueyPracticeCourseList(CQueryPracticeCourseList queryPracticeCourseList);
    void on_cbo_batch_currentIndexChanged(int index);

private:
	void showEvent(QShowEvent *);
	
	void refreshExam();

    Ui::clOnlinePractice *ui;

    std::vector<CPracticeCourseInfo> m_vPracticeCourseInfo;

    std::shared_ptr<clopResultList> m_pResultList;

    __int64 m_nCurExamId;
};

#endif // CLONLINEPRACTICE_H
