56 #include <common/glew_wrappers.hh> 72 #include <sys/types.h> 73 #include <sys/sysctl.h> 78 #define GPU_MEMORY_INFO_TOTAL_AVAILABLE_MEMORY_NVX 0x9048 79 #define GPU_MEMORY_INFO_CURRENT_AVAILABLE_VIDMEM_NVX 0x9049 89 if ( OpenFlipper::Options::nogui() )
99 QTextEdit* tmp =
new QTextEdit();
100 tmp->insertHtml( it.value() );
101 tmp->setReadOnly(
true);
110 QFont standardFont =
aboutWidget_->OpenFlipperAbout->currentFont();
111 QFont boldFont = standardFont;
112 boldFont.setBold(
true);
114 aboutWidget_->OpenFlipperAbout->setCurrentFont(boldFont);
115 aboutWidget_->OpenFlipperAbout->append(tr(
"%1 Core Version: %2",
"PRODUCT_NAME Core Version:").arg(
TOSTRING(PRODUCT_NAME)).arg(OpenFlipper::Options::coreVersion()) ) ;
116 aboutWidget_->OpenFlipperAbout->setCurrentFont(standardFont);
122 aboutWidget_->OpenFlipperAbout->setCurrentFont(boldFont);
124 aboutWidget_->OpenFlipperAbout->setCurrentFont(standardFont);
127 QDir tempDir = QDir(OpenFlipper::Options::applicationDir());
128 #ifdef OPENFLIPPER_DATADIR 129 tempDir.cd(OPENFLIPPER_DATADIR);
131 aboutWidget_->OpenFlipperAbout->append(
"Data:\t " + tempDir.absolutePath() );
132 aboutWidget_->OpenFlipperAbout->append(
"Shaders:\t " + OpenFlipper::Options::shaderDirStr() );
133 aboutWidget_->OpenFlipperAbout->append(
"Textures:\t " + OpenFlipper::Options::textureDirStr() );
134 aboutWidget_->OpenFlipperAbout->append(
"Scripts:\t " + OpenFlipper::Options::scriptDirStr() );
135 aboutWidget_->OpenFlipperAbout->append(
"Icons:\t " + OpenFlipper::Options::iconDirStr() );
136 aboutWidget_->OpenFlipperAbout->append(
"Fonts:\t" + OpenFlipper::Options::fontsDirStr() );
137 aboutWidget_->OpenFlipperAbout->append(
"Help:\t" + OpenFlipper::Options::helpDirStr() );
144 aboutWidget_->OpenFlipperAbout->setCurrentFont(boldFont);
145 aboutWidget_->OpenFlipperAbout->append(tr(
"%1 configuration files:").arg(
TOSTRING(PRODUCT_NAME)));
146 aboutWidget_->OpenFlipperAbout->setCurrentFont(standardFont);
148 aboutWidget_->OpenFlipperAbout->append(tr(
"ConfigDir:\t\t\t") + OpenFlipper::Options::configDirStr() );
149 aboutWidget_->OpenFlipperAbout->append(tr(
"Window states:\t\t") + OpenFlipper::Options::configDirStr() + OpenFlipper::Options::dirSeparator() +
"WindowStates.dat");
152 aboutWidget_->OpenFlipperAbout->append(tr(
"Additional option files:"));
153 for (
int i = 0 ; i < OpenFlipper::Options::optionFiles().size() ; ++i)
154 aboutWidget_->OpenFlipperAbout->append(OpenFlipper::Options::optionFiles()[i]);
163 aboutWidget_->OpenFlipperAbout->setCurrentFont(boldFont);
164 aboutWidget_->OpenFlipperAbout->append(tr(
"Memory Information:"));
165 aboutWidget_->OpenFlipperAbout->setCurrentFont(standardFont);
173 ms.dwLength =
sizeof (ms);
176 GlobalMemoryStatusEx(&ms);
179 aboutWidget_->OpenFlipperAbout->append(tr(
"Physical Memory:\t")+ QString::number(ms.ullAvailPhys/1024/1024) +
"MB/"+
180 QString::number(ms.ullTotalPhys/1024/1024) +
"MB free ("+
181 QString::number(ms.dwMemoryLoad) +
"%)");
182 aboutWidget_->OpenFlipperAbout->append(tr(
"Pagefile Memory:\t")+ QString::number(ms.ullAvailPageFile/1024/1024) +
"MB/" 183 + QString::number(ms.ullTotalPageFile/1024/1024) +
"MB free");
186 #elif defined ARCH_DARWIN 188 aboutWidget_->OpenFlipperAbout->append(tr(
"Not available for this platform (MacOS)"));
192 unsigned long memory = 0;
194 struct mallinfo info;
198 memory += info.hblkhd;
201 memory += info.uordblks;
203 double mmapAllocated = double(info.hblkhd ) / 1024 / 1024;
204 double sbrkAllocated = double(info.uordblks) / 1024 / 1024;
205 double totalAllocated = double(memory) / 1024 / 1024;
207 double pageSize = double(getpagesize()) /1024 ;
208 double availablePages = double( sysconf (_SC_AVPHYS_PAGES) );
209 double freeMem = availablePages * pageSize / 1024;
211 aboutWidget_->OpenFlipperAbout->append(tr(
"Total Memory allocated:\t ") + QString::number(totalAllocated,
'f' ,2 ) + tr(
"MB ")
212 + tr(
"( mmap: ") + QString::number(mmapAllocated ,
'f' ,2 ) + tr(
"MB")
213 + tr(
", sbrk: ") + QString::number(sbrkAllocated ,
'f' ,2 ) + tr(
"MB )") );
215 aboutWidget_->OpenFlipperAbout->append(tr(
"Free Memory:\t\t ") + QString::number(freeMem,
'f' ,2 ) + tr(
"MB ")
216 + tr(
"(") + QString::number(availablePages,
'f' ,0 ) + tr(
" pages of ")
217 + QString::number(pageSize,
'f' ,2 ) + tr(
"KB size)"));
225 aboutWidget_->OpenFlipperAbout->setCurrentFont(boldFont);
226 aboutWidget_->OpenFlipperAbout->append(tr(
"CPU Information:"));
227 aboutWidget_->OpenFlipperAbout->setCurrentFont(standardFont);
231 QSettings registryCPU(
"HKEY_LOCAL_MACHINE\\HARDWARE\\DESCRIPTION\\System\\CentralProcessor", QSettings::NativeFormat);
233 QStringList cpus = registryCPU.childGroups();
234 if ( cpus.size() != 0 ) {
236 aboutWidget_->OpenFlipperAbout->append(tr(
"CPU vendor:\t\t ") +
237 registryCPU.value( cpus[0]+
"/VendorIdentifier",
"Unknown" ).toString() );
238 aboutWidget_->OpenFlipperAbout->append(tr(
"CPU model:\t\t ") +
239 registryCPU.value( cpus[0]+
"/ProcessorNameString",
"Unknown" ).toString() );
240 aboutWidget_->OpenFlipperAbout->append(tr(
"CPU identifier:\t\t ") +
241 registryCPU.value( cpus[0]+
"/Identifier",
"Unknown" ).toString() );
242 aboutWidget_->OpenFlipperAbout->append(tr(
"CPU Speed:\t\t ") +
243 registryCPU.value( cpus[0]+
"/~MHz",
"Unknown" ).toString()+
" MHz" );
245 aboutWidget_->OpenFlipperAbout->append(
"CPU Cores:\t\t " + QString::number(cpus.size()));
248 aboutWidget_->OpenFlipperAbout->append(tr(
"Unable to retrieve CPU information"));
251 #elif defined ARCH_DARWIN 258 sysctlbyname(
"machdep.cpu.brand_string", NULL, &lenCPU, NULL, 0);
261 pCPU = (
char * )malloc(lenCPU);
264 sysctlbyname(
"machdep.cpu.brand_string", pCPU, &lenCPU, NULL, 0);
267 aboutWidget_->OpenFlipperAbout->append(tr(
"CPU Brand:\t\t ") + QString(pCPU) );
272 int physicalCPUS = 0;
275 lenCPU =
sizeof(int);
276 sysctlbyname(
"hw.physicalcpu", &physicalCPUS, &lenCPU , NULL, 0);
279 aboutWidget_->OpenFlipperAbout->append(tr(
"Physical Cores:\t\t ") + QString::number(physicalCPUS) );
284 lenCPU =
sizeof(int);
285 sysctlbyname(
"hw.logicalcpu", &logicalCPUS, &lenCPU, NULL, 0);
288 aboutWidget_->OpenFlipperAbout->append(tr(
"LogicalCores:\t\t ") + QString::number(logicalCPUS) );
291 QFile cpuinfo(
"/proc/cpuinfo");
292 if (! cpuinfo.exists() )
293 aboutWidget_->OpenFlipperAbout->append(tr(
"Unable to retrieve CPU information"));
296 cpuinfo.open(QFile::ReadOnly);
297 QTextStream stream(&cpuinfo);
298 QStringList splitted = stream.readAll().split(
"\n",QString::SkipEmptyParts);
300 int position = splitted.indexOf ( QRegExp(
"^vendor_id.*") );
301 if ( position != -1 ){
302 QString cpuVendor = splitted[position].section(
':', -1).simplified();
303 aboutWidget_->OpenFlipperAbout->append(tr(
"CPU vendor:\t\t ") + cpuVendor );
305 aboutWidget_->OpenFlipperAbout->append(tr(
"CPU vendor:\t\t vendor specification not found"));
308 position = splitted.indexOf ( QRegExp(
"^model name.*") );
309 if ( position != -1 ){
310 QString cpuModel = splitted[position].section(
':', -1).simplified();
311 aboutWidget_->OpenFlipperAbout->append(tr(
"CPU model:\t\t ") + cpuModel );
313 aboutWidget_->OpenFlipperAbout->append(tr(
"CPU model:\t\t Model specification not found"));
316 position = splitted.indexOf ( QRegExp(
"^cpu cores.*") );
317 if ( position != -1 ){
318 QString cpuCoresPhysical = splitted[position].section(
':', -1).simplified();
319 aboutWidget_->OpenFlipperAbout->append(tr(
"Physical CPU cores:\t\t ") + cpuCoresPhysical );
321 aboutWidget_->OpenFlipperAbout->append(tr(
"Physical CPU cores:\t\t CPU Core specification not found"));
324 position = splitted.indexOf ( QRegExp(
"^siblings.*") );
325 if ( position != -1 ){
326 QString cpuCoresLogical = splitted[position].section(
':', -1).simplified();
327 aboutWidget_->OpenFlipperAbout->append(tr(
"Logical CPU cores:\t\t ") + cpuCoresLogical );
329 aboutWidget_->OpenFlipperAbout->append(tr(
"Logical CPU cores:\t\t CPU Core specification not found"));
332 position = splitted.indexOf ( QRegExp(
"^flags.*") );
333 if ( position != -1 ){
334 QString cpuFlags = splitted[position].section(
':', -1).simplified();
335 aboutWidget_->OpenFlipperAbout->append( tr(
"CPU capabilities:") );
338 aboutWidget_->OpenFlipperAbout->append(tr(
"CPU capabilities:\t\t CPU flag specification not found"));
341 #if Q_BYTE_ORDER == Q_BIG_ENDIAN 342 aboutWidget_->OpenFlipperAbout->append(tr(
"System is Big Endian"));
345 #if Q_BYTE_ORDER == Q_LITTLE_ENDIAN 346 aboutWidget_->OpenFlipperAbout->append(tr(
"System is Little Endian"));
357 aboutWidget_->OpenFlipperAbout->setCurrentFont(boldFont);
358 aboutWidget_->OpenFlipperAbout->append(tr(
"Operating System Info:"));
359 aboutWidget_->OpenFlipperAbout->setCurrentFont(standardFont);
362 QSettings registryOS(
"HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion", QSettings::NativeFormat);
363 aboutWidget_->OpenFlipperAbout->append(tr(
"Product Name:\t\t ") +
364 registryOS.value(
"ProductName",
"Unknown" ).toString() );
365 aboutWidget_->OpenFlipperAbout->append(tr(
"Current Version:\t\t ") +
366 registryOS.value(
"CurrentVersion",
"Unknown" ).toString() );
367 #elif defined ARCH_DARWIN 374 mib[1] = KERN_VERSION;
376 sysctl(mib, 2, NULL, &len, NULL, 0);
377 p = (
char * )malloc(len);
378 sysctl(mib, 2, p, &len, NULL, 0);
380 aboutWidget_->OpenFlipperAbout->append(tr(
"OS Version:\t\t ") + QString(p) );
385 QFile versionInfo(
"/proc/version");
386 if (! versionInfo.exists() )
387 aboutWidget_->OpenFlipperAbout->append(tr(
"Unable to retrieve Kernel information"));
389 versionInfo.open(QFile::ReadOnly);
390 QTextStream versionStream(&versionInfo);
391 aboutWidget_->OpenFlipperAbout->append(tr(
"Kernel Version:\t\t ") + versionStream.readAll().simplified());
393 QString program =
"/usr/bin/lsb_release";
396 if ( lsb.exists() ) {
397 QStringList arguments;
401 myProcess.start(program, arguments);
403 if ( myProcess.waitForFinished ( 4000 ) ) {
404 QStringList outputLSB = QString(myProcess.readAllStandardOutput()).split(
'\n');
407 int position = outputLSB.indexOf ( QRegExp(
"^Distributor ID.*") );
408 if ( position != -1 ){
409 QString distributorID = outputLSB[position].section(
':', -1).simplified();
410 aboutWidget_->OpenFlipperAbout->append(tr(
"Distributor ID:\t\t ") + distributorID );
412 aboutWidget_->OpenFlipperAbout->append(tr(
"Distributor ID:\t\t Unknown"));
415 position = outputLSB.indexOf ( QRegExp(
"^Description.*") );
416 if ( position != -1 ){
417 QString description = outputLSB[position].section(
':', -1).simplified();
418 aboutWidget_->OpenFlipperAbout->append(tr(
"Description:\t\t ") + description );
420 aboutWidget_->OpenFlipperAbout->append(tr(
"Description:\t\t Unknown"));
423 position = outputLSB.indexOf ( QRegExp(
"^Release.*") );
424 if ( position != -1 ){
425 QString release = outputLSB[position].section(
':', -1).simplified();
426 aboutWidget_->OpenFlipperAbout->append(tr(
"Release number:\t\t ") + release );
428 aboutWidget_->OpenFlipperAbout->append(tr(
"Release number:\t\t Unknown"));
431 position = outputLSB.indexOf ( QRegExp(
"^Codename.*") );
432 if ( position != -1 ){
433 QString codename = outputLSB[position].section(
':', -1).simplified();
434 aboutWidget_->OpenFlipperAbout->append(tr(
"Codename:\t\t ") + codename );
436 aboutWidget_->OpenFlipperAbout->append(tr(
"Codename:\t\t Unknown"));
440 aboutWidget_->OpenFlipperAbout->append(tr(
"Unable to get LSB info"));
444 aboutWidget_->OpenFlipperAbout->append(tr(
"No additional information. Unable to get info via LSB."));
450 QString systemPathVariable = getenv(
"PATH");
451 aboutWidget_->OpenFlipperAbout->append(tr(
"System Path:\n ") + systemPathVariable);
454 QString systemLibraryPathVariable = getenv(
"LD_LIBRARY_PATH");
455 aboutWidget_->OpenFlipperAbout->append(tr(
"LD_LIBRARY_PATH:\n ") + systemLibraryPathVariable);
464 aboutWidget_->OpenFlipperAbout->setCurrentFont(boldFont);
465 aboutWidget_->OpenFlipperAbout->append(tr(
"OpenGL Specific Info:"));
466 aboutWidget_->OpenFlipperAbout->setCurrentFont(standardFont);
468 QString vendor = QString((
const char*)glGetString(GL_VENDOR));
469 aboutWidget_->OpenFlipperAbout->append(tr(
"Qt reports Vendor:\t\t") + vendor);
470 QString renderer = QString((
const char*)glGetString(GL_RENDERER));
471 aboutWidget_->OpenFlipperAbout->append(tr(
"Qt reports Renderer:\t\t") + renderer);
473 QGLFormat::OpenGLVersionFlags flags = QGLFormat::openGLVersionFlags();
475 QString openGLQtVersion = tr(
"Qt reports Version:\t\t");
477 if ( flags.testFlag(QGLFormat::OpenGL_Version_4_0) )
478 openGLQtVersion += tr(
"4.0 or higher") ;
479 else if (flags.testFlag(QGLFormat::OpenGL_Version_3_3))
480 openGLQtVersion += tr(
"3.3") ;
481 else if (flags.testFlag(QGLFormat::OpenGL_Version_3_2))
482 openGLQtVersion += tr(
"3.2") ;
483 else if (flags.testFlag(QGLFormat::OpenGL_Version_3_1))
484 openGLQtVersion += tr(
"3.1") ;
485 else if (flags.testFlag(QGLFormat::OpenGL_Version_3_0))
486 openGLQtVersion += tr(
"3.0") ;
487 else if (flags.testFlag(QGLFormat::OpenGL_Version_2_1))
488 openGLQtVersion += tr(
"2.1" );
489 else if (flags.testFlag(QGLFormat::OpenGL_Version_2_0))
490 openGLQtVersion += tr(
"2.0" );
491 else if (flags.testFlag(QGLFormat::OpenGL_Version_1_5))
492 openGLQtVersion += tr(
"1.5" );
493 else if (flags.testFlag(QGLFormat::OpenGL_Version_1_4))
494 openGLQtVersion += tr(
"1.4" );
495 else if (flags.testFlag(QGLFormat::OpenGL_Version_1_3))
496 openGLQtVersion += tr(
"1.3" );
497 else if (flags.testFlag(QGLFormat::OpenGL_Version_1_2))
498 openGLQtVersion += tr(
"1.2" );
499 else if (flags.testFlag(QGLFormat::OpenGL_Version_1_1))
500 openGLQtVersion += tr(
"1.1" );
502 openGLQtVersion += tr(
"Version:\tUNKNOWN!" );
504 aboutWidget_->OpenFlipperAbout->append(openGLQtVersion);
508 const QGLContext* context = QGLContext::currentContext();
510 QString openGLprofile = tr(
"Qt reports the OpenGL profile:\t");
511 QGLFormat::OpenGLContextProfile profile = context->format().profile();
512 if (profile == QGLFormat::NoProfile)
513 openGLprofile += tr(
"no profile");
514 else if (profile == QGLFormat::CoreProfile)
515 openGLprofile += tr(
"Core profile");
516 else if (profile == QGLFormat::CompatibilityProfile)
517 openGLprofile += tr(
"Compatibility profile");
519 openGLprofile += tr(
"unknown profile");
526 QString openGLVendor = tr(
"GL reports Vendor:\t\t");
527 openGLVendor += QString((
const char*)glGetString(GL_VENDOR));
530 QString openGLRenderer = tr(
"GL reports Renderer:\t\t");
531 openGLRenderer += QString((
const char*)glGetString(GL_RENDERER));
534 QString openGLGLVersion = tr(
"GL reports Version:\t\t");
535 openGLGLVersion += QString((
const char*)glGetString(GL_VERSION));
536 aboutWidget_->OpenFlipperAbout->append(openGLGLVersion);
538 QString openGLShadingLanguageVersion = tr(
"GL reports Shading Language Version:\t");
539 openGLShadingLanguageVersion += QString((
const char*)glGetString(GL_SHADING_LANGUAGE_VERSION));
540 aboutWidget_->OpenFlipperAbout->append(openGLShadingLanguageVersion);
547 aboutWidget_->OpenFlipperAbout->append(tr(
"Supported Extensions:"));
556 aboutWidget_->OpenFlipperAbout->setCurrentFont(boldFont);
557 aboutWidget_->OpenFlipperAbout->append(tr(
"OpenGL Values:"));
558 aboutWidget_->OpenFlipperAbout->setCurrentFont(standardFont);
560 glGetIntegerv(GL_MAX_VIEWPORT_DIMS, &getBuffer[0] );
561 aboutWidget_->OpenFlipperAbout->append(tr(
"Maximal Viewport size(GL_MAX_VIEWPORT_DIMS):\t\t\t\t ") + QString::number(getBuffer[0]) +
"x" + QString::number(getBuffer[1]) );
563 glGetIntegerv(GL_MAX_TEXTURE_IMAGE_UNITS, &getBuffer[0] );
564 aboutWidget_->OpenFlipperAbout->append(tr(
"Maximum supported texture image units(GL_MAX_TEXTURE_IMAGE_UNITS):\t") + QString::number(getBuffer[0]) );
567 if ( glExtensions.contains(
"GL_NVX_gpu_memory_info") ) {
569 GLint total_mem_kb = 0;
570 glGetIntegerv(GPU_MEMORY_INFO_TOTAL_AVAILABLE_MEMORY_NVX, &total_mem_kb);
572 aboutWidget_->OpenFlipperAbout->append(tr(
"GPU Memory (Total available):\t\t") + QString::number(total_mem_kb /1024) +
" MB" );
575 GLint cur_avail_mem_kb = 0;
576 glGetIntegerv(GPU_MEMORY_INFO_CURRENT_AVAILABLE_VIDMEM_NVX, &cur_avail_mem_kb);
578 aboutWidget_->OpenFlipperAbout->append(tr(
"GPU Memory (Currently available):\t") + QString::number(cur_avail_mem_kb / 1024) +
" MB" );
583 aboutWidget_->OpenFlipperAbout->moveCursor(QTextCursor::Start);
590 aboutWidget_->OpenFlipperAbout->setCurrentFont(boldFont);
591 aboutWidget_->OpenFlipperAbout->append(tr(
"GLEW Specific Info:"));
592 aboutWidget_->OpenFlipperAbout->setCurrentFont(standardFont);
594 QString glewVersion = QString(getGlewVersion());
595 aboutWidget_->OpenFlipperAbout->append(tr(
"GLEW Version:\t") + glewVersion);
603 aboutWidget_->OpenFlipperAbout->setCurrentFont(boldFont);
604 aboutWidget_->OpenFlipperAbout->append(tr(
"Qt Version Info:"));
605 aboutWidget_->OpenFlipperAbout->setCurrentFont(standardFont);
606 aboutWidget_->OpenFlipperAbout->append(tr(
"Currently used Version:\t") + qVersion() );
607 aboutWidget_->OpenFlipperAbout->append(tr(
"Link time Version:\t\t") + QT_VERSION_STR );
609 QList<QByteArray> imageFormats = QImageReader::supportedImageFormats();
610 QString formatsString =
"";
611 for (
int i = 0 ; i < imageFormats.size() ; ++i) {
612 formatsString += imageFormats[i] +
" ";
614 if ( (i != 0) && (i % 15) == 0 )
615 formatsString+=
"\n";
618 aboutWidget_->OpenFlipperAbout->append(tr(
"Supported image read formats:") );
623 aboutWidget_->OpenFlipperAbout->append(tr(
"Currently used Library paths:") );
624 QStringList libPaths = QCoreApplication::libraryPaths();
625 for(
int i = 0 ; i < libPaths.size() ; ++i)
626 aboutWidget_->OpenFlipperAbout->append(
" " + libPaths[i]);
649 aboutWidget_->OpenFlipperAbout->setCurrentFont(boldFont);
650 aboutWidget_->OpenFlipperAbout->append(tr(
"Compiler Info:"));
651 aboutWidget_->OpenFlipperAbout->setCurrentFont(standardFont);
652 aboutWidget_->OpenFlipperAbout->append( OpenFlipper::Options::compilerInfo() );
658 definitions +=
"WIN32 ";
662 definitions +=
"WIN64 ";
666 definitions +=
"DLL ";
671 definitions +=
"APPLE ";
675 definitions +=
"ARCH_DARWIN ";
678 #ifdef INCLUDE_TEMPLATES 679 definitions +=
"INCLUDE_TEMPLATES ";
683 definitions +=
"DEBUG ";
687 definitions +=
"NDEBUG ";
691 definitions +=
"QT_NO_OPENGL ";
695 definitions +=
"OPENMP ";
699 definitions +=
"USE_OPENMP ";
702 aboutWidget_->OpenFlipperAbout->append( tr(
"Definitions (incomplete):\n") + definitions );
708 aboutWidget_->OpenFlipperAbout->setCurrentFont(boldFont);
709 aboutWidget_->OpenFlipperAbout->append(tr(
"Registered data types:"));
710 aboutWidget_->OpenFlipperAbout->setCurrentFont(standardFont);
718 for ( uint i = 0 ; i <
typeCount() - 2 ; ++i) {
719 types +=
typeName( currentType ) +
"\t\t typeId: " + QString::number(currentType.
value()) +
"\n";
731 aboutWidget_->OpenFlipperAbout->setCurrentFont(boldFont);
732 aboutWidget_->OpenFlipperAbout->append(tr(
"Registered File Plugins:"));
733 aboutWidget_->OpenFlipperAbout->setCurrentFont(standardFont);
735 for ( uint i = 0 ; i < supportedTypes().size() ; ++i ) {
736 aboutWidget_->OpenFlipperAbout->setCurrentFont(boldFont);
737 aboutWidget_->OpenFlipperAbout->append(
"\t" + supportedTypes()[i].name );
738 aboutWidget_->OpenFlipperAbout->setCurrentFont(standardFont);
739 aboutWidget_->OpenFlipperAbout->append(
"\t\t Load: " + supportedTypes()[i].loadFilters );
740 aboutWidget_->OpenFlipperAbout->append(
"\t\t Save: " + supportedTypes()[i].saveFilters );
748 aboutWidget_->OpenFlipperAbout->setCurrentFont(boldFont);
749 aboutWidget_->OpenFlipperAbout->append(tr(
"Loaded Plugins:"));
750 aboutWidget_->OpenFlipperAbout->setCurrentFont(standardFont);
752 for ( uint i = 0 ; i <
plugins().size() ; ++i ) {
753 aboutWidget_->OpenFlipperAbout->setCurrentFont(boldFont);
755 aboutWidget_->OpenFlipperAbout->setCurrentFont(standardFont);
757 aboutWidget_->OpenFlipperAbout->append(
"\t\t Description: \t" +
plugins()[i].description );
760 if ( !
plugins()[i].warnings.isEmpty() ) {
761 aboutWidget_->OpenFlipperAbout->setTextColor(Qt::darkYellow);
763 aboutWidget_->OpenFlipperAbout->setTextColor(Qt::black);
766 if ( !
plugins()[i].errors.isEmpty() ) {
767 aboutWidget_->OpenFlipperAbout->setTextColor(Qt::darkRed);
769 aboutWidget_->OpenFlipperAbout->setTextColor(Qt::black);
777 aboutWidget_->OpenFlipperAbout->setCurrentFont(boldFont);
778 aboutWidget_->OpenFlipperAbout->append(tr(
"Failed Plugins:"));
779 aboutWidget_->OpenFlipperAbout->setCurrentFont(standardFont);
781 for (
unsigned i = 0 ; i < PluginStorage::pluginsFailed().size() ; ++i ) {
782 aboutWidget_->OpenFlipperAbout->setCurrentFont(boldFont);
783 aboutWidget_->OpenFlipperAbout->append(
"\t" + PluginStorage::pluginsFailed()[i].name );
784 aboutWidget_->OpenFlipperAbout->setCurrentFont(standardFont);
785 aboutWidget_->OpenFlipperAbout->append(
"\t\t Version: \t\t" + PluginStorage::pluginsFailed()[i].version );
786 aboutWidget_->OpenFlipperAbout->append(
"\t\t Description: \t" + PluginStorage::pluginsFailed()[i].description );
787 aboutWidget_->OpenFlipperAbout->append(
"\t\t Path \t\t" + PluginStorage::pluginsFailed()[i].path );
789 if ( !PluginStorage::pluginsFailed()[i].warnings.isEmpty() ) {
790 aboutWidget_->OpenFlipperAbout->setTextColor(Qt::darkYellow);
791 aboutWidget_->OpenFlipperAbout->append(
"\t\t Warnings: \t\t" + PluginStorage::pluginsFailed()[i].warnings );
792 aboutWidget_->OpenFlipperAbout->setTextColor(Qt::black);
795 if ( !PluginStorage::pluginsFailed()[i].errors.isEmpty() ) {
796 aboutWidget_->OpenFlipperAbout->setTextColor(Qt::darkRed);
797 aboutWidget_->OpenFlipperAbout->append(
"\t\t Errors: \t\t" + PluginStorage::pluginsFailed()[i].errors );
798 aboutWidget_->OpenFlipperAbout->setTextColor(Qt::black);
811 aboutWidget_->OpenFlipperAbout->setCurrentFont(boldFont);
812 aboutWidget_->OpenFlipperAbout->append(tr(
"Currently loaded Resources (e.g. by qrc files):"));
813 aboutWidget_->OpenFlipperAbout->setCurrentFont(standardFont);
815 QDir toplevelResources(
":/");
816 for (
auto str : toplevelResources.entryList() ) {
819 QDir firstLevel(
":/" + str);
820 for (
auto firstLevelStr : firstLevel.entryList() ) {
821 aboutWidget_->OpenFlipperAbout->append(
" \t" + firstLevelStr);
823 QDir secondLevel(
":/" + str +
"/" + firstLevelStr);
825 for (
auto secondLevelStr : secondLevel.entryList() ) {
826 aboutWidget_->OpenFlipperAbout->append(
" \t\t" + secondLevelStr);
DLLEXPORT OpenFlipperQSettings & OpenFlipperSettings()
QSettings object containing all program settings of OpenFlipper.
DLLEXPORT QString typeName(DataType _id)
Get the name of a type with given id.
void showAboutWidget()
Display the about widget.
AboutWidget * aboutWidget_
Pointer to the about widget.
QMap< QString, QString > additionalAboutTabs_
Additional tab information, that could be provided by plugins.
std::vector< PluginInfo > & plugins()
Convenient way to access plugin list.
DLLEXPORT size_t typeCount()
Get the number of registered types.
void addAboutInfo(QString _text, QString _tabName)
Adds an entry to the about dialog.
#define TOSTRING(x)
QSettings object containing all program settings of OpenFlipper.
unsigned int value() const
std::string getExtensionString()
getExtensionString returns a string containing all supported OpenGL extensions this function uses the...