MCPcopy Create free account
hub / github.com/TASEmulators/fceux / loadDisplayViews

Method loadDisplayViews

src/drivers/Qt/ConsoleDebugger.cpp:1538–1618  ·  view source on GitHub ↗

----------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

1536}
1537//----------------------------------------------------------------------------
1538void ConsoleDebugger::loadDisplayViews(void)
1539{
1540 char key[128];
1541 QSettings settings;
1542 bool prevStateSaved;
1543
1544 prevStateSaved = settings.value("debugger/prevStateSaved", false).toBool();
1545
1546 if ( !prevStateSaved )
1547 {
1548 setLayoutOption(2);
1549 }
1550
1551 for (int i=0; i<2; i++)
1552 {
1553 for (int j=0; j<4; j++)
1554 {
1555 QString tabListVal;
1556 sprintf( key, "debugger/tabView%i%i", i+1, j+1 );
1557 tabListVal = settings.value(key).toString();
1558
1559 QStringList tabList = tabListVal.split(',');
1560 for (int k=0; k<tabList.size(); k++)
1561 {
1562 if ( tabList[k].size() > 0 )
1563 {
1564 //printf(" %i: %s\n", k, tabList[k].toStdString().c_str() );
1565
1566 if ( tabList[k].compare( cpuFrame->objectName() ) == 0 )
1567 {
1568 tabView[i][j]->addTab( cpuFrame, tr("CPU") );
1569 }
1570 else if ( tabList[k].compare( ppuFrame->objectName() ) == 0 )
1571 {
1572 tabView[i][j]->addTab( ppuFrame, tr("PPU") );
1573 }
1574 else if ( tabList[k].compare( bpFrame->objectName() ) == 0 )
1575 {
1576 tabView[i][j]->addTab( bpFrame, tr("Breakpoints") );
1577 }
1578 else if ( tabList[k].compare( bmFrame->objectName() ) == 0 )
1579 {
1580 tabView[i][j]->addTab( bmFrame, tr("Bookmarks") );
1581 }
1582 }
1583 }
1584 }
1585 }
1586
1587 if ( cpuFrame->parent() == nullptr )
1588 {
1589 tabView[0][0]->addTab( cpuFrame, tr("CPU") );
1590 }
1591 if ( ppuFrame->parent() == nullptr )
1592 {
1593 tabView[0][0]->addTab( ppuFrame, tr("PPU") );
1594 }
1595 if ( bpFrame->parent() == nullptr )

Callers

nothing calls this directly

Calls 5

valueMethod · 0.80
toStringMethod · 0.80
compareMethod · 0.80
trFunction · 0.50
sizeMethod · 0.45

Tested by

no test coverage detected