MCPcopy Create free account
hub / github.com/OneMoreGres/ScreenTranslator / updateCurrentPage

Method updateCurrentPage

src/settingseditor.cpp:375–394  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

373}
374
375void SettingsEditor::updateCurrentPage()
376{
377 const auto row = ui->pagesList->currentIndex().row();
378
379 const auto description = pageModel_->index(row, int(PageColumn::Description));
380 ui->pageInfoLabel->setText(description.data().toString());
381 ui->pageInfoLabel->setVisible(!ui->pageInfoLabel->text().isEmpty());
382
383 const auto error = pageModel_->index(row, int(PageColumn::Error));
384 ui->pageErrorLabel->setText(error.data().toString());
385 ui->pageErrorLabel->setVisible(!ui->pageErrorLabel->text().isEmpty());
386
387 ui->pagesView->setCurrentIndex(row);
388
389 if (ui->pagesView->currentWidget() != ui->pageUpdate)
390 return;
391
392 if (ui->updatesView->model()->rowCount() == 0)
393 updater_.checkForUpdates();
394}
395
396void SettingsEditor::updateTranslators(const QStringList &translators)
397{

Callers

nothing calls this directly

Calls 5

toStringMethod · 0.80
dataMethod · 0.80
rowCountMethod · 0.80
checkForUpdatesMethod · 0.80
indexMethod · 0.45

Tested by

no test coverage detected