ConstrainedDataObject Class Reference

a DataObject with constraints This DataObject prevents the setProperty() from succeeding if the value which is passed does not fall into the constraints, as specified by a singleton ConstraintGroup. More...

#include <constraineddataobject.h>

Inheritance diagram for ConstrainedDataObject:

Inheritance graph
[legend]
Collaboration diagram for ConstrainedDataObject:

Collaboration graph
[legend]
List of all members.

Public Member Functions

virtual bool setProperty (const QString &propName, const QVariant &qv)
 Overrides, hides, and if it satisfies, calls the base class method too!
virtual bool setProperty (const char *propName, const QVariant &qv)
QString validInputs (QString propertyName) const
 
Returns:
a string representing any input constraints on a particular property


Static Public Member Functions

static ConstraintGroupConstraintMgr ()
 
Returns:
a singleton instance of a ConstraintGroup.


Detailed Description

a DataObject with constraints This DataObject prevents the setProperty() from succeeding if the value which is passed does not fall into the constraints, as specified by a singleton ConstraintGroup.

Deprecated:

Definition at line 21 of file constraineddataobject.h.


Member Function Documentation

ConstraintGroup & ConstrainedDataObject::ConstraintMgr (  )  [static]

Returns:
a singleton instance of a ConstraintGroup.

This particular one is checked in every call to DataObject::setProperty()

You can add Constraint instances to this, to impose input Constraint on some DataObject-derived classes.

Definition at line 5 of file constraineddataobject.cpp.

Referenced by CanadaAddress::initConstraints(), UsAddress::initConstraints(), setProperty(), and validInputs().

bool ConstrainedDataObject::setProperty ( const QString &  propName,
const QVariant &  qv 
) [virtual]

Overrides, hides, and if it satisfies, calls the base class method too!

Parameters:
propertyName name of property to set
value value to set property
Returns:
true if value satisfies the regexp constraint for this property and value is set. These methods will not be called if you use the QObject interface.

Reimplemented from DataObject.

Definition at line 17 of file constraineddataobject.cpp.

References Constraint::accepts(), DataObject::className(), ConstraintMgr(), ConstraintGroup::getConstraint(), and DataObject::setProperty().

Referenced by setProperty().

Here is the call graph for this function:


The documentation for this class was generated from the following files:
Generated on Wed Sep 30 01:15:43 2009 for oopapidocs by  doxygen 1.5.1