File indexing completed on 2024-11-17 05:01:28

0001 /*
0002     SPDX-FileCopyrightText: 2020 Benjamin Port <benjamin.port@enioka.com>
0003 
0004     SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
0005 */
0006 
0007 #pragma once
0008 
0009 #include <KCoreConfigSkeleton>
0010 
0011 namespace Sonnet
0012 {
0013 class Settings;
0014 class ConfigView;
0015 }
0016 
0017 class SpellCheckingSkeleton : public KCoreConfigSkeleton
0018 {
0019     Q_OBJECT
0020 
0021 public:
0022     explicit SpellCheckingSkeleton(QObject *parent = nullptr);
0023     bool usrSave() override;
0024     void usrRead() override;
0025 
0026     void setPreferredLanguages(const QStringList &preferredLanguages);
0027     QStringList preferredLanguages() const;
0028 
0029     void setIgnoreList(const QStringList &ignoreList);
0030     QStringList ignoreList() const;
0031 
0032     void setDefaultLanguage(const QString &defaultLanguage);
0033     QString defaultLanguage() const;
0034 
0035     QStringList clients() const;
0036 
0037 private:
0038     Sonnet::Settings *m_store;
0039     QStringList m_preferredLanguages;
0040     QStringList m_ignoreList;
0041     QString m_defaultLanguage;
0042 };