LeechCraft
0.6.70-18450-gabe19ee3b0
Modular cross-platform feature rich live environment.
Toggle main menu visibility
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
22
class
ISpellChecker
23
{
24
public
:
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
75
using
ISpellChecker_ptr
= std::shared_ptr<ISpellChecker>;
76
89
class
ISpellCheckProvider
90
{
91
protected
:
92
virtual
~ISpellCheckProvider
() {}
93
public
:
100
virtual
ISpellChecker_ptr
CreateSpellchecker
() = 0;
101
};
102
103
Q_DECLARE_INTERFACE (
ISpellChecker
,
"org.LeechCraft.ISpellChecker/1.0"
)
104
Q_DECLARE_INTERFACE (
ISpellCheckProvider
,
"org.LeechCraft.ISpellCheckProvider/1.0"
)
ISpellCheckProvider
Interface for plugins providing spell checker capabilities.
Definition
ispellcheckprovider.h:90
ISpellCheckProvider::CreateSpellchecker
virtual ISpellChecker_ptr CreateSpellchecker()=0
Requests a new spellchecker.
ISpellCheckProvider::~ISpellCheckProvider
virtual ~ISpellCheckProvider()
Definition
ispellcheckprovider.h:92
ISpellChecker
An instance of a spell checker.
Definition
ispellcheckprovider.h:23
ISpellChecker::LearnWord
virtual void LearnWord(const QString &word)=0
Asks the spell checker to learn the given word.
ISpellChecker::IsCorrect
virtual bool IsCorrect(const QString &word) const =0
Returns if the given word is correct.
ISpellChecker::GetPropositions
virtual QStringList GetPropositions(const QString &word) const =0
Returns the list of propositions for the word.
ISpellChecker::~ISpellChecker
virtual ~ISpellChecker()
Destroys the spell checker instance.
Definition
ispellcheckprovider.h:27
ISpellChecker_ptr
std::shared_ptr< ISpellChecker > ISpellChecker_ptr
A shared pointer to an ISpellChecker instance.
Definition
ispellcheckprovider.h:75
src
interfaces
ispellcheckprovider.h
Generated by
1.17.0