QWordDemo.h 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. #ifndef QWORDDEMO_H
  2. #define QWORDDEMO_H
  3. #include <QMainWindow>
  4. struct ReportableInfo
  5. {
  6. //公共元素
  7. std::string domid;
  8. std::string devcode;
  9. std::string devname;
  10. int _detectType; //分析类别
  11. std::string _typeDesc; //设备类别描述
  12. std::string _installspot; //安装地点
  13. std::string _maintainer; //生产厂家
  14. std::string _model; //设备型号
  15. double electricVal; //额定电流
  16. std::string _productSeq; //生产序列号
  17. std::string _productTime; //出厂日期
  18. std::string result;
  19. int alarm_level;
  20. std::string alarmTime;
  21. int envwindspeed; //环境风速
  22. int envtemp; //环境温度
  23. int envhumidity; //环境湿度
  24. };
  25. typedef enum
  26. {
  27. ALARM_CURRENT_HEAT,
  28. ALARM_VOLTAGE_HEAT,
  29. } ALARM_HEAT_TYPE;
  30. typedef enum
  31. {
  32. NORMAL_ALARM,
  33. GENERAL_ALARM,
  34. CRITICAL_ALARM,
  35. URGENT_ALARM,
  36. _ALARM_NUM,
  37. } ALARM_LEVEL;
  38. namespace Ui {
  39. class QWordDemo;
  40. }
  41. class QWordDemo : public QMainWindow
  42. {
  43. Q_OBJECT
  44. public:
  45. explicit QWordDemo(QWidget *parent = nullptr);
  46. ~QWordDemo();
  47. QString getDetectType(int detectType);
  48. QString getAlarmLevel(int level);
  49. private:
  50. Ui::QWordDemo *ui;
  51. ReportableInfo repItem;
  52. private slots:
  53. void on_exportPushBtn_clicked();
  54. };
  55. #endif // QWORDDEMO_H