[V8] (re-)implements the translation layer between ScriptValue and QVariant where a prototype is set. More...
#include <ScriptObjectV8Proxy.h>
Static Public Member Functions | |
static QVariant * | unwrapQVariantPointer (v8::Isolate *isolate, const v8::Local< v8::Value > &value) |
Used to retrieve QVariant pointer contained inside script value. This is indirectly used by ScriptVariantV8Proxy getters and setters through scriptvalue_cast and ScriptEngineV8::castValueToVariant. | |
[V8] (re-)implements the translation layer between ScriptValue and QVariant where a prototype is set.
This object depends on a ScriptObjectV8Proxy to provide the prototype's behavior. ScriptVariantV8Proxy uses prototype class which provides methods which operate on QVariant. Typically it's used for class with larger number of methods which has a simplified JS API. For example it's used to provide JS scripting interface to AnimationPointer by using methods of AnimationObject. To use this functionality, given type has to be registered with script engine together with its prototype:
engine->setDefaultPrototype(qMetaTypeId<AnimationPointer>(), engine->newQObject( new AnimationObject(), ScriptEngine::ScriptOwnership));