• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdelibs API Reference
  • KDE Home
  • Contact Us
 

KDEUI

Public Member Functions | List of all members
KMimeTypeValidator Class Reference

#include <kstringvalidator.h>

Inheritance diagram for KMimeTypeValidator:
Inheritance graph
[legend]

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

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

The fixup will simply remove all non-token characters.

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

Definition at line 154 of file kstringvalidator.h.

Constructor & Destructor Documentation

KMimeTypeValidator::KMimeTypeValidator ( QObject *  parent = 0)
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

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

Removes all characters that are forbidden in mimetypes.

Definition at line 151 of file kstringvalidator.cpp.

QValidator::State KMimeTypeValidator::validate ( QString &  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 135 of file kstringvalidator.cpp.


The documentation for this class was generated from the following files:
  • kstringvalidator.h
  • kstringvalidator.cpp
This file is part of the KDE documentation.
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.

KDEUI

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

kdelibs API Reference

Skip menu "kdelibs API Reference"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  • kjsembed
  •   WTF
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Nepomuk-Core
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal