LeechCraft 0.6.70-17609-g3dde4097dd
Modular cross-platform feature rich live environment.
Loading...
Searching...
No Matches
ispellcheckprovider.h
Go to the documentation of this file.
1/**********************************************************************
2 * LeechCraft - modular cross-platform feature rich internet client.
3 * Copyright (C) 2006-2014 Georg Rudoy
4 *
5 * Distributed under the Boost Software License, Version 1.0.
6 * (See accompanying file LICENSE or copy at https://www.boost.org/LICENSE_1_0.txt)
7 **********************************************************************/
8
9#pragma once
10
11#include <memory>
12#include <QtPlugin>
13
23{
24public:
27 virtual ~ISpellChecker () {}
28
44 virtual bool IsCorrect (const QString& word) const = 0;
45
57 virtual QStringList GetPropositions (const QString& word) const = 0;
58
70 virtual void LearnWord (const QString& word) = 0;
71};
72
75using ISpellChecker_ptr = std::shared_ptr<ISpellChecker>;
76
90{
91protected:
93public:
101};
102
103Q_DECLARE_INTERFACE (ISpellChecker, "org.LeechCraft.ISpellChecker/1.0")
104Q_DECLARE_INTERFACE (ISpellCheckProvider, "org.LeechCraft.ISpellCheckProvider/1.0")
Interface for plugins providing spell checker capabilities.
virtual ISpellChecker_ptr CreateSpellchecker()=0
Requests a new spellchecker.
An instance of a spell checker.
virtual void LearnWord(const QString &word)=0
Asks the spell checker to learn the given word.
virtual bool IsCorrect(const QString &word) const =0
Returns if the given word is correct.
virtual QStringList GetPropositions(const QString &word) const =0
Returns the list of propositions for the word.
virtual ~ISpellChecker()
Destroys the spell checker instance.
std::shared_ptr< ISpellChecker > ISpellChecker_ptr
A shared pointer to an ISpellChecker instance.