org.kde.koala
Class KMimeTypeValidator
public
class
KMimeTypeValidator
extends QValidator
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
mime-type := token "/" token ; 'token' is defined in rfc2045
The fixup will simply remove all non-token characters.
Author: Marc Mutz
UNKNOWN: A QValidator for mime types.
Method Summary |
String | className() |
void | dispose() Delete the wrapped C++ instance ahead of finalize() |
protected void | finalize() Deletes the wrapped C++ instance |
void | fixup(StringBuffer input)
Removes all characters that are forbidden in mimetypes. |
boolean | isDisposed() Has the wrapped C++ instance been deleted? |
QMetaObject | metaObject() |
int | validate(StringBuffer input, int[] pos)
Checks for well-formed mimetype. |
protected KMimeTypeValidator(Class dummy)
public KMimeTypeValidator(QObject parent, String name)
public KMimeTypeValidator(QObject parent)
public String className()
public void dispose()
Delete the wrapped C++ instance ahead of finalize()
protected void finalize()
Deletes the wrapped C++ instance
public void fixup(StringBuffer input)
Removes all characters that are forbidden in mimetypes.
UNKNOWN: Removes all characters that are forbidden in mimetypes.
public boolean isDisposed()
Has the wrapped C++ instance been deleted?
public QMetaObject metaObject()
public int validate(StringBuffer input, int[] pos)
Checks for well-formed mimetype. Returns
Acceptable iff input ~= /^[:allowed chars:]+\/[:allowed chars:]+$/
Intermediate iff input ~= /^[:allowed chars:]\/?[:allowed chars:]$/
Invalid else
@short Checks for well-formed mimetype.