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

tdeui

  • tdeui
knumvalidator.h
1 /**********************************************************************
2 **
3 ** $Id$
4 **
5 ** Copyright (C) 1999 Glen Parker <glenebob@nwlink.com>
6 ** Copyright (C) 2002 Marc Mutz <mutz@kde.org>
7 **
8 ** This library is free software; you can redistribute it and/or
9 ** modify it under the terms of the GNU Library General Public
10 ** License as published by the Free Software Foundation; either
11 ** version 2 of the License, or (at your option) any later version.
12 **
13 ** This library is distributed in the hope that it will be useful,
14 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
15 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 ** Library General Public License for more details.
17 **
18 ** You should have received a copy of the GNU Library General Public
19 ** License along with this library; if not, write to the Free
20 ** Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
21 **
22 *****************************************************************************/
23 
24 #ifndef __KNUMVALIDATOR_H
25 #define __KNUMVALIDATOR_H
26 
27 #include <tqvalidator.h>
28 
29 #include <tdelibs_export.h>
30 
31 class TQWidget;
32 class TQString;
33 
44 class TDEUI_EXPORT KIntValidator : public TQValidator {
45 
46  public:
50  KIntValidator ( TQWidget * parent, int base = 10, const char * name = 0 );
54  KIntValidator ( int bottom, int top, TQWidget * parent, int base = 10, const char * name = 0 );
58  virtual ~KIntValidator ();
62  virtual State validate ( TQString &, int & ) const;
66  virtual void fixup ( TQString & ) const;
70  virtual void setRange ( int bottom, int top );
74  virtual void setBase ( int base );
78  virtual int bottom () const;
82  virtual int top () const;
86  virtual int base () const;
87 
88  private:
89  int _base;
90  int _min;
91  int _max;
92 
93 };
94 
95 class KFloatValidatorPrivate;
96 
109 class TDEUI_EXPORT KFloatValidator : public TQValidator {
110 
111  public:
115  KFloatValidator ( TQWidget * parent, const char * name = 0 );
119  KFloatValidator ( double bottom, double top, TQWidget * parent, const char * name = 0 );
123  KFloatValidator ( double bottom, double top, bool localeAware, TQWidget * parent, const char * name = 0 );
127  virtual ~KFloatValidator ();
131  virtual State validate ( TQString &, int & ) const;
135  virtual void fixup ( TQString & ) const;
139  virtual void setRange ( double bottom, double top );
143  virtual double bottom () const;
147  virtual double top () const;
153  void setAcceptLocalizedNumbers(bool b);
158  bool acceptLocalizedNumbers() const;
159 
160  private:
161  double _min;
162  double _max;
163 
164  KFloatValidatorPrivate *d;
165 };
166 
181 class TDEUI_EXPORT KDoubleValidator : public TQDoubleValidator {
182  Q_OBJECT
183  TQ_PROPERTY( bool acceptLocalizedNumbers READ acceptLocalizedNumbers WRITE setAcceptLocalizedNumbers )
184 public:
188  KDoubleValidator( TQObject * parent, const char * name=0 );
192  KDoubleValidator( double bottom, double top, int decimals,
193  TQObject * parent, const char * name=0 );
196  virtual ~KDoubleValidator();
197 
199  virtual TQValidator::State validate( TQString & input, int & pos ) const;
200 
202  bool acceptLocalizedNumbers() const;
204  void setAcceptLocalizedNumbers( bool accept );
205 
206 private:
207  typedef TQDoubleValidator base;
208  class Private;
209  Private * d;
210 };
211 
212 #endif
KIntValidator
TQValidator for integers.
Definition: knumvalidator.h:44
KDoubleValidator
A locale-aware QDoubleValidator.
Definition: knumvalidator.h:181
KFloatValidator
TQValidator for floating point entry (Obsolete)
Definition: knumvalidator.h:109

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
  •     tdecore
  • tdeabc
  • tdecmshell
  • tdecore
  • tdefx
  • tdehtml
  • tdeinit
  • tdeio
  •   bookmarks
  •   httpfilter
  •   kpasswdserver
  •   kssl
  • tdeioslave
  •   http
  •   tdefile
  •   tdeio
  •   tdeioexec
  • tdemdi
  •   tdemdi
  • tdenewstuff
  • tdeparts
  • tdeprint
  • tderandr
  • tderesources
  • tdespell2
  • tdesu
  • tdeui
  • tdeunittest
  • tdeutils
  • tdewallet
Generated for tdeui by doxygen 1.8.8
This website is maintained by Timothy Pearson.