sysinfowidget.h 677 B

12345678910111213141516171819202122232425262728293031
  1. #ifndef SYSINFOWIDGET_H
  2. #define SYSINFOWIDGET_H
  3. #include <QTimer>
  4. #include <QWidget>
  5. #include <QtCharts/QChartView>
  6. /**
  7. * @brief The SysInfoWidget class
  8. * The QChartView is the generic widget that can display
  9. * many types of chat. This class will
  10. * handle the layout and display the QChartView
  11. */
  12. class SysInfoWidget : public QWidget {
  13. Q_OBJECT
  14. public:
  15. explicit SysInfoWidget(QWidget* parent = 0, int startDelayMs = 500,
  16. int updateSeriesDelayMs = 500);
  17. protected:
  18. QChartView& chartView();
  19. protected slots:
  20. virtual void updateSeries() = 0;
  21. private:
  22. QTimer mRefreshTimer;
  23. QChartView mChartView;
  24. };
  25. #endif // SYSINFOWIDGET_H