LeechCraft  0.6.70-15082-g543737046d
Modular cross-platform feature rich live environment.
ISpellChecker Class Referenceabstract

An instance of a spell checker. More...

#include "ispellcheckprovider.h"

Public Member Functions

virtual ~ISpellChecker ()
 Destroys the spell checker instance. More...
 
virtual bool IsCorrect (const QString &word) const =0
 Returns if the given word is correct. More...
 
virtual QStringList GetPropositions (const QString &word) const =0
 Returns the list of propositions for the word. More...
 
virtual void LearnWord (const QString &word)=0
 Asks the spell checker to learn the given word. More...
 

Detailed Description

An instance of a spell checker.

This interface provides access to the spell checking capabilities of plugins implementing ISpellCheckProvider and is obtained via a call to ISpellCheckProvider::CreateSpellchecker().

See also
ISpellCheckProvider

Definition at line 22 of file ispellcheckprovider.h.

Constructor & Destructor Documentation

◆ ~ISpellChecker()

virtual ISpellChecker::~ISpellChecker ( )
inlinevirtual

Destroys the spell checker instance.

Definition at line 33 of file ispellcheckprovider.h.

Member Function Documentation

◆ GetPropositions()

virtual QStringList ISpellChecker::GetPropositions ( const QString &  word) const
pure virtual

Returns the list of propositions for the word.

If the word is correct or no propositions are found, an empty list is returned.

Parameters
[in]wordThe word for which to return the list of propositions.
Returns
The possibly empty list of propositions.
See also
IsCorrect()

◆ IsCorrect()

virtual bool ISpellChecker::IsCorrect ( const QString &  word) const
pure virtual

Returns if the given word is correct.

If the word is incorrect, it probably makes sense to get a list of possible corrections via GetPropositions().

The spell checker uses the configuration of ISpellCheckProvider to figure out enabled languages, locales, spell checking options and so on.

Parameters
[in]wordThe word to check.
Returns
Whether the word is correct.
See also
GetPropositions()
LearnWord()

◆ LearnWord()

virtual void ISpellChecker::LearnWord ( const QString &  word)
pure virtual

Asks the spell checker to learn the given word.

This function is allowed to do nothing if the spell checker does not support user dictionaries. In this case, IsCorrect() may still return false for the given word even after calling this function.

Parameters
[in]wordThe word to learn.
See also
IsCorrect()

The documentation for this class was generated from the following file: