Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
|
\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 of this binding if it 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 bound with 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 the 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 invalid Element. | |
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 98 of file qqmlsa.cpp.
QQmlSA::Binding::Binding | ( | const Binding & | other | ) |
Definition at line 102 of file qqmlsa.cpp.
|
noexcept |
Definition at line 104 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 191 of file qqmlsa.cpp.
References QQmlSA::BindingPrivate::binding(), and QQmlJSScope::createQQmlSAElement().
QQmlSA::BindingType QQmlSA::Binding::bindingType | ( | ) | const |
Definition at line 165 of file qqmlsa.cpp.
References QQmlSA::BindingPrivate::binding().
Referenced by LiteralBindingCheckBase::getProperty(), VarBindingTypeValidatorPass::onBinding(), and QQmlJSLiteralBindingCheck::onBinding().
Element QQmlSA::Binding::groupType | ( | ) | const |
Returns the type of the property of this binding if it is a group property, otherwise returns an invalid Element.
Definition at line 160 of file qqmlsa.cpp.
References QQmlSA::BindingPrivate::binding(), and QQmlJSScope::createQQmlSAElement().
bool QQmlSA::Binding::hasObject | ( | ) | const |
Returns true
if this binding has an objects, otherwise returns false
.
Definition at line 226 of file qqmlsa.cpp.
References QQmlSA::BindingPrivate::binding().
bool QQmlSA::Binding::hasUndefinedScriptValue | ( | ) | const |
Definition at line 240 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.
Definition at line 252 of file qqmlsa.cpp.
Referenced by LiteralBindingCheckBase::getProperty(), and VarBindingTypeValidatorPass::onBinding().
double QQmlSA::Binding::numberValue | ( | ) | const |
Returns the associated number if the content type of this binding is NumberLiteral, otherwise returns 0.
Definition at line 209 of file qqmlsa.cpp.
References QQmlSA::BindingPrivate::binding().
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 invalid Element.
Definition at line 235 of file qqmlsa.cpp.
References QQmlSA::BindingPrivate::binding(), and QQmlJSScope::createQQmlSAElement().
Referenced by VarBindingTypeValidatorPass::onBinding().
Definition at line 117 of file qqmlsa.cpp.
References other().
Definition at line 107 of file qqmlsa.cpp.
References other().
QString QQmlSA::Binding::propertyName | ( | ) | const |
Returns the name of the property bound with this binding.
Definition at line 182 of file qqmlsa.cpp.
References QQmlSA::BindingPrivate::binding().
QQmlSA::ScriptBindingKind QQmlSA::Binding::scriptKind | ( | ) | const |
Returns the kind of the associated script if the content type of this binding is Script, otherwise returns Script_Invalid.
Definition at line 218 of file qqmlsa.cpp.
References QQmlSA::BindingPrivate::binding().
QQmlSA::SourceLocation QQmlSA::Binding::sourceLocation | ( | ) | const |
Returns the location in the QML code where this binding is defined.
Definition at line 199 of file qqmlsa.cpp.
References QQmlSA::BindingPrivate::binding(), and QQmlSA::SourceLocationPrivate::createQQmlSASourceLocation().
Referenced by AttachedPropertyTypeValidatorPass::onBinding(), VarBindingTypeValidatorPass::onBinding(), LiteralBindingCheckBase::onBinding(), QQmlJSLiteralBindingCheck::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 174 of file qqmlsa.cpp.
References QQmlSA::BindingPrivate::binding().
Referenced by LiteralBindingCheckBase::onBinding().