\section{KSpell Class Reference}
\label{classKSpell}\index{KSpell@{KSpell}}
KDE Spellchecker  


{\tt \#include $<$kspell.h$>$}

Inheritance diagram for KSpell:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=44pt]{classKSpell__inherit__graph}
\end{center}
\end{figure}
Collaboration diagram for KSpell:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=308pt]{classKSpell__coll__graph}
\end{center}
\end{figure}
\subsection*{Public Types}
\begin{CompactItemize}
\item 
enum {\bf spell\-Status} \{ \par
{\bf Starting} =  0, 
{\bf Running}, 
{\bf Cleaning}, 
{\bf Finished}, 
\par
{\bf Error}, 
{\bf Crashed}, 
{\bf Finished\-No\-Misspellings\-Encountered}
 \}
\item 
enum {\bf Speller\-Type} \{ {\bf Text} =  0, 
{\bf HTML}, 
{\bf Te\-X}, 
{\bf Nroff}
 \}
\end{CompactItemize}
\subsection*{Signals}
\begin{CompactItemize}
\item 
void {\bf misspelling} (const {\bf QString} \&originalword, const {\bf QString\-List} \&suggestions, unsigned int pos)
\item 
void {\bf corrected} (const {\bf QString} \&originalword, const {\bf QString} \&newword, unsigned int pos)
\item 
void {\bf ignoreall} (const {\bf QString} \&originalword)
\item 
void {\bf ignoreword} (const {\bf QString} \&originalword)
\item 
void {\bf addword} (const {\bf QString} \&originalword)
\item 
void {\bf replaceall} (const {\bf QString} \&origword, const {\bf QString} \&replacement)
\item 
void {\bf ready} ({\bf KSpell} $\ast$)
\item 
void {\bf progress} (unsigned int i)
\item 
void {\bf done} (const {\bf QString} \&buffer)
\item 
void {\bf done} (bool)
\item 
void {\bf death} ()
\item 
void {\bf dialog3} ()\label{classKSpell_l11}

\end{CompactItemize}
\subsection*{Public Member Functions}
\begin{CompactItemize}
\item 
{\bf KSpell} ({\bf QWidget} $\ast${\bf parent}, const {\bf QString} \&caption, {\bf QObject} $\ast$receiver, const char $\ast$slot, {\bf KSpell\-Config} $\ast$kcs=0, bool progressbar=true, bool modal=false)
\item 
{\bf KSpell} ({\bf QWidget} $\ast${\bf parent}, const {\bf QString} \&caption, {\bf QObject} $\ast$receiver, const char $\ast$slot, {\bf KSpell\-Config} $\ast$kcs, bool progressbar, bool modal, {\bf Speller\-Type} type)
\item 
{\bf spell\-Status} {\bf status} () const 
\item 
virtual void {\bf clean\-Up} ()
\item 
void {\bf set\-Auto\-Delete} (bool \_\-auto\-Delete)
\item 
virtual bool {\bf check} (const {\bf QString} \&\_\-buffer, bool usedialog=true)
\item 
int {\bf last\-Position} () const 
\item 
virtual bool {\bf check\-List} ({\bf QString\-List} $\ast$\_\-wordlist, bool usedialog=true)
\item 
virtual bool {\bf check\-Word} (const {\bf QString} \&\_\-buffer, bool usedialog=false)
\item 
bool {\bf check\-Word} (const {\bf QString} \&buffer, bool \_\-usedialog, bool suggest)
\item 
void {\bf hide} ()
\item 
{\bf QString\-List} {\bf suggestions} () const 
\item 
int {\bf dlg\-Result} () const 
\item 
void {\bf move\-Dlg} (int x, int y)
\item 
int {\bf height\-Dlg} () const 
\item 
int {\bf width\-Dlg} () const 
\item 
{\bf QString} {\bf intermediate\-Buffer} () const 
\item 
virtual bool {\bf ignore} (const {\bf QString} \&word)
\item 
virtual bool {\bf add\-Personal} (const {\bf QString} \&word)
\item 
{\bf KSpell\-Config} {\bf ks\-Config} () const 
\item 
void {\bf set\-Progress\-Resolution} (unsigned int res)
\item 
virtual {\bf $\sim$KSpell} ()
\item 
void {\bf set\-Ignore\-Upper\-Words} (bool b)
\item 
void {\bf set\-Ignore\-Title\-Case} (bool b)
\end{CompactItemize}
\subsection*{Static Public Member Functions}
\begin{CompactItemize}
\item 
static int {\bf modal\-Check} ({\bf QString} \&text) KDE\_\-DEPRECATED
\item 
static int {\bf modal\-Check} ({\bf QString} \&text, {\bf KSpell\-Config} $\ast$kcs)
\end{CompactItemize}
\subsection*{Protected Slots}
\begin{CompactItemize}
\item 
void {\bf KSpell2} ({\bf KProc\-IO} $\ast$)\label{classKSpell_j0}

\item 
void {\bf check\-Word2} ({\bf KProc\-IO} $\ast$)\label{classKSpell_j1}

\item 
void {\bf check\-Word3} ()\label{classKSpell_j2}

\item 
void {\bf check2} ({\bf KProc\-IO} $\ast$)\label{classKSpell_j3}

\item 
void {\bf check\-List2} ()\label{classKSpell_j4}

\item 
void {\bf check\-List3a} ({\bf KProc\-IO} $\ast$)\label{classKSpell_j5}

\item 
void {\bf check\-List\-Replace\-Current} ()\label{classKSpell_j6}

\item 
void {\bf check\-List4} ()\label{classKSpell_j7}

\item 
void {\bf dialog2} (int dlgresult)\label{classKSpell_j8}

\item 
void {\bf check3} ()\label{classKSpell_j9}

\item 
void {\bf suggest\-Word} ({\bf KProc\-IO} $\ast$)\label{classKSpell_j10}

\item 
void {\bf slot\-Stop\-Cancel} (int)\label{classKSpell_j11}

\item 
void {\bf ispell\-Exit} ({\bf KProcess} $\ast$)\label{classKSpell_j12}

\item 
void {\bf emit\-Death} ()\label{classKSpell_j13}

\item 
void {\bf ispell\-Errors} ({\bf KProcess} $\ast$, char $\ast$, int)\label{classKSpell_j14}

\item 
void {\bf check\-Next} ()\label{classKSpell_j15}

\end{CompactItemize}
\subsection*{Protected Member Functions}
\begin{CompactItemize}
\item 
int {\bf parse\-One\-Response} (const {\bf QString} \&\_\-buffer, {\bf QString} \&word, {\bf QString\-List} \&sugg)\label{classKSpell_b0}

\item 
{\bf QString} {\bf funny\-Word} (const {\bf QString} \&word)\label{classKSpell_b1}

\item 
void {\bf dialog} (const {\bf QString} \&word, {\bf QString\-List} \&sugg, const char $\ast$\_\-slot)\label{classKSpell_b2}

\item 
{\bf QString} {\bf replacement} () const \label{classKSpell_b3}

\item 
void {\bf set\-Up\-Dialog} (bool reallyusedialogbox=true)\label{classKSpell_b4}

\item 
void {\bf emit\-Progress} ()\label{classKSpell_b5}

\item 
bool {\bf clean\-Fputs} (const {\bf QString} \&s, bool append\-CR=true)\label{classKSpell_b6}

\item 
bool {\bf clean\-Fputs\-Word} (const {\bf QString} \&s, bool append\-CR=true)\label{classKSpell_b7}

\item 
void {\bf start\-Ispell} ()\label{classKSpell_b8}

\item 
bool {\bf write\-Personal\-Dictionary} ()\label{classKSpell_b9}

\item 
void {\bf initialize} ({\bf QWidget} $\ast$\_\-parent, const {\bf QString} \&\_\-caption, {\bf QObject} $\ast$obj, const char $\ast$slot, {\bf KSpell\-Config} $\ast$\_\-ksc, bool \_\-progressbar, bool \_\-modal, {\bf Speller\-Type} type)\label{classKSpell_b10}

\end{CompactItemize}
\subsection*{Protected Attributes}
\begin{CompactItemize}
\item 
{\bf KProc\-IO} $\ast$ {\bf proc}\label{classKSpell_p0}

\item 
{\bf QWidget} $\ast$ {\bf parent}\label{classKSpell_p1}

\item 
{\bf KSpell\-Config} $\ast$ {\bf ksconfig}\label{classKSpell_p2}

\item 
KSpell\-Dlg $\ast$ {\bf ksdlg}\label{classKSpell_p3}

\item 
{\bf QString\-List} $\ast$ {\bf wordlist}\label{classKSpell_p4}

\item 
QString\-List::Iterator {\bf wl\-It}\label{classKSpell_p5}

\item 
{\bf QString\-List} {\bf ignorelist}\label{classKSpell_p6}

\item 
{\bf QString\-List} {\bf replacelist}\label{classKSpell_p7}

\item 
{\bf QString\-List} {\bf sugg}\label{classKSpell_p8}

\item 
{\bf QText\-Codec} $\ast$ {\bf codec}\label{classKSpell_p9}

\item 
{\bf spell\-Status} {\bf m\_\-status}\label{classKSpell_p10}

\item 
bool {\bf usedialog}\label{classKSpell_p11}

\item 
bool {\bf texmode}\label{classKSpell_p12}

\item 
bool {\bf dlgon}\label{classKSpell_p13}

\item 
bool {\bf personaldict}\label{classKSpell_p14}

\item 
bool {\bf dialogwillprocess}\label{classKSpell_p15}

\item 
bool {\bf progressbar}\label{classKSpell_p16}

\item 
bool {\bf dialogsetup}\label{classKSpell_p17}

\item 
bool {\bf auto\-Delete}\label{classKSpell_p18}

\item 
{\bf QString} {\bf caption}\label{classKSpell_p19}

\item 
{\bf QString} {\bf orig}\label{classKSpell_p20}

\item 
{\bf QString} {\bf origbuffer}\label{classKSpell_p21}

\item 
{\bf QString} {\bf newbuffer}\label{classKSpell_p22}

\item 
{\bf QString} {\bf cwword}\label{classKSpell_p23}

\item 
{\bf QString} {\bf dlgorigword}\label{classKSpell_p24}

\item 
{\bf QString} {\bf dlgreplacement}\label{classKSpell_p25}

\item 
{\bf QString} {\bf dialog3slot}\label{classKSpell_p26}

\item 
int {\bf dlgresult}\label{classKSpell_p27}

\item 
int {\bf trystart}\label{classKSpell_p28}

\item 
int {\bf maxtrystart}\label{classKSpell_p29}

\item 
int {\bf lastpos}\label{classKSpell_p30}

\item 
unsigned int {\bf totalpos}\label{classKSpell_p31}

\item 
unsigned int {\bf lastline}\label{classKSpell_p32}

\item 
unsigned int {\bf posinline}\label{classKSpell_p33}

\item 
unsigned int {\bf lastlastline}\label{classKSpell_p34}

\item 
unsigned int {\bf offset}\label{classKSpell_p35}

\item 
unsigned int {\bf progres}\label{classKSpell_p36}

\item 
unsigned int {\bf curprog}\label{classKSpell_p37}

\item 
bool {\bf modaldlg}
\end{CompactItemize}
\subsection*{Static Protected Attributes}
\begin{CompactItemize}
\item 
static {\bf QString} {\bf modaltext}\label{classKSpell_t0}

\item 
static int {\bf modalreturn} = 0\label{classKSpell_t1}

\item 
static {\bf QWidget} $\ast$ {\bf modal\-Widget\-Hack} = 0\label{classKSpell_t2}

\end{CompactItemize}


\subsection{Detailed Description}
KDE Spellchecker 

A KDE programmer's interface to International ISpell 3.1, ASpell and HSpell. A static method, {\bf modal\-Check()}{\rm (p.\,\pageref{classKSpell_e0})} is provided for convenient access to the spellchecker.

\begin{Desc}
\item[Author:]David Sweet $<${\tt dsweet@kde.org}$>$ \end{Desc}
\begin{Desc}
\item[See also:]{\bf KSpell\-Config}{\rm (p.\,\pageref{classKSpellConfig})}, {\bf KSyntax\-Highlighter}{\rm (p.\,\pageref{classKSyntaxHighlighter})} \end{Desc}




Definition at line 46 of file kspell.h.

\subsection{Member Enumeration Documentation}
\index{KSpell@{KSpell}!spellStatus@{spellStatus}}
\index{spellStatus@{spellStatus}!KSpell@{KSpell}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}enum {\bf KSpell::spell\-Status}}\label{classKSpell_w11}


Possible states of the spell checker. 

\begin{itemize}
\item {\tt Starting} - After creation of KSpell. \item {\tt Running} - After the ready signal has been emitted. \item {\tt Cleaning} - After {\bf clean\-Up()}{\rm (p.\,\pageref{classKSpell_a3})} has been called. \item {\tt Finished} - After {\bf clean\-Up()}{\rm (p.\,\pageref{classKSpell_a3})} has been completed.\end{itemize}
The following error states exist:

\begin{itemize}
\item {\tt Error} - An error occurred in the {\tt Starting} state. \item {\tt Crashed} - An error occurred in the {\tt Running} state. \end{itemize}


Definition at line 65 of file kspell.h.\index{KSpell@{KSpell}!SpellerType@{SpellerType}}
\index{SpellerType@{SpellerType}!KSpell@{KSpell}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}enum {\bf KSpell::Speller\-Type}}\label{classKSpell_w12}


These are possible types of documents which the spell checker can check. 

\begin{itemize}
\item {\tt Text} - The default type, checks every word \item {\tt HTML} - For HTML/SGML/XML documents, will skip the tags, \item {\tt Te\-X} - For Te\-X/La\-Te\-X documents, will skip commands, \item {\tt Nroff} - For nroff/troff documents.\end{itemize}
Please note that not every option is supported on every type of checker (e.g. ASpell doesn't support Nroff). In case a type of a document is not supported the default Text option will be used. 

Definition at line 80 of file kspell.h.

\subsection{Constructor \& Destructor Documentation}
\index{KSpell@{KSpell}!KSpell@{KSpell}}
\index{KSpell@{KSpell}!KSpell@{KSpell}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KSpell::KSpell ({\bf QWidget} $\ast$ {\em parent}, const {\bf QString} \& {\em caption}, {\bf QObject} $\ast$ {\em receiver}, const char $\ast$ {\em slot}, {\bf KSpell\-Config} $\ast$ {\em kcs} = {\tt 0}, bool {\em progressbar} = {\tt true}, bool {\em modal} = {\tt false})}\label{classKSpell_a0}


Starts the spellchecker. 

KSpell emits {\bf ready()}{\rm (p.\,\pageref{classKSpell_l6})} when it has verified that ISpell/ASpell is working properly. Pass the name of a slot -- do not pass zero! Be sure to call {\bf clean\-Up()}{\rm (p.\,\pageref{classKSpell_a3})} when you are done with KSpell.

If KSpell could not be started correctly, {\bf death()}{\rm (p.\,\pageref{classKSpell_l10})} is emitted.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em parent}]Parent of {\bf KSpell\-Config}{\rm (p.\,\pageref{classKSpellConfig})} dialog.. \item[{\em caption}]Caption of {\bf KSpell\-Config}{\rm (p.\,\pageref{classKSpellConfig})} dialog. \item[{\em receiver}]Receiver object for the {\bf ready(KSpell $\ast$)}{\rm (p.\,\pageref{classKSpell_l6})} signal. \item[{\em slot}]Receiver's slot, will be connected to the {\bf ready(KSpell $\ast$)}{\rm (p.\,\pageref{classKSpell_l6})} signal. \item[{\em kcs}]Configuration for KSpell. \item[{\em progressbar}]Indicates if progress bar should be shown. \item[{\em modal}]Indicates modal or non-modal dialog. \end{description}
\end{Desc}


Definition at line 107 of file kspell.cpp.

Referenced by modal\-Check().\index{KSpell@{KSpell}!KSpell@{KSpell}}
\index{KSpell@{KSpell}!KSpell@{KSpell}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KSpell::KSpell ({\bf QWidget} $\ast$ {\em parent}, const {\bf QString} \& {\em caption}, {\bf QObject} $\ast$ {\em receiver}, const char $\ast$ {\em slot}, {\bf KSpell\-Config} $\ast$ {\em kcs}, bool {\em progressbar}, bool {\em modal}, {\bf Speller\-Type} {\em type})}\label{classKSpell_a1}


Starts the spellchecker. 

KSpell emits {\bf ready()}{\rm (p.\,\pageref{classKSpell_l6})} when it has verified that ISpell/ASpell is working properly. Pass the name of a slot -- do not pass zero! Be sure to call {\bf clean\-Up()}{\rm (p.\,\pageref{classKSpell_a3})} when you are done with KSpell.

If KSpell could not be started correctly, {\bf death()}{\rm (p.\,\pageref{classKSpell_l10})} is emitted.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em parent}]Parent of {\bf KSpell\-Config}{\rm (p.\,\pageref{classKSpellConfig})} dialog.. \item[{\em caption}]Caption of {\bf KSpell\-Config}{\rm (p.\,\pageref{classKSpellConfig})} dialog. \item[{\em receiver}]Receiver object for the {\bf ready(KSpell $\ast$)}{\rm (p.\,\pageref{classKSpell_l6})} signal. \item[{\em slot}]Receiver's slot, will be connected to the {\bf ready(KSpell $\ast$)}{\rm (p.\,\pageref{classKSpell_l6})} signal. \item[{\em kcs}]Configuration for KSpell. \item[{\em progressbar}]Indicates if progress bar should be shown. \item[{\em modal}]Indicates modal or non-modal dialog. \item[{\em type}]Type of the document to check \end{description}
\end{Desc}


Definition at line 115 of file kspell.cpp.\index{KSpell@{KSpell}!~KSpell@{$\sim$KSpell}}
\index{~KSpell@{$\sim$KSpell}!KSpell@{KSpell}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KSpell::$\sim${\bf KSpell} ()\hspace{0.3cm}{\tt  [virtual]}}\label{classKSpell_a21}


The destructor instructs ISpell/ASpell to write out the personal dictionary and then terminates ISpell/ASpell. 



Definition at line 1270 of file kspell.cpp.

\subsection{Member Function Documentation}
\index{KSpell@{KSpell}!status@{status}}
\index{status@{status}!KSpell@{KSpell}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf spell\-Status} KSpell::status () const\hspace{0.3cm}{\tt  [inline]}}\label{classKSpell_a2}


Returns the status of KSpell. 

\begin{Desc}
\item[See also:]{\bf spell\-Status()}{\rm (p.\,\pageref{classKSpell_w11})} \end{Desc}


Definition at line 130 of file kspell.h.

Referenced by modal\-Check().\index{KSpell@{KSpell}!cleanUp@{cleanUp}}
\index{cleanUp@{cleanUp}!KSpell@{KSpell}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KSpell::clean\-Up ()\hspace{0.3cm}{\tt  [virtual]}}\label{classKSpell_a3}


Cleans up ISpell. 

Write out the personal dictionary and close ISpell's stdin. A {\bf death()}{\rm (p.\,\pageref{classKSpell_l10})} signal will be emitted when the cleanup is complete, but this method will return immediately. 

Definition at line 1287 of file kspell.cpp.

References KProcess::close\-Stdin().\index{KSpell@{KSpell}!setAutoDelete@{setAutoDelete}}
\index{setAutoDelete@{setAutoDelete}!KSpell@{KSpell}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KSpell::set\-Auto\-Delete (bool {\em \_\-auto\-Delete})\hspace{0.3cm}{\tt  [inline]}}\label{classKSpell_a4}


Sets the auto-delete flag. 

If this is set, the KSpell object is automatically deleted after emitting {\bf death()}{\rm (p.\,\pageref{classKSpell_l10})}. 

Definition at line 145 of file kspell.h.\index{KSpell@{KSpell}!check@{check}}
\index{check@{check}!KSpell@{KSpell}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool KSpell::check (const {\bf QString} \& {\em \_\-buffer}, bool {\em usedialog} = {\tt true})\hspace{0.3cm}{\tt  [virtual]}}\label{classKSpell_a5}


Spellchecks a buffer of many words in plain text format. 

The {\tt \_\-buffer} is not modified. The signal {\bf done()}{\rm (p.\,\pageref{classKSpell_l8})} will be sent when {\bf check()}{\rm (p.\,\pageref{classKSpell_a5})} is finished and the argument will be a spell-corrected version of {\tt \_\-buffer}.

The spell check may be stopped by the user before the entire buffer has been checked. You can check {\bf last\-Position()}{\rm (p.\,\pageref{classKSpell_a6})} to see how far in {\tt \_\-buffer} {\bf check()}{\rm (p.\,\pageref{classKSpell_a5})} reached before stopping. 

Definition at line 961 of file kspell.cpp.

References QString::at(), done(), endl(), QString::ends\-With(), QString::find(), kd\-Debug(), QString::length(), QString::mid(), and KProc\-IO::write\-Stdin().\index{KSpell@{KSpell}!lastPosition@{lastPosition}}
\index{lastPosition@{lastPosition}!KSpell@{KSpell}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int KSpell::last\-Position () const\hspace{0.3cm}{\tt  [inline]}}\label{classKSpell_a6}


Returns the position (when using {\bf check()}{\rm (p.\,\pageref{classKSpell_a5})}) or word number (when using {\bf check\-List()}{\rm (p.\,\pageref{classKSpell_a7})}) of the last word checked. 



Definition at line 167 of file kspell.h.\index{KSpell@{KSpell}!checkList@{checkList}}
\index{checkList@{checkList}!KSpell@{KSpell}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool KSpell::check\-List ({\bf QString\-List} $\ast$ {\em \_\-wordlist}, bool {\em usedialog} = {\tt true})\hspace{0.3cm}{\tt  [virtual]}}\label{classKSpell_a7}


Spellchecks a list of words. 

{\bf check\-List()}{\rm (p.\,\pageref{classKSpell_a7})} is more flexible than {\bf check()}{\rm (p.\,\pageref{classKSpell_a5})}. You could parse any type of document (HTML, Te\-X, etc.) into a list of spell-checkable words and send the list to {\bf check\-List()}{\rm (p.\,\pageref{classKSpell_a7})}. Sending a marked-up document to {\bf check()}{\rm (p.\,\pageref{classKSpell_a5})} would result in the mark-up tags being spell checked. 

Definition at line 767 of file kspell.cpp.

References KProc\-IO::write\-Stdin().\index{KSpell@{KSpell}!checkWord@{checkWord}}
\index{checkWord@{checkWord}!KSpell@{KSpell}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool KSpell::check\-Word (const {\bf QString} \& {\em \_\-buffer}, bool {\em usedialog} = {\tt false})\hspace{0.3cm}{\tt  [virtual]}}\label{classKSpell_a8}


Spellchecks a single word. 

{\bf check\-Word()}{\rm (p.\,\pageref{classKSpell_a8})} is the most flexible function. Some applications might need this flexibility but will sacrifice speed when checking large numbers of words. Consider {\bf check\-List()}{\rm (p.\,\pageref{classKSpell_a7})} for checking many words.

Use this method for implementing \char`\"{}online\char`\"{} spellchecking (i.e., spellcheck as-you-type).

{\bf check\-Word()}{\rm (p.\,\pageref{classKSpell_a8})} returns {\tt false} if {\tt buffer} is not a single word (e.g. if it contains white space), otherwise it returns {\tt true};

If {\tt usedialog} is set to {\tt true}, KSpell will open the standard dialog if the word is not found. The dialog results can be queried by using {\bf dlg\-Result()}{\rm (p.\,\pageref{classKSpell_a12})} and replacement().

The signal {\bf corrected()}{\rm (p.\,\pageref{classKSpell_l1})} is emitted when the check is complete. You can look at {\bf suggestions()}{\rm (p.\,\pageref{classKSpell_a11})} to see what the suggested replacements were. 

Definition at line 458 of file kspell.cpp.

References QString::find(), QString::is\-Empty(), KProc\-IO::readln(), and KProc\-IO::write\-Stdin().\index{KSpell@{KSpell}!checkWord@{checkWord}}
\index{checkWord@{checkWord}!KSpell@{KSpell}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool KSpell::check\-Word (const {\bf QString} \& {\em buffer}, bool {\em \_\-usedialog}, bool {\em suggest})}\label{classKSpell_a9}


set the dialog signal handler 

Definition at line 499 of file kspell.cpp.

References QString::find(), QString::is\-Empty(), KProc\-IO::readln(), and KProc\-IO::write\-Stdin().\index{KSpell@{KSpell}!hide@{hide}}
\index{hide@{hide}!KSpell@{KSpell}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KSpell::hide ()}\label{classKSpell_a10}


Hides the dialog box. 

You'll need to do this when you are done with {\bf check\-Word()}{\rm (p.\,\pageref{classKSpell_a8})}; 

Definition at line 123 of file kspell.cpp.\index{KSpell@{KSpell}!suggestions@{suggestions}}
\index{suggestions@{suggestions}!KSpell@{KSpell}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QString\-List} KSpell::suggestions () const\hspace{0.3cm}{\tt  [inline]}}\label{classKSpell_a11}


Returns list of suggested word replacements. 

After calling {\bf check\-Word()}{\rm (p.\,\pageref{classKSpell_a8})} (an in response to a misspelled() signal you can use this to get the list of suggestions (if any were available). 

Definition at line 222 of file kspell.h.\index{KSpell@{KSpell}!dlgResult@{dlgResult}}
\index{dlgResult@{dlgResult}!KSpell@{KSpell}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int KSpell::dlg\-Result () const\hspace{0.3cm}{\tt  [inline]}}\label{classKSpell_a12}


Gets the result code of the dialog box. 

After calling check\-Word, you can use this to get the dialog box's result code. The possible values are (from {\bf kspelldlg.h}{\rm (p.\,\pageref{kspelldlg_8h})}): \begin{itemize}
\item KS\_\-CANCEL \item KS\_\-REPLACE \item KS\_\-REPLACEALL \item KS\_\-IGNORE \item KS\_\-IGNOREALL \item KS\_\-ADD \item KS\_\-STOP \end{itemize}


Definition at line 240 of file kspell.h.\index{KSpell@{KSpell}!moveDlg@{moveDlg}}
\index{moveDlg@{moveDlg}!KSpell@{KSpell}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KSpell::move\-Dlg (int {\em x}, int {\em y})}\label{classKSpell_a13}


Moves the dialog. 

If the dialog is not currently visible, it will be placed at this position when it becomes visible. Use this to get the dialog out of the way of a highlighted misspelled word in a document. 

Definition at line 1352 of file kspell.cpp.

References QWidget::map\-To\-Global(), QWidget::move(), QPoint::x(), and QPoint::y().\index{KSpell@{KSpell}!heightDlg@{heightDlg}}
\index{heightDlg@{heightDlg}!KSpell@{KSpell}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int KSpell::height\-Dlg () const}\label{classKSpell_a14}


Returns the height of the dialog box. 



Definition at line 125 of file kspell.cpp.\index{KSpell@{KSpell}!widthDlg@{widthDlg}}
\index{widthDlg@{widthDlg}!KSpell@{KSpell}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int KSpell::width\-Dlg () const}\label{classKSpell_a15}


Returns the width of the dialog box. 



Definition at line 126 of file kspell.cpp.\index{KSpell@{KSpell}!intermediateBuffer@{intermediateBuffer}}
\index{intermediateBuffer@{intermediateBuffer}!KSpell@{KSpell}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QString} KSpell::intermediate\-Buffer () const\hspace{0.3cm}{\tt  [inline]}}\label{classKSpell_a16}


Returns the partially spellchecked buffer. 

You might want the full buffer in its partially-checked state. 

Definition at line 267 of file kspell.h.\index{KSpell@{KSpell}!ignore@{ignore}}
\index{ignore@{ignore}!KSpell@{KSpell}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool KSpell::ignore (const {\bf QString} \& {\em word})\hspace{0.3cm}{\tt  [virtual]}}\label{classKSpell_a17}


Tells ISpell/ASpell to ignore this word for the life of this KSpell instance. 

\begin{Desc}
\item[Returns:]false if {\tt word} is not a word or there was an error communicating with ISpell/ASpell. \end{Desc}


Definition at line 395 of file kspell.cpp.

References QString::find(), QString::is\-Empty(), QString::prepend(), and KProc\-IO::write\-Stdin().\index{KSpell@{KSpell}!addPersonal@{addPersonal}}
\index{addPersonal@{addPersonal}!KSpell@{KSpell}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool KSpell::add\-Personal (const {\bf QString} \& {\em word})\hspace{0.3cm}{\tt  [virtual]}}\label{classKSpell_a18}


Adds a word to the user's personal dictionary. 

\begin{Desc}
\item[Returns:]false if {\tt word} is not a word or there was an error communicating with ISpell/ASpell. \end{Desc}


Definition at line 376 of file kspell.cpp.

References QString::find(), QString::is\-Empty(), QString::prepend(), and KProc\-IO::write\-Stdin().\index{KSpell@{KSpell}!ksConfig@{ksConfig}}
\index{ksConfig@{ksConfig}!KSpell@{KSpell}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf KSpell\-Config} KSpell::ks\-Config () const}\label{classKSpell_a19}


\begin{Desc}
\item[Returns:]the {\bf KSpell\-Config}{\rm (p.\,\pageref{classKSpellConfig})} object being used by this KSpell instance. \end{Desc}


Definition at line 1280 of file kspell.cpp.

References KSpell\-Config::set\-Ignore\-List(), and KSpell\-Config::set\-Replace\-All\-List().\index{KSpell@{KSpell}!setProgressResolution@{setProgressResolution}}
\index{setProgressResolution@{setProgressResolution}!KSpell@{KSpell}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KSpell::set\-Progress\-Resolution (unsigned int {\em res})}\label{classKSpell_a20}


Sets the resolution (in percent) of the {\bf progress()}{\rm (p.\,\pageref{classKSpell_l7})} signals. 

E.g. set\-Progress\-Resolution (10) instructs KSpell to send progress signals (at most) every 10\% (10\%, 20\%, 30\%...). The default is 10\%. 

Definition at line 1336 of file kspell.cpp.\index{KSpell@{KSpell}!modalCheck@{modalCheck}}
\index{modalCheck@{modalCheck}!KSpell@{KSpell}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int KSpell::modal\-Check ({\bf QString} \& {\em text})\hspace{0.3cm}{\tt  [static]}}\label{classKSpell_e0}


\begin{Desc}
\item[{\bf Deprecated}]Performs a synchronous spellcheck. \end{Desc}
This method does not return until spellchecking is done or canceled. Your application's GUI will still be updated, however. 

Definition at line 1376 of file kspell.cpp.\index{KSpell@{KSpell}!modalCheck@{modalCheck}}
\index{modalCheck@{modalCheck}!KSpell@{KSpell}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int KSpell::modal\-Check ({\bf QString} \& {\em text}, {\bf KSpell\-Config} $\ast$ {\em kcs})\hspace{0.3cm}{\tt  [static]}}\label{classKSpell_e1}


Performs a synchronous spellcheck. 

This method does not return until spellchecking is done or canceled. Your application's GUI will still be updated, however.

This overloaded method uses the spell-check configuration passed as parameter. 

Definition at line 1382 of file kspell.cpp.

References KSpell(), and status().\index{KSpell@{KSpell}!setIgnoreUpperWords@{setIgnoreUpperWords}}
\index{setIgnoreUpperWords@{setIgnoreUpperWords}!KSpell@{KSpell}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KSpell::set\-Ignore\-Upper\-Words (bool {\em b})}\label{classKSpell_a22}


Call set\-Ignore\-Upper\-Words(true) to tell the spell-checker to ignore words that are completely uppercase. 

They are spell-checked by default. 

Definition at line 1359 of file kspell.cpp.\index{KSpell@{KSpell}!setIgnoreTitleCase@{setIgnoreTitleCase}}
\index{setIgnoreTitleCase@{setIgnoreTitleCase}!KSpell@{KSpell}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KSpell::set\-Ignore\-Title\-Case (bool {\em b})}\label{classKSpell_a23}


Call set\-Ignore\-Title\-Case(true) to tell the spell-checker to ignore words with a 'title' case, i.e. 

starting with an uppercase letter. They are spell-checked by default. 

Definition at line 1364 of file kspell.cpp.\index{KSpell@{KSpell}!misspelling@{misspelling}}
\index{misspelling@{misspelling}!KSpell@{KSpell}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KSpell::misspelling (const {\bf QString} \& {\em originalword}, const {\bf QString\-List} \& {\em suggestions}, unsigned int {\em pos})\hspace{0.3cm}{\tt  [signal]}}\label{classKSpell_l0}


Emitted whenever a misspelled word is found by {\bf check()}{\rm (p.\,\pageref{classKSpell_a5})} or by {\bf check\-Word()}{\rm (p.\,\pageref{classKSpell_a8})}. 

If it is emitted by {\bf check\-Word()}{\rm (p.\,\pageref{classKSpell_a8})}, {\tt pos=0}. If it is emitted by {\bf check()}{\rm (p.\,\pageref{classKSpell_a5})}, then {\tt pos} indicates the position of the misspelled word in the (original) {\tt \_\-buffer}. (The first position is zero.) If it is emitted by {\bf check\-List()}{\rm (p.\,\pageref{classKSpell_a7})}, {\tt pos} is the index to the misspelled word in the {\bf QString\-List} passed to {\bf check\-List()}{\rm (p.\,\pageref{classKSpell_a7})}. Note, that {\tt originalword} can be only a word part, if it's word with hyphens.

These are called \_\-before\_\- the dialog is opened, so that the calling program's GUI may be updated. (e.g. the misspelled word may be highlighted). \index{KSpell@{KSpell}!corrected@{corrected}}
\index{corrected@{corrected}!KSpell@{KSpell}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KSpell::corrected (const {\bf QString} \& {\em originalword}, const {\bf QString} \& {\em newword}, unsigned int {\em pos})\hspace{0.3cm}{\tt  [signal]}}\label{classKSpell_l1}


Emitted after the \char`\"{}Replace\char`\"{} or \char`\"{}Replace All\char`\"{} buttons of the dialog was pressed, or if the word was corrected without calling the dialog (i.e., the user previously chose \char`\"{}Replace All\char`\"{} for this word). 

Results from the dialog may be checked with {\bf dlg\-Result()}{\rm (p.\,\pageref{classKSpell_a12})} and replacement().

Note, that when using {\bf check\-List()}{\rm (p.\,\pageref{classKSpell_a7})} this signal can occur more then once with same list position, when checking a word with hyphens. In this case {\tt originalword} is the last replacement.

\begin{Desc}
\item[See also:]{\bf check()}{\rm (p.\,\pageref{classKSpell_a5})} \end{Desc}
\index{KSpell@{KSpell}!ignoreall@{ignoreall}}
\index{ignoreall@{ignoreall}!KSpell@{KSpell}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KSpell::ignoreall (const {\bf QString} \& {\em originalword})\hspace{0.3cm}{\tt  [signal]}}\label{classKSpell_l2}


Emitted when the user pressed \char`\"{}Ignore All\char`\"{} in the dialog. 

This could be used to make an application or file specific user dictionary. \index{KSpell@{KSpell}!ignoreword@{ignoreword}}
\index{ignoreword@{ignoreword}!KSpell@{KSpell}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KSpell::ignoreword (const {\bf QString} \& {\em originalword})\hspace{0.3cm}{\tt  [signal]}}\label{classKSpell_l3}


Emitted when the user pressed \char`\"{}Ignore\char`\"{} in the dialog. 

Don't know if this could be useful. \index{KSpell@{KSpell}!addword@{addword}}
\index{addword@{addword}!KSpell@{KSpell}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KSpell::addword (const {\bf QString} \& {\em originalword})\hspace{0.3cm}{\tt  [signal]}}\label{classKSpell_l4}


Emitted when the user pressed \char`\"{}Add\char`\"{} in the dialog. 

This could be used to make an external user dictionary independent of the ISpell personal dictionary. \index{KSpell@{KSpell}!replaceall@{replaceall}}
\index{replaceall@{replaceall}!KSpell@{KSpell}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KSpell::replaceall (const {\bf QString} \& {\em origword}, const {\bf QString} \& {\em replacement})\hspace{0.3cm}{\tt  [signal]}}\label{classKSpell_l5}


Emitted when the user pressed \char`\"{}Replace\-All\char`\"{} in the dialog. 

\index{KSpell@{KSpell}!ready@{ready}}
\index{ready@{ready}!KSpell@{KSpell}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KSpell::ready ({\bf KSpell} $\ast$)\hspace{0.3cm}{\tt  [signal]}}\label{classKSpell_l6}


Emitted after KSpell has verified that ISpell/ASpell is running and working properly. 

\index{KSpell@{KSpell}!progress@{progress}}
\index{progress@{progress}!KSpell@{KSpell}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KSpell::progress (unsigned int {\em i})\hspace{0.3cm}{\tt  [signal]}}\label{classKSpell_l7}


Emitted during a {\bf check()}{\rm (p.\,\pageref{classKSpell_a5})}. 

{\tt i} is between 1 and 100. \index{KSpell@{KSpell}!done@{done}}
\index{done@{done}!KSpell@{KSpell}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KSpell::done (const {\bf QString} \& {\em buffer})\hspace{0.3cm}{\tt  [signal]}}\label{classKSpell_l8}


Emitted when {\bf check()}{\rm (p.\,\pageref{classKSpell_a5})} is done. 

Be sure to copy the results of {\tt buffer} if you need them. You can only rely on the contents of buffer for the life of the slot which was signaled by {\bf done()}{\rm (p.\,\pageref{classKSpell_l8})}. 

Referenced by check().\index{KSpell@{KSpell}!done@{done}}
\index{done@{done}!KSpell@{KSpell}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KSpell::done (bool)\hspace{0.3cm}{\tt  [signal]}}\label{classKSpell_l9}


Emitted when {\bf check\-List()}{\rm (p.\,\pageref{classKSpell_a7})} is done. 

If the argument is {\tt true}, then you should update your text from the wordlist, otherwise not. \index{KSpell@{KSpell}!death@{death}}
\index{death@{death}!KSpell@{KSpell}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KSpell::death ()\hspace{0.3cm}{\tt  [signal]}}\label{classKSpell_l10}


Emitted on terminal errors and after clean up. 

You can delete the KSpell object in this signal.

You can check {\bf status()}{\rm (p.\,\pageref{classKSpell_a2})} to see what caused the death: \begin{itemize}
\item {\tt Error} - KSpell could not start. \item {\tt Crashed} - KSpell encountered an unexpected error during execution. \item {\tt Finished} - Clean up finished. \end{itemize}


\subsection{Member Data Documentation}
\index{KSpell@{KSpell}!modaldlg@{modaldlg}}
\index{modaldlg@{modaldlg}!KSpell@{KSpell}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool {\bf KSpell::modaldlg}\hspace{0.3cm}{\tt  [protected]}}\label{classKSpell_p38}


Used for modal\-Check. 



Definition at line 541 of file kspell.h.

The documentation for this class was generated from the following files:\begin{CompactItemize}
\item 
kspell.h\item 
kspell.cpp\end{CompactItemize}
