[Marble-devel] Marble architecture analogy to QGraphicsView framework

Kishore Jonnalagadda kitts.mailinglists at gmail.com
Fri Aug 12 14:55:06 UTC 2011


I have a few questions about the architecture of marble and its relations to 
QGraphicsView. A lot has changed in marble since the last two years that i 
have been away from it! :)

In QGV, there are three core components;

1) QGraphicsItem - responsible for painting itself; have a hierarchy of items 
where disabling the parent disables children as well... and can be attached to 
only one scene.

2) QGraphicsScene - can be attached to multiple views

3) QGraphicsView - there can be n number of views showing the same scene

My understanding of marble so far is that MarbleModel is similar to QGS and 
MarbleMap is similar to QGV. So there can be multiple MarbleMaps attached to 
the same Model. Right?

Therefore, LayerInterface, MarbleGraphicsItems (GeoGraphicsItems etc.) are 
attached to MarbleModel. And there exists one model for each planet/theme file?

Please correct me if i am wrong. Your help will be much appreciated! :)

I would also like to know if there is a possiblility to add a RenderPlugin at 
runtime. ie. I would give marble an instance of a RenderPlugin rather than it 
load one from its default plugin directories.
-- 
Cheers!
Kishore

Ps: The thing i want to achieve is that, i use marblewidget in my applications 
and plugins to my application (not marble) may also want to show data on a map 
if it is available. In my map plugin implementation, i serach for any plugin 
implementing the say, LayerInterface(or RenderPlugin) API and add them to the 
map widget. The implementer of the LayerInterface is responsible for what it 
draws.


More information about the Marble-devel mailing list