Tools for running external processes in a Qt4 GUI.
Functions
level2tag(level) |
Classes
BaseOutputHandler([logger]) | Base class for output handlers |
BaseToolController([logger]) | Base class for controlling command line tools. |
Qt4Blinker([parent, flags]) | Qt4 linker. |
Qt4DialogLoggingHandler([dialog, parent]) | Qt4 handler for the logging dialog. |
Qt4LoggingHandler(textview) | Custom handler for logging on Qt4 textviews. |
Qt4OutputHandler([logger, statusbar, ...]) | Qt4 Output Handler. |
Qt4OutputPlane([parent]) | |
Qt4ToolController([logger, parent]) | Qt4 tool controller. |
Bases: PyQt4.QtGui.QLabel
Qt4 linker.
Slots : |
---|
Bases: PyQt4.QtGui.QTextEdit
SIGNAL: emits a hide request.
C++ signature: | void planeHideRequest() |
---|
Bases: PyQt4.QtCore.QObject, exectools.BaseOutputHandler
Qt4 Output Handler.
Signals : |
---|
Feed some data to the parser.
It is processed insofar as it consists of complete elements; incomplete data is buffered until more data is fed or close() is called.
Handle progress data.
Parameters: | data – a list containing an item for each named group in the “progress” regular expression: (pulse, percentage, text) for the default implementation. Each item can be None. |
---|
SIGNAL: it is emitted when the progress percentage changes
Parameters: | percentage (float) – the new completion percentage [0, 100] |
---|---|
C++ signature: | void percentageChanged(float) |
Bases: logging.Handler
Custom handler for logging on Qt4 textviews.
Bases: logging.Handler
Qt4 handler for the logging dialog.
Bases: PyQt4.QtCore.QObject, exectools.BaseToolController
Qt4 tool controller.
Signals : | |
---|---|
Slots : |
Perform finalization actions.
This method is called when the controlled process terminates to perform finalization actions like:
If one just needs to perfor some additional finalization action it should be better to use a custom “finalize_run_hook” instead of overriging “finalize_run”.
C++ signature: | finalize_run(int, QProcess::ExitStatus) |
---|
SIGNAL: it is emitted when the processing is finished.
Parameters: | exitcode (int) – the external proces exit code |
---|---|
C++ signature: | void finished(int exitCode) |
Handle a error in process execution.
Can be handle different types of errors:
C++ signature: | void handle_error(QProcess::ProcessError) |
---|
Run an external tool in controlled way.
The output of the child process is handled by the controller and, optionally, notifications can be achieved at sub-process termination.
Stop the execution of controlled subprocess.
When this method is invoked the controller instance is always reset even if the controller is unable to stop the subprocess.
When possible the controller try to kill the subprocess in a polite way. If this fails it also tryes brute killing by default (force=True). This behaviour can be controlled using the force parameter.
C++ signature: | void stop_tool(bool) |
---|