• 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.

Constructor & Destructor Documentation

◆ BackgroundChecker()

BackgroundChecker::BackgroundChecker ( const Broker::Ptr &  broker,
TQObject *  parent = 0,
const char *  name = 0 
)

Definition at line 40 of file backgroundchecker.cpp.

◆ ~BackgroundChecker()

BackgroundChecker::~BackgroundChecker ( )

Definition at line 55 of file backgroundchecker.cpp.

Member Function Documentation

◆ addWord()

bool BackgroundChecker::addWord ( const TQString &  word)

Definition at line 117 of file backgroundchecker.cpp.

◆ broker()

Broker * BackgroundChecker::broker ( ) const

Definition at line 105 of file backgroundchecker.cpp.

◆ changeLanguage()

void BackgroundChecker::changeLanguage ( const TQString &  lang)

Definition at line 128 of file backgroundchecker.cpp.

◆ checkText()

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.

◆ checkWord()

bool BackgroundChecker::checkWord ( const TQString &  word)

Definition at line 111 of file backgroundchecker.cpp.

◆ continueChecking

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.

◆ done

void KSpell2::BackgroundChecker::done ( )
signal

Emitted after the whole text has been spell checked.

◆ filter()

Filter * BackgroundChecker::filter ( ) const

Definition at line 99 of file backgroundchecker.cpp.

◆ finishedCurrentFeed()

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.

◆ getMoreText()

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.

◆ misspelling

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

Emitted whenever a misspelled word is found.

◆ setFilter

void BackgroundChecker::setFilter ( KSpell2::Filter *  filter)
virtualslot

Definition at line 93 of file backgroundchecker.cpp.

◆ slotEngineDone

void BackgroundChecker::slotEngineDone ( )
protectedslot

Definition at line 139 of file backgroundchecker.cpp.

◆ start

void BackgroundChecker::start ( )
virtualslot

Definition at line 68 of file backgroundchecker.cpp.

◆ stop

void BackgroundChecker::stop ( )
virtualslot

Definition at line 78 of file backgroundchecker.cpp.

◆ suggest()

TQStringList BackgroundChecker::suggest ( const TQString &  word) const

Definition at line 122 of file backgroundchecker.cpp.


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
  • tdeabc
  • tdecmshell
  • tdecore
  • tdefx
  • tdehtml
  • tdeinit
  • tdeio
  •   bookmarks
  •   httpfilter
  •   kpasswdserver
  •   kssl
  •   tdefile
  •   tdeio
  •   tdeioexec
  • tdeioslave
  •   http
  • tdemdi
  •   tdemdi
  • tdenewstuff
  • tdeparts
  • tdeprint
  • tderandr
  • tderesources
  • tdespell2
  • tdesu
  • tdeui
  • tdeunittest
  • tdeutils
  • tdewallet
Generated for tdespell2 by doxygen 1.9.4
This website is maintained by Timothy Pearson.