• Skip to content
  • Skip to link menu
Trinity API Reference
  • Trinity API Reference
  • tdeui
 

tdeui

Public Member Functions | List of all members
KMimeTypeValidator Class Reference

#include <kstringvalidator.h>

Inherits TQValidator.

Public Member Functions

 KMimeTypeValidator (TQObject *parent, const char *name=0)
 
virtual State validate (TQString &input, int &pos) const
 
virtual void fixup (TQString &input) const
 

Detailed Description

A TQValidator 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

mime-type := token "/" token ; 'token' is defined in rfc2045

The fixup will simply remove all non-token characters.

Author
Marc Mutz mutz@.nosp@m.kde..nosp@m.org

Definition at line 119 of file kstringvalidator.h.

Constructor & Destructor Documentation

◆ KMimeTypeValidator()

KMimeTypeValidator::KMimeTypeValidator ( TQObject *  parent,
const char *  name = 0 
)
inline

Definition at line 123 of file kstringvalidator.h.

Member Function Documentation

◆ fixup()

void KMimeTypeValidator::fixup ( TQString &  input) const
virtual

Removes all characters that are forbidden in mimetypes.

Definition at line 84 of file kstringvalidator.cpp.

◆ validate()

TQValidator::State KMimeTypeValidator::validate ( TQString &  input,
int &  pos 
) const
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 66 of file kstringvalidator.cpp.


The documentation for this class was generated from the following files:
  • kstringvalidator.h
  • kstringvalidator.cpp

tdeui

Skip menu "tdeui"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

tdeui

Skip menu "tdeui"
  • arts
  • dcop
  • dnssd
  • interfaces
  •   kspeech
  •     interface
  •     library
  •   tdetexteditor
  • kate
  • kded
  • kdoctools
  • kimgio
  • kjs
  • libtdemid
  • libtdescreensaver
  • tdeabc
  • tdecmshell
  • tdecore
  • tdefx
  • tdehtml
  • tdeinit
  • tdeio
  •   bookmarks
  •   httpfilter
  •   kpasswdserver
  •   kssl
  •   tdefile
  •   tdeio
  •   tdeioexec
  • tdeioslave
  •   http
  • tdemdi
  •   tdemdi
  • tdenewstuff
  • tdeparts
  • tdeprint
  • tderandr
  • tderesources
  • tdespell2
  • tdesu
  • tdeui
  • tdeunittest
  • tdeutils
  • tdewallet
Generated for tdeui by doxygen 1.9.4
This website is maintained by Timothy Pearson.