#include "fm_systeminfo_dialog.h" #if (SYSTEM_INFO_DIALOG) #include #include #include #include #include #include #include #include #include #include #include "../core/rm_player.h" FMSystemInfoDialog::FMSystemInfoDialog(QWidget *parent,Qt::WindowFlags f) : QDialog(parent,f) { setWindowTitle("SYSTEM INFO."); setFixedSize(600,300); _layout = new QVBoxLayout(this); _layout->setAlignment(Qt::AlignTop | Qt::AlignLeft); _layout->setMargin(0); _layout->setSpacing(0); _text = new QPlainTextEdit(this); _text->setReadOnly(true); // color : #00FF00;background-color: #111111;border:1px;border-style:solid;border-color:#313131; _text->setStyleSheet("font-family: Fixedsys;"); _text->setSizePolicy(QSizePolicy::Expanding,QSizePolicy::Expanding); _layout->addWidget(_text); QString message; message += ("DATETIME:" + QDateTime::currentDateTime().toString("yyyy/MM/dd HH:mm:ss") + "\n"); message += ("WINDOWS:" + QSysInfo::prettyProductName() + " (" + QSysInfo::currentCpuArchitecture() + ")\n"); message += ("KERNEL:" + QSysInfo::kernelType() + " VER " + QSysInfo::kernelVersion() + "\n"); QSettings settings("HKEY_LOCAL_MACHINE\\HARDWARE\\DESCRIPTION\\System\\BIOS", QSettings::NativeFormat); message += ("Manufacturer:" + settings.value("SystemManufacturer", "0").toString() + "\n"); message += ("Product:" + settings.value("SystemProductName", "0").toString() + "\n"); //message += ("Product:" + settings.value("BaseBoardProduct", "0").toString() + "\n"); QProcess process_system; QString system_output; QString cpuname = "wmic cpu get name"; process_system.start(cpuname); process_system.waitForFinished(); system_output = process_system.readAllStandardOutput().toUpper(); while(system_output.contains(" ")) { system_output = system_output.replace(" "," "); } message += ("CPU:" + system_output.replace("\n","").replace("\r","") + "\n"); QString gpuname = "wmic PATH Win32_videocontroller get VideoProcessor "; process_system.start(gpuname); process_system.waitForFinished(); system_output = process_system.readAllStandardOutput(); while(system_output.contains(" ")) { system_output = system_output.replace(" "," "); } message += ("GPU:" + system_output.replace("\n","").replace("\r","") + "\n"); message += "Audio Devices:\n"; QList ls = QAudioDeviceInfo::availableDevices(QAudio::AudioOutput); foreach(QAudioDeviceInfo info, ls) { message.append(" " + info.deviceName() + "\n"); //qInfo() << info.deviceName() << __FUNCTION__; } message.append("Main Audio Device:" + QAudioDeviceInfo::defaultOutputDevice().deviceName() + "\n"); message.append("Audio API:" + RMPlayer::instance()->playerF()->audio()->backend() + "\n"); message.append("Audio API Log:" + RMPlayer::instance()->playerF()->audio()->status() + "\n"); QString hash = QCryptographicHash::hash(message.toLocal8Bit(), QCryptographicHash::Md5).toHex(); message.append("MD5:" + hash + "\n"); _text->appendPlainText(message); } #endif // SYSTEM_INFO_DIALOG