Kross
qts/script.cpp
Go to the documentation of this file.
147 //krossdebug( QString("EcmaScript::connectFunctions No function to connect with %1.%2").arg(it.key()).arg(name) );
150 krossdebug( QString("EcmaScript::connectFunctions Connecting with %1.%2").arg(it.key()).arg(name) );
151 eval += QString("try { %1.%2.connect(%3); } catch(e) { print(e); }\n").arg(it.key()).arg(name).arg(name);
167 EcmaScript::EcmaScript(Interpreter* interpreter, Action* action) : Script(interpreter, action), d(new Private(this))
191 //krossdebug( QString("EcmaScript::execute fileName=%1 scriptCode=\n%2").arg(fileName).arg(scriptCode) );
int indexOf(QChar ch, int from, Qt::CaseSensitivity cs) const
void next()
Base class for interpreter dependent functionality each script provides.
Definition: core/script.h:43
int keyCount() const
QObject * sender() const
QHash< QString, Options > objectOptions() const
Definition: childreninterface.h:118
const QObjectList & children() const
virtual QVariant callFunction(const QString &name, const QVariantList &args=QVariantList())
Execute a function.
Definition: qts/script.cpp:227
virtual const QMetaObject * metaObject() const
QVariant toVariant() const
QString & remove(int position, int n)
QScriptValue call(const QScriptValue &thisObject, const QScriptValueList &args)
const char * name() const
QHash< QString, QObject * > objects() const
Definition: childreninterface.h:104
int value(int index) const
bool isEmpty() const
int methodCount() const
Interface for managing Object collections.
Definition: childreninterface.h:38
iterator begin()
bool startsWith(const QString &s, Qt::CaseSensitivity cs) const
const char * signature() const
QScriptValue property(const QString &name, const ResolveFlags &mode) const
virtual QVariant evaluate(const QByteArray &code)
Evaluate some scripting code.
Definition: qts/script.cpp:254
QMetaEnum enumerator(int index) const
bool isFunction() const
Item next()
QObject * object(const QString &name) const
Definition: childreninterface.h:97
int enumeratorCount() const
MethodType methodType() const
auto connect signals with scripting functions.
Definition: childreninterface.h:47
void setError(const QString &errormessage, const QString &tracemessage=QString(), long lineno=-1)
Set the error message.
Definition: errorinterface.h:69
QString left(int n) const
The Action class is an abstract container to deal with scripts like a single standalone script file...
Definition: action.h:94
iterator end()
The EcmaScript class implements a Kross::Script to handle a single script.
Definition: qts/script.h:38
const KShortcut & end()
QString arg(qlonglong a, int fieldWidth, int base, const QChar &fillChar) const
QMetaMethod method(int index) const
const char * key(int index) const
EcmaScript(Kross::Interpreter *interpreter, Kross::Action *action)
Constructor.
Definition: qts/script.cpp:167
void setProperty(const QString &name, const QScriptValue &value, const PropertyFlags &flags)
bool isQObject() const
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:24:44 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:24:44 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.