#include <validator.h>
|
| enum | Result { Error = 0
, Ok = 1
, Warning = 2
} |
|
| virtual Result | internalCheck (const TQString &valueName, const TQVariant &v, TQString &message, TQString &details) |
A validator extending TQValidator with offline-checking for value's validity.
The offline-checking for value's validity is provided by Validator::check() method. The validator groups two purposes into one container:
- string validator for line editors (online checking, "on typing");
- offline-checking for TQVariant values, reimplementing validate().
It also offers error and warning messages for check() method. You may need to reimplement:
Definition at line 45 of file validator.h.
◆ Result
| enum KexiUtils::Validator::Result |
◆ Validator()
| Validator::Validator |
( |
TQObject * | parent = 0, |
|
|
const char * | name = 0 ) |
◆ ~Validator()
| Validator::~Validator |
( |
| ) |
|
|
virtual |
◆ acceptsEmptyValue()
| bool KexiUtils::Validator::acceptsEmptyValue |
( |
| ) |
const |
|
inline |
◆ addChildValidator()
| void KexiUtils::Validator::addChildValidator |
( |
Validator * | v | ) |
|
Adds a child validator v.
◆ check()
| Validator::Result Validator::check |
( |
const TQString & | valueName, |
|
|
const TQVariant & | v, |
|
|
TQString & | message, |
|
|
TQString & | details ) |
Checks if value v is ok and returns one of Result value:
- Error is returned on error;
- Ok on success;
- Warning if there is something to warn about. In any case except Ok, i18n'ed message will be set in message and (optionally) datails are set in details, e.g. for use in a message box. valueName can be used to contruct message as well, for example: "[valueName] is not a valid login name". Depending on acceptsEmptyValue(), immediately accepts empty values or not.
Definition at line 34 of file validator.cpp.
◆ internalCheck()
| Validator::Result Validator::internalCheck |
( |
const TQString & | valueName, |
|
|
const TQVariant & | v, |
|
|
TQString & | message, |
|
|
TQString & | details ) |
|
protectedvirtual |
◆ msgColumnNotEmpty()
| const TQString KexiUtils::Validator::msgColumnNotEmpty |
( |
| ) |
|
|
inlinestatic |
A generic error/warning message.
Definition at line 77 of file validator.h.
◆ setAcceptsEmptyValue()
| void KexiUtils::Validator::setAcceptsEmptyValue |
( |
bool | set | ) |
|
|
inline |
Sets accepting empty values on (true) or off (false). By default the validator does not accepts empty values.
Definition at line 55 of file validator.h.
◆ validate()
| TQValidator::State Validator::validate |
( |
TQString & | input, |
|
|
int & | pos ) const |
|
virtual |
◆ MultiValidator
| friend class MultiValidator |
|
friend |
◆ m_acceptsEmptyValue
| bool KexiUtils::Validator::m_acceptsEmptyValue |
|
protected |
The documentation for this class was generated from the following files:
|