Marble/GraphicsViewGeoParser: Difference between revisions
(Created page with '== GeoParser and the GeoGraphicsView == The current GeoData XML Parser ( aka. GeoParser ) has been implemented to specifically deal with our current GeoData data structure. If y...') |
No edit summary |
||
Line 1: | Line 1: | ||
== GeoParser and the GeoGraphicsView == | == 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 [[Projects/Marble/ | 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 [[Projects/Marble/GeoData|GeoData documentation]]. I will only describe the particular problem to the GeoGraphicsView implementation here. | ||
=== Casting === | |||
=== | 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 {{class|GeoNode|kdeedu|4.2}} 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. | ||
The GeoParser is an | |||
=== 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 [http://en.wikipedia.org/wiki/Observer_pattern observer pattern] logic whereas GeoGraphicsItems would react to GeoData. Multiple options are available: | |||
The | * use signal/slots | ||
* implement light event handling methods | |||
* use qt's model-view framework of model-view-ng |
Revision as of 22:10, 22 July 2009
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.
Casting
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