SpellCheckBar

SpellCheckBar Class Reference

#include <spellcheckbar.h>

Inherits KateViewBarWidget.

Signals

void autoCorrect (const QString &currentWord, const QString &replaceWord)
 
void cancel ()
 
void done (const QString &newBuffer)
 
void languageChanged (const QString &language)
 
void misspelling (const QString &word, int start)
 
void replace (const QString &oldWord, int start, const QString &newWord)
 
void spellCheckStatus (const QString &)
 
void stop ()
 

Public Slots

void setBuffer (const QString &)
 

Public Member Functions

 SpellCheckBar (Sonnet::BackgroundChecker *checker, QWidget *parent)
 
void activeAutoCorrect (bool _active)
 
QString buffer () const
 
void closed () override
 
QString originalBuffer () const
 
void setSpellCheckContinuedAfterReplacement (bool b)
 
void show ()
 
void showProgressDialog (int timeout=500)
 
void showSpellCheckCompletionMessage (bool b=true)
 

Detailed Description

Spellcheck dialog.

Sonnet::SpellCheckBar dlg = new Sonnet::SpellCheckBar(
new Sonnet::BackgroundChecker(this), this);
//connect signals
...
dlg->setBuffer( someText );
dlg->show();

You can change buffer inside a slot connected to done() signal and spellcheck will continue with new data automatically.

Definition at line 50 of file spellcheckbar.h.

Member Function Documentation

void SpellCheckBar::done ( const QString newBuffer)
signal

The dialog won't be closed if you setBuffer() in slot connected to this signal.

Also emitted after stop() signal

void SpellCheckBar::languageChanged ( const QString language)
signal

Emitted when the user changes the language used for spellchecking, which is shown in a combobox of this dialog.

Parameters
languagethe new language the user selected
Since
4.1
void SpellCheckBar::setSpellCheckContinuedAfterReplacement ( bool  b)

Controls whether the spell checking is continued after the replacement of a misspelled word has been performed.

By default it is continued.

Since
4.4

Definition at line 233 of file spellcheckbar.cpp.

void SpellCheckBar::showProgressDialog ( int  timeout = 500)

Controls whether an (indefinite) progress dialog is shown when the spell checking takes longer than the given time to complete.

By default no progress dialog is shown. If the progress dialog is set to be shown, no time consuming operation (for example, showing a notification message) should be performed in a slot connected to the 'done' signal as this might trigger the progress dialog unnecessarily.

Parameters
timeouttime after which the progress dialog should appear; a negative value can be used to hide it
Since
4.4

Definition at line 223 of file spellcheckbar.cpp.

void SpellCheckBar::showSpellCheckCompletionMessage ( bool  b = true)

Controls whether a message box indicating the completion of the spell checking is shown or not.

By default it is not shown.

Since
4.4

Definition at line 228 of file spellcheckbar.cpp.

void SpellCheckBar::spellCheckStatus ( const QString )
signal

Signal sends when spell checking is finished/stopped/completed.

Since
4.1

The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Sun Jul 12 2020 22:58:03 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.