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

tdeui

  • tdeui
kstringvalidator.h
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 <tqvalidator.h>
26#include <tqstringlist.h>
27
28#include <tdelibs_export.h>
29
60class TDEUI_EXPORT KStringListValidator : public TQValidator {
61 TQ_OBJECT
62 TQ_PROPERTY( TQStringList stringList READ stringList WRITE setStringList )
63 TQ_PROPERTY( bool rejecting READ isRejecting WRITE setRejecting )
64 TQ_PROPERTY( bool fixupEnabled READ isFixupEnabled WRITE setFixupEnabled )
65public:
76 KStringListValidator( const TQStringList & list=TQStringList(),
77 bool rejecting=true, bool fixupEnabled=false,
78 TQObject * parent=0, const char * name=0 )
79 : TQValidator( parent, name ), mStringList( list ),
80 mRejecting( rejecting ), mFixupEnabled( fixupEnabled ) {}
81
82 virtual State validate( TQString & input, int & pos ) const;
83 virtual void fixup( TQString & input ) const;
84
85 void setRejecting( bool rejecting ) { mRejecting = rejecting; }
86 bool isRejecting() const { return mRejecting; }
87
88 void setFixupEnabled( bool fixupEnabled ) { mFixupEnabled = fixupEnabled; }
89 bool isFixupEnabled() const { return mFixupEnabled; }
90
91 void setStringList( const TQStringList & list ) { mStringList = list; }
92 TQStringList stringList() const { return mStringList; }
93
94protected:
95 TQStringList mStringList;
96 bool mRejecting;
97 bool mFixupEnabled;
98private:
99 class KStringListValidator* d;
100};
101
119class TDEUI_EXPORT KMimeTypeValidator : public TQValidator
120{
121 TQ_OBJECT
122public:
123 KMimeTypeValidator( TQObject* parent, const char* name=0)
124 : TQValidator( parent, name ) {}
125
132 virtual State validate( TQString & input, int & pos ) const;
136 virtual void fixup( TQString & input ) const;
137private:
138 class KMimeTypeValidator* d;
139};
140
141#endif // __KSTRINGVALIDATOR_H__
KMimeTypeValidator
A TQValidator for mime types.
Definition: kstringvalidator.h:120
KStringListValidator
A TQValidator to (dis)allow certain strings.
Definition: kstringvalidator.h:60
KStringListValidator::KStringListValidator
KStringListValidator(const TQStringList &list=TQStringList(), bool rejecting=true, bool fixupEnabled=false, TQObject *parent=0, const char *name=0)
Construct a new validator.
Definition: kstringvalidator.h:76

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.