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

KDEUI

  • sources
  • kde-4.14
  • kdelibs
  • kdeui
  • widgets
kstringvalidator.h
Go to the documentation of this file.
1 /*
2  kstringvalidator.h
3 
4  Copyright (c) 2001 Marc Mutz <mutz@kde.org>
5 
6  This library is free software; you can redistribute it and/or
7  modify it under the terms of the GNU Library General Public
8  License as published by the Free Software Foundation; version 2.0
9  of the License.
10 
11  This library is distributed in the hope that it will be useful,
12  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  Library General Public License for more details.
15 
16  You should have received a copy of the GNU Library General Public
17  License along with this library; if not, write to the Free
18  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
19  02110-1301 USA
20 */
21 
22 #ifndef KSTRINGVALIDATOR_H
23 #define KSTRINGVALIDATOR_H
24 
25 #include <kdeui_export.h>
26 
27 #include <QtCore/QStringList>
28 #include <QtGui/QValidator>
29 
60 class KDEUI_EXPORT KStringListValidator : public QValidator
61 {
62  Q_OBJECT
63  Q_PROPERTY( QStringList stringList READ stringList WRITE setStringList )
64  Q_PROPERTY( bool rejecting READ isRejecting WRITE setRejecting )
65  Q_PROPERTY( bool fixupEnabled READ isFixupEnabled WRITE setFixupEnabled )
66 
67  public:
78  explicit KStringListValidator( const QStringList &list = QStringList(),
79  bool rejecting = true, bool fixupEnabled = false,
80  QObject *parent = 0 );
81 
85  ~KStringListValidator();
86 
92  void setRejecting( bool rejecting );
93 
97  bool isRejecting() const;
98 
103  void setFixupEnabled( bool fixupEnabled );
104 
108  bool isFixupEnabled() const;
109 
114  void setStringList( const QStringList & list );
115 
119  QStringList stringList() const;
120 
124  virtual State validate( QString & input, int & pos ) const;
125 
129  virtual void fixup( QString & input ) const;
130 
131  private:
132  class Private;
133  Private* const d;
134 };
135 
154 class KDEUI_EXPORT_DEPRECATED KMimeTypeValidator : public QValidator
155 {
156  Q_OBJECT
157 
158  public:
162  explicit KMimeTypeValidator( QObject* parent = 0 );
163 
167  ~KMimeTypeValidator();
168 
175  virtual State validate( QString & input, int & pos ) const;
176 
180  virtual void fixup( QString & input ) const;
181 
182  private:
183  class Private;
184  Private* const d;
185 };
186 
187 #endif // KSTRINGVALIDATOR_H
KMimeTypeValidator
A QValidator for mime types.
Definition: kstringvalidator.h:154
QValidator::fixup
virtual void fixup(QString &input) const
KStringListValidator
A QValidator to (dis)allow certain strings.
Definition: kstringvalidator.h:60
QObject
QString
QStringList
QValidator::validate
virtual State validate(QString &input, int &pos) const =0
kdeui_export.h
QValidator
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:24:00 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
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • 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