![]() |
Qt 6.x
The Qt SDK
|
\inmodule QtCore More...
#include <qproperty.h>
Public Types | |
using | value_type = T |
using | parameter_type = std::conditional_t< UseReferences, const T &, T > |
using | rvalue_ref = typename std::conditional_t< UseReferences, T &&, DisableRValueRefs > |
using | arrow_operator_result = std::conditional_t< std::is_pointer_v< T >, const T &, std::conditional_t< QTypeTraits::is_dereferenceable_v< T >, const T &, void > > |
Public Member Functions | |
QPropertyData ()=default | |
QPropertyData (parameter_type t) | |
QPropertyData (rvalue_ref t) | |
~QPropertyData ()=default | |
parameter_type | valueBypassingBindings () const |
Returns the data stored in this property. | |
void | setValueBypassingBindings (parameter_type v) |
Sets the data value stored in this property to v. | |
void | setValueBypassingBindings (rvalue_ref v) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Sets the data value stored in this property to v. | |
Protected Attributes | |
T | val = T() |
Static Protected Attributes | |
static constexpr bool | UseReferences = !(std::is_arithmetic_v<T> || std::is_enum_v<T> || std::is_pointer_v<T>) |
\inmodule QtCore
The QPropertyData class is a helper class for properties with automatic property bindings.
QPropertyData<T> is a common base class for classes that can hold properties with automatic data bindings. It mainly wraps the stored data, and offers low level access to that data.
The low level access to the data provided by this class bypasses the binding mechanism, and should be used with care, as updates to the values will not get propagated to any bindings that depend on this property.
You should usually call value() and setValue() on QProperty<T> or QObjectBindableProperty<T>, not use the low level mechanisms provided in this class.
Definition at line 68 of file qproperty.h.
using QPropertyData< T >::arrow_operator_result = std::conditional_t<std::is_pointer_v<T>, const T &, std::conditional_t<QTypeTraits::is_dereferenceable_v<T>, const T &, void> > |
Definition at line 80 of file qproperty.h.
using QPropertyData< T >::parameter_type = std::conditional_t<UseReferences, const T &, T> |
Definition at line 78 of file qproperty.h.
using QPropertyData< T >::rvalue_ref = typename std::conditional_t<UseReferences, T &&, DisableRValueRefs> |
Definition at line 79 of file qproperty.h.
using QPropertyData< T >::value_type = T |
Definition at line 77 of file qproperty.h.
|
default |
|
inline |
Definition at line 84 of file qproperty.h.
|
inline |
Definition at line 85 of file qproperty.h.
|
default |
|
inline |
Sets the data value stored in this property to v.
Definition at line 89 of file qproperty.h.
Referenced by QtPrivate::BindingFunctionVTable::createFor().
|
inline |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Sets the data value stored in this property to v.
Definition at line 90 of file qproperty.h.
|
inline |
Returns the data stored in this property.
Definition at line 88 of file qproperty.h.
References QPropertyData< T >::val.
Referenced by QtPrivate::BindingFunctionVTable::createFor().
|
staticconstexprprotected |
Definition at line 75 of file qproperty.h.
|
mutableprotected |