Qt 4.8
Public Functions | Properties | List of all members
QScript::QVariantDelegate Class Reference

#include <qscriptvariant_p.h>

Inheritance diagram for QScript::QVariantDelegate:
QScriptObjectDelegate

Public Functions

virtual bool compareToObject (QScriptObject *, JSC::ExecState *, JSC::JSObject *)
 
 QVariantDelegate (const QVariant &value)
 
void setValue (const QVariant &value)
 
Type type () const
 
QVariantvalue ()
 
 ~QVariantDelegate ()
 
- Public Functions inherited from QScriptObjectDelegate
virtual bool deleteProperty (QScriptObject *, JSC::ExecState *, const JSC::Identifier &propertyName)
 
virtual JSC::CallType getCallData (QScriptObject *, JSC::CallData &)
 
virtual JSC::ConstructType getConstructData (QScriptObject *, JSC::ConstructData &)
 
virtual bool getOwnPropertyDescriptor (QScriptObject *, JSC::ExecState *, const JSC::Identifier &propertyName, JSC::PropertyDescriptor &)
 
virtual void getOwnPropertyNames (QScriptObject *, JSC::ExecState *, JSC::PropertyNameArray &, JSC::EnumerationMode mode=JSC::ExcludeDontEnumProperties)
 
virtual bool getOwnPropertySlot (QScriptObject *, JSC::ExecState *, const JSC::Identifier &propertyName, JSC::PropertySlot &)
 
virtual bool hasInstance (QScriptObject *, JSC::ExecState *, JSC::JSValue value, JSC::JSValue proto)
 
virtual void markChildren (QScriptObject *, JSC::MarkStack &markStack)
 
virtual void put (QScriptObject *, JSC::ExecState *exec, const JSC::Identifier &propertyName, JSC::JSValue, JSC::PutPropertySlot &)
 
 QScriptObjectDelegate ()
 
virtual ~QScriptObjectDelegate ()
 

Properties

QVariant m_value
 

Additional Inherited Members

- Public Types inherited from QScriptObjectDelegate
enum  Type { QtObject, Variant, ClassObject, DeclarativeClassObject }
 

Detailed Description

Definition at line 47 of file qscriptvariant_p.h.

Constructors and Destructors

◆ QVariantDelegate()

QScript::QVariantDelegate::QVariantDelegate ( const QVariant value)

Definition at line 47 of file qscriptvariant.cpp.

48  : m_value(value)
49 {
50 }

◆ ~QVariantDelegate()

QScript::QVariantDelegate::~QVariantDelegate ( )

Definition at line 52 of file qscriptvariant.cpp.

53 {
54 }

Functions

◆ compareToObject()

bool QScript::QVariantDelegate::compareToObject ( QScriptObject ,
JSC::ExecState *  exec,
JSC::JSObject *  o2 
)
virtual

Reimplemented from QScriptObjectDelegate.

Definition at line 132 of file qscriptvariant.cpp.

133 {
134  const QVariant &variant1 = value();
135  return variant1 == QScriptEnginePrivate::toVariant(exec, o2);
136 }
The QVariant class acts like a union for the most common Qt data types.
Definition: qvariant.h:92
static QVariant toVariant(JSC::ExecState *, JSC::JSValue)

◆ setValue()

void QScript::QVariantDelegate::setValue ( const QVariant value)

Definition at line 61 of file qscriptvariant.cpp.

62 {
63  m_value = value;
64 }

◆ type()

QScriptObjectDelegate::Type QScript::QVariantDelegate::type ( ) const
virtual

Implements QScriptObjectDelegate.

Definition at line 66 of file qscriptvariant.cpp.

67 {
68  return Variant;
69 }

◆ value()

QVariant & QScript::QVariantDelegate::value ( )

Properties

◆ m_value

QVariant QScript::QVariantDelegate::m_value
private

Definition at line 61 of file qscriptvariant_p.h.

Referenced by setValue(), and value().


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