questionSet.h 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. #ifndef QUESTIONSET_H
  2. #define QUESTIONSET_H
  3. #include <QWidget>
  4. #include "changeQuestion.h"
  5. #include "paperDef.h"
  6. #include "CBaseWidget.h"
  7. #include "CHttpBll.h"
  8. namespace Ui {
  9. class questionSet;
  10. }
  11. class questionSet : public QWidget
  12. {
  13. Q_OBJECT
  14. public:
  15. explicit questionSet(CQuestionStruct &qs, int nOrder, int nTotalSubQuestion, QWidget *parent = nullptr);
  16. ~questionSet();
  17. void setUI(const int nLeft, const int nTop, const int nWidth, const int nHeight);
  18. void showBtn(int nType);
  19. void setGroupInfo(QString sTitle, QString sProgress);
  20. void handinPaper();
  21. signals:
  22. void previousQuestion(int nOrder);
  23. void nextQuestion(int nOrder);
  24. void markedItem(bool bMarked, int nOrder);
  25. void questionAnswered(bool bAnswered, int nOrder);
  26. void uploadAnswer(int nOrder, __int64 timeStamp, QString sAnswer);
  27. private slots:
  28. void onPreviousQuestion();
  29. void onNextQuestion();
  30. void onMarkedItem(bool bMarked, int nOrder);
  31. void onQuestionAnswered(bool bAnswered, int nOrder);
  32. void onUploadAnswer(int nOrder, __int64 timeStamp, QString sAnswer);
  33. private:
  34. void initSubQuestionItem(CSubQuestionStruct &subQuestionItem);
  35. void initBody();
  36. Ui::questionSet *ui;
  37. changeQuestion *m_pWidgetChangeQuestion;
  38. CQuestionStruct &m_qs;
  39. int m_nOrder;
  40. int m_nTotalSubQuestion;
  41. };
  42. #endif // QUESTIONSET_H