KDDockWidgets API Documentation 2.0
Loading...
Searching...
No Matches
Public Member Functions | List of all members
KDBindings::Binding< T, ImmediateBindingEvaluator > Class Template Reference

Provides a convenience for old-school, immediate mode Bindings. More...

#include <binding.h>

Inheritance diagram for KDBindings::Binding< T, ImmediateBindingEvaluator >:
Inheritance graph
[legend]
Collaboration diagram for KDBindings::Binding< T, ImmediateBindingEvaluator >:
Collaboration graph
[legend]

Public Member Functions

 Binding ()=delete
 
 Binding (Binding &&other)=delete
 
 Binding (Binding const &other)=delete
 
 Binding (Private::Node< T > &&rootNode)
 Construct a new Binding with an immediate mode evaluator.
 
virtual ~Binding ()=default
 
void markDirty () override
 
Bindingoperator= (Binding &&other)=delete
 
Bindingoperator= (Binding const &other)=delete
 
- Public Member Functions inherited from KDBindings::Binding< T, BindingEvaluator >
 Binding ()=delete
 
 Binding (Binding &&other)=delete
 
 Binding (Binding const &other)=delete
 
 Binding (Private::Node< T > &&rootNode, BindingEvaluator const &evaluator)
 Construct a new Binding with a specific evaluator.
 
 ~Binding () override
 
void evaluate ()
 
get () const override
 
Bindingoperator= (Binding &&other)=delete
 
Bindingoperator= (Binding const &other)=delete
 
void setUpdateFunction (std::function< void(T &&)> const &updateFunction) override
 
- Public Member Functions inherited from KDBindings::PropertyUpdater< T >
 PropertyUpdater ()=default
 
 PropertyUpdater (PropertyUpdater &&other)=default
 
 PropertyUpdater (PropertyUpdater const &other)=default
 
virtual ~PropertyUpdater ()=default
 
PropertyUpdateroperator= (PropertyUpdater &&other)=default
 
PropertyUpdateroperator= (PropertyUpdater const &other)=default
 
- Public Member Functions inherited from KDBindings::Private::Dirtyable
 Dirtyable ()=default
 
virtual ~Dirtyable ()=default
 
bool isDirty () const
 
void setParent (Dirtyable *newParent)
 

Additional Inherited Members

- Protected Member Functions inherited from KDBindings::Binding< T, BindingEvaluator >
const bool * dirtyVariable () const override
 
Private::Dirtyable ** parentVariable () override
 
- Protected Attributes inherited from KDBindings::Binding< T, BindingEvaluator >
int m_bindingId
 
BindingEvaluator m_evaluator
 
std::function< void(T &&)> m_propertyUpdateFunction
 
Private::Node< T > m_rootNode
 

Detailed Description

template<typename T>
class KDBindings::Binding< T, ImmediateBindingEvaluator >

Provides a convenience for old-school, immediate mode Bindings.

This works in conjunction with a do-nothing ImmediateBindingEvaluator class to update the result of the Binding immediately upon any of the dependent bindables (i.e. Property instances) notifying that they have changed. This can lead to a Property Binding being evaluated many times before the result is ever used in a typical GUI application.

Template Parameters
TThe type of the value that the Binding expression evaluates to.

Definition at line 179 of file binding.h.

Constructor & Destructor Documentation

◆ Binding() [1/4]

template<typename T >
KDBindings::Binding< T, ImmediateBindingEvaluator >::Binding ( Private::Node< T > &&  rootNode)
inlineexplicit

Construct a new Binding with an immediate mode evaluator.

Parameters
rootNodeRepresents that expression contained in the Binding.

Definition at line 187 of file binding.h.

◆ Binding() [2/4]

template<typename T >
KDBindings::Binding< T, ImmediateBindingEvaluator >::Binding ( )
delete

A Binding is not default constructible.

◆ ~Binding()

template<typename T >
virtual KDBindings::Binding< T, ImmediateBindingEvaluator >::~Binding ( )
virtualdefault

◆ Binding() [3/4]

template<typename T >
KDBindings::Binding< T, ImmediateBindingEvaluator >::Binding ( Binding< T, ImmediateBindingEvaluator > const &  other)
delete

A Binding cannot be copy constructed.

◆ Binding() [4/4]

template<typename T >
KDBindings::Binding< T, ImmediateBindingEvaluator >::Binding ( Binding< T, ImmediateBindingEvaluator > &&  other)
delete

A Binding can not be move constructed.

Member Function Documentation

◆ markDirty()

template<typename T >
void KDBindings::Binding< T, ImmediateBindingEvaluator >::markDirty ( )
inlineoverridevirtual

Reimplemented from KDBindings::Private::Dirtyable.

Definition at line 207 of file binding.h.

References KDBindings::Binding< T, EvaluatorT >::evaluate().

◆ operator=() [1/2]

template<typename T >
Binding & KDBindings::Binding< T, ImmediateBindingEvaluator >::operator= ( Binding< T, ImmediateBindingEvaluator > &&  other)
delete

A Binding can not be move assigned.

◆ operator=() [2/2]

template<typename T >
Binding & KDBindings::Binding< T, ImmediateBindingEvaluator >::operator= ( Binding< T, ImmediateBindingEvaluator > const &  other)
delete

A Binding cannot be copy assigned.


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

© Klarälvdalens Datakonsult AB (KDAB)
"The Qt, C++ and OpenGL Experts"
https://www.kdab.com/
KDDockWidgets
Advanced Dock Widget Framework for Qt
https://www.kdab.com/development-resources/qt-tools/kddockwidgets/
Generated by doxygen 1.9.8