![]() |
Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
|
\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 |
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 69 of file qproperty.h.
using QPropertyData< T >::arrow_operator_result |
Definition at line 81 of file qproperty.h.
using QPropertyData< T >::parameter_type = std::conditional_t<UseReferences, const T &, T> |
Definition at line 79 of file qproperty.h.
using QPropertyData< T >::rvalue_ref = typename std::conditional_t<UseReferences, T &&, DisableRValueRefs> |
Definition at line 80 of file qproperty.h.
using QPropertyData< T >::value_type = T |
Definition at line 78 of file qproperty.h.
|
default |
|
inline |
Definition at line 85 of file qproperty.h.
References val.
|
inline |
Definition at line 86 of file qproperty.h.
References val.
|
default |
|
inline |
Sets the data value stored in this property to v.
Definition at line 90 of file qproperty.h.
References val.
|
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 91 of file qproperty.h.
References val.
|
inline |
Returns the data stored in this property.
Definition at line 89 of file qproperty.h.
References val.
|
staticconstexprprotected |
Definition at line 76 of file qproperty.h.
|
mutableprotected |
Definition at line 72 of file qproperty.h.
Referenced by QPropertyData(), QPropertyData(), setValueBypassingBindings(), setValueBypassingBindings(), and valueBypassingBindings().