GeoParser and the GeoGraphicsView
The current GeoData XML Parser ( aka. GeoParser ) has been implemented to specifically deal with our current GeoData data structure. If you want to see a more complete documentation of the GeoData library you can see the GeoData documentation. I will only describe the particular problem to the GeoGraphicsView implementation here.
The unfortunate thing about the current implementation of the GeoParser is that when any item is added to the Collection Data Structure it is effectively cast as an GeoNode and removes any ability for 3rd party developers to add parsing capability to marble with functionality other than that which marble provides. This is an issue that needs more investigation to provide more flexibility.
Link between GeoData and GeoGraphicsItems
Previously, GeoData has been accessed through pointers from the rendering objects. this poses problems as GeoData uses data sharing and updates in GeoData are thus not seen in Items.
It could be possible to do multiple inheritance where GeoGraphicsItems would also be GeoNodes, but that raises issues regarding modularity, because both the model and its representation would be in the same object.
The better solution would follow an observer pattern logic whereas GeoGraphicsItems would react to GeoData. Multiple options are available:
- use signal/slots
- implement light event handling methods
- use qt's model-view framework of model-view-ng