Qt 4.8
|
The QDeclarativeDomComponent class represents sub-component within a QML document. More...
#include <qdeclarativedom_p.h>
Public Functions | |
QDeclarativeDomObject | componentRoot () const |
Returns the component's root object. More... | |
QDeclarativeDomComponent & | operator= (const QDeclarativeDomComponent &) |
Assign other to this QDeclarativeDomComponent. More... | |
QDeclarativeDomComponent () | |
Construct an empty QDeclarativeDomComponent. More... | |
QDeclarativeDomComponent (const QDeclarativeDomComponent &) | |
Create a copy of other QDeclarativeDomComponent. More... | |
~QDeclarativeDomComponent () | |
Destroy the QDeclarativeDomComponent. More... | |
Public Functions inherited from QDeclarativeDomObject | |
QByteArray | customTypeData () const |
If this object represents a custom type, returns the data associated with the custom type, otherwise returns an empty QByteArray(). More... | |
QList< QDeclarativeDomDynamicProperty > | dynamicProperties () const |
QDeclarativeDomDynamicProperty | dynamicProperty (const QByteArray &) const |
bool | isComponent () const |
Returns true if this object is a sub-component object. More... | |
bool | isCustomType () const |
Returns true if this object is a custom type. More... | |
bool | isValid () const |
Returns true if this is a valid QDeclarativeDomObject, false otherwise. More... | |
int | length () const |
Returns the length in the input data from where the property assignment star ted upto the end of it, or -1 if the property is invalid. More... | |
QByteArray | objectClassName () const |
Returns the type name as referenced in the qml file. More... | |
QString | objectId () const |
Returns the QML id assigned to this object, or an empty QByteArray if no id has been assigned. More... | |
QByteArray | objectType () const |
Returns the fully-qualified type name of this object. More... | |
int | objectTypeMajorVersion () const |
int | objectTypeMinorVersion () const |
QDeclarativeDomObject & | operator= (const QDeclarativeDomObject &) |
Assign other to this QDeclarativeDomObject. More... | |
int | position () const |
Returns the position in the input data where the property assignment started , or -1 if the property is invalid. More... | |
QList< QDeclarativeDomProperty > | properties () const |
Returns the list of assigned properties on this object. More... | |
QDeclarativeDomProperty | property (const QByteArray &) const |
Returns the object's name property if a value has been assigned to it, or an invalid QDeclarativeDomProperty otherwise. More... | |
QDeclarativeDomObject () | |
Construct an invalid QDeclarativeDomObject. More... | |
QDeclarativeDomObject (const QDeclarativeDomObject &) | |
Create a copy of other QDeclarativeDomObject. More... | |
QDeclarativeDomComponent | toComponent () const |
Returns a QDeclarativeDomComponent for this object if it is a sub-component, or an invalid QDeclarativeDomComponent if not. More... | |
QUrl | url () const |
~QDeclarativeDomObject () | |
Destroy the QDeclarativeDomObject. More... | |
The QDeclarativeDomComponent class represents sub-component within a QML document.
Sub-components are QDeclarativeComponents defined within a QML document. The following example shows the definition of a sub-component with the id "listDelegate".
Like QDeclarativeDomDocument's, components contain a single root object.
Definition at line 262 of file qdeclarativedom_p.h.
QDeclarativeDomComponent::QDeclarativeDomComponent | ( | ) |
Construct an empty QDeclarativeDomComponent.
Definition at line 1727 of file qdeclarativedom.cpp.
QDeclarativeDomComponent::QDeclarativeDomComponent | ( | const QDeclarativeDomComponent & | other | ) |
Create a copy of other QDeclarativeDomComponent.
Definition at line 1734 of file qdeclarativedom.cpp.
QDeclarativeDomComponent::~QDeclarativeDomComponent | ( | ) |
Destroy the QDeclarativeDomComponent.
Definition at line 1742 of file qdeclarativedom.cpp.
QDeclarativeDomObject QDeclarativeDomComponent::componentRoot | ( | ) | const |
Returns the component's root object.
In the example below, the root object is the "Text" object.
Definition at line 1770 of file qdeclarativedom.cpp.
QDeclarativeDomComponent & QDeclarativeDomComponent::operator= | ( | const QDeclarativeDomComponent & | other | ) |
Assign other to this QDeclarativeDomComponent.
Definition at line 1749 of file qdeclarativedom.cpp.