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

Method setAsicValidRevisions

gui/qt/settings.cpp:1009–1028  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1007}
1008
1009void MainWindow::setAsicValidRevisions() {
1010 QStandardItemModel* itemModel = qobject_cast<QStandardItemModel*>(ui->comboBoxAsicRev->model());
1011 assert(itemModel);
1012
1013 bool allowAnyRev = ui->checkAllowAnyRev->isChecked();
1014 int row = 1;
1015 for (int rev : m_supportedRevs) {
1016 while (row < rev) {
1017 itemModel->item(row++)->setEnabled(allowAnyRev);
1018 }
1019 itemModel->item(row++)->setEnabled(true);
1020 }
1021 while (row < itemModel->rowCount()) {
1022 itemModel->item(row++)->setEnabled(allowAnyRev);
1023 }
1024
1025 if (!itemModel->item(ui->comboBoxAsicRev->currentIndex())->isEnabled()) {
1026 ui->comboBoxAsicRev->setCurrentIndex(0);
1027 }
1028}
1029
1030void MainWindow::setAsicRevision(int index) {
1031 emu.setAsicRev(index);

Callers

nothing calls this directly

Calls 1

rowCountMethod · 0.80

Tested by

no test coverage detected