Binding Class

class QQmlSA::Binding

Represents a single QML property binding for a specific type. More...

Header: #include <Binding>
Status: Technical Preview

Public Types

class Bindings

Public Functions

Element attachingType() const
Element groupType() const
bool hasObject() const
double numberValue() const
Element objectType() const
QString propertyName() const
ScriptBindingKind scriptKind() const
QQmlSA::SourceLocation sourceLocation() const
QString stringValue() const

Static Public Members

bool isLiteralBinding(BindingType bindingType)

Detailed Description

Member Function Documentation

Element Binding::attachingType() const

Returns the attached type if the content type of this binding is AttachedProperty, otherwise returns an invalid Element.

Element Binding::groupType() const

Returns the type of the property if this element is a group property, otherwise returns an invalid Element.

bool Binding::hasObject() const

Returns true if this binding has an objects, otherwise returns false.

[static] bool Binding::isLiteralBinding(BindingType bindingType)

Returns true if bindingType is a literal type, and false otherwise. Literal types include strings, booleans, numbers, regular expressions among other.

double Binding::numberValue() const

Returns the associated number if the content type of this binding is NumberLiteral, otherwise returns 0.

Element Binding::objectType() const

Returns the type of the associated object if the content type of this binding is Object, otherwise returns an invlaid Element.

QString Binding::propertyName() const

Returns the name of the property using this binding.

ScriptBindingKind Binding::scriptKind() const

Returns the kind of associated associated script if the content type of this binding is Script, otherwise returns Script_Invalid.

QQmlSA::SourceLocation Binding::sourceLocation() const

Returns the location in the QML code where this binding is defined.

QString Binding::stringValue() const

Returns the associated string literal if the content type of this binding is StringLiteral, otherwise returns an empty string.