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

Method updateState

src/settingseditor.cpp:355–373  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

353}
354
355void SettingsEditor::updateState()
356{
357 Settings settings;
358 settings.setPortable(ui->portable->isChecked());
359 ui->tessdataPath->setText(settings.tessdataPath);
360 ui->translatorsPath->setText(settings.translatorsPath);
361 ui->hunspellDir->setText(settings.hunspellPath);
362
363 updateModels();
364 updateTranslators(enabledTranslators());
365 validateSettings();
366 updateCurrentPage();
367
368 const auto portableChanged = wasPortable_ != settings.isPortable();
369 ui->pageUpdate->setEnabled(!portableChanged);
370 ui->pageUpdate->setToolTip(portableChanged
371 ? tr("Portable changed. Apply settings first")
372 : QString());
373}
374
375void SettingsEditor::updateCurrentPage()
376{

Callers

nothing calls this directly

Calls 4

setPortableMethod · 0.80
isPortableMethod · 0.80
setEnabledMethod · 0.80
QStringClass · 0.70

Tested by

no test coverage detected