File indexing completed on 2025-04-27 03:58:40
0001 /* ============================================================ 0002 * 0003 * This file is a part of digiKam project 0004 * https://www.digikam.org 0005 * 0006 * Date : 2023-08-16 0007 * Description : Spell-check and localize Settings Container. 0008 * 0009 * SPDX-FileCopyrightText: 2021-2024 by Gilles Caulier <caulier dot gilles at gmail dot com> 0010 * 0011 * SPDX-License-Identifier: GPL-2.0-or-later 0012 * 0013 * ============================================================ */ 0014 0015 #ifndef DIGIKAM_LOCALIZE_CONTAINER_H 0016 #define DIGIKAM_LOCALIZE_CONTAINER_H 0017 0018 // Qt includes 0019 0020 #include <QDebug> 0021 #include <QStringList> 0022 0023 // Local includes 0024 0025 #include "digikam_export.h" 0026 #include "donlinetranslator.h" 0027 0028 class KConfigGroup; 0029 0030 namespace Digikam 0031 { 0032 0033 /** 0034 * The class LocalizeContainer encapsulates all spell-check and localize related settings. 0035 */ 0036 class DIGIKAM_EXPORT LocalizeContainer 0037 { 0038 public: 0039 0040 explicit LocalizeContainer(); 0041 ~LocalizeContainer(); 0042 0043 public: 0044 0045 void readFromConfig(KConfigGroup& group); 0046 void writeToConfig(KConfigGroup& group) const; 0047 0048 public: 0049 0050 // SpellCheck settings 0051 bool enableSpellCheck; ///< Enable spell-checking feature. 0052 QString defaultLanguage; ///> Default language code to use with x-default (empty for auto-detection). 0053 QStringList ignoredWords; ///< Words to ignore with spell-checking. 0054 0055 // Localize settings 0056 DOnlineTranslator::Engine translatorEngine; ///< Online translator to use. 0057 QStringList translatorLang; ///< List of langues to use with Online translator. 0058 QStringList alternativeLang; ///< List of langges to use with Alternative Languages Text editor. 0059 }; 0060 0061 //! qDebug() stream operator. Writes property @a inf to the debug output in a nicely formatted way. 0062 DIGIKAM_EXPORT QDebug operator<<(QDebug dbg, const LocalizeContainer& inf); 0063 0064 } // namespace Digikam 0065 0066 #endif // DIGIKAM_LOCALIZE_CONTAINER_H