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

KDEUI

kstringvalidator.h

Go to the documentation of this file.
00001 /*
00002     kstringvalidator.h
00003 
00004     Copyright (c) 2001 Marc Mutz <mutz@kde.org>
00005 
00006     This library is free software; you can redistribute it and/or
00007     modify it under the terms of the GNU Library General Public
00008     License as published by the Free Software Foundation; version 2.0
00009     of the License.
00010 
00011     This library is distributed in the hope that it will be useful,
00012     but WITHOUT ANY WARRANTY; without even the implied warranty of
00013     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00014     Library General Public License for more details.
00015 
00016     You should have received a copy of the GNU Library General Public
00017     License along with this library; if not, write to the Free
00018     Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
00019     02110-1301 USA
00020 */
00021 
00022 #ifndef KSTRINGVALIDATOR_H
00023 #define KSTRINGVALIDATOR_H
00024 
00025 #include <kdeui_export.h>
00026 
00027 #include <QtCore/QStringList>
00028 #include <QtGui/QValidator>
00029 
00060 class KDEUI_EXPORT KStringListValidator : public QValidator
00061 {
00062   Q_OBJECT
00063   Q_PROPERTY( QStringList stringList READ stringList WRITE setStringList )
00064   Q_PROPERTY( bool rejecting READ isRejecting WRITE setRejecting )
00065   Q_PROPERTY( bool fixupEnabled READ isFixupEnabled WRITE setFixupEnabled )
00066 
00067   public:
00078     explicit KStringListValidator( const QStringList &list = QStringList(),
00079                                    bool rejecting = true, bool fixupEnabled = false,
00080                                    QObject *parent = 0 );
00081 
00085     ~KStringListValidator();
00086 
00092     void setRejecting( bool rejecting );
00093 
00097     bool isRejecting() const;
00098 
00103     void setFixupEnabled( bool fixupEnabled );
00104 
00108     bool isFixupEnabled() const;
00109 
00114     void setStringList( const QStringList & list );
00115 
00119     QStringList stringList() const;
00120 
00124     virtual State validate( QString & input, int & pos ) const;
00125 
00129     virtual void fixup( QString & input ) const;
00130 
00131   private:
00132     class Private;
00133     Private* const d;
00134 };
00135 
00153 class KDEUI_EXPORT KMimeTypeValidator : public QValidator
00154 {
00155   Q_OBJECT
00156 
00157   public:
00161     explicit KMimeTypeValidator( QObject* parent = 0 );
00162 
00166     ~KMimeTypeValidator();
00167 
00174     virtual State validate( QString & input, int & pos ) const;
00175 
00179     virtual void fixup( QString & input ) const;
00180 
00181   private:
00182     class Private;
00183     Private* const d;
00184 };
00185 
00186 #endif // KSTRINGVALIDATOR_H

KDEUI

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

kdelibs

Skip menu "kdelibs"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • Kate
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
Generated for kdelibs by doxygen 1.6.1
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal