Public Member Functions | |
def | __init__ |
This is the constructor of the GUIbridge class. | |
def | shutdown |
This method is used to shut the GUI bridge down. | |
def | isGUIthread |
Returns True if this method is being called from the GUI thread. | |
def | createGUI |
Method used for instantiating a GUI from a non-GUI thread. | |
def | execGUImethodNR |
Method used for executing a GUI function from a non-GUI thread. | |
def | execGUImethod |
Method used for executing a GUI function from a non-GUI thread. | |
def | execGUImethod2 |
def | handleCustomEvent |
Static Public Attributes | |
tuple | GUI_CMD_INST = QEvent.Type(QEvent.User + 1) |
tuple | GUI_CMD_FUNC = QEvent.Type(QEvent.User + 2) |
tuple | GUI_CMD_FUNC_NR = QEvent.Type(QEvent.User + 3) |
Private Attributes | |
__respQueue |
This bridge is needed whenever a non-GUI thread needs to interact with the GUI. The GUI is handled by the 'GUI thread'. A 'GUI thread' is defined to be the one in which the Qt QApplication class's exec_loop() method is executed. There can be only one GUI thread in a program.
The solution to the problem is handled by sending a message (an 'event', in Qt terms) from the non-GUI thread to the GUI thread. The message contains information on how it is to be handled. In some cases, this handling produces a result that must be sent back to the initiating non-GUI thread. The requests and responses are passed around via queues. Separate queues are maintained for the different non-GUI threads so that responses don't end up handed off to the wrong thread.
Definition at line 28 of file guiBridges.py.
|
This is the constructor of the GUIbridge class. It must be called from the GUI thread. Definition at line 34 of file guiBridges.py. |
|
Method used for instantiating a GUI from a non-GUI thread.
Definition at line 56 of file guiBridges.py. |
|
Method used for executing a GUI function from a non-GUI thread. Use this method when a response is expected from the function and when it is appropriate to wait for it (no deadlock arises)
Definition at line 95 of file guiBridges.py. |
|
Definition at line 119 of file guiBridges.py. |
|
Method used for executing a GUI function from a non-GUI thread. Use this method when no (useful) response is expected or when waiting for one could cause a deadlock. Any response from the function is lost.
Definition at line 77 of file guiBridges.py. |
|
Definition at line 135 of file guiBridges.py. |
|
Returns True if this method is being called from the GUI thread.
Definition at line 51 of file guiBridges.py. |
|
This method is used to shut the GUI bridge down.
Definition at line 46 of file guiBridges.py. |
|
Definition at line 126 of file guiBridges.py. |
|
Definition at line 31 of file guiBridges.py. |
|
Definition at line 32 of file guiBridges.py. |
|
Definition at line 30 of file guiBridges.py. |