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

#include <qscriptvalueproperty_p.h>

Public Functions

QScriptValue::PropertyFlags flags () const
 Returns the flags of this QScriptValueProperty. More...
 
bool isValid () const
 Returns true if this QScriptValueProperty is valid, otherwise returns false. More...
 
QString name () const
 Returns the name of this QScriptValueProperty. More...
 
QScriptValuePropertyoperator= (const QScriptValueProperty &other)
 Assigns the other property to this QScriptValueProperty. More...
 
 QScriptValueProperty ()
 Constructs an invalid QScriptValueProperty. More...
 
 QScriptValueProperty (const QString &name, const QScriptValue &value, QScriptValue::PropertyFlags flags)
 Constructs a QScriptValueProperty with the given name, value and flags. More...
 
 QScriptValueProperty (const QScriptValueProperty &other)
 Constructs a QScriptValueProperty that is a copy of the other property. More...
 
QScriptValue value () const
 Returns the value of this QScriptValueProperty. More...
 
 ~QScriptValueProperty ()
 Destroys this QScriptValueProperty. More...
 

Properties

QScopedSharedPointer< QScriptValuePropertyPrivated_ptr
 

Detailed Description

Definition at line 66 of file qscriptvalueproperty_p.h.

Constructors and Destructors

◆ QScriptValueProperty() [1/3]

QScriptValueProperty::QScriptValueProperty ( )

Constructs an invalid QScriptValueProperty.

Definition at line 74 of file qscriptvalueproperty.cpp.

75  : d_ptr(0)
76 {
77 }
QScopedSharedPointer< QScriptValuePropertyPrivate > d_ptr

◆ QScriptValueProperty() [2/3]

QScriptValueProperty::QScriptValueProperty ( const QString name,
const QScriptValue value,
QScriptValue::PropertyFlags  flags 
)

Constructs a QScriptValueProperty with the given name, value and flags.

Definition at line 83 of file qscriptvalueproperty.cpp.

87 {
88  d_ptr->name = name;
89  d_ptr->value = value;
90  d_ptr->flags = flags;
91  d_ptr->ref.ref();
92 }
QString name() const
Returns the name of this QScriptValueProperty.
QScriptValue::PropertyFlags flags() const
Returns the flags of this QScriptValueProperty.
QScopedSharedPointer< QScriptValuePropertyPrivate > d_ptr
QScriptValue value() const
Returns the value of this QScriptValueProperty.

◆ QScriptValueProperty() [3/3]

QScriptValueProperty::QScriptValueProperty ( const QScriptValueProperty other)

Constructs a QScriptValueProperty that is a copy of the other property.

Definition at line 97 of file qscriptvalueproperty.cpp.

98  : d_ptr(other.d_ptr.data())
99 {
100  if (d_ptr)
101  d_ptr->ref.ref();
102 }
T * data() const
Returns the value of the pointer referenced by this object.
QScopedSharedPointer< QScriptValuePropertyPrivate > d_ptr

◆ ~QScriptValueProperty()

QScriptValueProperty::~QScriptValueProperty ( )

Destroys this QScriptValueProperty.

Definition at line 107 of file qscriptvalueproperty.cpp.

108 {
109 }

Functions

◆ flags()

QScriptValue::PropertyFlags QScriptValueProperty::flags ( ) const

Returns the flags of this QScriptValueProperty.

Definition at line 145 of file qscriptvalueproperty.cpp.

Referenced by QScriptObjectSnapshot::capture(), QScriptDebuggerCommandExecutor::execute(), and QScriptValueProperty().

146 {
147  Q_D(const QScriptValueProperty);
148  if (!d)
149  return 0;
150  return d->flags;
151 }
double d
Definition: qnumeric_p.h:62
#define Q_D(Class)
Definition: qglobal.h:2482

◆ isValid()

bool QScriptValueProperty::isValid ( ) const

Returns true if this QScriptValueProperty is valid, otherwise returns false.

Definition at line 157 of file qscriptvalueproperty.cpp.

158 {
159  Q_D(const QScriptValueProperty);
160  return (d != 0);
161 }
double d
Definition: qnumeric_p.h:62
#define Q_D(Class)
Definition: qglobal.h:2482

◆ name()

QString QScriptValueProperty::name ( ) const

Returns the name of this QScriptValueProperty.

Definition at line 123 of file qscriptvalueproperty.cpp.

Referenced by QScriptObjectSnapshot::capture(), QScriptDebuggerCommandExecutor::execute(), QScriptObjectSnapshot::findProperty(), and QScriptValueProperty().

124 {
125  Q_D(const QScriptValueProperty);
126  if (!d)
127  return QString();
128  return d->name;
129 }
double d
Definition: qnumeric_p.h:62
The QString class provides a Unicode character string.
Definition: qstring.h:83
#define Q_D(Class)
Definition: qglobal.h:2482

◆ operator=()

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

Assigns the other property to this QScriptValueProperty.

Definition at line 114 of file qscriptvalueproperty.cpp.

115 {
116  d_ptr.assign(other.d_ptr.data());
117  return *this;
118 }
T * data() const
Returns the value of the pointer referenced by this object.
QScopedSharedPointer< QScriptValuePropertyPrivate > d_ptr

◆ value()

QScriptValue QScriptValueProperty::value ( ) const

Returns the value of this QScriptValueProperty.

Definition at line 134 of file qscriptvalueproperty.cpp.

Referenced by QScriptObjectSnapshot::capture(), QScriptDebuggerCommandExecutor::execute(), and QScriptValueProperty().

135 {
136  Q_D(const QScriptValueProperty);
137  if (!d)
138  return QScriptValue();
139  return d->value;
140 }
double d
Definition: qnumeric_p.h:62
#define Q_D(Class)
Definition: qglobal.h:2482
The QScriptValue class acts as a container for the Qt Script data types.
Definition: qscriptvalue.h:57

Properties

◆ d_ptr

QScopedSharedPointer<QScriptValuePropertyPrivate> QScriptValueProperty::d_ptr
private

Definition at line 85 of file qscriptvalueproperty_p.h.

Referenced by operator=(), and QScriptValueProperty().


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