SpellCheckBar

Search for usage in LXR

SpellCheckBar Class Reference

#include <spellcheckbar.h>

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 36 of file spellcheckbar.h.

Constructor & Destructor Documentation

◆ SpellCheckBar()

SpellCheckBar::SpellCheckBar ( Sonnet::BackgroundChecker * checker,
QWidget * parent )

Definition at line 115 of file spellcheckbar.cpp.

◆ ~SpellCheckBar()

SpellCheckBar::~SpellCheckBar ( )
override

Definition at line 131 of file spellcheckbar.cpp.

Member Function Documentation

◆ activeAutoCorrect()

void SpellCheckBar::activeAutoCorrect ( bool _active)

Definition at line 199 of file spellcheckbar.cpp.

◆ buffer()

QString SpellCheckBar::buffer ( ) const

Definition at line 270 of file spellcheckbar.cpp.

◆ closed()

void SpellCheckBar::closed ( )
override

Definition at line 136 of file spellcheckbar.cpp.

◆ done

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

◆ languageChanged

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

◆ originalBuffer()

QString SpellCheckBar::originalBuffer ( ) const

Definition at line 265 of file spellcheckbar.cpp.

◆ setBuffer

void SpellCheckBar::setBuffer ( const QString & buf)
slot

Definition at line 275 of file spellcheckbar.cpp.

◆ setSpellCheckContinuedAfterReplacement()

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 218 of file spellcheckbar.cpp.

◆ show()

void SpellCheckBar::show ( )

Definition at line 313 of file spellcheckbar.cpp.

◆ showProgressDialog()

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 208 of file spellcheckbar.cpp.

◆ showSpellCheckCompletionMessage()

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 213 of file spellcheckbar.cpp.

◆ spellCheckStatus

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-2024 The KDE developers.
Generated on Sat Dec 21 2024 17:01:56 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.