mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2023-10-10 13:36:59 +02:00
8a785e70c8
* SPI Fix - Free allocated memory in case of invert * Remove development statement * UI updates * Minor corrections * Tpm2net Fix - Free allocated memory * LGTM Finding * Add config directory and user type to SysInfo * WS281x - Ensure that device runs with root priviliges * WS281x - Update DMA defauls as per rpi_ws281x recommendation * Support Sysinfo for Qt < 5.10 * Address LGTM finding
42 lines
676 B
C++
42 lines
676 B
C++
#pragma once
|
|
|
|
#include <QObject>
|
|
#include <QString>
|
|
|
|
class SysInfo : public QObject
|
|
{
|
|
public:
|
|
struct HyperionSysInfo
|
|
{
|
|
QString kernelType;
|
|
QString kernelVersion;
|
|
QString architecture;
|
|
QString cpuModelName;
|
|
QString cpuModelType;
|
|
QString cpuRevision;
|
|
QString cpuHardware;
|
|
QString wordSize;
|
|
QString productType;
|
|
QString productVersion;
|
|
QString prettyName;
|
|
QString hostName;
|
|
QString domainName;
|
|
bool isUserAdmin;
|
|
QString qtVersion;
|
|
QString pyVersion;
|
|
};
|
|
|
|
static HyperionSysInfo get();
|
|
|
|
static bool isUserAdmin();
|
|
static QString userName();
|
|
|
|
private:
|
|
SysInfo();
|
|
void getCPUInfo();
|
|
|
|
static SysInfo* _instance;
|
|
|
|
HyperionSysInfo _sysinfo;
|
|
};
|