#include <dataobject.h>
Inheritance diagram for DataObject:

Public Slots | ||||
| virtual bool | setProperty (const QString &propName, const QVariant &qv) | |||
| overloaded for QString | ||||
| virtual bool | setProperty (const char *propName, const QVariant &qv) | |||
Public Member Functions | ||||
| DataObject (QString name) | ||||
| This was recently marked explicit to avoid making implicit temporaries when passing a pointer to a method which expects an object. | ||||
| virtual | ~DataObject () | |||
| DataObject (QObject *parent=0) | ||||
| DataObject (const DataObject &other) | ||||
| virtual bool | readFrom (const QObject &source) | |||
| Reads all the properties from the source object (using intraspection) and saves them to our object. | ||||
| virtual bool | writeTo (QObject &dest) const | |||
| writes all our properties into a QObject | ||||
| void | adoptChildren (QObject *wayward) | |||
| iterates through the wayward and steals all its children, reparenting them under "this" | ||||
| virtual bool | equals (const DataObject &other, bool compareChildren=true) const | |||
| ||||
| virtual bool | operator== (const DataObject &other) const | |||
| DataObject & | operator= (const DataObject &other) | |||
| virtual QString | className () const | |||
| We can't virtually override QObject::className(), but we override it anyway. | ||||
| virtual QStringList | propertyNames () const | |||
| ||||
| virtual QMetaProperty | metaProperty (const QString &propname) const | |||
| virtual QMetaProperty | metaProperty (int i) const | |||
| virtual uint | numProperties () const | |||
| ||||
| virtual QString | toString (int indentlevel=0) const | |||
| ||||
| virtual QVariant | property (QString name) const | |||
| overloaded to support QString | ||||
| virtual QVariant | property (const char *name) const | |||
| virtual DataObject * | clone (bool deep=false) const | |||
| Polymorphic clone() method - its proper behavior is to copy all properties from *this into the new copy. | ||||
Provides support for dynamic properties and object creation, as well as constraints on property setting.
NOTE: As of Qt 4.2, most of the functionality of this class is superceded by QObject, which now supports dynamic properties.
Definition at line 20 of file dataobject.h.
| bool DataObject::writeTo | ( | QObject & | dest | ) | const [virtual] |
writes all our properties into a QObject
Definition at line 222 of file dataobject.cpp.
References metaProperty(), property(), and propertyNames().
Referenced by clone().
Here is the call graph for this function:

| void DataObject::adoptChildren | ( | QObject * | wayward | ) |
iterates through the wayward and steals all its children, reparenting them under "this"
| wayward | - another QObject which has children we wish to add to this. The wayward loses children. |
Definition at line 81 of file dataobject.cpp.
| bool DataObject::equals | ( | const DataObject & | other, | |
| bool | compareChildren = true | |||
| ) | const [virtual] |
| compareChildren | if true recursively checks children |
Definition at line 88 of file dataobject.cpp.
References equals(), property(), propertyNames(), and toString().
Referenced by equals(), and operator==().
Here is the call graph for this function:

| QString DataObject::className | ( | ) | const [virtual] |
We can't virtually override QObject::className(), but we override it anyway.
In DataObject, it is virtual, so it can return something else in derived classes.
Reimplemented in PropsMap.
Definition at line 162 of file dataobject.cpp.
References property().
Referenced by ConstraintGroup::filter(), FormFactory::newForm(), StdinReader::readProperties(), ConstrainedDataObject::setProperty(), toString(), and ConstrainedDataObject::validInputs().
Here is the call graph for this function:

| uint DataObject::numProperties | ( | ) | const [virtual] |
| superclass | include superclass inherited properties in the count (currently ignored) |
Definition at line 183 of file dataobject.cpp.
References propertyNames().
Here is the call graph for this function:

| DataObject * DataObject::clone | ( | bool | deep = false |
) | const [virtual] |
Polymorphic clone() method - its proper behavior is to copy all properties from *this into the new copy.
| deep | if true, makes clones of all the children and reconstructs the tree. |
Definition at line 204 of file dataobject.cpp.
References DataObject(), and writeTo().
Referenced by DataObjectTableModel::insertRows().
Here is the call graph for this function:

| bool DataObject::setProperty | ( | const QString & | propName, | |
| const QVariant & | qv | |||
| ) | [virtual, slot] |
overloaded for QString
| propertyName | name of property to set | |
| value | value to set property |
Reimplemented in ConstrainedDataObject.
Definition at line 72 of file dataobject.cpp.
Referenced by ObjectFactory::newAddress(), readFrom(), StdinReader::readProperties(), ConstrainedDataObject::setProperty(), and PropQuestion::setValue().
1.5.1