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

kdeui

  • kdeui
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 <kdelibs_export.h>
30 
31 class TQWidget;
32 class TQString;
33 
44 class KDEUI_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 KDEUI_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 KDEUI_EXPORT KDoubleValidator : public TQDoubleValidator {
182  Q_OBJECT
183  Q_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

kdeui

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

kdeui

Skip menu "kdeui"
  • arts
  • dcop
  • dnssd
  • interfaces
  •     interface
  •     library
  •   kspeech
  •   ktexteditor
  • kabc
  • kate
  • kcmshell
  • kdecore
  • kded
  • kdefx
  • kdeprint
  • kdesu
  • kdeui
  • kdoctools
  • khtml
  • kimgio
  • kinit
  • kio
  •   bookmarks
  •   httpfilter
  •   kfile
  •   kio
  •   kioexec
  •   kpasswdserver
  •   kssl
  • kioslave
  •   http
  • kjs
  • kmdi
  •   kmdi
  • knewstuff
  • kparts
  • krandr
  • kresources
  • kspell2
  • kunittest
  • kutils
  • kwallet
  • libkmid
  • libkscreensaver
Generated for kdeui by doxygen 1.8.1.2
This website is maintained by Timothy Pearson.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. |