Qt 4.8
Public Functions | Properties | Friends | List of all members
QDeclarativeDomValueBinding Class Reference

The QDeclarativeDomValueBinding class represents a property binding. More...

#include <qdeclarativedom_p.h>

Public Functions

QString binding () const
 Return the binding expression. More...
 
QDeclarativeDomValueBindingoperator= (const QDeclarativeDomValueBinding &)
 Assign other to this QDeclarativeDomValueBinding. More...
 
 QDeclarativeDomValueBinding ()
 Construct an empty QDeclarativeDomValueBinding. More...
 
 QDeclarativeDomValueBinding (const QDeclarativeDomValueBinding &)
 Create a copy of other QDeclarativeDomValueBinding. More...
 
 ~QDeclarativeDomValueBinding ()
 Destroy the QDeclarativeDomValueBinding. More...
 

Properties

QSharedDataPointer< QDeclarativeDomBasicValuePrivated
 

Friends

class QDeclarativeDomValue
 

Detailed Description

The QDeclarativeDomValueBinding class represents a property binding.

Warning
This function is not part of the public interface.
A property binding is an ECMAScript expression assigned to a property.  In
the example below, the "x" property is being assigned a property binding.
Rectangle { x: Other.x }

Definition at line 216 of file qdeclarativedom_p.h.

Constructors and Destructors

◆ QDeclarativeDomValueBinding() [1/2]

QDeclarativeDomValueBinding::QDeclarativeDomValueBinding ( )

Construct an empty QDeclarativeDomValueBinding.

Definition at line 1056 of file qdeclarativedom.cpp.

1056  :
1058 {
1059 }
QSharedDataPointer< QDeclarativeDomBasicValuePrivate > d

◆ QDeclarativeDomValueBinding() [2/2]

QDeclarativeDomValueBinding::QDeclarativeDomValueBinding ( const QDeclarativeDomValueBinding other)

Create a copy of other QDeclarativeDomValueBinding.

Definition at line 1064 of file qdeclarativedom.cpp.

1065 : d(other.d)
1066 {
1067 }
QSharedDataPointer< QDeclarativeDomBasicValuePrivate > d

◆ ~QDeclarativeDomValueBinding()

QDeclarativeDomValueBinding::~QDeclarativeDomValueBinding ( )

Destroy the QDeclarativeDomValueBinding.

Definition at line 1072 of file qdeclarativedom.cpp.

1073 {
1074 }

Functions

◆ binding()

QString QDeclarativeDomValueBinding::binding ( ) const

Return the binding expression.

In the example below, the string "Other.x" will be returned.

Rectangle { x: Other.x }

Definition at line 1093 of file qdeclarativedom.cpp.

1094 {
1095  if (d->value)
1096  return d->value->value.asScript();
1097  else
1098  return QString();
1099 }
QDeclarativeParser::Value * value
The QString class provides a Unicode character string.
Definition: qstring.h:83
QSharedDataPointer< QDeclarativeDomBasicValuePrivate > d

◆ operator=()

QDeclarativeDomValueBinding & QDeclarativeDomValueBinding::operator= ( const QDeclarativeDomValueBinding other)

Assign other to this QDeclarativeDomValueBinding.

Definition at line 1079 of file qdeclarativedom.cpp.

1080 {
1081  d = other.d;
1082  return *this;
1083 }
QSharedDataPointer< QDeclarativeDomBasicValuePrivate > d

Friends and Related Functions

◆ QDeclarativeDomValue

friend class QDeclarativeDomValue
friend

Definition at line 227 of file qdeclarativedom_p.h.

Properties

◆ d

QSharedDataPointer<QDeclarativeDomBasicValuePrivate> QDeclarativeDomValueBinding::d
private

Definition at line 228 of file qdeclarativedom_p.h.

Referenced by binding(), operator=(), and QDeclarativeDomValue::toBinding().


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