![]() |
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 47 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 241 of file qqmlanybinding_p.h.
|
constexprdefaultnoexcept |
|
inline |
Definition at line 51 of file qqmlanybinding_p.h.
|
inlinenoexcept |
Definition at line 469 of file qqmlanybinding_p.h.
|
inlinenoexcept |
Definition at line 473 of file qqmlanybinding_p.h.
|
inlinenoexcept |
Definition at line 499 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 368 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 355 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 195 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 133 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 159 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 217 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 290 of file qqmlanybinding_p.h.
|
inline |
Definition at line 246 of file qqmlanybinding_p.h.
|
inline |
Returns true if a binding derived from QQmlAbstractPropertyBinding is stored. The binding migh still be null.
Definition at line 339 of file qqmlanybinding_p.h.
|
inline |
Definition at line 301 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 347 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 59 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 75 of file qqmlanybinding_p.h.
|
inline |
Definition at line 330 of file qqmlanybinding_p.h.
|
inline |
Stores the binding stored in binding and keeps a reference to it.
Definition at line 415 of file qqmlanybinding_p.h.
|
inlinenoexcept |
Definition at line 479 of file qqmlanybinding_p.h.
|
inline |
Stores the binding stored in untypedBinding and keeps a reference to it.
Definition at line 442 of file qqmlanybinding_p.h.
|
inline |
Stores binding and keeps a reference to it.
Definition at line 401 of file qqmlanybinding_p.h.
|
inline |
Stores binding's binding, taking ownership from binding.
Definition at line 429 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 458 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 324 of file qqmlanybinding_p.h.
|
inline |
Reevaluates the binding. If the binding was disabled, it gets enabled.
Definition at line 380 of file qqmlanybinding_p.h.
|
inlinestatic |
Removes the binding from prop if there is any.
Definition at line 180 of file qqmlanybinding_p.h.
|
inline |
Definition at line 310 of file qqmlanybinding_p.h.
|
inlinenoexcept |
Definition at line 476 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 109 of file qqmlanybinding_p.h.
|
friend |
Definition at line 494 of file qqmlanybinding_p.h.
|
friend |
Definition at line 489 of file qqmlanybinding_p.h.
|
friend |
Definition at line 477 of file qqmlanybinding_p.h.