summaryrefslogtreecommitdiffstats
path: root/konquest/int_validator.h
blob: 4f9951582abe35d93921ba06afa52c3960f6bd7f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#ifndef _INT_VALIDATOR_H_
#define _INT_VALIDATOR_H_

#include <tqvalidator.h>


class IntValidator : public TQValidator
{
    Q_OBJECT
  TQ_OBJECT

public:
    IntValidator( TQWidget *tqparent, const char *name = 0 );
    IntValidator( int bottom, int top, TQWidget *tqparent, const char *name = 0 );

    virtual ~IntValidator();

    virtual TQValidator::State validate( TQString &, int & ) const;
    
    virtual void setRange( int bottom, int top );

    int bottom() const { return v_bottom; }
    int top() const { return v_top; }

private:
    int v_bottom, v_top;
};



#endif /* _INT_VALIDATOR_H_ */