Documents > BPS V2 Script API
Engine Class Reference

The script engine. More...

List of all members.

Signals

void writelnDebug (String aLine)
 This signal is emitted whenever a line shall be written to the debugger output.
void writelnStderr (String aLine)
 This signal is emitted whenever a line shall be written to the standard error output (stderr).
void writelnStdout (String aLine)
 This signal is emitted whenever a line shall be written to the standard output (stdout).

Detailed Description

The script engine.

There exists exactly one property of this type named engine in the global object. The engine object is a reference to the script engine object which is executing the current script. It is mainly of use in GUI applications where output of debug(), print() and perror() shall get displayed on a widget.

Example:

 var ui = loadUiFile('mydialog.ui');
 engine.writelnStdout.connect(ui.findChild('textEdit').append);
 print('hello world'); //appended to the textedit

Member Function Documentation

void Engine::writelnDebug ( String  aLine) [signal]

This signal is emitted whenever a line shall be written to the debugger output.

Parameters:
[in]aLineThe text line to write.
void Engine::writelnStderr ( String  aLine) [signal]

This signal is emitted whenever a line shall be written to the standard error output (stderr).

Parameters:
[in]aLineThe text line to write.
void Engine::writelnStdout ( String  aLine) [signal]

This signal is emitted whenever a line shall be written to the standard output (stdout).

Parameters:
[in]aLineThe text line to write.