ch_widget.h 799 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. #ifndef CH_WIDGET_H
  2. #define CH_WIDGET_H
  3. #include <QWidget>
  4. #include "pdu_ctrl.h"
  5. namespace Ui {
  6. class ch_Widget;
  7. }
  8. class ch_Widget : public QWidget
  9. {
  10. Q_OBJECT
  11. public:
  12. explicit ch_Widget(QWidget *parent = nullptr);
  13. ~ch_Widget();
  14. void setDataCHP(int nIndex,PowerInfo* pdata,PowerWarningInfo* pWarn);
  15. void UpdateData();
  16. public:
  17. //void mousePressEvent(QMouseEvent *event) override;
  18. void mouseDoubleClickEvent(QMouseEvent *event) override;
  19. //void mouseMoveEvent(QMouseEvent *event) override;
  20. signals:
  21. void singal_DoubleClick(int CHID);
  22. protected:
  23. bool event(QEvent *event);
  24. private:
  25. Ui::ch_Widget *ui;
  26. int m_nIndex;
  27. PowerInfo* m_pCHData;
  28. PowerWarningInfo* m_pChWarning;
  29. int nStatus=0;
  30. QTime pTimeLastset;
  31. };
  32. #endif // CH_WIDGET_H