Mod Machine_info

add send_info_to_debug
Mod get data PC
send to debuger on startup
This commit is contained in:
Simon De Backer
2020-08-13 22:50:58 +02:00
parent da4e31dfcb
commit d5b7414b36
3 changed files with 228 additions and 143 deletions

View File

@@ -19,6 +19,7 @@
#define MACHINE_INFO_H
#include <QObject>
#include <QThread>
/**
@brief The Machine_info class
@@ -32,13 +33,65 @@ public:
int32_t i_max_screen_width();
int32_t i_max_screen_height();
QString compilation_info();
void send_info_to_debug();
signals:
private:
void init_get_Screen_info();
int32_t Max_screen_width;
int32_t Max_screen_height;
void init_get_cpu_info();
void init_get_cpu_info_linux();
void init_get_cpu_info_winnt();
void init_get_cpu_info_macos();
struct Pc
{
struct Screen
{
int32_t count;
int32_t width[10];
int32_t height[10];
int32_t Max_width;
int32_t Max_height;
}screen;
struct Built
{
QString version=
#ifdef __GNUC__
#ifdef __APPLE_CC__
"CLANG " + QString(__clang_version__);
#else
"GCC " + QString(__VERSION__);
#endif
#endif
QString QT=QString(QT_VERSION_STR);
QString date=QString(__DATE__);
QString time=QString(__TIME__);
}built;
struct CPU
{
QString info;
QString Architecture=QString(
QSysInfo::currentCpuArchitecture());
int32_t ThreadCount=QThread::idealThreadCount();
}cpu;
struct RAM
{
QString Total;
QString Available;
}ram;
struct GPU
{
QString info;
QString RAM;
}gpu;
struct OS
{
QString type=QString(QSysInfo::kernelType());
QString name=QString(QSysInfo::prettyProductName());
QString kernel=QString(QSysInfo::kernelVersion());
}os;
}pc;
};