![]() |
Qt 6.x
The Qt SDK
|
\inmodule QtQmlCompiler More...
#include <qqmlsa.h>
Classes | |
class | Bindings |
\inmodule QtQmlCompiler More... | |
Public Member Functions | |
Binding () | |
Binding (const Binding &) | |
Binding (Binding &&) noexcept | |
Binding & | operator= (const Binding &) |
Binding & | operator= (Binding &&) noexcept |
~Binding () | |
Element | groupType () const |
Returns the type of the property if this element is a group property, otherwise returns an invalid Element. | |
BindingType | bindingType () const |
QString | stringValue () const |
Returns the associated string literal if the content type of this binding is StringLiteral, otherwise returns an empty string. | |
QString | propertyName () const |
Returns the name of the property using this binding. | |
Element | attachingType () const |
Returns the attached type if the content type of this binding is AttachedProperty, otherwise returns an invalid Element. | |
QQmlSA::SourceLocation | sourceLocation () const |
Returns the location in the QML code where this binding is defined. | |
double | numberValue () const |
Returns the associated number if the content type of this binding is NumberLiteral, otherwise returns 0. | |
ScriptBindingKind | scriptKind () const |
Returns the kind of associated associated script if the content type of this binding is Script, otherwise returns Script_Invalid. | |
bool | hasObject () const |
Returns true if this binding has an objects, otherwise returns false . | |
Element | objectType () const |
Returns the type of the associated object if the content type of this binding is Object, otherwise returns an invlaid Element. | |
Element | literalType (const QQmlJSTypeResolver *) const |
bool | hasUndefinedScriptValue () const |
Static Public Member Functions | |
static bool | isLiteralBinding (BindingType) |
Returns true if bindingType is a literal type, and false otherwise. | |
Friends | |
bool | operator== (const Binding &lhs, const Binding &rhs) |
bool | operator!= (const Binding &lhs, const Binding &rhs) |
\inmodule QtQmlCompiler
Represents a single QML property binding for a specific type.
QQmlSA::Binding::Binding | ( | ) |
Definition at line 100 of file qqmlsa.cpp.
QQmlSA::Binding::Binding | ( | const Binding & | other | ) |
Definition at line 104 of file qqmlsa.cpp.
|
noexcept |
Definition at line 106 of file qqmlsa.cpp.
References other().
|
default |
Element QQmlSA::Binding::attachingType | ( | ) | const |
Returns the attached type if the content type of this binding is AttachedProperty, otherwise returns an invalid Element.
Definition at line 193 of file qqmlsa.cpp.
References QQmlJSMetaPropertyBinding::attachingType(), QQmlSA::BindingPrivate::binding(), and QQmlJSScope::createQQmlSAElement().
QQmlSA::BindingType QQmlSA::Binding::bindingType | ( | ) | const |
Definition at line 167 of file qqmlsa.cpp.
References QQmlSA::BindingPrivate::binding(), and QQmlJSMetaPropertyBinding::bindingType().
Referenced by VarBindingTypeValidatorPass::onBinding().
Element QQmlSA::Binding::groupType | ( | ) | const |
Returns the type of the property if this element is a group property, otherwise returns an invalid Element.
Definition at line 162 of file qqmlsa.cpp.
References QQmlSA::BindingPrivate::binding(), QQmlJSScope::createQQmlSAElement(), and QQmlJSMetaPropertyBinding::groupType().
bool QQmlSA::Binding::hasObject | ( | ) | const |
Returns true
if this binding has an objects, otherwise returns false
.
Definition at line 228 of file qqmlsa.cpp.
References QQmlSA::BindingPrivate::binding(), and QQmlJSMetaPropertyBinding::hasObject().
bool QQmlSA::Binding::hasUndefinedScriptValue | ( | ) | const |
Definition at line 247 of file qqmlsa.cpp.
References QQmlSA::BindingPrivate::binding(), QQmlSA::Script, and ScriptValue_Undefined.
|
static |
Returns true
if bindingType is a literal type, and false
otherwise.
Literal types include strings, booleans, numbers, regular expressions among other.
Definition at line 259 of file qqmlsa.cpp.
Referenced by VarBindingTypeValidatorPass::onBinding().
Element QQmlSA::Binding::literalType | ( | const QQmlJSTypeResolver * | resolver | ) | const |
Definition at line 242 of file qqmlsa.cpp.
References QQmlSA::BindingPrivate::binding(), QQmlJSScope::createQQmlSAElement(), and QQmlJSMetaPropertyBinding::literalType().
Referenced by QQmlSA::GenericPass::resolveLiteralType().
double QQmlSA::Binding::numberValue | ( | ) | const |
Returns the associated number if the content type of this binding is NumberLiteral, otherwise returns 0.
Definition at line 211 of file qqmlsa.cpp.
References QQmlSA::BindingPrivate::binding(), and QQmlJSMetaPropertyBinding::numberValue().
QQmlSA::Element QQmlSA::Binding::objectType | ( | ) | const |
Returns the type of the associated object if the content type of this binding is Object, otherwise returns an invlaid Element.
Definition at line 237 of file qqmlsa.cpp.
References QQmlSA::BindingPrivate::binding(), QQmlJSScope::createQQmlSAElement(), and QQmlJSMetaPropertyBinding::objectType().
Referenced by VarBindingTypeValidatorPass::onBinding().
Definition at line 119 of file qqmlsa.cpp.
References other().
Definition at line 109 of file qqmlsa.cpp.
References other().
QString QQmlSA::Binding::propertyName | ( | ) | const |
Returns the name of the property using this binding.
Definition at line 184 of file qqmlsa.cpp.
References QQmlSA::BindingPrivate::binding(), and QQmlJSMetaPropertyBinding::propertyName().
QQmlSA::ScriptBindingKind QQmlSA::Binding::scriptKind | ( | ) | const |
Returns the kind of associated associated script if the content type of this binding is Script, otherwise returns Script_Invalid.
Definition at line 220 of file qqmlsa.cpp.
References QQmlSA::BindingPrivate::binding(), and QQmlJSMetaPropertyBinding::scriptKind().
QQmlSA::SourceLocation QQmlSA::Binding::sourceLocation | ( | ) | const |
Returns the location in the QML code where this binding is defined.
Definition at line 201 of file qqmlsa.cpp.
References QQmlSA::BindingPrivate::binding(), QQmlSA::SourceLocationPrivate::createQQmlSASourceLocation(), and QQmlJSMetaPropertyBinding::sourceLocation().
Referenced by AttachedPropertyTypeValidatorPass::onBinding(), VarBindingTypeValidatorPass::onBinding(), and QQmlSA::DebugPropertyPass::onBinding().
QString QQmlSA::Binding::stringValue | ( | ) | const |
Returns the associated string literal if the content type of this binding is StringLiteral, otherwise returns an empty string.
Definition at line 176 of file qqmlsa.cpp.
References QQmlSA::BindingPrivate::binding(), and QQmlJSMetaPropertyBinding::stringValue().