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
bool canConvert(Type t) const
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
uint qHash(const KConfigIniBackend::BufferFragment &fragment)
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
T value() const
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)
double toDouble(bool *ok) const
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
int size() const
static QVariant releaseValue(const QVariant &v)
Helper that calls release on any object or function reference base stored in v.
Definition: scriptableextension.cpp:212
void append(const T &value)
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
int toInt(bool *ok, int base) const
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
const char * constData() const
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
int remove(const Key &key)
iterator end()
QString toLower() const
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
QVariant fromValue(const T &value)
KGuiItem ok()
virtual void release(quint64 objid)
decreases reference count of object objId
Definition: scriptableextension.cpp:207
QString & replace(int position, int n, QChar after)
ScriptableExtension * owner
Definition: scriptableextension.h:92
QByteArray toLatin1() const
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
QString & sprintf(const char *cformat,...)
bool toBool() const
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
QString fromLatin1(const char *str, int size)
bool contains(const Key &key) const
Type type() const
bool connect(const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
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
QString toString() const
iterator begin()
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-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:25:36 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:25:36 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.