7.2. pyopus.plotter.manager — Manager for Matplotlib plot windows

Manager for Matplotlib plot windows
The graphical part (PyQt + MatPlotLib) is running in a thread and the
part that issues the plotting commands (defined in the
interface module) runs in the main thread (or process).
The main thread uses a QPController object for sending and receiving
messages from the graphical thread. The messages are sent to the GUI by
calling the processMessage() method of a QPController object
via a meta object. A queue.Queue object is used for sending the
response back to the main thread. On the graphical thread’s side a
QPControlWindow widget is handling the received commands.
- class pyopus.plotter.manager.QPController(args=[])[source]
This is the controller responsible for sending commands to the GUI and collection responses.
args are passed to the
GUIentry()function which forwards them as command line arguments to theQApplicationobject.- join()[source]
Waits for the GUI thread to finish.
KeyboardInterruptandSystemExitare caught and the GUI is stopped upon which the exception is re-raised.
- lockGUI()[source]
Marks the beginning of a section of code where Matplotlib API calls are made. Locking prevents these calls from interfering with the PyQt event loop and crashing the application.