Qt 4.8
|
Public Functions | |
NamedNodeMapClass (QScriptEngine *engine) | |
virtual QScriptValue | property (const QScriptValue &object, const QScriptString &name, uint id) |
Returns the value of the property with the given name of the given object. More... | |
virtual QueryFlags | queryProperty (const QScriptValue &object, const QScriptString &name, QueryFlags flags, uint *id) |
Queries this script class for how access to the property with the given name of the given object should be handled. More... | |
Public Functions inherited from QScriptClass | |
QScriptEngine * | engine () const |
Returns the engine that this QScriptClass is associated with. More... | |
virtual QVariant | extension (Extension extension, const QVariant &argument=QVariant()) |
This virtual function can be reimplemented in a QScriptClass subclass to provide support for extensions. More... | |
virtual QString | name () const |
Returns the name of the script class. More... | |
virtual QScriptClassPropertyIterator * | newIterator (const QScriptValue &object) |
Returns an iterator for traversing custom properties of the given object. More... | |
virtual QScriptValue::PropertyFlags | propertyFlags (const QScriptValue &object, const QScriptString &name, uint id) |
Returns the flags of the property with the given name of the given object. More... | |
virtual QScriptValue | prototype () const |
Returns the object to be used as the prototype of new instances of this class (created with QScriptEngine::newObject()). More... | |
QScriptClass (QScriptEngine *engine) | |
Constructs a QScriptClass object to be used in the given engine. More... | |
virtual void | setProperty (QScriptValue &object, const QScriptString &name, uint id, const QScriptValue &value) |
Sets the property with the given name of the given object to the given value. More... | |
virtual bool | supportsExtension (Extension extension) const |
Returns true if the QScriptClass supports the given extension; otherwise, false is returned. More... | |
virtual | ~QScriptClass () |
Destroys the QScriptClass object. More... | |
Additional Inherited Members | |
Public Types inherited from QScriptClass | |
enum | Extension { Callable, HasInstance } |
This enum specifies the possible extensions to a QScriptClass. More... | |
enum | QueryFlag { HandlesReadAccess = 0x01, HandlesWriteAccess = 0x02 } |
This enum describes flags that are used to query a QScriptClass regarding how access to a property should be handled. More... | |
Protected Functions inherited from QScriptClass | |
QScriptClass (QScriptEngine *engine, QScriptClassPrivate &dd) | |
Protected Variables inherited from QScriptClass | |
QScopedPointer< QScriptClassPrivate > | d_ptr |
Definition at line 187 of file qdeclarativexmlhttprequest.cpp.
|
inline |
Definition at line 190 of file qdeclarativexmlhttprequest.cpp.
|
virtual |
Returns the value of the property with the given name of the given object.
The id argument is only useful if you assigned a value to it in queryProperty().
The default implementation does nothing and returns an invalid QScriptValue.
Reimplemented from QScriptClass.
Definition at line 883 of file qdeclarativexmlhttprequest.cpp.
|
virtual |
Queries this script class for how access to the property with the given name of the given object should be handled.
The given flags specify the aspects of interest. This function should return a subset of flags to indicate which aspects of property access should be further handled by the script class.
For example, if the flags contain HandlesReadAccess, and you would like your class to handle the reading of the property (through the property() function), the returned flags should include HandlesReadAccess. If the returned flags do not contain HandlesReadAccess, the property will be handled as a normal script object property.
You can optionally use the id argument to store a value that will subsequently be passed on to functions such as property() and setProperty().
The default implementation of this function returns 0.
Note: This function is only called if the given property isn't already a normal property of the object. For example, say you advertise that you want to handle read access to property foo
, but not write access; if foo
is then assigned a value, it will become a normal script object property, and subsequently you will no longer be queried regarding read access to foo
.
Reimplemented from QScriptClass.
Definition at line 854 of file qdeclarativexmlhttprequest.cpp.