Wexus2 0.20
|
#include <ActiveClass.h>
Public Member Functions | |
ActiveField (int style, const QString &fieldName, const QString &fieldType, const ValidationExpr &valexpr, const QVariant &initVal) | |
constructor | |
int | style (void) const |
const QString & | fieldName (void) const |
const QString & | fieldType (void) const |
QString | sqlFieldType (void) const |
const ValidationExpr & | validationExpr (void) const |
const QVariant & | initVal (void) const |
virtual QVariant | toVariant (const ActiveRecord *inst) const =0 |
virtual void | setVariant (ActiveRecord *inst, const QVariant &v)=0 |
Represents one field in an wexus::ActiveClass
const QString& wexus::ActiveClass::ActiveField::fieldName | ( | void | ) | const [inline] |
Returns the field name of this field.
const QString& wexus::ActiveClass::ActiveField::fieldType | ( | void | ) | const [inline] |
Returns the C++ data type of this field.
const QVariant& wexus::ActiveClass::ActiveField::initVal | ( | void | ) | const [inline] |
Returns the default value, as defined in the .eh file. Returns an invalida QVariant if none was set.
virtual void wexus::ActiveClass::ActiveField::setVariant | ( | ActiveRecord * | inst, |
const QVariant & | v | ||
) | [pure virtual] |
Sets the value of thie field in the given wexus::ActiveRecord instance to v.
Implemented in wexus::ActiveClass::ActiveFieldType< RECT, DATT >.
QString wexus::ActiveClass::ActiveField::sqlFieldType | ( | void | ) | const [inline] |
Returns the SQL datatype (converted from fieldType() via toSqlType()) of this field.
int wexus::ActiveClass::ActiveField::style | ( | void | ) | const [inline] |
Returns the "style" (type) of field this is.
virtual QVariant wexus::ActiveClass::ActiveField::toVariant | ( | const ActiveRecord * | inst | ) | const [pure virtual] |
Converts the current value of this field in the given wexus::ActiveRecord instance to a QVariant and returns it.
Implemented in wexus::ActiveClass::ActiveFieldType< RECT, DATT >.
const ValidationExpr& wexus::ActiveClass::ActiveField::validationExpr | ( | void | ) | const [inline] |
Returns the wexus::ValidationExpr defined in the .eh for this field, or a null wexus::ValidationExpr is none was defined.