![]() |
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 44 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 238 of file qqmlanybinding_p.h.
|
constexprdefaultnoexcept |
|
inline |
Definition at line 48 of file qqmlanybinding_p.h.
|
inlinenoexcept |
Definition at line 452 of file qqmlanybinding_p.h.
References QQmlAnyBinding().
Referenced by QQmlAnyBinding().
|
inlinenoexcept |
Definition at line 456 of file qqmlanybinding_p.h.
|
inlinenoexcept |
Definition at line 482 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 351 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 338 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 192 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 130 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 156 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 214 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 273 of file qqmlanybinding_p.h.
References isAbstractPropertyBinding().
|
inline |
Definition at line 243 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 322 of file qqmlanybinding_p.h.
Referenced by hasError(), and installOn().
|
inline |
Definition at line 284 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 330 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 56 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 72 of file qqmlanybinding_p.h.
|
inline |
Definition at line 313 of file qqmlanybinding_p.h.
|
inline |
Stores the binding stored in binding and keeps a reference to it.
Definition at line 398 of file qqmlanybinding_p.h.
|
inlinenoexcept |
Definition at line 462 of file qqmlanybinding_p.h.
|
inline |
Stores the binding stored in untypedBinding and keeps a reference to it.
Definition at line 425 of file qqmlanybinding_p.h.
|
inline |
Stores binding and keeps a reference to it.
Definition at line 384 of file qqmlanybinding_p.h.
|
inline |
Stores binding's binding, taking ownership from binding.
Definition at line 412 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 441 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 307 of file qqmlanybinding_p.h.
|
inline |
Reevaluates the binding. If the binding was disabled, it gets enabled.
Definition at line 363 of file qqmlanybinding_p.h.
|
inlinestatic |
Removes the binding from prop if there is any.
Definition at line 177 of file qqmlanybinding_p.h.
|
inline |
Definition at line 293 of file qqmlanybinding_p.h.
|
inlinenoexcept |
Definition at line 459 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 106 of file qqmlanybinding_p.h.
|
friend |
Definition at line 477 of file qqmlanybinding_p.h.
|
friend |
Definition at line 472 of file qqmlanybinding_p.h.
|
friend |
Definition at line 460 of file qqmlanybinding_p.h.