KParts
scriptableextension.cpp
Go to the documentation of this file.
227 ScriptableLiveConnectExtension::ScriptableLiveConnectExtension(QObject* p, LiveConnectExtension* old):
242 bool ScriptableLiveConnectExtension::hasProperty(ScriptableExtension*, quint64 objId, const QString& propName)
384 void ScriptableLiveConnectExtension::liveConnectEvent(const unsigned long, const QString& event,
virtual bool removeProperty(ScriptableExtension *callerPrincipal, quint64 objId, const QString &propName)
Tries to remove the field d propName from object objId associated with 'this'.
Definition: scriptableextension.cpp:146
static ScriptableExtension * childObject(QObject *obj)
Queries obj for a child object which inherits from this ScriptableExtension class.
Definition: scriptableextension.cpp:43
static QVariant acquireValue(const QVariant &v)
Helper that calls acquire on any object or function reference base stored in v.
Definition: scriptableextension.cpp:195
virtual QVariant rootObject()
Return the root scriptable object of this KPart.
Definition: scriptableextension.cpp:64
QVariant get(ScriptableExtension *callerPrincipal, quint64 objId, const QString &propName)
Tries to get field propName from object objId associated with 'this'.
Definition: scriptableextension.cpp:274
QVariant rootObject()
Return the root scriptable object of this KPart.
Definition: scriptableextension.cpp:236
ScriptableExtension * host() const
Returns any registered parent scripting context.
Definition: scriptableextension.cpp:59
Returned from operations to denote a failure.
Definition: scriptableextension.h:68
virtual QVariant callFunctionReference(ScriptableExtension *callerPrincipal, quint64 objId, const QString &f, const ArgList &args)
Try to use a function reference to field f of object as a function.
Definition: scriptableextension.cpp:98
virtual bool enumerateProperties(ScriptableExtension *callerPrincipal, quint64 objId, QStringList *result)
Tries to enumerate all fields of object objId associated with this to result.
Definition: scriptableextension.cpp:155
virtual bool call(const unsigned long objid, const QString &func, const QStringList &args, Type &type, unsigned long &retobjid, QString &value)
calls a function of objid, return true on success
Definition: browserextension.cpp:811
virtual bool hasProperty(ScriptableExtension *callerPrincipal, quint64 objId, const QString &propName)
Returns true if the object objId associated with 'this' has the property propName.
Definition: scriptableextension.cpp:118
virtual QVariant get(ScriptableExtension *callerPrincipal, quint64 objId, const QString &propName)
Tries to get field propName from object objId associated with 'this'.
Definition: scriptableextension.cpp:127
virtual void acquire(quint64 objid)
increases reference count of object objId
Definition: scriptableextension.cpp:190
virtual QVariant callAsFunction(ScriptableExtension *callerPrincipal, quint64 objId, const ArgList &args)
Try to use the object objId associated with 'this' as a function.
Definition: scriptableextension.cpp:89
static QDebug kDebug(bool cond, int area=KDE_DEFAULT_DEBUG_AREA)
ScriptableLiveConnectExtension(QObject *parent, LiveConnectExtension *old)
Definition: scriptableextension.cpp:227
QVariant enclosingObject()
Returns an object that represents the host()'s view of us.
Definition: scriptableextension.cpp:69
static QVariant releaseValue(const QVariant &v)
Helper that calls release on any object or function reference base stored in v.
Definition: scriptableextension.cpp:212
static ScriptableExtension * adapterFromLiveConnect(QObject *parentObj, LiveConnectExtension *oldApi)
This returns a bridge object that permits KParts implementing the older LiveConnectExtension to be us...
Definition: scriptableextension.cpp:48
QVariant callFunctionReference(ScriptableExtension *callerPrincipal, quint64 objId, const QString &f, const ArgList &args)
Try to use a function reference to field f of object as a function.
Definition: scriptableextension.cpp:252
bool put(ScriptableExtension *callerPrincipal, quint64 objId, const QString &propName, const QVariant &value)
Tries to set the field propName from object objId associated with 'this' to value.
Definition: scriptableextension.cpp:288
An extension class for LiveConnect, i.e.
Definition: browserextension.h:765
Corresponds to 'null' in JavaScript.
Definition: scriptableextension.h:61
virtual QVariant callAsConstructor(ScriptableExtension *callerPrincipal, quint64 objId, const ArgList &args)
Try to use the object objId associated with 'this' as a constructor (corresponding to ECMAScript's ne...
Definition: scriptableextension.cpp:109
void liveConnectEvent(const unsigned long, const QString &, const KParts::LiveConnectExtension::ArgList &)
Definition: scriptableextension.cpp:384
virtual ~ScriptableExtension()
Definition: scriptableextension.cpp:38
virtual bool isScriptLanguageSupported(ScriptLanguage lang) const
returns true if this extension can execute scripts in the given language
Definition: scriptableextension.cpp:184
Function references are a pair of an object and a field in it.
Definition: scriptableextension.h:104
virtual void unregister(const unsigned long objid)
notifies the part that there is no reference anymore to objid
Definition: browserextension.cpp:815
KGuiItem ok()
uint qHash(const KPluginInfo &p)
virtual void release(quint64 objid)
decreases reference count of object objId
Definition: scriptableextension.cpp:207
ScriptableExtension * owner
Definition: scriptableextension.h:92
virtual bool put(const unsigned long objid, const QString &field, const QString &value)
put a field value in objid, return true on success
Definition: browserextension.cpp:807
void acquire(quint64 objid)
increases reference count of object objId
Definition: scriptableextension.cpp:369
void setHost(ScriptableExtension *host)
Reports the hosting ScriptableExtension to a child.
Definition: scriptableextension.cpp:54
bool hasProperty(ScriptableExtension *callerPrincipal, quint64 objId, const QString &propName)
Returns true if the object objId associated with 'this' has the property propName.
Definition: scriptableextension.cpp:242
virtual bool setException(ScriptableExtension *callerPrincipal, const QString &message)
Tries to raise an exception with given message in this extension's scripting context.
Definition: scriptableextension.cpp:164
virtual QVariant evaluateScript(ScriptableExtension *callerPrincipal, quint64 contextObjectId, const QString &code, ScriptLanguage language=ECMAScript)
Tries to evaluate a script code with the given object as its context.
Definition: scriptableextension.cpp:172
virtual bool put(ScriptableExtension *callerPrincipal, quint64 objId, const QString &propName, const QVariant &value)
Tries to set the field propName from object objId associated with 'this' to value.
Definition: scriptableextension.cpp:136
void release(quint64 objid)
decreases reference count of object objId
Definition: scriptableextension.cpp:374
An extension class that permits KParts to be scripted (such as when embedded inside a KHTMLPart) and ...
Definition: scriptableextension.h:44
ScriptableExtension(QObject *parent)
Definition: scriptableextension.cpp:34
Objects are abstracted away as a pair of the ScriptableExtension the performs operations on it...
Definition: scriptableextension.h:91
virtual bool get(const unsigned long objid, const QString &field, Type &type, unsigned long &retobjid, QString &value)
get a field value from objid, return true on success
Definition: browserextension.cpp:803
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:50:42 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:50:42 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.