1
0
mirror of https://gitlab.com/kelteseth/ScreenPlay.git synced 2024-11-08 12:02:36 +01:00
ScreenPlay/ScreenPlaySysInfo/sysinfo.h

47 lines
835 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"
#include "storage.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)
Q_PROPERTY(Storage* storage READ storage NOTIFY storageChanged)
2018-10-26 12:05:23 +02:00
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
}
Storage* storage() const
{
return m_storage.get();
}
2018-10-26 12:05:23 +02:00
signals:
void ramChanged(RAM* ram);
void cpuChanged(CPU* cpu);
void storageChanged(Storage* storage);
2018-10-26 12:05:23 +02:00
private:
std::unique_ptr<RAM> m_ram;
std::unique_ptr<CPU> m_cpu;
std::unique_ptr<Storage> m_storage;
2018-10-26 12:05:23 +02:00
};