Qt 4.8
|
Public Functions | |
QScriptValue | property (const QScriptValue &object, const QScriptString &name, uint) |
Returns the value of the property with the given name of the given object. More... | |
QScriptValue::PropertyFlags | propertyFlags (const QScriptValue &, const QScriptString &name, uint) |
Returns the flags of the property with the given name of the given object. More... | |
QDeclarativeSqlQueryScriptClass (QScriptEngine *engine) | |
QueryFlags | queryProperty (const QScriptValue &, const QScriptString &name, QueryFlags flags, uint *) |
Queries this script class for how access to the property with the given name of the given object should be handled. More... | |
void | setProperty (QScriptValue &object, const QScriptString &name, uint, const QScriptValue &value) |
Sets the property with the given name of the given object to the given value. 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 | 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 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... | |
Properties | |
QScriptString | str_forwardOnly |
QScriptString | str_length |
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 70 of file qdeclarativesqldatabase.cpp.
|
inline |
Definition at line 72 of file qdeclarativesqldatabase.cpp.
Referenced by qmlsqldatabase_executeSql().
|
inlinevirtual |
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 95 of file qdeclarativesqldatabase.cpp.
|
inlinevirtual |
Returns the flags 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 returns 0.
Reimplemented from QScriptClass.
Definition at line 126 of file qdeclarativesqldatabase.cpp.
|
inlinevirtual |
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 78 of file qdeclarativesqldatabase.cpp.
|
inlinevirtual |
Sets the property with the given name of the given object to the given value.
The id argument is only useful if you assigned a value to it in queryProperty().
The default implementation does nothing.
An invalid value represents a request to remove the property.
Reimplemented from QScriptClass.
Definition at line 117 of file qdeclarativesqldatabase.cpp.
|
private |
Definition at line 137 of file qdeclarativesqldatabase.cpp.
Referenced by property(), QDeclarativeSqlQueryScriptClass(), queryProperty(), and setProperty().
|
private |
Definition at line 136 of file qdeclarativesqldatabase.cpp.
Referenced by property(), propertyFlags(), QDeclarativeSqlQueryScriptClass(), and queryProperty().