⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 cpuplot.h

📁 qt4.3.2 ,red hat9中d动态调用cpu的程序
💻 H
字号:
#include <qwt_plot.h>#include "cpustat.h"#define HISTORY 60 // secondsclass QwtPlotCurve;class CpuPlot : public QwtPlot {    Q_OBJECTpublic:    enum CpuData    {        User,        System,        Total,        Idle,        NCpuData    };    CpuPlot(QWidget * = 0);    const QwtPlotCurve *cpuCurve(int id) const        { return data[id].curve; }protected:    void timerEvent(QTimerEvent *e);private slots:    void showCurve(QwtPlotItem *, bool on);private:    struct    {        QwtPlotCurve *curve;        double data[HISTORY];    } data[NCpuData];    double timeData[HISTORY];    int dataCount;    CpuStat cpuStat;};

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -