.TH "KStringListValidator" kde3 "11 Jun 2005" "Version Version 3.4.1" "kdeui Library" \" -*- nroff -*-
.ad l
.nh
.SH NAME
KStringListValidator \- 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
.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
.SS "Properties"

.in +1c
.ti -1c
.RI "\fBQStringList\fP \fBstringList\fP"
.br
.ti -1c
.RI "bool \fBrejecting\fP"
.br
.ti -1c
.RI "bool \fBfixupEnabled\fP"
.br
.in -1c
.SH "Detailed Description"
.PP 
A \fBQValidator\fP to (dis)allow certain strings. 

This validator allows you to accept only certain or to accept all but certain strings.
.PP
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 60 of file kstringvalidator.h.
.SH "Constructor & Destructor Documentation"
.PP 
.SS "KStringListValidator::KStringListValidator (const \fBQStringList\fP & list = \fC\fBQStringList\fP()\fP, bool rejecting = \fCtrue\fP, bool fixupEnabled = \fCfalse\fP, \fBQObject\fP * parent = \fC0\fP, const char * name = \fC0\fP)\fC [inline]\fP"
.PP
Construct a new validator. 
.PP
\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. 
.br
\fIparent\fP Passed to lower level constructor. 
.br
\fIname\fP Passed to lower level constructor 
.RE
.PP

.PP
Definition at line 76 of file kstringvalidator.h.

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