Sonnet

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

KDE's Doxygen guidelines are available online.