Qt 4.8
Public Functions | Protected Functions | Private Functions | Properties | Friends | List of all members
QDeclarativeValueTypeProxyBinding Class Reference

#include <qdeclarativebinding_p.h>

Inheritance diagram for QDeclarativeValueTypeProxyBinding:
QDeclarativeAbstractBinding

Public Functions

QDeclarativeAbstractBinding * binding (int propertyIndex)
 
virtual Type bindingType () const
 
virtual void disconnect (DisconnectMode disconnectMode)
 
 QDeclarativeValueTypeProxyBinding (QObject *o, int coreIndex)
 
void removeBindings (quint32 mask)
 Removes a collection of bindings, corresponding to the set bits in mask. More...
 
virtual void setEnabled (bool, QDeclarativePropertyPrivate::WriteFlags)
 
virtual void update (QDeclarativePropertyPrivate::WriteFlags)
 
- Public Functions inherited from QDeclarativeAbstractBinding
void addToObject (QObject *, int)
 Add this binding to object. More...
 
virtual void destroy (DestroyMode mode=DisconnectBinding)
 Destroy the binding. More...
 
virtual QString expression () const
 
QObject * object () const
 
int propertyIndex () const
 
 QDeclarativeAbstractBinding ()
 
void removeFromObject ()
 Remove the binding from the object. More...
 
void setEnabled (bool e)
 
void update ()
 

Protected Functions

 ~QDeclarativeValueTypeProxyBinding ()
 
- Protected Functions inherited from QDeclarativeAbstractBinding
void clear ()
 
virtual ~QDeclarativeAbstractBinding ()
 

Private Functions

void recursiveDisable (QDeclarativeAbstractBinding *)
 
void recursiveEnable (QDeclarativeAbstractBinding *, QDeclarativePropertyPrivate::WriteFlags)
 

Properties

QDeclarativeAbstractBinding * m_bindings
 
int m_index
 
QObject * m_object
 

Friends

class QDeclarativeAbstractBinding
 

Additional Inherited Members

- Public Types inherited from QDeclarativeAbstractBinding
enum  DestroyMode { DisconnectBinding, KeepBindingConnected }
 
enum  DisconnectMode { DisconnectOne, DisconnectAll }
 
typedef QWeakPointer< QDeclarativeAbstractBinding > Pointer
 
enum  Type { PropertyBinding, ValueTypeProxy }
 
- Static Public Functions inherited from QDeclarativeAbstractBinding
static Pointer getPointer (QDeclarativeAbstractBinding *p)
 

Detailed Description

Definition at line 146 of file qdeclarativebinding_p.h.

Constructors and Destructors

◆ QDeclarativeValueTypeProxyBinding()

QDeclarativeValueTypeProxyBinding::QDeclarativeValueTypeProxyBinding ( QObject *  o,
int  coreIndex 
)

Definition at line 500 of file qdeclarativebinding.cpp.

◆ ~QDeclarativeValueTypeProxyBinding()

QDeclarativeValueTypeProxyBinding::~QDeclarativeValueTypeProxyBinding ( )
protected

Definition at line 505 of file qdeclarativebinding.cpp.

506 {
507  while (m_bindings) {
509  binding->setEnabled(false, 0);
510  binding->destroy();
511  }
512 }
virtual void destroy(DestroyMode mode=DisconnectBinding)
Destroy the binding.
QDeclarativeAbstractBinding * binding(int propertyIndex)
QDeclarativeAbstractBinding * m_bindings

Functions

◆ binding()

QDeclarativeAbstractBinding * QDeclarativeValueTypeProxyBinding::binding ( int  propertyIndex)

Definition at line 557 of file qdeclarativebinding.cpp.

Referenced by removeBindings(), and ~QDeclarativeValueTypeProxyBinding().

558 {
560 
561  while (binding && binding->propertyIndex() != propertyIndex)
562  binding = binding->m_nextBinding;
563 
564  return binding;
565 }
QDeclarativeAbstractBinding * m_nextBinding
QDeclarativeAbstractBinding * binding(int propertyIndex)
QDeclarativeAbstractBinding * m_bindings

◆ bindingType()

virtual Type QDeclarativeValueTypeProxyBinding::bindingType ( ) const
inlinevirtual

◆ disconnect()

void QDeclarativeValueTypeProxyBinding::disconnect ( DisconnectMode  disconnectMode)
virtual

Implements QDeclarativeAbstractBinding.

Definition at line 551 of file qdeclarativebinding.cpp.

552 {
553  Q_UNUSED(disconnectMode);
554  // Nothing to do
555 }
#define Q_UNUSED(x)
Indicates to the compiler that the parameter with the specified name is not used in the body of a fun...
Definition: qglobal.h:1729

◆ recursiveDisable()

void QDeclarativeValueTypeProxyBinding::recursiveDisable ( QDeclarativeAbstractBinding *  b)
private

Definition at line 536 of file qdeclarativebinding.cpp.

Referenced by setEnabled().

537 {
538  if (!b)
539  return;
540 
542 
543  if (b)
544  b->setEnabled(false, 0);
545 }
QDeclarativeAbstractBinding * m_nextBinding
void recursiveDisable(QDeclarativeAbstractBinding *)

◆ recursiveEnable()

void QDeclarativeValueTypeProxyBinding::recursiveEnable ( QDeclarativeAbstractBinding *  b,
QDeclarativePropertyPrivate::WriteFlags  flags 
)
private

Definition at line 525 of file qdeclarativebinding.cpp.

Referenced by setEnabled().

526 {
527  if (!b)
528  return;
529 
530  recursiveEnable(b->m_nextBinding, flags);
531 
532  if (b)
533  b->setEnabled(true, flags);
534 }
void recursiveEnable(QDeclarativeAbstractBinding *, QDeclarativePropertyPrivate::WriteFlags)
QDeclarativeAbstractBinding * m_nextBinding

◆ removeBindings()

void QDeclarativeValueTypeProxyBinding::removeBindings ( quint32  mask)

Removes a collection of bindings, corresponding to the set bits in mask.

Definition at line 570 of file qdeclarativebinding.cpp.

571 {
573  while (binding) {
574  if (mask & (1 << (binding->propertyIndex() >> 24))) {
576  binding = remove->m_nextBinding;
577  *remove->m_prevBinding = remove->m_nextBinding;
578  if (remove->m_nextBinding) remove->m_nextBinding->m_prevBinding = remove->m_prevBinding;
579  remove->m_prevBinding = 0;
580  remove->m_nextBinding = 0;
581  remove->destroy();
582  } else {
583  binding = binding->m_nextBinding;
584  }
585  }
586 }
virtual void destroy(DestroyMode mode=DisconnectBinding)
Destroy the binding.
QDeclarativeAbstractBinding * m_nextBinding
QDeclarativeAbstractBinding * binding(int propertyIndex)
QDeclarativeAbstractBinding * m_bindings
QDeclarativeAbstractBinding ** m_prevBinding

◆ setEnabled()

void QDeclarativeValueTypeProxyBinding::setEnabled ( bool  e,
QDeclarativePropertyPrivate::WriteFlags  flags 
)
virtual

Implements QDeclarativeAbstractBinding.

Definition at line 514 of file qdeclarativebinding.cpp.

515 {
516  if (e) {
518  recursiveEnable(bindings, flags);
519  } else {
521  recursiveDisable(bindings);
522  }
523 }
void recursiveEnable(QDeclarativeAbstractBinding *, QDeclarativePropertyPrivate::WriteFlags)
QDeclarativeAbstractBinding * m_bindings
void recursiveDisable(QDeclarativeAbstractBinding *)

◆ update()

void QDeclarativeValueTypeProxyBinding::update ( QDeclarativePropertyPrivate::WriteFlags  )
virtual

Implements QDeclarativeAbstractBinding.

Definition at line 547 of file qdeclarativebinding.cpp.

548 {
549 }

Friends and Related Functions

◆ QDeclarativeAbstractBinding

Definition at line 168 of file qdeclarativebinding_p.h.

Properties

◆ m_bindings

QDeclarativeAbstractBinding* QDeclarativeValueTypeProxyBinding::m_bindings
private

◆ m_index

int QDeclarativeValueTypeProxyBinding::m_index
private

Definition at line 170 of file qdeclarativebinding_p.h.

◆ m_object

QObject* QDeclarativeValueTypeProxyBinding::m_object
private

Definition at line 169 of file qdeclarativebinding_p.h.


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