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

tdespell2

  • KSpell2
  • BackgroundChecker
Public Slots | Signals | Public Member Functions | Protected Slots | Protected Member Functions | List of all members
KSpell2::BackgroundChecker Class Reference

#include <backgroundchecker.h>

Inherits TQObject.

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@.nosp@m.kde..nosp@m.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 ( )
virtualslot

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 ( )
protectedvirtual

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 ( )
protectedvirtual

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

tdespell2

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

tdespell2

Skip menu "tdespell2"
  • arts
  • dcop
  • dnssd
  • interfaces
  •   kspeech
  •     interface
  •     library
  •   tdetexteditor
  • kate
  • kded
  • kdoctools
  • kimgio
  • kjs
  • libtdemid
  • libtdescreensaver
  •     tdecore
  • tdeabc
  • tdecmshell
  • tdecore
  • tdefx
  • tdehtml
  • tdeinit
  • tdeio
  •   bookmarks
  •   httpfilter
  •   kpasswdserver
  •   kssl
  • tdeioslave
  •   http
  •   tdefile
  •   tdeio
  •   tdeioexec
  • tdemdi
  •   tdemdi
  • tdenewstuff
  • tdeparts
  • tdeprint
  • tderandr
  • tderesources
  • tdespell2
  • tdesu
  • tdeui
  • tdeunittest
  • tdeutils
  • tdewallet
Generated for tdespell2 by doxygen 1.8.8
This website is maintained by Timothy Pearson.