Sonnet

spellerplugin.cpp
1 /*
2  * SPDX-FileCopyrightText: 2006 Zack Rusin <[email protected]>
3  *
4  * SPDX-License-Identifier: LGPL-2.1-or-later
5  */
6 #include "spellerplugin_p.h"
7 
8 namespace Sonnet
9 {
10 class SpellerPluginPrivate
11 {
12 public:
13  QString language;
14 };
15 
16 SpellerPlugin::SpellerPlugin(const QString &lang)
17  : d(new SpellerPluginPrivate)
18 {
19  d->language = lang;
20 }
21 
22 SpellerPlugin::~SpellerPlugin()
23 {
24  delete d;
25 }
26 
27 QString SpellerPlugin::language() const
28 {
29  return d->language;
30 }
31 
32 bool SpellerPlugin::isMisspelled(const QString &word) const
33 {
34  return !isCorrect(word);
35 }
36 
37 bool SpellerPlugin::checkAndSuggest(const QString &word, QStringList &suggestions) const
38 {
39  bool c = isCorrect(word);
40  if (!c) {
41  suggestions = suggest(word);
42  }
43  return c;
44 }
45 }
The sonnet namespace.
This file is part of the KDE documentation.
Documentation copyright © 1996-2022 The KDE developers.
Generated on Sun Sep 25 2022 04:14:52 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.