|
ParaView
|
pqEventDispatcher is responsible for taking each "event" from the test and then "playing" it using the player. More...
#include <pqEventDispatcher.h>

Signals | |
| void | started () |
| signal when playback starts | |
| void | stopped () |
| signal when playback stops | |
Public Member Functions | |
| pqEventDispatcher (QObject *parent=0) | |
| ~pqEventDispatcher () | |
| bool | playEvents (pqEventSource &source, pqEventPlayer &player) |
| Retrieves events from the given event source, dispatching them to the given event player for test case playback. | |
Static Public Member Functions | |
| static void | setEventPlaybackDelay (int milliseconds) |
| Set the delay between dispatching successive events. | |
| static int | eventPlaybackDelay () |
| static void | processEventsAndWait (int ms) |
| Wait function provided for players that need to wait for the GUI to perform a certain action. | |
| static void | processEvents (QEventLoop::ProcessEventsFlags flags=QEventLoop::AllEvents) |
| proccessEvents method for widgets and paraview to use instead of calling Qt version, since that will break test playback | |
| static void | registerTimer (QTimer *timer) |
| register a timer that needs to be ensured to have timed-out after every event dispatch. | |
Protected Slots | |
| void | playEvent (int indent=0) |
| Plays a single event. | |
| void | playEventOnBlocking () |
| void | aboutToBlock () |
| Called when the mainThread is about to block. | |
| void | awake () |
| Called when the mainThread wakes up. | |
Protected Attributes | |
| bool | PlayBackFinished |
| bool | PlayBackStatus |
| pqEventSource * | ActiveSource |
| pqEventPlayer * | ActivePlayer |
| QTimer | BlockTimer |
Static Protected Attributes | |
| static bool | DeferMenuTimeouts |
pqEventDispatcher is responsible for taking each "event" from the test and then "playing" it using the player.
The dispatcher is the critical component of this playback since it decides when it's time to dispatch the next "event" from the test. After an event is posted, there are two options:
To enable the second mode simply set the eventPlaybackDelay to 0. In either mode, all timers registered using registerTimer() will be timed-out before dispatching next event.
To make it easier to register timers, one can directly use pqTimer instead of QTimer.
Definition at line 69 of file pqEventDispatcher.h.
| pqEventDispatcher::pqEventDispatcher | ( | QObject * | parent = 0 | ) |
| pqEventDispatcher::~pqEventDispatcher | ( | ) |
| bool pqEventDispatcher::playEvents | ( | pqEventSource & | source, |
| pqEventPlayer & | player | ||
| ) |
Retrieves events from the given event source, dispatching them to the given event player for test case playback.
This call blocks until all the events from the source have been played back (or failure). Returns true if playback was successful.
| static void pqEventDispatcher::setEventPlaybackDelay | ( | int | milliseconds | ) | [static] |
Set the delay between dispatching successive events.
Default is set using CMake variable QT_TESTING_EVENT_PLAYBACK_DELAY.
| static int pqEventDispatcher::eventPlaybackDelay | ( | ) | [static] |
| static void pqEventDispatcher::processEventsAndWait | ( | int | ms | ) | [static] |
Wait function provided for players that need to wait for the GUI to perform a certain action.
Note: the minimum wait time is 100ms. This is set to avoid timiing issues on slow processors that hang tests.
| static void pqEventDispatcher::processEvents | ( | QEventLoop::ProcessEventsFlags | flags = QEventLoop::AllEvents | ) | [static] |
proccessEvents method for widgets and paraview to use instead of calling Qt version, since that will break test playback
| static void pqEventDispatcher::registerTimer | ( | QTimer * | timer | ) | [static] |
register a timer that needs to be ensured to have timed-out after every event dispatch.
| void pqEventDispatcher::started | ( | ) | [signal] |
signal when playback starts
| void pqEventDispatcher::stopped | ( | ) | [signal] |
signal when playback stops
| void pqEventDispatcher::playEvent | ( | int | indent = 0 | ) | [protected, slot] |
Plays a single event.
this->PlayBackFinished and this->PlayBackStatus are updated by this method.
| void pqEventDispatcher::playEventOnBlocking | ( | ) | [protected, slot] |
| void pqEventDispatcher::aboutToBlock | ( | ) | [protected, slot] |
Called when the mainThread is about to block.
| void pqEventDispatcher::awake | ( | ) | [protected, slot] |
Called when the mainThread wakes up.
bool pqEventDispatcher::PlayBackFinished [protected] |
Definition at line 122 of file pqEventDispatcher.h.
bool pqEventDispatcher::PlayBackStatus [protected] |
Definition at line 123 of file pqEventDispatcher.h.
bool pqEventDispatcher::DeferMenuTimeouts [static, protected] |
Definition at line 124 of file pqEventDispatcher.h.
pqEventSource* pqEventDispatcher::ActiveSource [protected] |
Definition at line 126 of file pqEventDispatcher.h.
pqEventPlayer* pqEventDispatcher::ActivePlayer [protected] |
Definition at line 127 of file pqEventDispatcher.h.
QTimer pqEventDispatcher::BlockTimer [protected] |
Definition at line 128 of file pqEventDispatcher.h.
1.7.5.1