[Qgis-developer] How to get renderComplete painter reference

Mathieu Pellerin nirvn.asia at gmail.com
Sun Apr 6 17:36:42 PDT 2014


Anita, just saw you commited a fix. Thanks!

May I suggest a small improvement? You should calculate the time it took,
in ms, to render canvas and deduce that ms value from the
animationFrameLength ms value in your singleShot call:

QTimer.singleShot(self.animationFrameLength,self.playAnimation)

Currently if you have a 1000ms frame length and canvas rendering takes
500ms, each frame will last 1500ms. Deducing the 500ms canvas rendering
time from frame length will fix this.  If rendering ms > frame length ms,
that'd allow you to skip singleShot and render next frame immediately.

Cheers and thanks again.

Math
On 6 Apr 2014 23:08, "Anita Graser" <anitagraser at gmx.at> wrote:

> Hi,
>
> I need the painter from the renderComplete signal? Could you help me with
> the correct syntax?
> I have:
>
>    self.iface.mapCanvas().renderComplete.connect(self.
> waitAfterRenderComplete)
>
> and
>
>    def waitAfterRenderComplete(self, painter):
>
> but waitAfterRenderComplete does not receive a painter.
>
> Thanks and best wishes,
> Anita
>
>
> --
> anitagraser.com
> _______________________________________________
> Qgis-developer mailing list
> Qgis-developer at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/qgis-developer
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20140407/bd5dca17/attachment.html>


More information about the Qgis-developer mailing list