QtHaskell wraps the QScriptEngine
and
QScriptValue
classes. This is also done in the standard
way as for the rest of the qtHaskell bindings, except that the
wrapper is not yet complete for these classes, although it is sufficiently
complete to facilitate the recoding of the detailed Qt tetrix example.
In order to allow custom slots and signals to be connected from within the javascript code, the following extra facilities are provided:
The javascript file qtc_ds.js
provides the
javascript routines connectDsSlot
which is used
to connect custom slots from within the javascript code, and
connectDsCall
which connects functions in the Haskell
environment so they can be called from within javascript.
The Haskell environment provides the function
registerDsSignal
which allows signals to be used from
within javascript and qNsfContainer
which allows Haskell
functions to be called from within javascript.