ListenerDemo

Inheritance diagram of ListenerDemo
class ListenerDemo(name=None, parent=None)[source]

Bases: taurus.qt.qtcore.taurusqlistener.QObjectTaurusListener

eventReceived(evt_src, evt_type, evt_value)[source]

The basic implementation of the event handling chain is as follows:

  • eventReceived just calls fireEvent() which emits a “taurusEvent” PyQt signal that is connected (by preAttach()) to the filterEvent() method.
  • After filtering, handleEvent() is invoked with the resulting filtered event

Note

in the earlier steps of the chain (i.e., in eventReceived()/fireEvent()), the code is executed in a Python thread, while from eventFilter ahead, the code is executed in a Qt thread. When writing widgets, one should normally work on the Qt thread (i.e. reimplementing handleEvent())

Parameters:
  • evt_src (object) – object that triggered the event
  • evt_type (TaurusEventType) – type of event
  • evt_value (object) – event value
handleEvent(evt_src, evt_type, evt_value)[source]

Event handling. Default implementation does nothing. Reimplement as necessary

Parameters:
  • evt_src (object or None) – object that triggered the event
  • evt_type (TaurusEventType or None) – type of event
  • evt_value (object or None) – event value