\section{KRestricted\-Line Class Reference}
\label{classKRestrictedLine}\index{KRestrictedLine@{KRestrictedLine}}
A line editor for restricted character sets.  


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

Inheritance diagram for KRestricted\-Line:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=105pt]{classKRestrictedLine__inherit__graph}
\end{center}
\end{figure}
Collaboration diagram for KRestricted\-Line:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=123pt]{classKRestrictedLine__coll__graph}
\end{center}
\end{figure}
\subsection*{Signals}
\begin{CompactItemize}
\item 
void {\bf invalid\-Char} (int)
\end{CompactItemize}
\subsection*{Public Member Functions}
\begin{CompactItemize}
\item 
{\bf KRestricted\-Line} ({\bf QWidget} $\ast$parent=0, const char $\ast$name=0, const {\bf QString} \&valid=QString::null)
\item 
{\bf $\sim$KRestricted\-Line} ()
\item 
void {\bf set\-Valid\-Chars} (const {\bf QString} \&valid)
\item 
{\bf QString} {\bf valid\-Chars} () const 
\end{CompactItemize}
\subsection*{Protected Member Functions}
\begin{CompactItemize}
\item 
void {\bf key\-Press\-Event} ({\bf QKey\-Event} $\ast$e)
\item 
virtual void {\bf virtual\_\-hook} (int id, void $\ast$data)\label{classKRestrictedLine_b1}

\end{CompactItemize}
\subsection*{Properties}
\begin{CompactItemize}
\item 
{\bf QString} {\bf valid\-Chars}\label{classKRestrictedLine_00}

\end{CompactItemize}


\subsection{Detailed Description}
A line editor for restricted character sets. 

The KRestricted\-Line widget is a variant of {\bf QLine\-Edit} which accepts only a restricted set of characters as input. All other characters will be discarded and the signal {\bf invalid\-Char()}{\rm (p.\,\pageref{classKRestrictedLine_l0})} will be emitted for each of them.

Valid characters can be passed as a {\bf QString} to the constructor or set afterwards via {\bf set\-Valid\-Chars()}{\rm (p.\,\pageref{classKRestrictedLine_a2})}. The default key bindings of {\bf QLine\-Edit} are still in effect.

\begin{Desc}
\item[Author:]Michael Wiedmann $<${\tt mw@miwie.in-berlin.de}$>$ \end{Desc}




Definition at line 44 of file krestrictedline.h.

\subsection{Constructor \& Destructor Documentation}
\index{KRestrictedLine@{KRestricted\-Line}!KRestrictedLine@{KRestrictedLine}}
\index{KRestrictedLine@{KRestrictedLine}!KRestrictedLine@{KRestricted\-Line}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KRestricted\-Line::KRestricted\-Line ({\bf QWidget} $\ast$ {\em parent} = {\tt 0}, const char $\ast$ {\em name} = {\tt 0}, const {\bf QString} \& {\em valid} = {\tt QString::null})}\label{classKRestrictedLine_a0}


Constructor: This contructor takes three - optional - arguments. 

The first two parameters are simply passed on to {\bf QLine\-Edit}. \begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em parent}]pointer to the parent widget \item[{\em name}]pointer to the name of this widget \item[{\em valid}]pointer to set of valid characters \end{description}
\end{Desc}


Definition at line 28 of file krestrictedline.cpp.\index{KRestrictedLine@{KRestricted\-Line}!~KRestrictedLine@{$\sim$KRestrictedLine}}
\index{~KRestrictedLine@{$\sim$KRestrictedLine}!KRestrictedLine@{KRestricted\-Line}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KRestricted\-Line::$\sim${\bf KRestricted\-Line} ()}\label{classKRestrictedLine_a1}


Destructs the restricted line editor. 



Definition at line 36 of file krestrictedline.cpp.

\subsection{Member Function Documentation}
\index{KRestrictedLine@{KRestricted\-Line}!setValidChars@{setValidChars}}
\index{setValidChars@{setValidChars}!KRestrictedLine@{KRestricted\-Line}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KRestricted\-Line::set\-Valid\-Chars (const {\bf QString} \& {\em valid})}\label{classKRestrictedLine_a2}


All characters in the string valid are treated as acceptable characters. 



Definition at line 68 of file krestrictedline.cpp.\index{KRestrictedLine@{KRestricted\-Line}!validChars@{validChars}}
\index{validChars@{validChars}!KRestrictedLine@{KRestricted\-Line}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QString} KRestricted\-Line::valid\-Chars () const}\label{classKRestrictedLine_a3}


\begin{Desc}
\item[Returns:]the string of acceptable characters. \end{Desc}
\index{KRestrictedLine@{KRestricted\-Line}!invalidChar@{invalidChar}}
\index{invalidChar@{invalidChar}!KRestrictedLine@{KRestricted\-Line}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KRestricted\-Line::invalid\-Char (int)\hspace{0.3cm}{\tt  [signal]}}\label{classKRestrictedLine_l0}


Emitted when an invalid character was typed. 



Referenced by key\-Press\-Event().\index{KRestrictedLine@{KRestricted\-Line}!keyPressEvent@{keyPressEvent}}
\index{keyPressEvent@{keyPressEvent}!KRestrictedLine@{KRestricted\-Line}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KRestricted\-Line::key\-Press\-Event ({\bf QKey\-Event} $\ast$ {\em e})\hspace{0.3cm}{\tt  [protected, virtual]}}\label{classKRestrictedLine_b0}


Re-implemented for internal reasons. 

API not affected.

See {\bf QLine\-Edit::key\-Press\-Event()}. 

Reimplemented from {\bf KLine\-Edit} {\rm (p.\,\pageref{classKLineEdit_b1})}.

Definition at line 42 of file krestrictedline.cpp.

References QString::contains(), invalid\-Char(), QString::is\-Empty(), and QLine\-Edit::key\-Press\-Event().

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