MCPcopy Create free account
hub / github.com/QNapi/qnapi / twEnginesItemChanged

Method twEnginesItemChanged

gui/src/forms/frmoptions.cpp:166–186  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

164}
165
166void frmOptions::twEnginesItemChanged(QTableWidgetItem *item) {
167 bool foundActive = false;
168
169 for (int i = 0; i < ui.twEngines->rowCount(); ++i) {
170 if (!ui.twEngines->item(i, 0)) {
171 return;
172 }
173
174 if (ui.twEngines->item(i, 0)->checkState() == Qt::Checked) {
175 foundActive = true;
176 break;
177 }
178 }
179
180 if (!foundActive) {
181 item->setCheckState(Qt::Checked);
182 QMessageBox::warning(
183 this, tr("Warning"),
184 tr("At least one subtitles engine must remain active!"));
185 }
186}
187
188void frmOptions::pbMoveUpClicked() {
189 int currentRow = ui.twEngines->row(ui.twEngines->selectedItems().at(0));

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected