cumbia-qtcontrols 1.x
Qt widgets on top of the cumbia C++ library
|
an event bridge to post a CuEventI event to a QApplication More...
#include <qthreadseventbridge.h>
Public Member Functions | |
QThreadsEventBridge () | |
the class constructor More... | |
virtual | ~QThreadsEventBridge () |
the class destructor More... | |
void | postEvent (CuEventI *e) |
posts an event through QApplication::postEvent, normally from the CuThread's thread to the event loop's More... | |
void | setCuThreadsEventBridgeListener (CuThreadsEventBridgeListener *l) |
set the event bridge listener on the bridge More... | |
Protected Member Functions | |
bool | event (QEvent *event) |
receives a QEvent from QApplication and delivers the contents to a registered CuThreadsEventBridgeListener on the main thread. More... | |
an event bridge to post a CuEventI event to a QApplication
QThreadsEventBridge::QThreadsEventBridge | ( | ) |
the class constructor
Constructs a new instance of the object
|
virtual |
the class destructor
class destructor
|
protected |
receives a QEvent from QApplication and delivers the contents to a registered CuThreadsEventBridgeListener on the main thread.
event | a QEvent that wraps a CuEventI. |
If the QEvent::type is QEvent::User + 101, then QEvent is safely casted to a CuEvent_Qt object. CuEvent_Qt contains a CuEventI instance, that is delivered to a registered CuThreadsEventBridgeListener.
References event().
Referenced by event().
void QThreadsEventBridge::postEvent | ( | CuEventI * | e | ) |
posts an event through QApplication::postEvent, normally from the CuThread's thread to the event loop's
e | a CuEventI |
void QThreadsEventBridge::setCuThreadsEventBridgeListener | ( | CuThreadsEventBridgeListener * | l | ) |
set the event bridge listener on the bridge
l | a CuThreadsEventBridgeListener, such as CuThread |
When an event is delivered through the QApplication event loop, (QThreadsEventBridge::event) CuThreadsEventBridgeListener::onEventPosted is called on the main thread.