MCPcopy Create free account
hub / github.com/WarmUpTill/SceneSwitcher / LanguageChanged

Method LanguageChanged

plugins/video/macro-condition-video.cpp:893–911  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

891}
892
893void OCREdit::LanguageChanged()
894{
895 GUARD_LOADING_AND_LOCK();
896 if (!_entryData->SetLanguageCode(_languageCode->text().toStdString())) {
897 const QString message(obs_module_text(
898 "AdvSceneSwitcher.condition.video.ocrLanguageNotFound"));
899 const QDir dataDir(QString::fromStdString(
900 _entryData->_ocrParameters.GetTesseractBasePath()));
901 const QString fileName(_languageCode->text() + ".traineddata");
902 DisplayMessage(message.arg(fileName, dataDir.absolutePath()));
903
904 // Reset to previous value
905 const QSignalBlocker b(this);
906 _languageCode->setText(
907 _entryData->_ocrParameters.GetLanguageCode());
908 return;
909 }
910 _previewDialog->OCRParametersChanged(_entryData->_ocrParameters);
911}
912
913void OCREdit::UseConfigChanged(int value)
914{

Callers

nothing calls this directly

Calls 7

obs_module_textFunction · 0.85
GetTesseractBasePathMethod · 0.80
setTextMethod · 0.80
GetLanguageCodeMethod · 0.80
OCRParametersChangedMethod · 0.80
DisplayMessageFunction · 0.50
SetLanguageCodeMethod · 0.45

Tested by

no test coverage detected