24 lines
328 B
C
24 lines
328 B
C
|
#ifndef CPUWORKER_H
|
||
|
#define CPUWORKER_H
|
||
|
|
||
|
#include <QObject>
|
||
|
#include <QVector>
|
||
|
|
||
|
class CPUWorker : public QObject
|
||
|
{
|
||
|
Q_OBJECT
|
||
|
|
||
|
public:
|
||
|
explicit CPUWorker(QObject *parent = nullptr);
|
||
|
|
||
|
signals:
|
||
|
void dataReady(int coreIndex, double usage);
|
||
|
|
||
|
public slots:
|
||
|
void process();
|
||
|
|
||
|
private:
|
||
|
void fetchCpuUsage();
|
||
|
};
|
||
|
|
||
|
#endif // CPUWORKER_H
|