\section{KMime\-Type\-Validator Class Reference}
\label{classKMimeTypeValidator}\index{KMimeTypeValidator@{KMimeTypeValidator}}
A {\bf QValidator} for mime types.  


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

Inheritance diagram for KMime\-Type\-Validator:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=72pt]{classKMimeTypeValidator__inherit__graph}
\end{center}
\end{figure}
Collaboration diagram for KMime\-Type\-Validator:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=84pt]{classKMimeTypeValidator__coll__graph}
\end{center}
\end{figure}
\subsection*{Public Member Functions}
\begin{CompactItemize}
\item 
{\bf KMime\-Type\-Validator} ({\bf QObject} $\ast$parent, const char $\ast$name=0)\label{classKMimeTypeValidator_a0}

\item 
virtual State {\bf validate} ({\bf QString} \&input, int \&pos) const 
\item 
virtual void {\bf fixup} ({\bf QString} \&input) const 
\end{CompactItemize}


\subsection{Detailed Description}
A {\bf QValidator} 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 \char`\"{}foo/bar\char`\"{}, although that particular mime type isn't yet registered. It suffices for the name to adhere to the production



\footnotesize\begin{verbatim} mime-type := token "/" token ; 'token' is defined in rfc2045
\end{verbatim}
\normalsize


The fixup will simply remove all non-token characters.

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




Definition at line 119 of file kstringvalidator.h.

\subsection{Member Function Documentation}
\index{KMimeTypeValidator@{KMime\-Type\-Validator}!validate@{validate}}
\index{validate@{validate}!KMimeTypeValidator@{KMime\-Type\-Validator}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}QValidator::State KMime\-Type\-Validator::validate ({\bf QString} \& {\em input}, int \& {\em pos}) const\hspace{0.3cm}{\tt  [virtual]}}\label{classKMimeTypeValidator_a1}


Checks for well-formed mimetype. 

Returns \begin{itemize}
\item Acceptable iff input $\sim$= /$^\wedge$[:allowed chars:]+$\backslash$/[:allowed chars:]+\$/ \item Intermediate iff input $\sim$= /$^\wedge$[:allowed chars:]$\ast$$\backslash$/?[:allowed chars:]$\ast$\$/ \item Invalid else \end{itemize}


Reimplemented from {\bf QValidator}.

Definition at line 66 of file kstringvalidator.cpp.

References QReg\-Exp::exact\-Match().\index{KMimeTypeValidator@{KMime\-Type\-Validator}!fixup@{fixup}}
\index{fixup@{fixup}!KMimeTypeValidator@{KMime\-Type\-Validator}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KMime\-Type\-Validator::fixup ({\bf QString} \& {\em input}) const\hspace{0.3cm}{\tt  [virtual]}}\label{classKMimeTypeValidator_a2}


Removes all characters that are forbidden in mimetypes. 



Reimplemented from {\bf QValidator}.

Definition at line 84 of file kstringvalidator.cpp.

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