\section{KString\-List\-Validator Class Reference}
\label{classKStringListValidator}\index{KStringListValidator@{KStringListValidator}}
This validator allows you to accept only certain or to accept all but certain strings. A {\bf QValidator} to (dis)allow certain strings.  


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

Inheritance diagram for KString\-List\-Validator:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=74pt]{classKStringListValidator__inherit__graph}
\end{center}
\end{figure}
Collaboration diagram for KString\-List\-Validator:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=109pt]{classKStringListValidator__coll__graph}
\end{center}
\end{figure}
\subsection*{Public Member Functions}
\begin{CompactItemize}
\item 
{\bf KString\-List\-Validator} (const  {\bf QString\-List} \&list={\bf QString\-List}(), bool rejecting=true, bool fixup\-Enabled=false, {\bf QObject} $\ast$parent=0, const  char $\ast$name=0)
\begin{CompactList}\small\item\em Construct a new validator. \item\end{CompactList}\item 
virtual State {\bf validate} ({\bf QString} \&input, int \&pos) const \label{classKStringListValidator_a1}

\item 
virtual void {\bf fixup} ({\bf QString} \&input) const \label{classKStringListValidator_a2}

\item 
void {\bf set\-Rejecting} (bool rejecting)\label{classKStringListValidator_a3}

\item 
bool {\bf is\-Rejecting} () const \label{classKStringListValidator_a4}

\item 
void {\bf set\-Fixup\-Enabled} (bool fixup\-Enabled)\label{classKStringListValidator_a5}

\item 
bool {\bf is\-Fixup\-Enabled} () const \label{classKStringListValidator_a6}

\item 
void {\bf set\-String\-List} (const  {\bf QString\-List} \&list)\label{classKStringListValidator_a7}

\item 
{\bf QString\-List} {\bf string\-List} () const \label{classKStringListValidator_a8}

\end{CompactItemize}
\subsection*{Protected Attributes}
\begin{CompactItemize}
\item 
{\bf QString\-List} {\bf m\-String\-List}\label{classKStringListValidator_p0}

\item 
bool {\bf m\-Rejecting}\label{classKStringListValidator_p1}

\item 
bool {\bf m\-Fixup\-Enabled}\label{classKStringListValidator_p2}

\end{CompactItemize}


\subsection{Detailed Description}
This validator allows you to accept only certain or to accept all but certain strings. A {\bf QValidator} to (dis)allow certain strings. 

When used in rejecting mode, accepts only strings not in the stringlist. This mode is the default and comes in handy when asking the user for a name of some listed entity. Set the list of already used names to prevent the user from entering duplicate names.

When used in non-rejecting mode, accepts only strings that appear in the stringlist. Use with care! From a user's point of view this mode is hard to grasp.

This validator can also fix strings. In rejecting mode, a number will be appended to the string until it is Acceptable. E.g. if \char`\"{}foo\char`\"{} and \char`\"{}foo 1\char`\"{} are in the stringlist, then fixup will change \char`\"{}foo\char`\"{} to \char`\"{}foo 2\char`\"{}, provided \char`\"{}foo 2\char`\"{} isn't in the list of forbidden strings.

In accepting mode, when the input starts with an Acceptable substring, truncates to the longest Acceptable string. When the input is the start of an Acceptable string, completes to the shortest Acceptable string.

NOTE: fixup isn't yet implemented.

\begin{Desc}
\item[Author:]Marc Mutz $<${\tt mutz@kde.org}$>$ \end{Desc}




Definition at line 57 of file kstringvalidator.h.

\subsection{Constructor \& Destructor Documentation}
\index{KStringListValidator@{KString\-List\-Validator}!KStringListValidator@{KStringListValidator}}
\index{KStringListValidator@{KStringListValidator}!KStringListValidator@{KString\-List\-Validator}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KString\-List\-Validator::KString\-List\-Validator (const {\bf QString\-List} \& {\em list} = {\bf QString\-List}(), bool {\em rejecting} = true, bool {\em fixup\-Enabled} = false, {\bf QObject} $\ast$ {\em parent} = 0, const char $\ast$ {\em name} = 0)\hspace{0.3cm}{\tt  [inline]}}\label{classKStringListValidator_a0}


Construct a new validator. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em list}]The list of strings to (dis)allow. \item[{\em rejecting}]Selects the validator's mode (rejecting: true; accepting: false) \item[{\em fixup\-Enabled}]Selects whether to fix strings or not. \end{description}
\end{Desc}


Definition at line 70 of file kstringvalidator.h.

References KStd\-Accel::name().

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