![]() |
Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
|
QQmlAnyBinding is an abstraction over the various bindings in QML. More...
#include <qqmlanybinding_p.h>
Public Types | |
| enum | InterceptorMode : bool { IgnoreInterceptors , RespectInterceptors } |
Friends | |
| void | swap (QQmlAnyBinding &lhs, QQmlAnyBinding &rhs) noexcept |
| bool | operator== (const QQmlAnyBinding &p1, const QQmlAnyBinding &p2) |
| bool | operator!= (const QQmlAnyBinding &p1, const QQmlAnyBinding &p2) |
QQmlAnyBinding is an abstraction over the various bindings in QML.
QQmlAnyBinding can store both classical bindings (derived from QQmlAbstractBinding) as well as new-style bindings (derived from QPropertyBindingPrivate). For both, it keeps a strong reference to them, and knows how to delete them in case the reference count becomes zero. In that sense it can be thought of as a union of QUntypedPropertyBinding and QQmlAbstractBinding::Ptr.
It also offers methods to create bindings (from QV4::Function, from translation bindings and from code strings). Moreover, it allows the retrieval, the removal and the installation of bindings on a QQmlProperty.
Note that the class intentionally does not allow construction from QUntypedProperty and QQmlAbstractBinding::Ptr. This is meant to catch code which doesn't handle bindable properties yet when porting existing code.
Definition at line 45 of file qqmlanybinding_p.h.
| enum QQmlAnyBinding::InterceptorMode : bool |
Installs the binding referenced by this QQmlAnyBinding on the target. If mode is set to RespectInterceptors, interceptors are honored, otherwise writes and binding installation bypass them (the default). Preconditions:
| Enumerator | |
|---|---|
| IgnoreInterceptors | |
| RespectInterceptors | |
Definition at line 239 of file qqmlanybinding_p.h.
|
constexprdefaultnoexcept |
|
inline |
Definition at line 49 of file qqmlanybinding_p.h.
|
inlinenoexcept |
Definition at line 453 of file qqmlanybinding_p.h.
References QQmlAnyBinding().
Referenced by QQmlAnyBinding().
|
inlinenoexcept |
Definition at line 457 of file qqmlanybinding_p.h.
|
inlinenoexcept |
Definition at line 483 of file qqmlanybinding_p.h.
|
inline |
Returns the stored QQmlAbstractBinding. If no such binding is currently stored, a null pointer is returned.
Definition at line 352 of file qqmlanybinding_p.h.
|
inline |
Returns the stored QPropertyBindingPrivate as a QUntypedPropertyBinding. If no such binding is currently stored, a null QUntypedPropertyBinding is returned.
Definition at line 339 of file qqmlanybinding_p.h.
|
inlinestatic |
Creates a binding for property prop from function. obj is the scope object which shall be used for the function and scope its QML scope. The binding is not installed on the property (but if a QQmlBinding is created, it has its target set to prop).
Definition at line 193 of file qqmlanybinding_p.h.
|
inlinestatic |
Creates a binding for property prop from function. obj is the scope object which shall be used for the function and scope its QML scope. The binding is not installed on the property (but if a QQmlBinding is created, it has its target set to prop).
Definition at line 131 of file qqmlanybinding_p.h.
|
inlinestatic |
Creates a binding for property prop from script. obj is the scope object which shall be used for the function and ctxt its QML scope. The binding is not installed on the property (but if a QQmlBinding is created, it has its target set to prop).
Definition at line 157 of file qqmlanybinding_p.h.
|
inlinestatic |
Creates a translattion binding for prop from compilationUnit and transationBinding. obj is the context object, context the qml context.
Definition at line 215 of file qqmlanybinding_p.h.
|
inline |
Returns true if the binding is in an error state (e.g. binding loop), false otherwise.
Definition at line 274 of file qqmlanybinding_p.h.
References isAbstractPropertyBinding().
|
inline |
Definition at line 244 of file qqmlanybinding_p.h.
References IgnoreInterceptors, and isAbstractPropertyBinding().
|
inline |
Returns true if a binding derived from QQmlAbstractPropertyBinding is stored. The binding migh still be null.
Definition at line 323 of file qqmlanybinding_p.h.
Referenced by hasError(), and installOn().
|
inline |
Definition at line 285 of file qqmlanybinding_p.h.
|
inline |
Returns true if a binding derived from QPropertyBindingPrivate is stored. The binding might still be null.
Definition at line 331 of file qqmlanybinding_p.h.
|
inlinestatic |
Returns the binding of the property prop as a QQmlAnyBinding. The binding continues to be active and set on the property. If there was no binding set, the returned QQmlAnyBinding is null.
Definition at line 57 of file qqmlanybinding_p.h.
|
inlinestatic |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.object must be non-null.
Definition at line 73 of file qqmlanybinding_p.h.
|
inline |
Definition at line 314 of file qqmlanybinding_p.h.
|
inline |
Stores the binding stored in binding and keeps a reference to it.
Definition at line 399 of file qqmlanybinding_p.h.
|
inlinenoexcept |
Definition at line 463 of file qqmlanybinding_p.h.
|
inline |
Stores the binding stored in untypedBinding and keeps a reference to it.
Definition at line 426 of file qqmlanybinding_p.h.
|
inline |
Stores binding and keeps a reference to it.
Definition at line 385 of file qqmlanybinding_p.h.
|
inline |
Stores binding's binding, taking ownership from binding.
Definition at line 413 of file qqmlanybinding_p.h.
|
inline |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Stores the binding stored in untypedBinding, taking ownership from it.
Definition at line 442 of file qqmlanybinding_p.h.
|
inline |
Stores a null binding.
For purpose of classification, the null bindings is treated as a QQmlAbstractPropertyBindings.
Definition at line 308 of file qqmlanybinding_p.h.
|
inline |
Reevaluates the binding. If the binding was disabled, it gets enabled.
Definition at line 364 of file qqmlanybinding_p.h.
|
inlinestatic |
Removes the binding from prop if there is any.
Definition at line 178 of file qqmlanybinding_p.h.
|
inline |
Definition at line 294 of file qqmlanybinding_p.h.
|
inlinenoexcept |
Definition at line 460 of file qqmlanybinding_p.h.
|
inlinestatic |
Removes the binding from the property prop, and returns it as a QQmlAnyBinding if there was any.
Otherwise returns a null QQmlAnyBinding.
Definition at line 107 of file qqmlanybinding_p.h.
|
friend |
Definition at line 478 of file qqmlanybinding_p.h.
|
friend |
Definition at line 473 of file qqmlanybinding_p.h.
|
friend |
Definition at line 461 of file qqmlanybinding_p.h.