1
0
mirror of https://gitlab.com/kelteseth/ScreenPlay.git synced 2024-09-19 17:01:45 +02:00
ScreenPlay/ScreenPlaySysInfo/sysinfo.h

39 lines
601 B
C
Raw Normal View History

2018-10-26 12:05:23 +02:00
#pragma once
2018-09-19 13:19:51 +02:00
#include <QQuickItem>
2018-10-26 12:05:23 +02:00
#include <memory>
2018-09-19 13:19:51 +02:00
#include "cpu.h"
#include "ram.h"
2018-10-26 12:05:23 +02:00
class SysInfo : public QQuickItem {
2018-09-19 13:19:51 +02:00
Q_OBJECT
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);
~SysInfo(){}
2018-09-19 13:19:51 +02:00
2018-10-26 12:05:23 +02:00
RAM* ram() const
{
return m_ram.get();
2018-10-26 12:05:23 +02:00
}
CPU* cpu() const
{
return m_cpu.get();
2018-10-26 12:05:23 +02:00
}
public slots:
signals:
void ramChanged(RAM* ram);
void cpuChanged(CPU* cpu);
private:
std::unique_ptr<RAM> m_ram;
std::unique_ptr<CPU> m_cpu;
2018-10-26 12:05:23 +02:00
};