#ifndef CLOPPAPERDETAIL_H
#define CLOPPAPERDETAIL_H

#include <QWidget>
#include "CHttpBll.h"

namespace Ui {
class clopPaperDetail;
}

class clopPaperDetail : public QWidget
{
    Q_OBJECT
signals:
	void heightChange(int nHeight);
public:
    explicit clopPaperDetail(__int64 nExamRecordDataId, QString sCourseCode, bool bFromCache = false, QWidget *parent = nullptr);
    ~clopPaperDetail();

    int setUI(const int nWidth);
private slots:
    void on_btn_expandPaper_clicked();

	void onFindExamRecordDataEntity(CFindExamRecordDataEntity findExamRecordDataEntity);
	void onGetExamRecordPaperStruct(CGetExamRecordPaperStruct getExamRecordPaperStruct);
	void onGetExamRecordQuestions(CGetExamRecordQuestions getExamRecordQuestions);
	void onGetQuestion(CGetQuestion getQuestion);
private:
	void initQuestion(Json::Value jBody);
	void setStudentAnswer(int nOrder, QString sStudentAnswer);

    Ui::clopPaperDetail *ui;

	__int64 m_nExamId;
	QString m_sPaperType;
	__int64 m_nExamRecordDataId;
	QString m_sCourseCode;
	
	std::vector<CPaperGroupStruct> m_vPaperGroupStruct;
    bool m_bFromCache;
};

#endif // CLOPPAPERDETAIL_H
