Changeset View
Changeset View
Standalone View
Standalone View
src/plugins/ispellchecker/ispellcheckerdict.h
1 | /* | 1 | /* | ||
---|---|---|---|---|---|
2 | SPDX-FileCopyrightText: 2019 Christoph Cullmann <cullmann@kde.org> | 2 | SPDX-FileCopyrightText: 2019 Christoph Cullmann <cullmann@kde.org> | ||
3 | 3 | | |||
4 | SPDX-License-Identifier: LGPL-2.0-or-later | 4 | SPDX-License-Identifier: LGPL-2.0-or-later | ||
5 | */ | 5 | */ | ||
6 | 6 | | |||
7 | #ifndef KSPELL_ISPELLCHECKDICT_H | 7 | #ifndef KSPELL_ISPELLCHECKDICT_H | ||
8 | #define KSPELL_ISPELLCHECKDICT_H | 8 | #define KSPELL_ISPELLCHECKDICT_H | ||
9 | 9 | | |||
10 | #include "spellerplugin_p.h" | 10 | #include "spellerplugin_p.h" | ||
11 | 11 | | |||
12 | #include "ispellcheckerclient.h" | 12 | #include "ispellcheckerclient.h" | ||
13 | 13 | | |||
14 | class ISpellCheckerDict : public Sonnet::SpellerPlugin | 14 | class ISpellCheckerDict : public Sonnet::SpellerPlugin | ||
15 | { | 15 | { | ||
16 | public: | 16 | public: | ||
17 | explicit ISpellCheckerDict(ISpellCheckerFactory *spellCheckerFactory, const QString &language); | 17 | explicit ISpellCheckerDict(ISpellChecker *spellChecker, const QString &language); | ||
18 | ~ISpellCheckerDict() override; | 18 | ~ISpellCheckerDict() override; | ||
19 | bool isCorrect(const QString &word) const override; | 19 | bool isCorrect(const QString &word) const override; | ||
20 | 20 | | |||
21 | QStringList suggest(const QString &word) const override; | 21 | QStringList suggest(const QString &word) const override; | ||
22 | 22 | | |||
23 | bool storeReplacement(const QString &bad, const QString &good) override; | 23 | bool storeReplacement(const QString &bad, const QString &good) override; | ||
24 | 24 | | |||
25 | bool addToPersonal(const QString &word) override; | 25 | bool addToPersonal(const QString &word) override; | ||
26 | bool addToSession(const QString &word) override; | 26 | bool addToSession(const QString &word) override; | ||
27 | 27 | | |||
28 | private: | 28 | private: | ||
29 | // spell checker com object | 29 | // spell checker com object, we don't own this | ||
30 | ISpellChecker *m_spellChecker = nullptr; | 30 | ISpellChecker * const m_spellChecker; | ||
31 | }; | 31 | }; | ||
32 | 32 | | |||
33 | #endif | 33 | #endif |