Kexi API Documentation (2.0 alpha)

KexiDB::FieldValidator Class Reference

#include <fieldvalidator.h>

Inheritance diagram for KexiDB::FieldValidator:

KexiUtils::MultiValidator KexiUtils::Validator QValidator List of all members.

Detailed Description

A validator for KexiDB data types.

This can be used by QLineEdit or subclass to provide validated text entry. Curently is supports all integer types, floating point types and booleans. Internal validators like KIntValidator or KexiUtils::LongLongValidator are used. 'unsigned' and 'scale' parameters are taken into account when setting up internal validators.

Todo:
date/time support for types

add validation of the maximum length and other field's properties

Definition at line 39 of file fieldvalidator.h.

Public Member Functions

 FieldValidator (const Field &field, QWidget *parent, const char *name=0)
 Setups the validator for field. Does not keep a pointer to field.
 ~FieldValidator ()


Constructor & Destructor Documentation

FieldValidator::FieldValidator const Field field,
QWidget parent,
const char *  name = 0
 

Setups the validator for field. Does not keep a pointer to field.

Todo:
merge this code with KexiTableEdit code!

set maximum length validator

handle input mask (via QLineEdit::setInputMask()

Todo:
handle unsigned (using ULongLongValidator)
Todo:
add validator
Todo:
add validator
Todo:
add BooleanValidator

Definition at line 29 of file fieldvalidator.cpp.

References KexiUtils::MultiValidator::addSubvalidator(), KexiDB::Field::BigInteger, KexiDB::Field::Boolean, KexiDB::Field::Byte, KexiDB::Field::Date, KexiDB::Field::DateTime, KexiDB::Field::Float, KexiDB::Field::Integer, KexiDB::Field::isFPNumericType(), KexiDB::Field::isIntegerType(), KexiDB::Field::isUnsigned(), KexiDB::Field::scale(), KexiDB::Field::ShortInteger, KexiDB::Field::Time, and KexiDB::Field::type().

FieldValidator::~FieldValidator  ) 
 

Definition at line 97 of file fieldvalidator.cpp.


The documentation for this class was generated from the following files:
KDE Logo
This file is part of the documentation for Kexi 2.0 alpha.
Documentation copyright © 2002-2007 the Kexi Team.
Generated on Tue Apr 1 20:50:45 2008 by doxygen 1.4.2 written by Dimitri van Heesch, © 1997-2003