longlongvalidator.h
1/* This file is part of the KDE project
2 Copyright (C) 2006 Jaroslaw Staniek <js@iidea.pl>
3
4 This program is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Library General Public
6 License as published by the Free Software Foundation; either
7 version 2 of the License, or (at your option) any later version.
8
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Library General Public License for more details.
13
14 You should have received a copy of the GNU Library General Public License
15 along with this program; see the file COPYING. If not, write to
16 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17 * Boston, MA 02110-1301, USA.
18*/
19
20#ifndef KEXI_LLONGVALIDATOR_H
21#define KEXI_LLONGVALIDATOR_H
22
23#include "kexiutils_export.h"
24
25#include <tqvalidator.h>
26class TQWidget;
27
28namespace KexiUtils {
29
31
38class KEXIUTILS_EXPORT LongLongValidator : public TQValidator
39{
40 public:
41 LongLongValidator( TQWidget * parent, int base = 10, const char * name = 0 );
42 LongLongValidator( TQ_LLONG bottom, TQ_LLONG top, TQWidget * parent, int base = 10, const char * name = 0 );
43 virtual ~LongLongValidator();
44
46 virtual State validate( TQString &, int & ) const;
47
49 virtual void fixup( TQString & ) const;
50
52 virtual void setRange( TQ_LLONG bottom, TQ_LLONG top );
53
55 virtual void setBase( int base );
56
58 virtual TQ_LLONG bottom() const;
59
61 virtual TQ_LLONG top() const;
62
64 virtual int base () const;
65
66 private:
67 TQ_LLONG m_base;
68 TQ_LLONG m_min;
69 TQ_LLONG m_max;
70};
71
72}
73#endif
A validator for longlong data type.
General Utils.
Definition identifier.h:27