<html>
 <body>
  <div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
   <table bgcolor="#f9f3c9" width="100%" cellpadding="8" style="border: 1px #c9c399 solid;">
    <tr>
     <td>
      This is an automatically generated e-mail. To reply, visit:
      <a href="http://git.reviewboard.kde.org/r/103867/">http://git.reviewboard.kde.org/r/103867/</a>
     </td>
    </tr>
   </table>
   <br />


<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" style="background-image: url('http://git.reviewboard.kde.org/media/rb/images/review_request_box_top_bg.png'); background-position: left top; background-repeat: repeat-x; border: 1px black solid;">
 <tr>
  <td>

<div>Review request for Marble, Dennis Nienhüser and Thibaut Gridel.</div>
<div>By Paul Nader.</div>







<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description </h1>
 <table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
 <tr>
  <td>
   <pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">This patch enables interaction between marble layers. Currently each LayerInterface rendered through LayerManager is independent of each other. It is currently not possible to control the rendering of objects in a layer based on the visible placemarks of layers below it. (eg., a user of the library creates a new layer similar to PlacemarkLayer but wishes to ensure that the labels for its visible placemarks do not overlap with labels of placemarks drawn in a layer below it. Nor is it possible to affect the rendering of a layer below the current layer (eg., disallow the rendering of any placemarks below the placemark in the current layer).

This patch allows a layer to see the visible placemarks for all layers already rendered and to modify the lower layers visible items:

- Added a new parameter to LayoutInterface::render which contains a vector of all previous LayerInterfaces already rendered.
- Added a VisiblePlacemarks vector member to LayerInterface (with getter/setter)
- Added a paint method to LayerInterface. Layers wishing to cooperate should compose/create their visible placemarks in the render method (but not paint them) using the new vector container added to LayerInterface. The visible placemarks are then drawn in the paint method.
- Modified LayerManager to pass a vector of previous layers when calling render and to loop through the layers calling the paint method after that.
t.t

This patch is crude (I admit) but its a start nonetheless. I am more trying to get feedback/ideas here rather than pushing for the patch to be incorporated...

The screenshow shows an application of its use. Here there is a user placemark layer used to draw the nodes of a network. This ensures the nodes are always above the marble city placemarks. A second use layer draws the links below the nodes. Using the patch I could hide any city placemarks directly below the nodes (eg, Madrid and Malaga are not visible because they have been hidden by the user placemark layer). Also, some of the node labels have been moved after they detected a collision with the labels of placemarks close to them.</pre>
  </td>
 </tr>
</table>





<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> </h1>
<ul style="margin-left: 3em; padding-left: 0;">

 <li>src/lib/AbstractDataPlugin.h <span style="color: grey">(aca7aa0)</span></li>

 <li>src/lib/AbstractDataPlugin.cpp <span style="color: grey">(2881e19)</span></li>

 <li>src/lib/AbstractFloatItem.h <span style="color: grey">(ea6050e)</span></li>

 <li>src/lib/AbstractFloatItem.cpp <span style="color: grey">(9de45b5)</span></li>

 <li>src/lib/CMakeLists.txt <span style="color: grey">(af2c4db)</span></li>

 <li>src/lib/LayerInterface.h <span style="color: grey">(1241ccc)</span></li>

 <li>src/lib/LayerManager.cpp <span style="color: grey">(62bb4aa)</span></li>

 <li>src/lib/MarbleMap.cpp <span style="color: grey">(90238da)</span></li>

 <li>src/lib/MarbleWidget.cpp <span style="color: grey">(f811854)</span></li>

 <li>src/lib/VisiblePlacemark.h <span style="color: grey">(0518815)</span></li>

 <li>src/lib/kdescendantsproxymodel.h <span style="color: grey">(6908bff)</span></li>

 <li>src/lib/layers/AtmosphereLayer.h <span style="color: grey">(b68dd60)</span></li>

 <li>src/lib/layers/AtmosphereLayer.cpp <span style="color: grey">(c05d6e3)</span></li>

 <li>src/lib/layers/FogLayer.h <span style="color: grey">(e86f79d)</span></li>

 <li>src/lib/layers/FogLayer.cpp <span style="color: grey">(24a1325)</span></li>

 <li>src/lib/layers/FpsLayer.h <span style="color: grey">(eb3743f)</span></li>

 <li>src/lib/layers/FpsLayer.cpp <span style="color: grey">(9c07485)</span></li>

 <li>src/lib/layers/GeometryLayer.h <span style="color: grey">(70e97ba)</span></li>

 <li>src/lib/layers/GeometryLayer.cpp <span style="color: grey">(1c24153)</span></li>

 <li>src/lib/layers/MarbleSplashLayer.h <span style="color: grey">(2ef2e7b)</span></li>

 <li>src/lib/layers/MarbleSplashLayer.cpp <span style="color: grey">(bed786a)</span></li>

 <li>src/lib/layers/PlacemarkLayout.h <span style="color: grey">(cfad7f7)</span></li>

 <li>src/lib/layers/PlacemarkLayout.cpp <span style="color: grey">(8c9aca7)</span></li>

 <li>src/lib/layers/TextureLayer.h <span style="color: grey">(efc9ef2)</span></li>

 <li>src/lib/layers/TextureLayer.cpp <span style="color: grey">(a7943bf)</span></li>

 <li>src/lib/layers/VectorMapBaseLayer.h <span style="color: grey">(7db584e)</span></li>

 <li>src/lib/layers/VectorMapBaseLayer.cpp <span style="color: grey">(1bf1fbd)</span></li>

 <li>src/lib/layers/VectorMapLayer.h <span style="color: grey">(91a3f35)</span></li>

 <li>src/lib/layers/VectorMapLayer.cpp <span style="color: grey">(f05c88a)</span></li>

 <li>src/lib/routing/RoutingLayer.h <span style="color: grey">(ba8b295)</span></li>

 <li>src/lib/routing/RoutingLayer.cpp <span style="color: grey">(8a3a44a)</span></li>

 <li>src/plugins/render/aprs/AprsPlugin.h <span style="color: grey">(d073872)</span></li>

 <li>src/plugins/render/aprs/AprsPlugin.cpp <span style="color: grey">(514aa1d)</span></li>

 <li>src/plugins/render/crosshairs/CrosshairsPlugin.h <span style="color: grey">(fc28128)</span></li>

 <li>src/plugins/render/crosshairs/CrosshairsPlugin.cpp <span style="color: grey">(975d5de)</span></li>

 <li>src/plugins/render/graticule/GraticulePlugin.h <span style="color: grey">(339ca44)</span></li>

 <li>src/plugins/render/graticule/GraticulePlugin.cpp <span style="color: grey">(96c58f7)</span></li>

 <li>src/plugins/render/measure/MeasureToolPlugin.h <span style="color: grey">(366d36c)</span></li>

 <li>src/plugins/render/measure/MeasureToolPlugin.cpp <span style="color: grey">(54e4605)</span></li>

 <li>src/plugins/render/positionmarker/PositionMarker.h <span style="color: grey">(95be7ec)</span></li>

 <li>src/plugins/render/positionmarker/PositionMarker.cpp <span style="color: grey">(44b5ded)</span></li>

 <li>src/plugins/render/satellites/SatellitesPlugin.h <span style="color: grey">(808e9df)</span></li>

 <li>src/plugins/render/satellites/SatellitesPlugin.cpp <span style="color: grey">(2ca0775)</span></li>

 <li>src/plugins/render/stars/StarsPlugin.h <span style="color: grey">(1c306e1)</span></li>

 <li>src/plugins/render/stars/StarsPlugin.cpp <span style="color: grey">(e09bf99)</span></li>

 <li>src/plugins/render/sun/SunPlugin.h <span style="color: grey">(514f94d)</span></li>

 <li>src/plugins/render/sun/SunPlugin.cpp <span style="color: grey">(2258377)</span></li>

</ul>

<p><a href="http://git.reviewboard.kde.org/r/103867/diff/" style="margin-left: 3em;">View Diff</a></p>



<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Screenshots </h1>

<div>

 <a href="http://git.reviewboard.kde.org/r/103867/s/425/"><img src="http://git.reviewboard.kde.org/media/uploaded/images/2012/02/04/inter-layer_400x100.png" style="border: 1px black solid;" alt="" /></a>

</div>


  </td>
 </tr>
</table>




  </div>
 </body>
</html>