|
ParaView
|
Manages serialization of user interaction for test-cases, demos, tutorials, etc. More...
#include <pqEventTranslator.h>
Signals | |
| void | recordEvent (const QString &Object, const QString &Command, const QString &Arguments) |
| This signal will be emitted every time a translator generates a high-level ParaView event. Observers should connect to this signal to serialize high-level events. | |
| void | started () |
| this signals when recording starts | |
| void | stopped () |
| this signals when recording stops | |
Public Member Functions | |
| pqEventTranslator (QObject *p=0) | |
| ~pqEventTranslator () | |
| void | addDefaultWidgetEventTranslators (pqTestUtility *util) |
| Adds the default set of widget translators to the working set. | |
| void | addWidgetEventTranslator (pqWidgetEventTranslator *) |
| Adds a new translator to the current working set of widget translators. pqEventTranslator assumes control of the lifetime of the supplied object. | |
| void | ignoreObject (QObject *Object) |
| Adds a Qt object to a list of objects that should be ignored when translating events (useful to prevent recording UI events from being captured as part of the recording) | |
| void | start () |
| start listening to the GUI and translating events | |
| void | stop () |
| stop listening to the GUI and translating events | |
Manages serialization of user interaction for test-cases, demos, tutorials, etc.
pqEventTranslator installs itself as a global Qt event "filter" that receives notification of every Qt event. Each event is passed through a collection of pqWidgetEventTranslator objects, until one of them "handles" the event. The pqWidgetEventTranslator objects convert low-level Qt events (mouse move, button down, key released, etc) into high-level ParaView events (button clicked, row selected, etc) that can be serialized as text. Once an event translator is found, the recordEvent() signal is emitted with the name of the widget that is receiving the event, plus the serialized event. Observers such as pqEventObserverXML connect to the recordEvent() signal and handle storage of the events.
Definition at line 53 of file pqEventTranslator.h.
| pqEventTranslator::pqEventTranslator | ( | QObject * | p = 0 | ) |
| pqEventTranslator::~pqEventTranslator | ( | ) |
| void pqEventTranslator::addDefaultWidgetEventTranslators | ( | pqTestUtility * | util | ) |
Adds the default set of widget translators to the working set.
Translators are executed in order, so you may call addWidgetEventTranslator() with your own custom translators before calling this method, to "override" the default translators.
| void pqEventTranslator::addWidgetEventTranslator | ( | pqWidgetEventTranslator * | ) |
Adds a new translator to the current working set of widget translators. pqEventTranslator assumes control of the lifetime of the supplied object.
| void pqEventTranslator::ignoreObject | ( | QObject * | Object | ) |
Adds a Qt object to a list of objects that should be ignored when translating events (useful to prevent recording UI events from being captured as part of the recording)
| void pqEventTranslator::start | ( | ) |
start listening to the GUI and translating events
| void pqEventTranslator::stop | ( | ) |
stop listening to the GUI and translating events
| void pqEventTranslator::recordEvent | ( | const QString & | Object, |
| const QString & | Command, | ||
| const QString & | Arguments | ||
| ) | [signal] |
This signal will be emitted every time a translator generates a high-level ParaView event. Observers should connect to this signal to serialize high-level events.
| void pqEventTranslator::started | ( | ) | [signal] |
this signals when recording starts
| void pqEventTranslator::stopped | ( | ) | [signal] |
this signals when recording stops
1.7.5.1