• Skip to content
  • Skip to link menu
Trinity API Reference
  • Trinity API Reference
  • kspell2
 

kspell2

  • KSpell2
  • BackgroundChecker
Public Slots | Signals | Public Member Functions | Protected Slots | Protected Member Functions
KSpell2::BackgroundChecker Class Reference

#include <backgroundchecker.h>

Inherits TQObject.

List of all members.

Public Slots

virtual void setFilter (KSpell2::Filter *filter)
virtual void start ()
virtual void stop ()
virtual void continueChecking ()

Signals

void misspelling (const TQString &word, int start)
void done ()

Public Member Functions

 BackgroundChecker (const Broker::Ptr &broker, TQObject *parent=0, const char *name=0)
void checkText (const TQString &)
Filter * filter () const
Broker * broker () const
void changeLanguage (const TQString &lang)
bool checkWord (const TQString &word)
TQStringList suggest (const TQString &) const
bool addWord (const TQString &word)

Protected Slots

void slotEngineDone ()

Protected Member Functions

virtual TQString getMoreText ()
virtual void finishedCurrentFeed ()

Detailed Description

BackgroundChecker is used to perform spell checking without blocking the application.

You can use it as is by calling the checkText function or subclass it and reimplement getMoreText function.

The misspelling signal is emitted whenever a mispelled word is found. The background checker stops right before emitting the signal. So the parent has to call continueChecking function to resume the checking.

done signal is emitted when whole text is spell checked.

Author:
Zack Rusin <zack@kde.org> class used for spell checking in the background

Definition at line 49 of file backgroundchecker.h.


Member Function Documentation

void BackgroundChecker::checkText ( const TQString &  text)

This method is used to spell check static text.

It automatically invokes start().

Use getMoreText() with start() to spell check a stream.

Definition at line 60 of file backgroundchecker.cpp.

void BackgroundChecker::continueChecking ( ) [virtual, slot]

After emitting misspelling signal the background checker stops.

The catcher is responsible for calling continueChecking function to resume checking.

Definition at line 134 of file backgroundchecker.cpp.

void KSpell2::BackgroundChecker::done ( ) [signal]

Emitted after the whole text has been spell checked.

void BackgroundChecker::finishedCurrentFeed ( ) [protected, virtual]

This function will be called whenever the background checker will be finished text which it got from getMoreText.

Definition at line 89 of file backgroundchecker.cpp.

TQString BackgroundChecker::getMoreText ( ) [protected, virtual]

This function is called to get the text to spell check.

It will be called continuesly until it returns TQString::null in which case the done() singnal is emitted. Note: the start parameter in mispelling() is not a combined position but a position in the last string returned by getMoreText. You need to store the state in the derivatives.

Definition at line 84 of file backgroundchecker.cpp.

void KSpell2::BackgroundChecker::misspelling ( const TQString &  word,
int  start 
) [signal]

Emitted whenever a misspelled word is found.


The documentation for this class was generated from the following files:
  • backgroundchecker.h
  • backgroundchecker.cpp

kspell2

Skip menu "kspell2"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Class Members

kspell2

Skip menu "kspell2"
  • arts
  • dcop
  • dnssd
  • interfaces
  •     interface
  •     library
  •   kspeech
  •   ktexteditor
  • kabc
  • kate
  • kcmshell
  • kdecore
  • kded
  • kdefx
  • kdeprint
  • kdesu
  • kdeui
  • kdoctools
  • khtml
  • kimgio
  • kinit
  • kio
  •   bookmarks
  •   httpfilter
  •   kfile
  •   kio
  •   kioexec
  •   kpasswdserver
  •   kssl
  • kioslave
  •   http
  • kjs
  • kmdi
  •   kmdi
  • knewstuff
  • kparts
  • krandr
  • kresources
  • kspell2
  • kunittest
  • kutils
  • kwallet
  • libkmid
  • libkscreensaver
Generated for kspell2 by doxygen 1.7.6.1
This website is maintained by Timothy Pearson.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. |