File indexing completed on 2024-05-05 04:01:24
0001 /* 0002 * kspell_aspellclient.h 0003 * 0004 * SPDX-FileCopyrightText: 2003 Zack Rusin <zack@kde.org> 0005 * 0006 * SPDX-License-Identifier: LGPL-2.1-or-later 0007 */ 0008 #ifndef KSPELL_ASPELLCLIENT_H 0009 #define KSPELL_ASPELLCLIENT_H 0010 0011 #include "client_p.h" 0012 0013 #include "aspell.h" 0014 0015 namespace Sonnet 0016 { 0017 class SpellerPlugin; 0018 } 0019 using Sonnet::SpellerPlugin; 0020 0021 class ASpellClient : public Sonnet::Client 0022 { 0023 Q_OBJECT 0024 Q_INTERFACES(Sonnet::Client) 0025 Q_PLUGIN_METADATA(IID "org.kde.Sonnet.ASpellClient") 0026 0027 public: 0028 explicit ASpellClient(QObject *parent = nullptr); 0029 ~ASpellClient() override; 0030 0031 int reliability() const override 0032 { 0033 return 20; 0034 } 0035 0036 SpellerPlugin *createSpeller(const QString &language) override; 0037 0038 QStringList languages() const override; 0039 0040 QString name() const override 0041 { 0042 return QStringLiteral("ASpell"); 0043 } 0044 0045 private: 0046 AspellConfig *const m_config; 0047 }; 0048 0049 #endif