qx::IxValidator : common interface for validator engine
More...
#include <IxValidator.h>
List of all members.
Public Types |
enum | validator_type {
not_null,
not_empty,
min_value,
max_value,
min_length,
max_length,
date_past,
date_future,
min_decimal,
max_decimal,
regular_expression,
e_mail,
recursive_validator,
custom_validator
} |
Public Member Functions |
| IxValidator (validator_type type) |
virtual | ~IxValidator () |
validator_type | getType () const |
QString | getMessage () const |
QString | getGroup () const |
QVariant | getConstraint () const |
QVariantList | getConstraints () const |
IxDataMember * | getDataMember () const |
void | setMessage (const QString &s) |
void | setGroup (const QString &s) |
void | setConstraint (const QVariant &v) |
void | setConstraints (const QVariantList &lst) |
void | setDataMember (IxDataMember *p) |
virtual void | validate (void *pOwner, QxInvalidValueX &lstInvalidValues) const |
Protected Member Functions |
void | initDefaultMessage () |
void | validateNotNull (const QVariant &v, QxInvalidValueX &lstInvalidValues) const |
void | validateNotEmpty (const QVariant &v, QxInvalidValueX &lstInvalidValues) const |
void | validateMinValue (const QVariant &v, QxInvalidValueX &lstInvalidValues) const |
void | validateMaxValue (const QVariant &v, QxInvalidValueX &lstInvalidValues) const |
void | validateMinDecimal (const QVariant &v, QxInvalidValueX &lstInvalidValues) const |
void | validateMaxDecimal (const QVariant &v, QxInvalidValueX &lstInvalidValues) const |
void | validateMinLength (const QVariant &v, QxInvalidValueX &lstInvalidValues) const |
void | validateMaxLength (const QVariant &v, QxInvalidValueX &lstInvalidValues) const |
void | validateDatePast (const QVariant &v, QxInvalidValueX &lstInvalidValues) const |
void | validateDateFuture (const QVariant &v, QxInvalidValueX &lstInvalidValues) const |
void | validateRegularExpression (const QVariant &v, QxInvalidValueX &lstInvalidValues) const |
void | validateEMail (const QVariant &v, QxInvalidValueX &lstInvalidValues) const |
Protected Attributes |
validator_type | m_type |
| Validator type.
|
QString | m_message |
| Validator message when invalid value is detected.
|
QString | m_group |
| Validator group.
|
QVariantList | m_Constraints |
| List of constraints to verify.
|
IxDataMember * | m_pDataMember |
| Registered property associated to validator.
|
Detailed Description
Member Enumeration Documentation
- Enumerator:
not_null |
|
not_empty |
|
min_value |
|
max_value |
|
min_length |
|
max_length |
|
date_past |
|
date_future |
|
min_decimal |
|
max_decimal |
|
regular_expression |
|
e_mail |
|
recursive_validator |
|
custom_validator |
|
Definition at line 65 of file IxValidator.h.
Constructor & Destructor Documentation
virtual qx::IxValidator::~IxValidator |
( |
| ) |
[virtual] |
Member Function Documentation
QVariant qx::IxValidator::getConstraint |
( |
| ) |
const |
QVariantList qx::IxValidator::getConstraints |
( |
| ) |
const |
QString qx::IxValidator::getGroup |
( |
| ) |
const |
QString qx::IxValidator::getMessage |
( |
| ) |
const |
void qx::IxValidator::initDefaultMessage |
( |
| ) |
[protected] |
void qx::IxValidator::setConstraint |
( |
const QVariant & |
v | ) |
|
void qx::IxValidator::setConstraints |
( |
const QVariantList & |
lst | ) |
|
void qx::IxValidator::setGroup |
( |
const QString & |
s | ) |
|
void qx::IxValidator::setMessage |
( |
const QString & |
s | ) |
|
virtual void qx::IxValidator::validate |
( |
void * |
pOwner, |
|
|
QxInvalidValueX & |
lstInvalidValues |
|
) |
| const [virtual] |
void qx::IxValidator::validateDateFuture |
( |
const QVariant & |
v, |
|
|
QxInvalidValueX & |
lstInvalidValues |
|
) |
| const [protected] |
void qx::IxValidator::validateDatePast |
( |
const QVariant & |
v, |
|
|
QxInvalidValueX & |
lstInvalidValues |
|
) |
| const [protected] |
void qx::IxValidator::validateEMail |
( |
const QVariant & |
v, |
|
|
QxInvalidValueX & |
lstInvalidValues |
|
) |
| const [protected] |
void qx::IxValidator::validateMaxDecimal |
( |
const QVariant & |
v, |
|
|
QxInvalidValueX & |
lstInvalidValues |
|
) |
| const [protected] |
void qx::IxValidator::validateMaxLength |
( |
const QVariant & |
v, |
|
|
QxInvalidValueX & |
lstInvalidValues |
|
) |
| const [protected] |
void qx::IxValidator::validateMaxValue |
( |
const QVariant & |
v, |
|
|
QxInvalidValueX & |
lstInvalidValues |
|
) |
| const [protected] |
void qx::IxValidator::validateMinDecimal |
( |
const QVariant & |
v, |
|
|
QxInvalidValueX & |
lstInvalidValues |
|
) |
| const [protected] |
void qx::IxValidator::validateMinLength |
( |
const QVariant & |
v, |
|
|
QxInvalidValueX & |
lstInvalidValues |
|
) |
| const [protected] |
void qx::IxValidator::validateMinValue |
( |
const QVariant & |
v, |
|
|
QxInvalidValueX & |
lstInvalidValues |
|
) |
| const [protected] |
void qx::IxValidator::validateNotEmpty |
( |
const QVariant & |
v, |
|
|
QxInvalidValueX & |
lstInvalidValues |
|
) |
| const [protected] |
void qx::IxValidator::validateNotNull |
( |
const QVariant & |
v, |
|
|
QxInvalidValueX & |
lstInvalidValues |
|
) |
| const [protected] |
void qx::IxValidator::validateRegularExpression |
( |
const QVariant & |
v, |
|
|
QxInvalidValueX & |
lstInvalidValues |
|
) |
| const [protected] |
Member Data Documentation
List of constraints to verify.
Definition at line 78 of file IxValidator.h.
Validator message when invalid value is detected.
Definition at line 76 of file IxValidator.h.
Registered property associated to validator.
Definition at line 79 of file IxValidator.h.
The documentation for this class was generated from the following file: