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

Ákos Maróy akos at maroy.hu
Thu Mar 31 11:39:08 CEST 2011


Hi,

I'm trying to programmatically add my on subclass of AbstractDataPlugin
to a MarbleWidget instances, but I'm not finding a way to do so.

What I'm looking for is to create my own AbstractDataPlugin subclass,
say FooPlugin, and add it to a MarbleWidget through code - that is, not
through the shared object based plugin loading mechanism.

I've been looking at the API docs and source code, and it seems that one
cannot call widget->map()->addLayer(), as MarbleWidget::map() is a const
function (consider widget of beinga MarbleWidget * type). I cannot
explicitly make PluginManager add my plugin object to the list of
available plugins either.

I wonder what is the proper way of adding a custom plugin to an existing
MarbleWidget object?


Akos


More information about the Marble-devel mailing list