.TH "KStringListValidator" 3 "28 Jan 2004" "kdeui Library" \" -*- nroff -*-
.ad l
.nh
.SH NAME
KStringListValidator \- This validator allows you to accept only certain or to accept all but certain strings. A \fBQValidator\fP to (dis)allow certain strings.  

.PP
.SH SYNOPSIS
.br
.PP
\fC#include <kstringvalidator.h>\fP
.PP
Inherits \fBQValidator\fP.
.PP
.SS "Public Member Functions"

.in +1c
.ti -1c
.RI "\fBKStringListValidator\fP (const  \fBQStringList\fP &list=\fBQStringList\fP(), bool rejecting=true, bool fixupEnabled=false, \fBQObject\fP *parent=0, const  char *name=0)"
.br
.RI "\fIConstruct a new validator. \fP"
.ti -1c
.RI "virtual State \fBvalidate\fP (\fBQString\fP &input, int &pos) const "
.br
.ti -1c
.RI "virtual void \fBfixup\fP (\fBQString\fP &input) const "
.br
.ti -1c
.RI "void \fBsetRejecting\fP (bool rejecting)"
.br
.ti -1c
.RI "bool \fBisRejecting\fP () const "
.br
.ti -1c
.RI "void \fBsetFixupEnabled\fP (bool fixupEnabled)"
.br
.ti -1c
.RI "bool \fBisFixupEnabled\fP () const "
.br
.ti -1c
.RI "void \fBsetStringList\fP (const  \fBQStringList\fP &list)"
.br
.ti -1c
.RI "\fBQStringList\fP \fBstringList\fP () const "
.br
.in -1c
.SS "Protected Attributes"

.in +1c
.ti -1c
.RI "\fBQStringList\fP \fBmStringList\fP"
.br
.ti -1c
.RI "bool \fBmRejecting\fP"
.br
.ti -1c
.RI "bool \fBmFixupEnabled\fP"
.br
.in -1c
.SH "Detailed Description"
.PP 
This validator allows you to accept only certain or to accept all but certain strings. A \fBQValidator\fP 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.
.PP
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.
.PP
This validator can also fix strings. In rejecting mode, a number will be appended to the string until it is Acceptable. E.g. if 'foo' and 'foo 1' are in the stringlist, then fixup will change 'foo' to 'foo 2', provided 'foo 2' isn't in the list of forbidden strings.
.PP
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.
.PP
NOTE: fixup isn't yet implemented.
.PP
\fBAuthor:\fP
.RS 4
Marc Mutz <mutz@kde.org> 
.RE
.PP

.PP
Definition at line 57 of file kstringvalidator.h.
.SH "Constructor & Destructor Documentation"
.PP 
.SS "KStringListValidator::KStringListValidator (const \fBQStringList\fP & list = \fBQStringList\fP(), bool rejecting = true, bool fixupEnabled = false, \fBQObject\fP * parent = 0, const char * name = 0)\fC [inline]\fP"
.PP
Construct a new validator. \fBParameters:\fP
.RS 4
\fIlist\fP The list of strings to (dis)allow. 
.br
\fIrejecting\fP Selects the validator's mode (rejecting: true; accepting: false) 
.br
\fIfixupEnabled\fP Selects whether to fix strings or not. 
.RE
.PP
Definition at line 70 of file kstringvalidator.h.
.PP
References KStdAccel::name().

.SH "Author"
.PP 
Generated automatically by Doxygen for kdeui Library from the source code.
