Sonnet
enchantclient.h
Go to the documentation of this file.00001
00020 #ifndef QSPELL_ENCHANTCLIENT_H
00021 #define QSPELL_ENCHANTCLIENT_H
00022
00023 #include "spellerplugin_p.h"
00024 #include "client_p.h"
00025
00026 #include <QtCore/QSet>
00027 #include <QtCore/QVariantList>
00028 #include <enchant.h>
00029
00030 namespace Sonnet {
00031 class SpellerPlugin;
00032 }
00033 using Sonnet::SpellerPlugin;
00034
00035 class QSpellEnchantClient : public Sonnet::Client
00036 {
00037 Q_OBJECT
00038 public:
00039 QSpellEnchantClient(QObject *parent, const QVariantList & );
00040 ~QSpellEnchantClient();
00041
00042 virtual int reliability() const {
00043 return 30;
00044 }
00045
00046 virtual SpellerPlugin *createSpeller(const QString &language);
00047
00048 virtual QStringList languages() const;
00049
00050 virtual QString name() const {
00051 return QString::fromLatin1("Enchant");
00052 }
00053
00054 void addLanguage(const QString &lang);
00055
00056 void removeDictRef(EnchantDict *dict);
00057
00058 private:
00059 EnchantBroker *m_broker;
00060 QSet<QString> m_languages;
00061 QHash<EnchantDict*, int> m_dictRefs;
00062 };
00063
00064 #endif