[Marble-devel] How does LayerInterface ask for an update?
Bernhard Beschow
bbeschow at cs.tu-berlin.de
Fri Aug 12 17:20:29 UTC 2011
Hi Kishore,
> I am porintg some old code that user the customPaint method to instead use
> LayerInterface. The one part that i am stuck with is how does LayerInterface
> inform the widget that its needs update?
>
> Previously, with customPaint() as the whole paint and data to be information
> to be painted was within the widget, i could simply call update() on the
> widget. Now that i have modularized the code, and layers are separated from
> the widget (they have no pointer to it) i was wondering how this is to be
> achieved?
>
> Am i misusing the API? I do not want to create a marble plugin and install it
> into the marble install directories for it to work properly. Is there a
> solution?
Yes, there is a solution :) :
You could add a signal to your LayerInterface implementation, e.g. "requestUpdate()" and call that instead of MarbleWidget::update(). When adding your layer to MarbleWidget, you connect that signal to MarbleWidget::update().
HTH,
Bernhard
More information about the Marble-devel
mailing list