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

KDEUI

  • 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
60class 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
154class 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::KMimeTypeValidator
KMimeTypeValidator(QObject *parent=0)
Creates a new mime type validator.
Definition kstringvalidator.cpp:124
KMimeTypeValidator::fixup
virtual void fixup(QString &input) const
Removes all characters that are forbidden in mimetypes.
Definition kstringvalidator.cpp:151
KMimeTypeValidator::validate
virtual State validate(QString &input, int &pos) const
Checks for well-formed mimetype.
Definition kstringvalidator.cpp:135
KStringListValidator::stringList
QStringList stringList
Definition kstringvalidator.h:63
KStringListValidator::fixup
virtual void fixup(QString &input) const
Reimplemented from.
Definition kstringvalidator.cpp:71
KStringListValidator::isRejecting
bool isRejecting() const
Returns whether the string validator is in rejecting mode.
Definition kstringvalidator.cpp:89
KStringListValidator::KStringListValidator
KStringListValidator(const QStringList &list=QStringList(), bool rejecting=true, bool fixupEnabled=false, QObject *parent=0)
Creates a new string validator.
Definition kstringvalidator.cpp:35
KStringListValidator::rejecting
bool rejecting
Definition kstringvalidator.h:64
KStringListValidator::setStringList
void setStringList(const QStringList &list)
Sets the.
Definition kstringvalidator.cpp:104
KStringListValidator::setRejecting
void setRejecting(bool rejecting)
Sets whether the string validator is in rejecting mode or not.
Definition kstringvalidator.cpp:84
KStringListValidator::setFixupEnabled
void setFixupEnabled(bool fixupEnabled)
Sets the fixup flag.
Definition kstringvalidator.cpp:94
KStringListValidator::fixupEnabled
bool fixupEnabled
Definition kstringvalidator.h:65
KStringListValidator::isFixupEnabled
bool isFixupEnabled() const
Returns whether the fixup flag is set.
Definition kstringvalidator.cpp:99
KStringListValidator::validate
virtual State validate(QString &input, int &pos) const
Reimplemented from.
Definition kstringvalidator.cpp:50
QObject
QValidator
kdeui_export.h
This file is part of the KDE documentation.
Documentation copyright © 1996-2025 The KDE developers.
Generated on Fri Jan 17 2025 00:00:00 by doxygen 1.13.2 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
  • Related Pages

kdelibs-4.14.38 API Reference

Skip menu "kdelibs-4.14.38 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
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