\section{KRestricted\-Line Class Reference}
\label{classKRestrictedLine}\index{KRestrictedLine@{KRestrictedLine}}
The KRestricted\-Line widget is a variant of {\bf QLine\-Edit} which accepts only a restricted set of characters as input. A line editor for restricted character sets.  


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

Inheritance diagram for KRestricted\-Line:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=106pt]{classKRestrictedLine__inherit__graph}
\end{center}
\end{figure}
Collaboration diagram for KRestricted\-Line:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=168pt]{classKRestrictedLine__coll__graph}
\end{center}
\end{figure}
\subsection*{Signals}
\begin{CompactItemize}
\item 
void {\bf invalid\-Char} (int)
\begin{CompactList}\small\item\em Emitted when an invalid character was typed. \item\end{CompactList}\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)
\begin{CompactList}\small\item\em Constructor: This contructor takes three - optional - arguments. \item\end{CompactList}\item 
{\bf $\sim$KRestricted\-Line} ()
\begin{CompactList}\small\item\em Destructs the restricted line editor. \item\end{CompactList}\item 
void {\bf set\-Valid\-Chars} (const  {\bf QString} \&valid)
\begin{CompactList}\small\item\em All characters in the string valid are treated as acceptable characters. \item\end{CompactList}\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)
\begin{CompactList}\small\item\em Re-implemented for internal reasons. \item\end{CompactList}\item 
virtual void {\bf virtual\_\-hook} (int id, void $\ast$data)\label{classKRestrictedLine_b1}

\end{CompactItemize}


\subsection{Detailed Description}
The KRestricted\-Line widget is a variant of {\bf QLine\-Edit} which accepts only a restricted set of characters as input. A line editor for restricted character sets. 

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}
\begin{Desc}
\item[Version:]0.0.1 \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} = 0, const char $\ast$ {\em name} = 0, const {\bf QString} \& {\em valid} = 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 29 of file krestrictedline.cpp.

References KStd\-Accel::name().\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 37 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 69 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}


Definition at line 74 of file krestrictedline.cpp.\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 43 of file krestrictedline.cpp.

References QKey\-Event::ascii(), QString::contains(), invalid\-Char(), QString::is\-Empty(), QKey\-Event::key(), 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}
