20#include "fieldvalidator.h"
23#include <kexiutils/longlongvalidator.h>
24#include <knumvalidator.h>
37 TQValidator *validator = 0;
39 int bottom = 0, top = 0;
41 bottom = u ? 0 : -0x80;
42 top = u ? 0xff : 0x7f;
45 bottom = u ? 0 : -0x8000;
46 top = u ? 0xffff : 0x7fff;
49 bottom = u ? 0 : -0x7fffffff-1;
50 top = u ? 0xffffffff : 0x7fffffff;
58 validator = new KIntValidator(bottom, top, 0);
62 TQValidator *validator;
65 validator = new KDoubleValidator(0, 3.4e+38, field. scale(), 0);
67 validator = new KDoubleValidator( this);
71 validator = new KDoubleValidator(0, 1.7e+308, field. scale(), 0);
73 validator = new KDoubleValidator( this);
77 else if (t==Field::Date) {
83 else if (t==Field::Time) {
87 else if (t==Field::DateTime) {
97FieldValidator::~FieldValidator()
FieldValidator(const Field &field, TQWidget *parent, const char *name=0) Setups the validator for field. Does not keep a pointer to field.
bool isFPNumericType() const
bool isIntegerType() const
bool isUnsigned() const if the type has the unsigned attribute
A validator for longlong data type.
void addSubvalidator(TQValidator *validator, bool owned=true)
High-level database connectivity library with database backend drivers.
|