The work module#
The Worker class, inheriting from parce’s Worker class.
- class Worker(qtextdocument, treebuilder=None, transformer=None)[source]#
Bases:
Worker,SingleInstanceA Worker that uses Qt signals instead of callbacks.
This Worker is attachted to a QTextDocument, and automatically updates the tokens (and optionally the transformed result) when the document changes.
- started#
Qt signal emitted with no arguments when
start_build()is called.
- tree_updated#
Qt signal emitted with two arguments (start, end) when the tree has been updated.
- tree_finished#
Qt signal emitted with no arguments just after
tree_updatedhas been emitted.
- transform_finished#
Qt signal emitted with no arguments when the transformation has been finished.
- debugging = False#
set debugging to True to print some info to the console while running
- slot_contents_change(start, removed, added)[source]#
Called after modification of the text, retokenizes the modified part.
- wait_build()[source]#
Wait for the build job to be completed.
Immediately returns if there is no build job active.