[Marble-devel] QGraphicsView Overlay for marble
Andrew Manson
g.real.ate at gmail.com
Tue Mar 24 21:41:04 CET 2009
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? ;)
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.
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.
For PluginManager to become a singleton all we really need to do to
alter the current code is to remove the loadPlugins() call from the
constructor of PluginManager and have LayerManager get an/the instance
of PluginManager and call loadPlugins on it. And of course actually
making the PluginManager a singleton ;)
Anyone like to comment on this approach? Pros and Cons and stuff like
that ;)
I will give this method a try on Thursday or Friday and keep you all
updated.
-Andrew
-------------- next part --------------
A non-text attachment was scrubbed...
Name: overlay.diff
Type: text/x-patch
Size: 5701 bytes
Desc: not available
Url : http://mail.kde.org/pipermail/marble-devel/attachments/20090324/92d0d9c4/attachment.diff
More information about the Marble-devel
mailing list