enchantclient.h

00001 // -*- Mode: C++; c-basic-offset: 4; indent-tabs-mode: nil; -*-
00021 #ifndef QSPELL_ENCHANTCLIENT_H
00022 #define QSPELL_ENCHANTCLIENT_H
00023 
00024 #include "client.h"
00025 
00026 #include <qmap.h>
00027 #include <enchant.h>
00028 
00029 namespace KSpell2 {
00030     class Dictionary;
00031 }
00032 using KSpell2::Dictionary;
00033 
00034 class QSpellEnchantClient : public KSpell2::Client
00035 {
00036     Q_OBJECT
00037 public:
00038     QSpellEnchantClient(QObject *parent, const char *name, const QStringList & /* args */);
00039     ~QSpellEnchantClient();
00040 
00041     virtual int reliability() const {
00042         return 30;
00043     }
00044 
00045     virtual Dictionary *dictionary(const QString &language);
00046 
00047     virtual QStringList languages() const;
00048 
00049     virtual QString name() const {
00050         return QString::fromLatin1("Enchant");
00051     }
00052 
00053     void addLanguage(const QString &lang);
00054 
00055     void removeDictRef(EnchantDict *dict);
00056 
00057 private:
00058     EnchantBroker *m_broker;
00059     QStringList m_languages;
00060     QMap<EnchantDict*, int> m_dictRefs;
00061 };
00062 
00063 #endif
KDE Home | KDE Accessibility Home | Description of Access Keys