Revision b8d7cf5...
Go back to digest for 5th August 2012Other in Educational
API change: reflect in the API that MarbleGraphicsItems are now 2D objects
== Changes ==
All painting methods of MarbleGraphicsItem and subclasses now take a QPainter rather than a GeoPainter, which is sufficient for 2D items.
The renderPosition and GeoSceneLayer parameters have been removed from all these methods as well.
The paint() and paintContent() methods, which paint an item in item coordinates, don't take a ViewportParams parameter any more.
== Motivation ==
* using plain 2D API rather than GeoPainter avoids possible side effects of GeoPainter such as repeating in x-direction, which could disturb caching
* plain 2D items also shouldn't depend on the current viewport, especially on the projection
Reacting to viewport changes is currently only possible by subclassing AbstractFloatItem and by reimplementing changeViewport(), where this method is called always before paint().
* the renderPosition and GeoSceneLayer parameters were never used and were probably overdesigned
REVIEW: 105828
File Changes
- src/lib/AbstractDataPlugin.cpp
- src/lib/AbstractFloatItem.cpp
- src/lib/graphicsview/FrameGraphicsItem.cpp
- src/lib/graphicsview/FrameGraphicsItem.h
- src/lib/graphicsview/LabelGraphicsItem.cpp
- src/lib/graphicsview/LabelGraphicsItem.h
- src/lib/graphicsview/MarbleGraphicsItem.cpp
- src/lib/graphicsview/MarbleGraphicsItem.h
- src/lib/graphicsview/MarbleGraphicsItem_p.h
- src/lib/graphicsview/WidgetGraphicsItem.cpp
- src/lib/graphicsview/WidgetGraphicsItem.h
- src/lib/graphicsview/WidgetGraphicsItem_p.h
- src/plugins/render/compass/CompassFloatItem.cpp
- src/plugins/render/compass/CompassFloatItem.h
- src/plugins/render/earthquake/EarthquakeItem.cpp
- src/plugins/render/earthquake/EarthquakeItem.h
- src/plugins/render/elevationprofilefloatitem/ElevationProfileFloatItem.cpp
- src/plugins/render/elevationprofilefloatitem/ElevationProfileFloatItem.h
- src/plugins/render/elevationprofilemarker/ElevationProfileMarker.cpp
- src/plugins/render/mapscale/MapScaleFloatItem.cpp
- src/plugins/render/mapscale/MapScaleFloatItem.h
- src/plugins/render/opendesktop/OpenDesktopItem.cpp
- src/plugins/render/opendesktop/OpenDesktopItem.h
- src/plugins/render/overviewmap/OverviewMap.cpp
- src/plugins/render/overviewmap/OverviewMap.h
- src/plugins/render/postalcode/PostalCodeItem.cpp
- src/plugins/render/postalcode/PostalCodeItem.h
- src/plugins/render/progress/ProgressFloatItem.cpp
- src/plugins/render/progress/ProgressFloatItem.h
- src/plugins/render/wikipedia/WikipediaItem.cpp
- src/plugins/render/wikipedia/WikipediaItem.h