KDECore
spellerplugin.cpp
Go to the documentation of this file.
00001 // -*- Mode: C++; c-basic-offset: 4; indent-tabs-mode: nil; -*- 00021 #include "spellerplugin_p.h" 00022 00023 namespace Sonnet 00024 { 00025 00026 class SpellerPlugin::Private 00027 { 00028 public: 00029 QString language; 00030 }; 00031 00032 SpellerPlugin::SpellerPlugin(const QString &lang) 00033 : d(new Private) 00034 { 00035 d->language = lang; 00036 } 00037 00038 SpellerPlugin::~SpellerPlugin() 00039 { 00040 delete d; 00041 } 00042 00043 QString SpellerPlugin::language() const 00044 { 00045 return d->language; 00046 } 00047 00048 bool SpellerPlugin::isMisspelled(const QString &word) const 00049 { 00050 return !isCorrect(word); 00051 } 00052 00053 bool SpellerPlugin::checkAndSuggest(const QString &word, 00054 QStringList &suggestions) const 00055 { 00056 bool c = isCorrect(word); 00057 if (!c) 00058 suggestions = suggest(word); 00059 return c; 00060 } 00061 00062 }
KDE 4.6 API Reference