Qt 4.8
|
The QDeclarativeDomValue class represents a generic Qml value. More...
#include <qdeclarativedom_p.h>
Public Types | |
enum | Type { Invalid, Literal, PropertyBinding, ValueSource, ValueInterceptor, Object, List } |
The type of the QDeclarativeDomValue node. More... | |
Public Functions | |
bool | isBinding () const |
Returns true if this is a property binding value, otherwise false. More... | |
bool | isInvalid () const |
Returns true if this is an invalid value, otherwise false. More... | |
bool | isList () const |
Returns true if this is a list value, otherwise false. More... | |
bool | isLiteral () const |
Returns true if this is a literal value, otherwise false. More... | |
bool | isObject () const |
Returns true if this is an object value, otherwise false. More... | |
bool | isValueInterceptor () const |
Returns true if this is a value interceptor value, otherwise false. More... | |
bool | isValueSource () const |
Returns true if this is a value source value, otherwise false. More... | |
int | length () const |
Returns the length in the input data from where the property value started u pto the end of it, or -1 if the value is invalid. More... | |
QDeclarativeDomValue & | operator= (const QDeclarativeDomValue &) |
Assign other to this QDeclarativeDomValue. More... | |
int | position () const |
Returns the position in the input data where the property value startd, or -1 if the value is invalid. More... | |
QDeclarativeDomValue () | |
Construct an invalid QDeclarativeDomValue. More... | |
QDeclarativeDomValue (const QDeclarativeDomValue &) | |
Create a copy of other QDeclarativeDomValue. More... | |
QDeclarativeDomValueBinding | toBinding () const |
Returns a QDeclarativeDomValueBinding if this value is a property binding type, otherwise returns an invalid QDeclarativeDomValueBinding. More... | |
QDeclarativeDomList | toList () const |
Returns a QDeclarativeDomList if this value is a list type, otherwise returns an invalid QDeclarativeDomList. More... | |
QDeclarativeDomValueLiteral | toLiteral () const |
Returns a QDeclarativeDomValueLiteral if this value is a literal type, otherwise returns an invalid QDeclarativeDomValueLiteral. More... | |
QDeclarativeDomObject | toObject () const |
Returns a QDeclarativeDomObject if this value is an object assignment type, otherwise returns an invalid QDeclarativeDomObject. More... | |
QDeclarativeDomValueValueInterceptor | toValueInterceptor () const |
Returns a QDeclarativeDomValueValueInterceptor if this value is a property value interceptor type, otherwise returns an invalid QDeclarativeDomValueValueInterceptor. More... | |
QDeclarativeDomValueValueSource | toValueSource () const |
Returns a QDeclarativeDomValueValueSource if this value is a property value source type, otherwise returns an invalid QDeclarativeDomValueValueSource. More... | |
Type | type () const |
Returns the type of this QDeclarativeDomValue. More... | |
~QDeclarativeDomValue () | |
Destroy the QDeclarativeDomValue. More... | |
Properties | |
QSharedDataPointer< QDeclarativeDomValuePrivate > | d |
Friends | |
class | QDeclarativeDomList |
class | QDeclarativeDomProperty |
The QDeclarativeDomValue class represents a generic Qml value.
QDeclarativeDomValue's can be assigned to QML \link QDeclarativeDomProperty \endlink{properties}. In QML, properties can be assigned various different values, including basic literals, property bindings, property value sources, objects and lists of values. The QDeclarativeDomValue class allows a programmer to determine the specific value type being assigned and access more detailed information through a corresponding value type class. For example, in the following example,
The text property is being assigned a literal, and the y property a property binding. To output the values assigned to the text and y properties in the above example from C++,
Definition at line 273 of file qdeclarativedom_p.h.
The type of the QDeclarativeDomValue node.
Enumerator | |
---|---|
Invalid | |
Literal | |
PropertyBinding | |
ValueSource | |
ValueInterceptor | |
Object | |
List |
Definition at line 276 of file qdeclarativedom_p.h.
QDeclarativeDomValue::QDeclarativeDomValue | ( | ) |
Construct an invalid QDeclarativeDomValue.
Definition at line 1315 of file qdeclarativedom.cpp.
QDeclarativeDomValue::QDeclarativeDomValue | ( | const QDeclarativeDomValue & | other | ) |
Create a copy of other QDeclarativeDomValue.
Definition at line 1323 of file qdeclarativedom.cpp.
QDeclarativeDomValue::~QDeclarativeDomValue | ( | ) |
Destroy the QDeclarativeDomValue.
Definition at line 1331 of file qdeclarativedom.cpp.
bool QDeclarativeDomValue::isBinding | ( | ) | const |
Returns true if this is a property binding value, otherwise false.
Definition at line 1417 of file qdeclarativedom.cpp.
bool QDeclarativeDomValue::isInvalid | ( | ) | const |
Returns true if this is an invalid value, otherwise false.
Definition at line 1401 of file qdeclarativedom.cpp.
bool QDeclarativeDomValue::isList | ( | ) | const |
Returns true if this is a list value, otherwise false.
Definition at line 1449 of file qdeclarativedom.cpp.
bool QDeclarativeDomValue::isLiteral | ( | ) | const |
Returns true if this is a literal value, otherwise false.
Definition at line 1409 of file qdeclarativedom.cpp.
bool QDeclarativeDomValue::isObject | ( | ) | const |
Returns true if this is an object value, otherwise false.
Definition at line 1441 of file qdeclarativedom.cpp.
bool QDeclarativeDomValue::isValueInterceptor | ( | ) | const |
Returns true if this is a value interceptor value, otherwise false.
Definition at line 1433 of file qdeclarativedom.cpp.
bool QDeclarativeDomValue::isValueSource | ( | ) | const |
Returns true if this is a value source value, otherwise false.
Definition at line 1425 of file qdeclarativedom.cpp.
int QDeclarativeDomValue::length | ( | ) | const |
Returns the length in the input data from where the property value started u
pto the end of it, or -1 if the value is invalid.
Definition at line 1565 of file qdeclarativedom.cpp.
QDeclarativeDomValue & QDeclarativeDomValue::operator= | ( | const QDeclarativeDomValue & | other | ) |
Assign other to this QDeclarativeDomValue.
Definition at line 1338 of file qdeclarativedom.cpp.
int QDeclarativeDomValue::position | ( | ) | const |
Returns the position in the input data where the property value startd, or -1 if the value is invalid.
Definition at line 1553 of file qdeclarativedom.cpp.
QDeclarativeDomValueBinding QDeclarativeDomValue::toBinding | ( | ) | const |
Returns a QDeclarativeDomValueBinding if this value is a property binding type, otherwise returns an invalid QDeclarativeDomValueBinding.
Definition at line 1476 of file qdeclarativedom.cpp.
QDeclarativeDomList QDeclarativeDomValue::toList | ( | ) | const |
Returns a QDeclarativeDomList if this value is a list type, otherwise returns an invalid QDeclarativeDomList.
Definition at line 1540 of file qdeclarativedom.cpp.
QDeclarativeDomValueLiteral QDeclarativeDomValue::toLiteral | ( | ) | const |
Returns a QDeclarativeDomValueLiteral if this value is a literal type, otherwise returns an invalid QDeclarativeDomValueLiteral.
Definition at line 1460 of file qdeclarativedom.cpp.
QDeclarativeDomObject QDeclarativeDomValue::toObject | ( | ) | const |
Returns a QDeclarativeDomObject if this value is an object assignment type, otherwise returns an invalid QDeclarativeDomObject.
Definition at line 1524 of file qdeclarativedom.cpp.
QDeclarativeDomValueValueInterceptor QDeclarativeDomValue::toValueInterceptor | ( | ) | const |
Returns a QDeclarativeDomValueValueInterceptor if this value is a property value interceptor type, otherwise returns an invalid QDeclarativeDomValueValueInterceptor.
Definition at line 1508 of file qdeclarativedom.cpp.
QDeclarativeDomValueValueSource QDeclarativeDomValue::toValueSource | ( | ) | const |
Returns a QDeclarativeDomValueValueSource if this value is a property value source type, otherwise returns an invalid QDeclarativeDomValueValueSource.
Definition at line 1492 of file qdeclarativedom.cpp.
QDeclarativeDomValue::Type QDeclarativeDomValue::type | ( | ) | const |
Returns the type of this QDeclarativeDomValue.
Definition at line 1364 of file qdeclarativedom.cpp.
Referenced by isBinding(), isInvalid(), isList(), isLiteral(), isObject(), isValueInterceptor(), isValueSource(), length(), position(), toBinding(), toList(), toLiteral(), toObject(), toValueInterceptor(), and toValueSource().
|
friend |
Definition at line 313 of file qdeclarativedom_p.h.
|
friend |
Definition at line 312 of file qdeclarativedom_p.h.
|
private |
Definition at line 314 of file qdeclarativedom_p.h.
Referenced by length(), operator=(), position(), toBinding(), toList(), toLiteral(), toObject(), toValueInterceptor(), toValueSource(), type(), QDeclarativeDomProperty::value(), and QDeclarativeDomList::values().