[Marble-devel] Re: programmatically adding an AbstractDataPlugin to MarbleWidget?
akos at maroy.hu
Thu Mar 31 21:08:37 CEST 2011
> Have you tried adding your plugin by means of MarbleMap::addLayer()?
> AbstractDataPlugin inherits from LayerInterface, which is what this
> method expects.
to be more specific, I tried to replicate the results from this
but I get stuck in this call:
MarbleWidget *mapWidget = new MarbleWidget;
// Create and register our paint layer
MyPaintLayer* layer = new MyPaintLayer(mapWidget);
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.
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 /
More information about the Marble-devel