Qt 4.8
Static Public Functions | List of all members
CharacterData Class Reference
Inheritance diagram for CharacterData:
Node Text CDATA

Static Public Functions

static QScriptValue length (QScriptContext *context, QScriptEngine *engine)
 
static QScriptValue prototype (QScriptEngine *)
 
- Static Public Functions inherited from Node
static QScriptValue attributes (QScriptContext *context, QScriptEngine *engine)
 
static QScriptValue childNodes (QScriptContext *context, QScriptEngine *engine)
 
static QScriptValue create (QScriptEngine *, NodeImpl *)
 
static QScriptValue firstChild (QScriptContext *context, QScriptEngine *engine)
 
static QScriptValue lastChild (QScriptContext *context, QScriptEngine *engine)
 
static QScriptValue nextSibling (QScriptContext *context, QScriptEngine *engine)
 
static QScriptValue nodeName (QScriptContext *context, QScriptEngine *engine)
 
static QScriptValue nodeType (QScriptContext *context, QScriptEngine *engine)
 
static QScriptValue nodeValue (QScriptContext *context, QScriptEngine *engine)
 
static QScriptValue parentNode (QScriptContext *context, QScriptEngine *engine)
 
static QScriptValue previousSibling (QScriptContext *context, QScriptEngine *engine)
 
static QScriptValue prototype (QScriptEngine *)
 

Additional Inherited Members

- Public Functions inherited from Node
bool isNull () const
 
 Node ()
 
 Node (const Node &o)
 
 ~Node ()
 
- Public Variables inherited from Node
NodeImpld
 

Detailed Description

Definition at line 284 of file qdeclarativexmlhttprequest.cpp.

Functions

◆ length()

QScriptValue CharacterData::length ( QScriptContext context,
QScriptEngine engine 
)
static

Definition at line 564 of file qdeclarativexmlhttprequest.cpp.

565 {
566  Node node = qscriptvalue_cast<Node>(context->thisObject());
567  if (node.isNull()) return engine->undefinedValue();
568 
569  return QScriptValue(node.d->data.length());
570 }
T qscriptvalue_cast(const QScriptValue &)
int length() const
Returns the number of characters in this string.
Definition: qstring.h:696
bool isNull() const
QScriptValue undefinedValue()
Returns a QScriptValue of the primitive type Undefined.
QScriptValue thisObject() const
Returns the `this&#39; object associated with this QScriptContext.
The QScriptValue class acts as a container for the Qt Script data types.
Definition: qscriptvalue.h:57

◆ prototype()

QScriptValue CharacterData::prototype ( QScriptEngine engine)
static

Definition at line 572 of file qdeclarativexmlhttprequest.cpp.

Referenced by Text::prototype().

573 {
574  QScriptValue proto = engine->newObject();
575  proto.setPrototype(Node::prototype(engine));
576 
579 
580  return proto;
581 }
QScriptValue newFunction(FunctionSignature signature, int length=0)
Creates a QScriptValue that wraps a native (C++) function.
QLatin1String(DBUS_INTERFACE_DBUS))) Q_GLOBAL_STATIC_WITH_ARGS(QString
static QScriptValue prototype(QScriptEngine *)
static QScriptValue nodeValue(QScriptContext *context, QScriptEngine *engine)
QScriptValue newObject()
Creates a QtScript object of class Object.
static QScriptValue length(QScriptContext *context, QScriptEngine *engine)
void setProperty(const QString &name, const QScriptValue &value, const PropertyFlags &flags=KeepExistingFlags)
Sets the value of this QScriptValue&#39;s property with the given name to the given value.
void setPrototype(const QScriptValue &prototype)
If this QScriptValue is an object, sets the internal prototype (__proto__ property) of this object to...
The QScriptValue class acts as a container for the Qt Script data types.
Definition: qscriptvalue.h:57

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