2017-03-02 10:50:31 +01:00
|
|
|
#pragma once
|
2022-01-07 14:47:51 +01:00
|
|
|
#include <memory>
|
2017-03-02 10:50:31 +01:00
|
|
|
|
|
|
|
#include <QObject>
|
|
|
|
#include <QString>
|
|
|
|
|
2022-02-11 20:36:15 +01:00
|
|
|
#include "HyperionConfig.h"
|
|
|
|
|
2017-03-02 10:50:31 +01:00
|
|
|
class SysInfo : public QObject
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
struct HyperionSysInfo
|
|
|
|
{
|
|
|
|
QString kernelType;
|
|
|
|
QString kernelVersion;
|
|
|
|
QString architecture;
|
2020-10-20 20:18:51 +02:00
|
|
|
QString cpuModelName;
|
|
|
|
QString cpuModelType;
|
|
|
|
QString cpuRevision;
|
|
|
|
QString cpuHardware;
|
2017-03-02 10:50:31 +01:00
|
|
|
QString wordSize;
|
2017-03-04 22:17:42 +01:00
|
|
|
QString productType;
|
|
|
|
QString productVersion;
|
|
|
|
QString prettyName;
|
|
|
|
QString hostName;
|
2017-03-21 17:55:46 +01:00
|
|
|
QString domainName;
|
2021-09-15 10:31:56 +02:00
|
|
|
bool isUserAdmin;
|
2020-11-14 16:34:31 +01:00
|
|
|
QString qtVersion;
|
2022-02-11 20:36:15 +01:00
|
|
|
#if defined(ENABLE_EFFECTENGINE)
|
2020-11-14 16:34:31 +01:00
|
|
|
QString pyVersion;
|
2022-02-11 20:36:15 +01:00
|
|
|
#endif
|
2017-03-02 10:50:31 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
static HyperionSysInfo get();
|
|
|
|
|
2021-09-15 10:31:56 +02:00
|
|
|
static bool isUserAdmin();
|
|
|
|
static QString userName();
|
|
|
|
|
2017-03-02 10:50:31 +01:00
|
|
|
private:
|
|
|
|
SysInfo();
|
2020-10-20 20:18:51 +02:00
|
|
|
void getCPUInfo();
|
2017-03-04 22:17:42 +01:00
|
|
|
|
2022-01-07 14:47:51 +01:00
|
|
|
static std::unique_ptr <SysInfo> _instance;
|
2017-03-02 10:50:31 +01:00
|
|
|
|
|
|
|
HyperionSysInfo _sysinfo;
|
|
|
|
};
|