1
0
mirror of https://gitlab.com/kelteseth/ScreenPlay.git synced 2024-11-07 11:32:42 +01:00
ScreenPlay/ScreenPlaySysInfo/sysinfo.h

40 lines
609 B
C
Raw Normal View History

2018-10-26 12:05:23 +02:00
#pragma once
2018-09-19 13:19:51 +02:00
2018-10-26 12:05:23 +02:00
#include "cpu.h"
#include "ram.h"
2018-09-19 13:19:51 +02:00
#include <QQuickItem>
2018-10-26 12:05:23 +02:00
#include <QSharedPointer>
#include <memory>
2018-09-19 13:19:51 +02:00
2018-10-26 12:05:23 +02:00
class SysInfo : public QQuickItem {
2018-09-19 13:19:51 +02:00
Q_OBJECT
Q_DISABLE_COPY(SysInfo)
2018-10-26 12:05:23 +02:00
Q_PROPERTY(RAM* ram READ ram NOTIFY ramChanged)
Q_PROPERTY(CPU* cpu READ cpu NOTIFY cpuChanged)
2018-09-19 13:19:51 +02:00
public:
2018-10-26 12:05:23 +02:00
SysInfo(QQuickItem* parent = nullptr);
2018-09-19 13:19:51 +02:00
~SysInfo();
2018-10-26 12:05:23 +02:00
RAM* ram() const
{
return m_ram;
}
CPU* cpu() const
{
return m_cpu;
}
public slots:
signals:
void ramChanged(RAM* ram);
void cpuChanged(CPU* cpu);
private:
RAM* m_ram;
CPU* m_cpu;
};