• Skip to content
  • Skip to link menu
KDE 4.1 API Reference
  • KDE API Reference
  • kdelibs
  • Sitemap
  • Contact Us
 

KDECore

speller.h

Go to the documentation of this file.
00001 // -*- Mode: C++; c-basic-offset: 4; indent-tabs-mode: nil; -*-
00021 #ifndef SONNET_SPELLER_H
00022 #define SONNET_SPELLER_H
00023 
00024 #include <QtCore/QStringList>
00025 #include <QtCore/QString>
00026 
00027 #include <kdecore_export.h>
00028 
00029 class KConfig;
00030 
00031 namespace Sonnet
00032 {
00038     class KDECORE_EXPORT Speller
00039     {
00040     public:
00041         Speller(const QString &lang=QString());
00042         ~Speller();
00043 
00044         Speller(const Speller &speller);
00045         Speller &operator=(const Speller &speller);
00046 
00051         bool isValid() const;
00052 
00056         void setLanguage(const QString &lang);
00060         QString language() const;
00061 
00066         bool isCorrect(const QString &word) const;
00067 
00072         bool isMisspelled(const QString &word) const;
00073 
00079         QStringList suggest(const QString &word) const;
00080 
00085         bool checkAndSuggest(const QString &word,
00086                              QStringList &suggestions) const;
00087 
00092         bool storeReplacement(const QString &bad,
00093                               const QString &good);
00094 
00099         bool addToPersonal(const QString &word);
00100 
00105         bool addToSession(const QString &word);
00106 
00107     public: // Configuration API
00108         enum Attribute {
00109             CheckUppercase,
00110             SkipRunTogether
00111         };
00112         void save(KConfig *config);
00113         void restore(KConfig *config);
00114 
00118         QStringList availableBackends() const;
00119 
00123         QStringList availableLanguages() const;
00127         QStringList availableLanguageNames() const;
00128 
00129         void setDefaultLanguage(const QString &lang);
00130         QString defaultLanguage() const;
00131 
00132         void setDefaultClient(const QString &client);
00133         QString defaultClient() const;
00134 
00135         void setAttribute(Attribute attr, bool b = true);
00136         bool testAttribute(Attribute attr) const;
00137     private:
00138         class Private;
00139         Private *const d;
00140     };
00141 }
00142 #endif

KDECore

Skip menu "KDECore"
  • Main Page
  • Modules
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

kdelibs

Skip menu "kdelibs"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • Kate
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • KIO
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • Kross
  • KUtils
  • Nepomuk
  • Solid
  • Sonnet
  • ThreadWeaver
Generated for kdelibs by doxygen 1.5.4
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal