Integration of libcairo in pvbrowser
Backward Content Forward

mask1_slots

mask_slot1.png
DATA, slotInit(), slotNullEvent()

The slot functions of the mask do the following:

In slotInit() the table with the description of our cairo widgets is read in. In slotNullEvent(), which is called cyclically, d->cairo. sendFileToQDraw() ensures that the graphic is displayed on the QDraw object draw1. This is only done if the modification time of the file has changed. With tloop.lock() / tloop.unlock() it is ensured that the threads "Loop" and "pvMain" synchronize, it is ensured that only complete graphics are processed.

In slotMousePressedEvent() / slotMouseReleasedEvent(), the mouse position coming from the pvbrowser client is taken and with pvCairoWidget::hitTest() determines which table row (row) was clicked.

mask_slot2.png
slotMousePressedEvent() With loopfifo.printf(), the mouse event is sent via rlFifo to the loop thread, where it can be responded to.
mask_slot3.png
slotMouseReleasedEvent() Here the mouse event is also sent back to the loop thread and the mouse shape that the user sees is reset.

Backward Content Forward