Revision f856d21...

Go back to digest for 5th August 2012

Optimization in Development Tools

Bernhard Beschow committed changes in [marble] /:

API change: don't have GeoGraphicsItem inherit MarbleGraphicsItem; introduce BillboardGraphicsItem as a placeholder

== Motivation ==
GeoGraphicsItems and MarbleGraphicsItems shouldn't be mixed for the following reasons:

* paintEvent() is NOT called for real GeoGraphicsItems
Instead, paint() is called directly. As a result, "real" GeoGraphicsItems don't make use of caching.

* paint() has different semantics for ScreenGraphicsItems/AbstractDataPluginItems and GeoGraphicsItems
The GeoPainter used in "real" GeoGraphicsItems repeats items in x-direction if neccessary.
For ScreenGraphicsItems/AbstractDataPluginItems, this is done in paintEvent() presumably due to caching.

* ScreenGraphicsItems/AbstractDataPluginItems are 2D objects, whereas GeoGraphicsItems are 3D objects
ScreenGraphicsItems/AbstractDataPluginItems represent two-dimensional labels whose size() is independent of the zoom level and they always face the screen (a.k.a. billboards).
GeoGraphicsItems don't make use of size(). Instead, their size and shape changes depending on the projection.

== Changes ==
AbstractDataPluginItem's coordinate() method was inherited from GeoGraphicsItem.
In order to keep a high degree of source-compatibilty, this patch introduces the placeholder class BillboardGraphicsItem.
It implements the methods GeoGraphicsItem used to deliver to the AbstractDataPluginItems.

File Changes

Added 1 files
  • src/lib/graphicsview/BillboardGraphicsItem.h
Modified 9 files
  •   src/lib/AbstractDataPluginItem.cpp
  •   src/lib/AbstractDataPluginItem.h
  •   src/lib/graphicsview/CMakeLists.txt
  •   src/lib/graphicsview/GeoGraphicsItem.cpp
  •   src/lib/graphicsview/GeoGraphicsItem.h
  •   src/lib/graphicsview/GeoGraphicsItem_p.h
  •   src/lib/graphicsview/ScreenGraphicsItem_p.h
  •   src/plugins/render/elevationprofilemarker/ElevationProfileMarker.cpp
  •   src/plugins/render/elevationprofilemarker/ElevationProfileMarker.h
10 files changed in total