QtBase  v6.3.1
Public Types | Public Member Functions | Friends | List of all members
QObjectCompatProperty< Class, T, Offset, Setter, Signal, Getter > Class Template Reference

Declares a \l QObjectBindableProperty inside containingClass of type type with name name. If the optional argument signal is given, this signal will be emitted when the property is marked dirty. More...

#include <qproperty_p.h>

Inheritance diagram for QObjectCompatProperty< Class, T, Offset, Setter, Signal, Getter >:
Inheritance graph
[legend]
Collaboration diagram for QObjectCompatProperty< Class, T, Offset, Setter, Signal, Getter >:
Collaboration graph
[legend]

Public Types

using value_type = typename QPropertyData< T >::value_type
 
using parameter_type = typename QPropertyData< T >::parameter_type
 
using arrow_operator_result = typename QPropertyData< T >::arrow_operator_result
 
- Public Types inherited from QPropertyData< T >
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

 QObjectCompatProperty ()=default
 
 QObjectCompatProperty (const T &initialValue)
 
 QObjectCompatProperty (T &&initialValue)
 
parameter_type value () const
 
arrow_operator_result operator-> () const
 
parameter_type operator* () const
 
 operator parameter_type () const
 
void setValue (parameter_type t)
 
QObjectCompatPropertyoperator= (parameter_type newValue)
 
QPropertyBinding< TsetBinding (const QPropertyBinding< T > &newBinding)
 
bool setBinding (const QUntypedPropertyBinding &newBinding)
 
template<typename Functor >
QPropertyBinding< TsetBinding (Functor &&f, const QPropertyBindingSourceLocation &location=QT_PROPERTY_DEFAULT_BINDING_LOCATION, std::enable_if_t< std::is_invocable_v< Functor >> *=nullptr)
 
bool hasBinding () const
 
void removeBindingUnlessInWrapper ()
 
void notify ()
 
QPropertyBinding< Tbinding () const
 
QPropertyBinding< TtakeBinding ()
 
template<typename Functor >
QPropertyChangeHandler< FunctoronValueChanged (Functor f)
 
template<typename Functor >
QPropertyChangeHandler< Functorsubscribe (Functor f)
 
template<typename Functor >
QPropertyNotifier addNotifier (Functor f)
 
QtPrivate::QPropertyBindingDatabindingData () const
 
- Public Member Functions inherited from QPropertyData< T >
 QPropertyData ()=default
 
 QPropertyData (parameter_type t)
 
 QPropertyData (rvalue_ref t)
 
 ~QPropertyData ()=default
 
parameter_type valueBypassingBindings () const
 
void setValueBypassingBindings (parameter_type v)
 
void setValueBypassingBindings (rvalue_ref v)
 

Friends

template<typename Property , typename >
class QtPrivate::QBindableInterfaceForProperty
 

Additional Inherited Members

- Protected Attributes inherited from QPropertyData< T >
T val = T()
 
- Static Protected Attributes inherited from QPropertyData< T >
static constexpr bool UseReferences = !(std::is_arithmetic_v<T> || std::is_enum_v<T> || std::is_pointer_v<T>)
 

Detailed Description

template<typename Class, typename T, auto Offset, auto Setter, auto Signal = nullptr, auto Getter = nullptr>
class QObjectCompatProperty< Class, T, Offset, Setter, Signal, Getter >

Declares a \l QObjectBindableProperty inside containingClass of type type with name name. If the optional argument signal is given, this signal will be emitted when the property is marked dirty.

\macro Q_OBJECT_BINDABLE_PROPERTY(containingClass, type, name, signal)

Since
6.0
See also
{Qt's Property System}, {Qt Bindable Properties}

\macro Q_OBJECT_BINDABLE_PROPERTY_WITH_ARGS(containingClass, type, name, initialvalue, signal)

Since
6.0

Declares a \l QObjectBindableProperty inside containingClass of type type with name name which is initialized to initialvalue. If the optional argument signal is given, this signal will be emitted when the property is marked dirty.

See also
{Qt's Property System}, {Qt Bindable Properties}

\inmodule QtCore

The QObjectCompatProperty class is a template class to help port old properties to the bindable property system.

Since
6.0

Definition at line 460 of file qproperty_p.h.

Member Typedef Documentation

◆ arrow_operator_result

template<typename Class , typename T , auto Offset, auto Setter, auto Signal = nullptr, auto Getter = nullptr>
using QObjectCompatProperty< Class, T, Offset, Setter, Signal, Getter >::arrow_operator_result = typename QPropertyData<T>::arrow_operator_result

Definition at line 509 of file qproperty_p.h.

◆ parameter_type

template<typename Class , typename T , auto Offset, auto Setter, auto Signal = nullptr, auto Getter = nullptr>
using QObjectCompatProperty< Class, T, Offset, Setter, Signal, Getter >::parameter_type = typename QPropertyData<T>::parameter_type

Definition at line 508 of file qproperty_p.h.

◆ value_type

template<typename Class , typename T , auto Offset, auto Setter, auto Signal = nullptr, auto Getter = nullptr>
using QObjectCompatProperty< Class, T, Offset, Setter, Signal, Getter >::value_type = typename QPropertyData<T>::value_type

Definition at line 507 of file qproperty_p.h.

Constructor & Destructor Documentation

◆ QObjectCompatProperty() [1/3]

template<typename Class , typename T , auto Offset, auto Setter, auto Signal = nullptr, auto Getter = nullptr>
QObjectCompatProperty< Class, T, Offset, Setter, Signal, Getter >::QObjectCompatProperty ( )
default

◆ QObjectCompatProperty() [2/3]

template<typename Class , typename T , auto Offset, auto Setter, auto Signal = nullptr, auto Getter = nullptr>
QObjectCompatProperty< Class, T, Offset, Setter, Signal, Getter >::QObjectCompatProperty ( const T initialValue)
inlineexplicit

Definition at line 512 of file qproperty_p.h.

◆ QObjectCompatProperty() [3/3]

template<typename Class , typename T , auto Offset, auto Setter, auto Signal = nullptr, auto Getter = nullptr>
QObjectCompatProperty< Class, T, Offset, Setter, Signal, Getter >::QObjectCompatProperty ( T &&  initialValue)
inlineexplicit

Definition at line 513 of file qproperty_p.h.

Member Function Documentation

◆ addNotifier()

template<typename Class , typename T , auto Offset, auto Setter, auto Signal = nullptr, auto Getter = nullptr>
template<typename Functor >
QPropertyNotifier QObjectCompatProperty< Class, T, Offset, Setter, Signal, Getter >::addNotifier ( Functor  f)
inline

Definition at line 663 of file qproperty_p.h.

◆ binding()

template<typename Class , typename T , auto Offset, auto Setter, auto Signal = nullptr, auto Getter = nullptr>
QPropertyBinding<T> QObjectCompatProperty< Class, T, Offset, Setter, Signal, Getter >::binding ( ) const
inline

Definition at line 636 of file qproperty_p.h.

Here is the call graph for this function:

◆ bindingData()

template<typename Class , typename T , auto Offset, auto Setter, auto Signal = nullptr, auto Getter = nullptr>
QtPrivate::QPropertyBindingData& QObjectCompatProperty< Class, T, Offset, Setter, Signal, Getter >::bindingData ( ) const
inline

Definition at line 669 of file qproperty_p.h.

Here is the call graph for this function:

◆ hasBinding()

template<typename Class , typename T , auto Offset, auto Setter, auto Signal = nullptr, auto Getter = nullptr>
bool QObjectCompatProperty< Class, T, Offset, Setter, Signal, Getter >::hasBinding ( ) const
inline

Definition at line 592 of file qproperty_p.h.

Here is the call graph for this function:

◆ notify()

template<typename Class , typename T , auto Offset, auto Setter, auto Signal = nullptr, auto Getter = nullptr>
void QObjectCompatProperty< Class, T, Offset, Setter, Signal, Getter >::notify ( )
inline

Definition at line 607 of file qproperty_p.h.

Here is the call graph for this function:

◆ onValueChanged()

template<typename Class , typename T , auto Offset, auto Setter, auto Signal = nullptr, auto Getter = nullptr>
template<typename Functor >
QPropertyChangeHandler<Functor> QObjectCompatProperty< Class, T, Offset, Setter, Signal, Getter >::onValueChanged ( Functor  f)
inline

Definition at line 648 of file qproperty_p.h.

Here is the caller graph for this function:

◆ operator parameter_type()

template<typename Class , typename T , auto Offset, auto Setter, auto Signal = nullptr, auto Getter = nullptr>
QObjectCompatProperty< Class, T, Offset, Setter, Signal, Getter >::operator parameter_type ( ) const
inline

Definition at line 541 of file qproperty_p.h.

Here is the call graph for this function:

◆ operator*()

template<typename Class , typename T , auto Offset, auto Setter, auto Signal = nullptr, auto Getter = nullptr>
parameter_type QObjectCompatProperty< Class, T, Offset, Setter, Signal, Getter >::operator* ( ) const
inline

Definition at line 536 of file qproperty_p.h.

Here is the call graph for this function:

◆ operator->()

template<typename Class , typename T , auto Offset, auto Setter, auto Signal = nullptr, auto Getter = nullptr>
arrow_operator_result QObjectCompatProperty< Class, T, Offset, Setter, Signal, Getter >::operator-> ( ) const
inline

Definition at line 524 of file qproperty_p.h.

Here is the call graph for this function:

◆ operator=()

template<typename Class , typename T , auto Offset, auto Setter, auto Signal = nullptr, auto Getter = nullptr>
QObjectCompatProperty& QObjectCompatProperty< Class, T, Offset, Setter, Signal, Getter >::operator= ( parameter_type  newValue)
inline

Definition at line 557 of file qproperty_p.h.

Here is the call graph for this function:

◆ removeBindingUnlessInWrapper()

template<typename Class , typename T , auto Offset, auto Setter, auto Signal = nullptr, auto Getter = nullptr>
void QObjectCompatProperty< Class, T, Offset, Setter, Signal, Getter >::removeBindingUnlessInWrapper ( )
inline

Definition at line 597 of file qproperty_p.h.

Here is the call graph for this function:

◆ setBinding() [1/3]

template<typename Class , typename T , auto Offset, auto Setter, auto Signal = nullptr, auto Getter = nullptr>
QPropertyBinding<T> QObjectCompatProperty< Class, T, Offset, Setter, Signal, Getter >::setBinding ( const QPropertyBinding< T > &  newBinding)
inline

Definition at line 563 of file qproperty_p.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setBinding() [2/3]

template<typename Class , typename T , auto Offset, auto Setter, auto Signal = nullptr, auto Getter = nullptr>
bool QObjectCompatProperty< Class, T, Offset, Setter, Signal, Getter >::setBinding ( const QUntypedPropertyBinding newBinding)
inline

Definition at line 571 of file qproperty_p.h.

Here is the call graph for this function:

◆ setBinding() [3/3]

template<typename Class , typename T , auto Offset, auto Setter, auto Signal = nullptr, auto Getter = nullptr>
template<typename Functor >
QPropertyBinding<T> QObjectCompatProperty< Class, T, Offset, Setter, Signal, Getter >::setBinding ( Functor &&  f,
const QPropertyBindingSourceLocation location = QT_PROPERTY_DEFAULT_BINDING_LOCATION,
std::enable_if_t< std::is_invocable_v< Functor >> *  = nullptr 
)
inline

Definition at line 581 of file qproperty_p.h.

Here is the call graph for this function:

◆ setValue()

template<typename Class , typename T , auto Offset, auto Setter, auto Signal = nullptr, auto Getter = nullptr>
void QObjectCompatProperty< Class, T, Offset, Setter, Signal, Getter >::setValue ( parameter_type  t)
inline

Definition at line 546 of file qproperty_p.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ subscribe()

template<typename Class , typename T , auto Offset, auto Setter, auto Signal = nullptr, auto Getter = nullptr>
template<typename Functor >
QPropertyChangeHandler<Functor> QObjectCompatProperty< Class, T, Offset, Setter, Signal, Getter >::subscribe ( Functor  f)
inline

Definition at line 655 of file qproperty_p.h.

Here is the call graph for this function:

◆ takeBinding()

template<typename Class , typename T , auto Offset, auto Setter, auto Signal = nullptr, auto Getter = nullptr>
QPropertyBinding<T> QObjectCompatProperty< Class, T, Offset, Setter, Signal, Getter >::takeBinding ( )
inline

Definition at line 642 of file qproperty_p.h.

Here is the call graph for this function:

◆ value()

template<typename Class , typename T , auto Offset, auto Setter, auto Signal = nullptr, auto Getter = nullptr>
parameter_type QObjectCompatProperty< Class, T, Offset, Setter, Signal, Getter >::value ( ) const
inline

Definition at line 515 of file qproperty_p.h.

Here is the call graph for this function:
Here is the caller graph for this function:

Friends And Related Function Documentation

◆ QtPrivate::QBindableInterfaceForProperty

template<typename Class , typename T , auto Offset, auto Setter, auto Signal = nullptr, auto Getter = nullptr>
template<typename Property , typename >
friend class QtPrivate::QBindableInterfaceForProperty
friend

Definition at line 463 of file qproperty_p.h.


The documentation for this class was generated from the following files: