rocs/RocsCore
QtScriptBackend.cpp
Go to the documentation of this file.
63 graphList.property("push").call(graphList, QScriptValueList() << _document->dataStructures().at(i)->scriptValue());
71 DocumentManager::self().activeDocument()->engineBackend()->debug(QString("%1").arg(context->argument(0).toString()));
77 DocumentManager::self().activeDocument()->engineBackend()->output(QString("%1").arg(context->argument(0).toString()));
90 DocumentManager::self().activeDocument()->engineBackend()->include(QString("%1").arg(context->argument(0).toString()));
184 connect(d->_document->dataStructures().at(i).get(), SIGNAL(scriptError(QString)), this, SIGNAL(scriptError(QString)));
189 QString result = d->_engine->evaluate(d->_currentScript, i18n("Rocs Console script")).toString();
195 emit scriptInfo(i18nc("@info status message after successful script execution", "<i>Execution Finished</i>"));
228 connect(d->_document->dataStructures().at(i).get(), SIGNAL(scriptError(QString)), this, SIGNAL(scriptError(QString)));
240 scriptInfo(i18nc("@info status message after successful script execution", "<i>Execution Finished</i>"));
265 emit scriptError(i18n("The global method \"%1\" is deprecated, please use \"%2\" instead.", QString("debug(message)"), QString("Console.debug(message)")));
271 emit scriptError(i18n("The global method \"%1\" is deprecated, please use \"%2\" instead.", QString("output(message)"), QString("Console.log(message)")));
294 QString script = d->_includeManager.include(f.readAll(), fileName.section('/', 0, -2), fileName.section('/', -1));
295 d->_engine->currentContext()->setActivationObject(d->_engine->currentContext()->parentContext()->activationObject());
void scriptInfo(const QString &message)
void continueExecutionStep()
Continue execution of interrupted script.
Definition: QtScriptBackend.cpp:276
void sendOutput(const QString &message)
Document * activeDocument() const
Returns the currently active document, or 0 if there document list is empty.
Definition: DocumentManager.cpp:96
static QScriptValue debug_script(QScriptContext *context, QScriptEngine *)
Definition: QtScriptBackend.cpp:69
void include(const QString &filePath)
Include script from other script file.
Definition: QtScriptBackend.cpp:283
QScriptValue registerGlobalObject(QObject *qobject, const QString &name)
Register qobject as global object under name name at engine for next simulation run.
Definition: QtScriptBackend.cpp:125
void scriptError(const QString &message)
void output(const QString &message)
Output the given string message as program output.
Definition: QtScriptBackend.cpp:269
void sendDebug(const QString &message)
Definition: IncludeManager.h:27
QScriptValue call(const QScriptValue &thisObject, const QScriptValueList &args)
QString toString() const
void engineCreated(QScriptEngine *e)
void debug(const QString &message)
Output the given string message as debug output.
Definition: QtScriptBackend.cpp:263
QByteArray readAll()
static QScriptValue interrupt_script(QScriptContext *context, QScriptEngine *)
Definition: QtScriptBackend.cpp:81
bool isRunning() const
Return true if engine is currently evaluating a script, otherwise false.
Definition: QtScriptBackend.cpp:249
virtual bool open(QFlags< QIODevice::OpenModeFlag > mode)
QScriptValue property(const QString &name, const ResolveFlags &mode) const
IncludeManager & includeManager() const
Definition: QtScriptBackend.cpp:137
Definition: Document.h:41
static QScriptValue output_script(QScriptContext *context, QScriptEngine *)
Definition: QtScriptBackend.cpp:75
virtual bool atEnd() const
QString section(QChar sep, int start, int end, QFlags< QString::SectionFlag > flags) const
void setScript(const QString &script, Document *document)
Set the script script and the corresponding document document to be executed on next run...
Definition: QtScriptBackend.cpp:257
QScriptValue argument(int index) const
static QScriptValue include_script(QScriptContext *context, QScriptEngine *)
Definition: QtScriptBackend.cpp:88
bool connect(const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
void finished()
qint64 readLine(char *data, qint64 maxSize)
void setProperty(const QString &name, const QScriptValue &value, const PropertyFlags &flags)
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:16:18 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:16:18 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.