[Marble-devel] Re: programmatically adding an AbstractDataPlugin to MarbleWidget?

Bernhard Beschow bbeschow at cs.tu-berlin.de
Fri Apr 1 20:47:16 CEST 2011

Hi Ákos,

> to be more specific, I tried to replicate the results from this
> tutorial: http://techbase.kde.org/Projects/Marble/LayerInterface
> but I get stuck in this call:
> MarbleWidget *mapWidget = new MarbleWidget;
> // Create and register our paint layer
> MyPaintLayer* layer = new MyPaintLayer(mapWidget);
> mapWidget->map()->model()->addLayer(layer);
> as there is no MarbleWidget::map() function in the current (trunk) API,
> there is a MarbleWidget::model() fuction, but then the function
> MarbleModel::addLayer() is non-existent by now.

Yes, the tutorial is outdated, thanks for pointing this out. :)

> looking at the stable (subversion) API, I don't see how the above would
> work either, as MarbleWidget::map() is a const function, whereas
> addLayer() will require a non-const pointer to work on.
> thus I wonder what the current, up-to-date method for adding layers /
> plugins is..

Adding layers is actually work in progress and I'm therefore glad to hear about demands and issues from your side.

I've added addLayer() and removeLayer() to MarbleWidget in subversion. Could you try if that helps? Thanks :)


More information about the Marble-devel mailing list