\section{KFind\-Dialog Class Reference}
\label{classKFindDialog}\index{KFindDialog@{KFindDialog}}
A generic \char`\"{}find\char`\"{} dialog.  


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

Inheritance diagram for KFind\-Dialog:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=63pt]{classKFindDialog__inherit__graph}
\end{center}
\end{figure}
Collaboration diagram for KFind\-Dialog:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=186pt]{classKFindDialog__coll__graph}
\end{center}
\end{figure}
\subsection*{Public Types}
\begin{CompactItemize}
\item 
enum {\bf Options} \{ \par
{\bf Whole\-Words\-Only} =  1, 
{\bf From\-Cursor} =  2, 
{\bf Selected\-Text} =  4, 
{\bf Case\-Sensitive} =  8, 
\par
{\bf Find\-Backwards} =  16, 
{\bf Regular\-Expression} =  32, 
{\bf Minimum\-User\-Option} =  65536
 \}
\end{CompactItemize}
\subsection*{Signals}
\begin{CompactItemize}
\item 
void {\bf ok\-Clicked} ()
\begin{CompactList}\small\item\em The OK button was pressed, the pattern was not empty, and if it is supposed to be a regular expression, it is known to be valid. \item\end{CompactList}\end{CompactItemize}
\subsection*{Public Member Functions}
\begin{CompactItemize}
\item 
{\bf KFind\-Dialog} ({\bf QWidget} $\ast$parent=0, const  char $\ast$name=0, long options=0, const  {\bf QString\-List} \&find\-Strings={\bf QString\-List}(), bool has\-Selection=false)
\begin{CompactList}\small\item\em Construct a find dialog with a parent object and a name. \item\end{CompactList}\item 
virtual {\bf $\sim$KFind\-Dialog} ()
\begin{CompactList}\small\item\em Destructor. \item\end{CompactList}\item 
void {\bf set\-Find\-History} (const  {\bf QString\-List} \&strings)
\begin{CompactList}\small\item\em Provide the list of {\tt strings} to be displayed as the history of find strings. \item\end{CompactList}\item 
{\bf QString\-List} {\bf find\-History} () const 
\begin{CompactList}\small\item\em Returns the list of history items. \item\end{CompactList}\item 
void {\bf set\-Has\-Selection} (bool has\-Selection)
\begin{CompactList}\small\item\em Enable/disable the 'search in selection' option, depending on whether there actually is a selection. \item\end{CompactList}\item 
void {\bf set\-Has\-Cursor} (bool has\-Cursor)
\begin{CompactList}\small\item\em Hide/show the 'from cursor' option, depending on whether the application implements a cursor. \item\end{CompactList}\item 
void {\bf set\-Options} (long options)
\begin{CompactList}\small\item\em Set the options which are enabled. \item\end{CompactList}\item 
long {\bf options} () const 
\begin{CompactList}\small\item\em Returns the state of the options. \item\end{CompactList}\item 
{\bf QString} {\bf pattern} () const 
\begin{CompactList}\small\item\em Returns the pattern to find. \item\end{CompactList}\item 
void {\bf set\-Pattern} (const  {\bf QString} \&pattern)
\begin{CompactList}\small\item\em Sets the pattern to find. \item\end{CompactList}\item 
{\bf QWidget} $\ast$ {\bf find\-Extension} ()
\begin{CompactList}\small\item\em Returns an empty widget which the user may fill with additional UI elements as required. \item\end{CompactList}\end{CompactItemize}
\subsection*{Protected Slots}
\begin{CompactItemize}
\item 
void {\bf slot\-Ok} ()\label{classKFindDialog_j0}

\item 
void {\bf slot\-Selected\-Text\-Toggled} (bool)\label{classKFindDialog_j1}

\item 
void {\bf show\-Patterns} ()\label{classKFindDialog_j2}

\item 
void {\bf show\-Placeholders} ()\label{classKFindDialog_j3}

\item 
void {\bf text\-Search\-Changed} (const  {\bf QString} \&)\label{classKFindDialog_j4}

\end{CompactItemize}
\subsection*{Protected Member Functions}
\begin{CompactItemize}
\item 
virtual void {\bf show\-Event} ({\bf QShow\-Event} $\ast$)\label{classKFindDialog_b0}

\end{CompactItemize}
\subsection*{Friends}
\begin{CompactItemize}
\item 
class {\bf KReplace\-Dialog}\label{classKFindDialog_n0}

\end{CompactItemize}


\subsection{Detailed Description}
A generic \char`\"{}find\char`\"{} dialog. 

\begin{Desc}
\item[Author:]S.R.Haque $<${\tt srhaque@iee.org}$>$\end{Desc}


{\bf  Detail}

{\bf  This widget inherits from {\bf KDialog\-Base} and implements the following additional functionalities: a find string object and an area for a user-defined widget to extend the dialog.}

{\bf  }

{\bf {\bf  Example}}

{\bf {\bf  To use the basic find dialog:}}

{\bf {\bf  \small\begin{alltt}
  KFindDialog dlg(....)
  if ( dlg.exec() != QDialog::Accepted )
      return;\end{alltt}\normalsize 
}}

{\bf {\bf \small\begin{alltt}  // proceed with {\bf KFind}{\rm (p.\,\pageref{classKFind})} from here
 \end{alltt}\normalsize 
}}

{\bf {\bf  To use your own extensions:}}

{\bf {\bf  \small\begin{alltt}
 \end{alltt}\normalsize 
 }}



Definition at line 61 of file kfinddialog.h.

\subsection{Constructor \& Destructor Documentation}
\index{KFindDialog@{KFind\-Dialog}!KFindDialog@{KFindDialog}}
\index{KFindDialog@{KFindDialog}!KFindDialog@{KFind\-Dialog}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KFind\-Dialog::KFind\-Dialog ({\bf QWidget} $\ast$ {\em parent} = 0, const char $\ast$ {\em name} = 0, long {\em options} = 0, const {\bf QString\-List} \& {\em find\-Strings} = {\bf QString\-List}(), bool {\em has\-Selection} = false)}\label{classKFindDialog_a0}


Construct a find dialog with a parent object and a name. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em parent}]The parent object of this widget. \item[{\em name}]The name of this widget. \item[{\em options}]A bitfield of the Options to be enabled. \item[{\em find\-Strings}]The find history, see {\bf find\-History}{\rm (p.\,\pageref{classKFindDialog_a3})}() \item[{\em has\-Selection}]Whether a selection exists \end{description}
\end{Desc}


Definition at line 52 of file kfinddialog.cpp.

References KStd\-Accel::name(), and set\-Options().\index{KFindDialog@{KFind\-Dialog}!~KFindDialog@{$\sim$KFindDialog}}
\index{~KFindDialog@{$\sim$KFindDialog}!KFindDialog@{KFind\-Dialog}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KFind\-Dialog::$\sim${\bf KFind\-Dialog} ()\hspace{0.3cm}{\tt  [virtual]}}\label{classKFindDialog_a1}


Destructor. 



Definition at line 70 of file kfinddialog.cpp.

\subsection{Member Function Documentation}
\index{KFindDialog@{KFind\-Dialog}!setFindHistory@{setFindHistory}}
\index{setFindHistory@{setFindHistory}!KFindDialog@{KFind\-Dialog}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KFind\-Dialog::set\-Find\-History (const {\bf QString\-List} \& {\em strings})}\label{classKFindDialog_a2}


Provide the list of {\tt strings} to be displayed as the history of find strings. 

{\tt strings} might get truncated if it is too long.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em history}]The find history. \end{description}
\end{Desc}
\begin{Desc}
\item[See also:]{\bf find\-History}{\rm (p.\,\pageref{classKFindDialog_a3})} \end{Desc}


Definition at line 262 of file kfinddialog.cpp.

References KHistory\-Combo::clear\-History(), QCombo\-Box::line\-Edit(), and KHistory\-Combo::set\-History\-Items().\index{KFindDialog@{KFind\-Dialog}!findHistory@{findHistory}}
\index{findHistory@{findHistory}!KFindDialog@{KFind\-Dialog}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QString\-List} KFind\-Dialog::find\-History () const}\label{classKFindDialog_a3}


Returns the list of history items. 

\begin{Desc}
\item[See also:]{\bf set\-Find\-History}{\rm (p.\,\pageref{classKFindDialog_a2})} \end{Desc}


Definition at line 86 of file kfinddialog.cpp.

References KHistory\-Combo::history\-Items().\index{KFindDialog@{KFind\-Dialog}!setHasSelection@{setHasSelection}}
\index{setHasSelection@{setHasSelection}!KFindDialog@{KFind\-Dialog}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KFind\-Dialog::set\-Has\-Selection (bool {\em has\-Selection})}\label{classKFindDialog_a4}


Enable/disable the 'search in selection' option, depending on whether there actually is a selection. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em has\-Selection}]true if a selection exists \end{description}
\end{Desc}


Definition at line 274 of file kfinddialog.cpp.

References QCheck\-Box::set\-Checked().\index{KFindDialog@{KFind\-Dialog}!setHasCursor@{setHasCursor}}
\index{setHasCursor@{setHasCursor}!KFindDialog@{KFind\-Dialog}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KFind\-Dialog::set\-Has\-Cursor (bool {\em has\-Cursor})}\label{classKFindDialog_a5}


Hide/show the 'from cursor' option, depending on whether the application implements a cursor. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em has\-Cursor}]true if the application features a cursor This is assumed to be the case by default. \end{description}
\end{Desc}


Definition at line 292 of file kfinddialog.cpp.

References options(), and QCheck\-Box::set\-Checked().\index{KFindDialog@{KFind\-Dialog}!setOptions@{setOptions}}
\index{setOptions@{setOptions}!KFindDialog@{KFind\-Dialog}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KFind\-Dialog::set\-Options (long {\em options})}\label{classKFindDialog_a6}


Set the options which are enabled. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em options}]The setting of the Options. \end{description}
\end{Desc}


Reimplemented in {\bf KReplace\-Dialog} {\rm (p.\,\pageref{classKReplaceDialog_a4})}.

Definition at line 299 of file kfinddialog.cpp.

References QCheck\-Box::set\-Checked().

Referenced by KFind\-Dialog(), and KReplace\-Dialog::set\-Options().\index{KFindDialog@{KFind\-Dialog}!options@{options}}
\index{options@{options}!KFindDialog@{KFind\-Dialog}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}long KFind\-Dialog::options () const}\label{classKFindDialog_a7}


Returns the state of the options. 

Disabled options may be returned in an indeterminate state.

\begin{Desc}
\item[See also:]{\bf set\-Options}{\rm (p.\,\pageref{classKFindDialog_a6})} \end{Desc}


Reimplemented in {\bf KReplace\-Dialog} {\rm (p.\,\pageref{classKReplaceDialog_a5})}.

Definition at line 230 of file kfinddialog.cpp.

References QCheck\-Box::is\-Checked(), and options().

Referenced by KReplace\-Dialog::options(), options(), and set\-Has\-Cursor().\index{KFindDialog@{KFind\-Dialog}!pattern@{pattern}}
\index{pattern@{pattern}!KFindDialog@{KFind\-Dialog}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QString} KFind\-Dialog::pattern () const}\label{classKFindDialog_a8}


Returns the pattern to find. 



Definition at line 249 of file kfinddialog.cpp.

References QCombo\-Box::current\-Text().\index{KFindDialog@{KFind\-Dialog}!setPattern@{setPattern}}
\index{setPattern@{setPattern}!KFindDialog@{KFind\-Dialog}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KFind\-Dialog::set\-Pattern (const {\bf QString} \& {\em pattern})}\label{classKFindDialog_a9}


Sets the pattern to find. 



Definition at line 254 of file kfinddialog.cpp.

References QCombo\-Box::line\-Edit().\index{KFindDialog@{KFind\-Dialog}!findExtension@{findExtension}}
\index{findExtension@{findExtension}!KFindDialog@{KFind\-Dialog}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QWidget} $\ast$ KFind\-Dialog::find\-Extension ()}\label{classKFindDialog_a10}


Returns an empty widget which the user may fill with additional UI elements as required. 

The widget occupies the width of the dialog, and is positioned immediately below the regular expression support widgets for the pattern string. 

Definition at line 75 of file kfinddialog.cpp.

References QGrid\-Layout::add\-Multi\-Cell\-Widget().\index{KFindDialog@{KFind\-Dialog}!okClicked@{okClicked}}
\index{okClicked@{okClicked}!KFindDialog@{KFind\-Dialog}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KFind\-Dialog::ok\-Clicked ()\hspace{0.3cm}{\tt  [signal]}}\label{classKFindDialog_l0}


The OK button was pressed, the pattern was not empty, and if it is supposed to be a regular expression, it is known to be valid. 



Reimplemented from {\bf KDialog\-Base}.

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