KDEUI
#include <kstringvalidator.h>
Public Member Functions | |
KMimeTypeValidator (QObject *parent=0) | |
~KMimeTypeValidator () | |
virtual void | fixup (QString &input) const |
virtual State | validate (QString &input, int &pos) const |
Detailed Description
A 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 "foo/bar", although that particular mime type isn't yet registered. It suffices for the name to adhere to the production
The fixup will simply remove all non-token characters.
Definition at line 154 of file kstringvalidator.h.
Constructor & Destructor Documentation
|
explicit |
Creates a new mime type validator.
Definition at line 124 of file kstringvalidator.cpp.
KMimeTypeValidator::~KMimeTypeValidator | ( | ) |
Destroys the mime type validator.
Definition at line 130 of file kstringvalidator.cpp.
Member Function Documentation
|
virtual |
Removes all characters that are forbidden in mimetypes.
Definition at line 151 of file kstringvalidator.cpp.
|
virtual |
Checks for well-formed mimetype.
Returns
- Acceptable iff input ~= /^[:allowed chars:]+\/[:allowed chars:]+$/
- Intermediate iff input ~= /^[:allowed chars:]*\/?[:allowed chars:]*$/
- Invalid else
Definition at line 135 of file kstringvalidator.cpp.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:49:17 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.