CAppInfo.h 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133
  1. #ifndef CAPPINFO_H
  2. #define CAPPINFO_H
  3. #include <memory>
  4. #include <QString>
  5. #include <QWidget>
  6. #include "json/json.h"
  7. namespace EXAM_TYPES
  8. {
  9. const QString ONLINE = "ONLINE";
  10. const QString PRACTICE = "PRACTICE";
  11. const QString OFFLINE = "OFFLINE";
  12. }
  13. class ExamInfo
  14. {
  15. public:
  16. bool bIsExamInProgress;//是否断点续考
  17. QString sExamType;
  18. QString sPracticeType;
  19. __int64 nExamId;
  20. __int64 nExamStudentId;
  21. __int64 nExamRecordDataId;
  22. QString sCourseCode;
  23. QString sCourseName;
  24. int nFaceVerifyMinute;
  25. int nDuration;
  26. bool bFaceCheck;
  27. bool bLivenessCheck;
  28. int nWarnThreshold;//预警阈值
  29. bool bIsFaceCheck;//进入考试是否验证人脸识别(强制、非强制)
  30. int nSnapshotInterval;//抓拍间隔时间
  31. int nFaceVerifyStartMinute;//活体检测开始分钟数
  32. int nFaceVerifyEndMinute;//活体检测结束分钟数
  33. bool bIsStrangerEnable;//是否启用陌生人检测
  34. __int64 nFaceLiveVerifyId;//活体检测id
  35. int nFaceVerifyTimes;//活体检测次数
  36. int nFaceVerifyDoMinute;//活体检测时间后台随机
  37. int nActionNum;
  38. QString sActionOptions;//SHAKE,BLINK,NOD
  39. QString sActionOrder;//FIXED
  40. int nActionDuration;//单个动作最大时长
  41. int nActionAlert;//指定动作检测提醒N秒后开始检测
  42. ExamInfo()
  43. {
  44. bIsExamInProgress = false;
  45. sExamType = "";
  46. sPracticeType = "";
  47. nExamId = 0;
  48. nExamStudentId = 0;
  49. nExamRecordDataId = 0;
  50. sCourseCode = "";
  51. sCourseName = "";
  52. nFaceVerifyMinute = 0;
  53. nDuration = 0;
  54. bFaceCheck = false;
  55. bLivenessCheck = false;
  56. nWarnThreshold = 0;
  57. bIsFaceCheck = false;
  58. nSnapshotInterval = 0;
  59. nFaceVerifyStartMinute = 0;
  60. nFaceVerifyEndMinute = 0;
  61. bIsStrangerEnable = false;
  62. nActionNum = 0;
  63. sActionOptions = "";
  64. sActionOrder = "";
  65. nActionDuration = 0;
  66. nActionAlert = 0;
  67. nFaceLiveVerifyId = 0;
  68. nFaceVerifyDoMinute = 0;
  69. nFaceVerifyTimes = 0;
  70. }
  71. };
  72. class CAppInfo
  73. {
  74. public:
  75. CAppInfo();
  76. double m_fRate;
  77. QString m_sQssStr;
  78. QString m_sEscDomain;//ecs域名
  79. QString m_sOrgPrefix;//org域名前缀
  80. QString m_sHttpServer;
  81. QString m_sHttpPort;
  82. bool m_bDisableMutiScreen;//禁止全屏
  83. bool m_bDisableRemoteAssistance;//远程协助
  84. bool m_bFullScreenTop;//屏幕前置
  85. bool m_bDisableVirtualCamera;//虚拟摄像头
  86. QString m_sRootOrgId;
  87. bool m_bShowQmthLogo;
  88. QString m_sMenuLogoUrl;
  89. bool m_bShowStudentClientAppQrcode;
  90. bool m_bWeiXinAnswerEnabled;//是否开启微信作答
  91. Json::Value m_jAudioPlayedCount;
  92. __int64 m_nStudentId;
  93. QString m_sStudentName;
  94. __int64 m_nOrgId;
  95. QString m_sOrgCode;
  96. QString m_sOrgName;
  97. QString m_sStudentCode;
  98. QString m_sStudentIdentityNumber;
  99. QString m_sStudentPhotoPath;
  100. bool m_bStudentEnable;
  101. QString m_sSpecialtyName;
  102. QString m_sAppDownLoadUrl;//app下载地址
  103. ExamInfo m_oExamInfo;
  104. QWidget* m_pAnsBgWidget;
  105. int m_nVersionId;
  106. QString m_sVersionCode;
  107. QString m_sMachineId;
  108. QString m_sUpgradeUrl;//升级文件url
  109. QString m_sCacheFileDir;
  110. __int64 m_nRecordId;
  111. bool m_bShowDebugInfo;//是否显示debug日志
  112. __int64 serverMTime();
  113. std::map<QString, QString> m_FileCacheMap;
  114. };
  115. extern std::shared_ptr<CAppInfo> g_appInfoPtr;
  116. #endif // CAPPINFO_H