.TH "KMimeTypeValidator" kde3 "11 Jun 2005" "Version Version 3.4.1" "kdeui Library" \" -*- nroff -*-
.ad l
.nh
.SH NAME
KMimeTypeValidator \- A \fBQValidator\fP for mime types.  

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

.in +1c
.ti -1c
.RI "\fBKMimeTypeValidator\fP (\fBQObject\fP *parent, 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
.in -1c
.SH "Detailed Description"
.PP 
A \fBQValidator\fP for mime types. 

This validator allows you to validate mimetype names (e.g. text/plain, image/jpeg). Note that the validation is only syntactically. It will e.g. not reject 'foo/bar', although that particular mime type isn't yet registered. It suffices for the name to adhere to the production
.PP
.PP
.nf
 mime-type := token '/' token ; 'token' is defined in rfc2045
.fi
.PP
.PP
The fixup will simply remove all non-token characters.
.PP
\fBAuthor:\fP
.RS 4
Marc Mutz <mutz@kde.org> 
.RE
.PP

.PP
Definition at line 119 of file kstringvalidator.h.
.SH "Member Function Documentation"
.PP 
.SS "QValidator::State KMimeTypeValidator::validate (\fBQString\fP & input, int & pos) const\fC [virtual]\fP"
.PP
Checks for well-formed mimetype. 
.PP
Returns 
.PD 0

.IP "\(bu" 2
Acceptable iff input ~= /^[:allowed chars:]+\\/[:allowed chars:]+$/ 
.IP "\(bu" 2
Intermediate iff input ~= /^[:allowed chars:]*\\/?[:allowed chars:]*$/ 
.IP "\(bu" 2
Invalid else 
.PP

.PP
Reimplemented from \fBQValidator\fP.
.PP
Definition at line 66 of file kstringvalidator.cpp.
.PP
References QRegExp::exactMatch().
.SS "void KMimeTypeValidator::fixup (\fBQString\fP & input) const\fC [virtual]\fP"
.PP
Removes all characters that are forbidden in mimetypes. 
.PP
Reimplemented from \fBQValidator\fP.
.PP
Definition at line 84 of file kstringvalidator.cpp.

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