File indexing completed on 2024-05-05 04:01:24

0001 /*
0002     SPDX-FileCopyrightText: 2019 Christoph Cullmann <cullmann@kde.org>
0003 
0004     SPDX-License-Identifier: LGPL-2.0-or-later
0005 */
0006 
0007 #ifndef KSPELL_ISPELLCHECKDICT_H
0008 #define KSPELL_ISPELLCHECKDICT_H
0009 
0010 #include "spellerplugin_p.h"
0011 
0012 #include "ispellcheckerclient.h"
0013 
0014 class ISpellCheckerDict : public Sonnet::SpellerPlugin
0015 {
0016 public:
0017     explicit ISpellCheckerDict(ISpellChecker *spellChecker, const QString &language);
0018     ~ISpellCheckerDict() override;
0019     bool isCorrect(const QString &word) const override;
0020 
0021     QStringList suggest(const QString &word) const override;
0022 
0023     bool storeReplacement(const QString &bad, const QString &good) override;
0024 
0025     bool addToPersonal(const QString &word) override;
0026     bool addToSession(const QString &word) override;
0027 
0028 private:
0029     // spell checker com object, we don't own this
0030     ISpellChecker *const m_spellChecker;
0031 };
0032 
0033 #endif