thresholdlistwidget.h 781 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. #ifndef THRESHOLDLISTWIDGET_H
  2. #define THRESHOLDLISTWIDGET_H
  3. #include <QWidget>
  4. #include "common.h"
  5. namespace Ui {
  6. class ThresholdListWidget;
  7. }
  8. class ThresholdListWidget : public QWidget
  9. {
  10. Q_OBJECT
  11. public:
  12. explicit ThresholdListWidget(QWidget *parent = nullptr);
  13. ~ThresholdListWidget();
  14. //刷新
  15. void UpdateTreshold();
  16. //读取数据库内容
  17. void ReadSqlData();
  18. //更新表数据
  19. void updateTablewidget();
  20. private:
  21. //初始化UI
  22. void InitUI();
  23. //添加一行 返回行ID
  24. int AddRowData(int nChID,QString strName,GlobalOverManager*pData);
  25. //清空表数据
  26. void ClearList();
  27. void checkThresholds(int nRow,PowerWarningInfo* pWarning);
  28. private:
  29. Ui::ThresholdListWidget *ui;
  30. };
  31. #endif // THRESHOLDLISTWIDGET_H