\section{KOCRDialog Class Reference}
\label{classKOCRDialog}\index{KOCRDialog@{KOCRDialog}}
Base class for OCR Dialogs.  


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

Inheritance diagram for KOCRDialog:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=55pt]{classKOCRDialog__inherit__graph}
\end{center}
\end{figure}
Collaboration diagram for KOCRDialog:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=55pt]{classKOCRDialog__coll__graph}
\end{center}
\end{figure}
\subsection*{Signals}
\begin{CompactItemize}
\item 
void {\bf text\-Recognized} (const {\bf QString} \&text, int id)
\end{CompactItemize}
\subsection*{Static Public Member Functions}
\begin{CompactItemize}
\item 
static {\bf KOCRDialog} $\ast$ {\bf get\-OCRDialog} ({\bf QWidget} $\ast$parent=0L, const char $\ast$name=0, bool modal=false)
\end{CompactItemize}
\subsection*{Protected Member Functions}
\begin{CompactItemize}
\item 
{\bf KOCRDialog} (int dialog\-Face=Tabbed, int button\-Mask=Close$|$Help, {\bf QWidget} $\ast$parent=0L, const char $\ast$name=0, bool modal=false)
\item 
int {\bf id} () const 
\item 
int {\bf next\-Id} ()
\item 
virtual void {\bf virtual\_\-hook} (int id, void $\ast$data)\label{classKOCRDialog_b3}

\end{CompactItemize}


\subsection{Detailed Description}
Base class for OCR Dialogs. 



Definition at line 236 of file kscan.h.

\subsection{Constructor \& Destructor Documentation}
\index{KOCRDialog@{KOCRDialog}!KOCRDialog@{KOCRDialog}}
\index{KOCRDialog@{KOCRDialog}!KOCRDialog@{KOCRDialog}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KOCRDialog::KOCRDialog (int {\em dialog\-Face} = {\tt Tabbed}, int {\em button\-Mask} = {\tt Close$|$Help}, {\bf QWidget} $\ast$ {\em parent} = {\tt 0L}, const char $\ast$ {\em name} = {\tt 0}, bool {\em modal} = {\tt false})\hspace{0.3cm}{\tt  [protected]}}\label{classKOCRDialog_b0}


Constructs the OCR dialog. 

If you implement an own dialog, you can customize it with the usual {\bf KDialog\-Base} flags.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em dialog\-Face}]the {\bf KDialog\-Base::Dialog\-Type} \item[{\em button\-Mask}]a ORed mask of all buttons (see {\bf KDialog\-Base::Button\-Code}) \item[{\em parent}]the QWidget's parent, or 0 \item[{\em name}]the name of the {\bf QObject}, can be 0 \item[{\em modal}]if true the dialog is model \end{description}
\end{Desc}


Definition at line 93 of file kscan.cpp.

\subsection{Member Function Documentation}
\index{KOCRDialog@{KOCRDialog}!getOCRDialog@{getOCRDialog}}
\index{getOCRDialog@{getOCRDialog}!KOCRDialog@{KOCRDialog}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf KOCRDialog} $\ast$ KOCRDialog::get\-OCRDialog ({\bf QWidget} $\ast$ {\em parent} = {\tt 0L}, const char $\ast$ {\em name} = {\tt 0}, bool {\em modal} = {\tt false})\hspace{0.3cm}{\tt  [static]}}\label{classKOCRDialog_e0}


Creates the user's preferred OCR dialog and returns it, or 0L if no OCR-support is available. 

Pass a suitable {\tt parent} widget, if you like. If you don't you have to 'delete' the returned pointer yourself. \begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em parent}]the QWidget's parent, or 0 \item[{\em name}]the name of the {\bf QObject}, can be 0 \item[{\em modal}]if true the dialog is model \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]the KOCRDialog, or 0 if the function failed \end{Desc}


Definition at line 71 of file kscan.cpp.

References QValue\-List::begin(), KLib\-Factory::create(), KLib\-Loader::factory(), QValue\-List::is\-Empty(), QString::number(), KTrader::query(), KLib\-Loader::self(), and KTrader::self().\index{KOCRDialog@{KOCRDialog}!id@{id}}
\index{id@{id}!KOCRDialog@{KOCRDialog}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int KOCRDialog::id () const\hspace{0.3cm}{\tt  [inline, protected]}}\label{classKOCRDialog_b1}


Returns the current id for an image. 

You can use that in your subclass for the signals. The id is used in the signals to let people know which text-recognition belongs to which scan.

\begin{Desc}
\item[Returns:]the current id for the image \end{Desc}
\begin{Desc}
\item[See also:]{\bf next\-Id}{\rm (p.\,\pageref{classKOCRDialog_b2})} 

{\bf text\-Recognized}{\rm (p.\,\pageref{classKOCRDialog_l0})} \end{Desc}


Definition at line 279 of file kscan.h.\index{KOCRDialog@{KOCRDialog}!nextId@{nextId}}
\index{nextId@{nextId}!KOCRDialog@{KOCRDialog}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int KOCRDialog::next\-Id ()\hspace{0.3cm}{\tt  [inline, protected]}}\label{classKOCRDialog_b2}


Returns the id for the next image. 

You can use that in your subclass for the signals.

\begin{Desc}
\item[Returns:]the id for the next image \end{Desc}
\begin{Desc}
\item[See also:]{\bf id}{\rm (p.\,\pageref{classKOCRDialog_b1})} 

{\bf text\-Recognized}{\rm (p.\,\pageref{classKOCRDialog_l0})} \end{Desc}


Definition at line 289 of file kscan.h.\index{KOCRDialog@{KOCRDialog}!textRecognized@{textRecognized}}
\index{textRecognized@{textRecognized}!KOCRDialog@{KOCRDialog}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KOCRDialog::text\-Recognized (const {\bf QString} \& {\em text}, int {\em id})\hspace{0.3cm}{\tt  [signal]}}\label{classKOCRDialog_l0}


Informs you that the image with the id {\tt id} has been run through text-recognition. 

The text is in the {\bf QString} parameter. In the future, a compound document, using rich text will be used instead.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em text}]the text that has been recognized \item[{\em id}]the id of the image \end{description}
\end{Desc}


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