One instance of this class is created by MainApplication::setupApplication and runs in the main thread of itom. Its onPythonStateChanged slot is connected to the pythonStateChanged signal of PythonEngine. Other widgets should rather connect to pythonStateChanged of this class than to the direct signal of PythonEngine. This is mainly for one reason: Whenever a short script is run in Python (not debug), it might be that the execution is so short, that it is a waste of computing resources to switch the GUI to a busy state during this short execution. Therefore, the transition to the run
state is signalled by this class with a short delay. Whenever, the 'idle' state is signalled by the PythonEngine before the delay exceeds, nothing is signalled by this class. This only holds for this transition. All other python state transitions are immediately reported to all connected classes.
More...
#include <pythonStatePublisher.h>
|
void | pythonStateChanged (tPythonTransitions pyTransition) |
|
|
void | timerEvent (QTimerEvent *event) |
|
|
void | onPythonStateChanged (tPythonTransitions pyTransition, bool immediate) |
|
void | propertiesChanged () |
|
|
DelayedTransition | m_delayedTrans |
|
int | m_delayMs |
| delay time of non-immediate state changes in ms
|
|
One instance of this class is created by MainApplication::setupApplication and runs in the main thread of itom. Its onPythonStateChanged slot is connected to the pythonStateChanged signal of PythonEngine. Other widgets should rather connect to pythonStateChanged of this class than to the direct signal of PythonEngine. This is mainly for one reason: Whenever a short script is run in Python (not debug), it might be that the execution is so short, that it is a waste of computing resources to switch the GUI to a busy state during this short execution. Therefore, the transition to the run
state is signalled by this class with a short delay. Whenever, the 'idle' state is signalled by the PythonEngine before the delay exceeds, nothing is signalled by this class. This only holds for this transition. All other python state transitions are immediately reported to all connected classes.
If the PythonEngine emits the signal pythonStateChanged with immediate = true, this transition is directly reported (e.g. necessary for commands, executed in the command line).
The documentation for this class was generated from the following files:
- C:/Workspace/itom_development_VS2019_Qt5.15.2_x64/itomProject/itom/Qitom/python/pythonStatePublisher.h
- C:/Workspace/itom_development_VS2019_Qt5.15.2_x64/itomProject/itom/Qitom/python/pythonStatePublisher.cpp