The Property class is a template class that enables automatic property bindings.
More...
#include <qx/core/qx-property.h>
template<typename T>
class Qx::Property< T >
Property is the principal implementation of the Qx Bindable Properties System. It is a container that holds an instance of T.
It can be used in all of the ways described in AbstractBindableProperty to build a web of dynamic properties.
◆ Property() [1/6]
Constructs a property with a default constructed instance of T.
◆ Property() [2/6]
Move-constructs a property from other.
◆ Property() [3/6]
template<typename T >
template<std::invocable Functor>
Constructs a property that is tied to the provided binding expression f. The binding is immediately evaluated to establish the initial value of the property. Whenever a dependency of the binding changes, the binding will be re-evaluated, and the property's value will be updated accordingly.
◆ Property() [4/6]
Constructs a property that is tied to the provided binding expression. The binding is immediately evaluated to establish the initial value of the property. Whenever a dependency of the binding changes, the binding will be re-evaluated, and the property's value will be updated accordingly.
◆ Property() [5/6]
Move-constructs a property with the provided initialValue.
◆ Property() [6/6]
Constructs a property with the provided initialValue.
◆ operator=() [1/3]
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
◆ operator=() [2/3]
Move assigns other to this.
◆ operator=() [3/3]
Assigns newValue to this property and returns a reference to this property.
◆ setValueBypassingBindings()
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Directly sets the value of this property to v.
This is generally only used by a derived class to control how the underlying data is written when an rvalue of T is provided, but there are some cases (like maintaining class invariants) where it is useful externally.
- Note
- Using this method will bypass any potential binding registered for this property.
Implements Qx::AbstractBindableProperty< T >.
◆ valueBypassingBindings()
template<typename T >
const T & Qx::Property< T >::valueBypassingBindings |
( |
| ) |
const |
|
inlineoverridevirtual |
Returns the direct value of the property.
This is generally only used by a derived class to control how the underlying data is read when requested, but there are some cases where it is useful externally.
- Note
- Using this method will not register the property access with any currently executing binding.
Implements Qx::AbstractBindableProperty< T >.
The documentation for this class was generated from the following files: