File indexing completed on 2024-05-05 04:01:24
0001 /* 0002 * kspell_hspellclient.h 0003 * 0004 * SPDX-FileCopyrightText: 2003 Zack Rusin <zack@kde.org> 0005 * SPDX-FileCopyrightText: 2005 Mashrab Kuvatov <kmashrab@uni-bremen.de> 0006 * 0007 * SPDX-License-Identifier: LGPL-2.1-or-later 0008 */ 0009 #ifndef KSPELL_HSPELLCLIENT_H 0010 #define KSPELL_HSPELLCLIENT_H 0011 0012 #include "client_p.h" 0013 0014 /* libhspell is a C library and it does not have #ifdef __cplusplus */ 0015 extern "C" { 0016 #include "hspell.h" 0017 } 0018 0019 namespace Sonnet 0020 { 0021 class SpellerPlugin; 0022 } 0023 using Sonnet::SpellerPlugin; 0024 0025 class HSpellClient : public Sonnet::Client 0026 { 0027 Q_OBJECT 0028 Q_INTERFACES(Sonnet::Client) 0029 Q_PLUGIN_METADATA(IID "org.kde.Sonnet.HSpellClient") 0030 public: 0031 explicit HSpellClient(QObject *parent = nullptr); 0032 ~HSpellClient(); 0033 0034 int reliability() const override 0035 { 0036 return 20; 0037 } 0038 0039 SpellerPlugin *createSpeller(const QString &language) override; 0040 0041 QStringList languages() const override; 0042 0043 QString name() const override 0044 { 0045 return QString::fromLatin1("HSpell"); 0046 } 0047 0048 private: 0049 }; 0050 0051 #endif