----------------------------------------------------------------------------
| 1077 | } |
| 1078 | //---------------------------------------------------------------------------- |
| 1079 | void ConsoleDebugger::buildCpuListDisplay(void) |
| 1080 | { |
| 1081 | QVBoxLayout *vbox, *vbox1; |
| 1082 | QHBoxLayout *hbox, *hbox1; |
| 1083 | QGridLayout *grid; |
| 1084 | QLabel *lbl; |
| 1085 | QFont cpuFont; |
| 1086 | std::string fontString; |
| 1087 | int fontCharWidth; |
| 1088 | |
| 1089 | g_config->getOption("SDL.DebuggerCpuStatusFont", &fontString); |
| 1090 | |
| 1091 | if ( fontString.size() > 0 ) |
| 1092 | { |
| 1093 | cpuFont.fromString( QString::fromStdString( fontString ) ); |
| 1094 | } |
| 1095 | else |
| 1096 | { |
| 1097 | cpuFont.setFamily("Courier New"); |
| 1098 | cpuFont.setStyle( QFont::StyleNormal ); |
| 1099 | cpuFont.setStyleHint( QFont::Monospace ); |
| 1100 | } |
| 1101 | |
| 1102 | QFontMetrics fm(cpuFont); |
| 1103 | |
| 1104 | fontCharWidth = fm.averageCharWidth(); |
| 1105 | |
| 1106 | vbox = new QVBoxLayout(); |
| 1107 | vbox1 = new QVBoxLayout(); |
| 1108 | hbox1 = new QHBoxLayout(); |
| 1109 | |
| 1110 | cpuFrame = new QFrame(); |
| 1111 | grid = new QGridLayout(); |
| 1112 | |
| 1113 | cpuFrame->setObjectName( tr("debuggerStatusCPU") ); |
| 1114 | cpuFrame->setSizePolicy( QSizePolicy::Maximum, QSizePolicy::Maximum ); |
| 1115 | |
| 1116 | hbox1->addLayout( vbox, 1 ); |
| 1117 | vbox->addLayout( grid ); |
| 1118 | vbox1->addLayout( hbox1, 1 ); |
| 1119 | vbox1->addStretch( 10 ); |
| 1120 | cpuFrame->setLayout( vbox1 ); |
| 1121 | |
| 1122 | hbox = new QHBoxLayout(); |
| 1123 | lbl = new QLabel( tr("PC:") ); |
| 1124 | lbl->setToolTip( tr("Program Counter Register") ); |
| 1125 | pcEntry = new QLineEdit(); |
| 1126 | pcEntry->setFont( cpuFont ); |
| 1127 | pcEntry->setMaxLength( 4 ); |
| 1128 | pcEntry->setInputMask( ">HHHH;0" ); |
| 1129 | pcEntry->setAlignment(Qt::AlignCenter); |
| 1130 | pcEntry->setMinimumWidth( 6 * fontCharWidth ); |
| 1131 | pcEntry->setMaximumWidth( 6 * fontCharWidth ); |
| 1132 | pcEntry->setToolTip( tr("Program Counter Register Hex Value") ); |
| 1133 | hbox->addWidget( lbl ); |
| 1134 | hbox->addWidget( pcEntry, 1, Qt::AlignLeft ); |
| 1135 | grid->addLayout( hbox, 0, 0, Qt::AlignLeft ); |
| 1136 |
nothing calls this directly
no test coverage detected