MCPcopy Create free account
hub / github.com/CE-Programming/CEmu / showConfig

Method showConfig

gui/qt/visualizerwidget.cpp:95–196  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

93}
94
95void VisualizerWidget::showConfig() {
96 QDialog *dialog = new QDialog;
97
98 QGridLayout *mlayout = new QGridLayout(dialog);
99 QGridLayout *glayout = new QGridLayout;
100 QHBoxLayout *hlayout = new QHBoxLayout;
101
102 QLabel *baseLbl = new QLabel(tr("Base Address"));
103 QLineEdit *baseEdit = new QLineEdit(int2hex(m_base, 6));
104 QLabel *fpsLbl = new QLabel(QStringLiteral("FPS"));
105 QSpinBox *fpsSpin = new QSpinBox;
106 QLabel *scaleLbl = new QLabel(tr("Scale"));
107 QSpinBox *scaleSpin = new QSpinBox;
108 QLabel *widthLbl = new QLabel(tr("Width"));
109 QSpinBox *widthSpin = new QSpinBox;
110 QLabel *heightLbl = new QLabel(tr("Height"));
111 QSpinBox *heightSpin = new QSpinBox;
112 QLabel *bppLbl = new QLabel(QStringLiteral("BPP"));
113 QComboBox *bppCombo = new QComboBox;
114 QCheckBox *beboChk = new QCheckBox(QStringLiteral("BEBO"));
115 QCheckBox *bepoChk = new QCheckBox(QStringLiteral("BEPO"));
116 QCheckBox *bgrChk = new QCheckBox(QStringLiteral("BGR"));
117 QCheckBox *gridChk = new QCheckBox(tr("Grid"));
118 QPushButton *submitBtn = new QPushButton(tr("Submit"));
119
120 fpsSpin->setRange(0, 120);
121 fpsSpin->setValue(m_fps);
122
123 scaleSpin->setRange(0, 5000);
124 scaleSpin->setValue(m_scale);
125
126 widthSpin->setRange(0, 5000);
127 widthSpin->setValue(m_width);
128
129 heightSpin->setRange(0, 5000);
130 heightSpin->setValue(m_height);
131
132 bepoChk->setChecked(m_control & 0x400 ? true : false);
133 beboChk->setChecked(m_control & 0x200 ? true : false);
134 bgrChk->setChecked(m_control & 0x100 ? true : false);
135 gridChk->setChecked(m_grid);
136
137 bppCombo->addItem(QStringLiteral("1"));
138 bppCombo->addItem(QStringLiteral("2"));
139 bppCombo->addItem(QStringLiteral("4"));
140 bppCombo->addItem(QStringLiteral("8"));
141 bppCombo->addItem(QStringLiteral("16"));
142 bppCombo->addItem(QStringLiteral("24"));
143 bppCombo->addItem(QStringLiteral("16 (5:6:5)"));
144 bppCombo->addItem(QStringLiteral("12 (4:4:4)"));
145
146 bppCombo->setCurrentIndex((m_control >> 1) & 7);
147
148 glayout->addWidget(baseLbl, 0, 0);
149 glayout->addWidget(baseEdit, 0, 1);
150 glayout->addWidget(fpsLbl, 1, 0);
151 glayout->addWidget(fpsSpin, 1, 1);
152 glayout->addWidget(scaleLbl, 2, 0);

Callers

nothing calls this directly

Calls 2

int2hexFunction · 0.85
hex2intFunction · 0.85

Tested by

no test coverage detected