File indexing completed on 2024-12-22 04:40:15
0001 /* 0002 SPDX-FileCopyrightText: 2010-2022 Mladen Milinkovic <max@smoothware.net> 0003 0004 SPDX-License-Identifier: GPL-2.0-or-later 0005 */ 0006 0007 #include "pocketsphinxconfigwidget.h" 0008 0009 #include <KLocalizedString> 0010 #include <kio_version.h> 0011 0012 using namespace SubtitleComposer; 0013 0014 PocketSphinxConfigWidget::PocketSphinxConfigWidget(QWidget *parent) 0015 : QWidget(parent) 0016 { 0017 setupUi(this); 0018 #if KIO_VERSION >= QT_VERSION_CHECK(5, 108, 0) 0019 kcfg_lexiconFile->setNameFilters({ 0020 i18n("Sphinx Dictionaries") + QLatin1String(" (*.dict *.dic)"), 0021 i18n("All Files") + QLatin1String(" (*)"), 0022 }); 0023 kcfg_trigramModelFile->setNameFilters({ 0024 i18n("Trigram Models") + QStringLiteral(" (*.lm.bin *.lm)"), 0025 i18n("All Files") + QLatin1String(" (*)"), 0026 }); 0027 #else 0028 kcfg_lexiconFile->setFilter(QLatin1String("*.dict *.dic|") + i18n("Sphinx Dictionaries") + QLatin1String("\n*|") + i18n("All Files")); 0029 kcfg_trigramModelFile->setFilter(QStringLiteral("*.lm.bin *.lm|") + i18n("Trigram Models") + QLatin1String("\n*|") + i18n("All Files")); 0030 #endif 0031 } 0032 0033 PocketSphinxConfigWidget::~PocketSphinxConfigWidget() 0034 { 0035 0036 }