[Marble-devel] QGraphicsView Overlay for marble

Inge Wallin inge at lysator.liu.se
Wed Mar 25 13:16:01 CET 2009


On Tuesday 24 March 2009 21:41:04 Andrew Manson wrote:
> Hi all,
>
> I guess you're all a little sick of my little emails every day by now,
> but i am making progress so thats good right? ;)

No, discussions are good, as are status reports.  Keep them coming! :-)

> OK so the current update on the Marble Overlay stuff, i have been
> studying the code to try and find a nice way to let the PluginManager
> class "know" about the MarbleWidget. Unfortunately, from what i can see
> there is no nice or simple way to do this. The attachment is a diff that
> will take the naive way of doing it, simply passing a widget pointer
> down each constructor until it reaches the Plugin Manager.

Note that the Marble *Widget* is just a presentation device. The real work is 
in the MarbleMap. In fact, most functions in MarbleWidget are just releays 
that calls the corresponding function in MarbleMap.  The Map knows about the 
size, zoom, centerLon,Lat, etc, and if I remember correctly most of it is kept 
in a MarbleViewData or something like that.  The Model holds the data, but it 
does not know about projections, and positions.  The idea is that a 
MarbleModel shoud be usable with more than one view, i.e. more than one 
MarbleMap.

> Just for reference ( and in case you don't like looking at diffs ) the
> chain of constructors i was talking about is: MarbleWidget -> MarbleMap
> -> MarbleModel -> LayerManager -> PluginManager.
>
> ... this, as you all know, seems a bit unnecessary. Any alternative
> solution would need to alter the Architecture of marble in some way, the
> simplest way to do this i think might be to Change the PluginManager
> into a Singleton Class. This might even be able to maintain binary
> compatibility, which the diff attached clearly does not.

As people have written in previous replies, it should be possible to use more 
than one view, i.e. Map and/or Widget for the data.  So the plugins should be 
managed per Map, and that's where the pluginmanager should be.

	-Inge




More information about the Marble-devel mailing list