Qx v0.6
Qt Extensions Library
|
The PropertyBinding class acts as a functor for properties with automatic property bindings. More...
#include <qx/core/qx-property.h>
Public Member Functions | |
PropertyBinding ()=default | |
template<std::invocable Functor> | |
PropertyBinding (Functor &&f) | |
bool | isNull () const |
operator bool () const | |
T | operator() () const |
PropertyBinding encapsulates a binding function to be used with properties in order to enable automatic updates of that property when its dependencies change. This class is often not used directly, and instead a binding is generally created directly within a property via Property::setBinding(), though it is possible to pre-create bindings, as well as move them between properties.
|
default |
Constructs a null property binding.
|
inline |
Constructs a property binding from functor f.
|
inline |
Returns true
if the binding is null; otherwise, returns false
.
A property binding is null if it contains no callable function target (i.e. is default constructed).
|
inlineexplicit |
Same as isNull().
|
inline |
Invokes the contained callable function target, if present.