<html>
<body>
<div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
<table bgcolor="#f9f3c9" width="100%" cellpadding="12" style="border: 1px #c9c399 solid; border-radius: 6px; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
<tr>
<td>
This is an automatically generated e-mail. To reply, visit:
<a href="https://git.reviewboard.kde.org/r/118717/">https://git.reviewboard.kde.org/r/118717/</a>
</td>
</tr>
</table>
<br />
<div>
<table width="100%" border="0" bgcolor="white" style="border: 1px solid #C0C0C0; border-collapse: collapse; margin: 2px padding: 2px;">
<thead>
<tr>
<th colspan="4" bgcolor="#F0F0F0" style="border-bottom: 1px solid #C0C0C0; font-size: 9pt; padding: 4px 8px; text-align: left;">
<a href="https://git.reviewboard.kde.org/r/118717/diff/7/?file=289994#file289994line697" style="color: black; font-weight: bold; text-decoration: underline;">src/lib/marble/MarbleMap.h</a>
<span style="font-weight: normal;">
(Diff revision 7)
</span>
</th>
</tr>
</thead>
<tbody style="background-color: #e4d9cb; padding: 4px 8px; text-align: center;">
<tr>
<td colspan="4"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">class MARBLE_EXPORT MarbleMap : public QObject</pre></td>
</tr>
</tbody>
<tbody>
<tr>
<th bgcolor="#b1ebb0" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2"></font></th>
<td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>
<th bgcolor="#b1ebb0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">697</font></th>
<td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "> <span class="kt">void</span> <span class="nf">announceMouseClick</span><span class="p">(</span> <span class="n">qreal</span><span class="p">,</span> <span class="n">qreal</span><span class="p">,</span> <span class="n">GeoDataCoordinates</span><span class="o">::</span><span class="n">Unit</span> <span class="p">);</span></pre></td>
</tr>
</tbody>
</table>
<div style="margin-left: 2em;">
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">Same here, do we really need to taint the API with an inputhandler related signal? can't we connect the signal from the input handler directly with the handleHighlight slot?</p></pre>
</div>
</div>
<br />
<div>
<table width="100%" border="0" bgcolor="white" style="border: 1px solid #C0C0C0; border-collapse: collapse; margin: 2px padding: 2px;">
<thead>
<tr>
<th colspan="4" bgcolor="#F0F0F0" style="border-bottom: 1px solid #C0C0C0; font-size: 9pt; padding: 4px 8px; text-align: left;">
<a href="https://git.reviewboard.kde.org/r/118717/diff/7/?file=289998#file289998line1065" style="color: black; font-weight: bold; text-decoration: underline;">src/lib/marble/MarbleWidget.h</a>
<span style="font-weight: normal;">
(Diff revision 7)
</span>
</th>
</tr>
</thead>
<tbody style="background-color: #e4d9cb; padding: 4px 8px; text-align: center;">
<tr>
<td colspan="4"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">class MARBLE_EXPORT MarbleWidget : public QWidget</pre></td>
</tr>
</tbody>
<tbody>
<tr>
<th bgcolor="#b1ebb0" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2"></font></th>
<td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>
<th bgcolor="#b1ebb0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">1065</font></th>
<td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "> <span class="kt">void</span> <span class="nf">announceMouseClick</span><span class="p">(</span> <span class="n">qreal</span><span class="p">,</span> <span class="n">qreal</span><span class="p">,</span> <span class="n">GeoDataCoordinates</span><span class="o">::</span><span class="n">Unit</span> <span class="p">);</span></pre></td>
</tr>
</tbody>
</table>
<div style="margin-left: 2em;">
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">I would prefer it if we wouldn't taint the MarbleWidget API with inputhandler stuff :) can we just connect the signal inside the inputhandler with the slot?</p></pre>
</div>
</div>
<br />
<div>
<table width="100%" border="0" bgcolor="white" style="border: 1px solid #C0C0C0; border-collapse: collapse; margin: 2px padding: 2px;">
<thead>
<tr>
<th colspan="4" bgcolor="#F0F0F0" style="border-bottom: 1px solid #C0C0C0; font-size: 9pt; padding: 4px 8px; text-align: left;">
<a href="https://git.reviewboard.kde.org/r/118717/diff/7/?file=290010#file290010line440" style="color: black; font-weight: bold; text-decoration: underline;">src/lib/marble/layers/GeometryLayer.cpp</a>
<span style="font-weight: normal;">
(Diff revision 7)
</span>
</th>
</tr>
</thead>
<tbody style="background-color: #e4d9cb; padding: 4px 8px; text-align: center;">
<tr>
<td colspan="4"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">void GeometryLayer::resetCacheData()</pre></td>
</tr>
</tbody>
<tbody>
<tr>
<th bgcolor="#b1ebb0" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2"></font></th>
<td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>
<th bgcolor="#b1ebb0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">440</font></th>
<td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="kt">void</span> <span class="n">GeometryLayer</span><span class="o">::</span><span class="n">handleHighlight</span><span class="p">(</span> <span class="n">qreal</span> <span class="n">lon</span><span class="p">,</span> <span class="n">qreal</span> <span class="n">lat</span><span class="p">,</span> <span class="n">GeoDataCoordinates</span><span class="o">::</span><span class="n">Unit</span> <span class="n">unit</span> <span class="p">)</span></pre></td>
</tr>
</tbody>
</table>
<div style="margin-left: 2em;">
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">This is only executed on mouse click, right? Given all the nested loops I'm still a bit concerned about the performance. Have you measured how long the execution of this method takes at max?</p></pre>
</div>
</div>
<br />
<p>- Torsten Rahn</p>
<br />
<p>On Juli 13th, 2014, 4:23 nachm. UTC, Abhinav Gangwar wrote:</p>
<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="12" style="border: 1px #888a85 solid; border-radius: 6px; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
<tr>
<td>
<div>Review request for Marble, Dennis Nienhüser, Torsten Rahn, and Thibaut Gridel.</div>
<div>By Abhinav Gangwar.</div>
<p style="color: grey;"><i>Updated Juli 13, 2014, 4:23 nachm.</i></p>
<div style="margin-top: 1.5em;">
<b style="color: #575012; font-size: 10pt;">Repository: </b>
marble
</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;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">Modifications:</p>
<ol style="padding: 0;text-rendering: inherit;margin: 0 0 0 2em;line-height: inherit;white-space: normal;">
<li style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;">Added support to specify highlight color in dgml file.</li>
<li style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;">Highlighting is done in the following way:</li>
</ol>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">-> Input handler emits mouseClickGeoPostion( qreal lon, qreal lat, GeoDataCoordinates::Unit unit ) whenever a click <br style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;" />
is detected on map.</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">-> Signal mouseClickGeoPostion(..) is connected to the signal MarbleMap::announceMouseClick(..) which<br style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;" />
further triggers the slot GeometryLayer::hadnleHighlight(..) which iterates over the tree model to find the <br style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;" />
placemarks, from all GeoDataDocuments in which any of its style map has an entry for highlight styleId, which<br style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;" />
were under mouse when the click event happened.</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">-> After searching for all such placemarks GeometryLayer::hadnleHighlight(..) emits signal<br style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;" />
announceHighlight(QVector<GeoDataPlacemarks<em style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;">> which is caught by GeoGraphicsScene to execute the slot<br style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;" />
GeoGraphicsScene::applyHighlight(QVector< GeoDataPlacemark</em> > selectedPlacemark).</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">-> GeoGraphicsScene::applyHighlight(..) we find all GeoGraphicsItems for a plcamark and execute<br style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;" />
GeoGraphicsItem::setHighlightStyle( GeoDataStyle *highlightStyle ) for each graphics items if the corresponding <br style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;" />
placemark's style url is set to a style map which has a entry for highlight styleId.</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">-> GeoGraphicsItem::setHighlightStyle(..) assigns this style to GeoGraphicsItemPrivate::m_highlightStyle makes <br style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;" />
GeoGraphicsItemPrivate::m_isHighlighted true. m_isHighlight decides which style ( normal or highlight ) to use<br style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;" />
to paint the graphics item.</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">That's it . Need feedback :)</p></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/marble/MarbleWidget.h <span style="color: grey">(dfc1aa7)</span></li>
<li>src/lib/marble/MarbleWidget.cpp <span style="color: grey">(d4c7ff4)</span></li>
<li>src/lib/marble/geodata/graphicsitem/GeoPolygonGraphicsItem.cpp <span style="color: grey">(b161d06)</span></li>
<li>src/lib/marble/MarbleInputHandler.h <span style="color: grey">(58107e5)</span></li>
<li>src/lib/marble/MarbleInputHandler.cpp <span style="color: grey">(6a46a0d)</span></li>
<li>src/lib/marble/MarbleMap.h <span style="color: grey">(ab51f62)</span></li>
<li>src/lib/marble/MarbleMap.cpp <span style="color: grey">(25007ac)</span></li>
<li>src/lib/marble/MarbleModel.h <span style="color: grey">(9643186)</span></li>
<li>src/lib/marble/MarbleModel.cpp <span style="color: grey">(d240bac)</span></li>
<li>data/maps/earth/political/political.dgml <span style="color: grey">(3bf3b1b)</span></li>
<li>src/lib/marble/GeoGraphicsScene.h <span style="color: grey">(869c3d8)</span></li>
<li>src/lib/marble/GeoGraphicsScene.cpp <span style="color: grey">(f84c532)</span></li>
<li>src/lib/marble/geodata/handlers/dgml/DgmlAttributeDictionary.h <span style="color: grey">(cf4dd76)</span></li>
<li>src/lib/marble/geodata/handlers/dgml/DgmlAttributeDictionary.cpp <span style="color: grey">(85f10fb)</span></li>
<li>src/lib/marble/geodata/handlers/dgml/DgmlMapTagHandler.cpp <span style="color: grey">(fb7ff0f)</span></li>
<li>src/lib/marble/geodata/scene/GeoSceneMap.h <span style="color: grey">(498bb3a)</span></li>
<li>src/lib/marble/geodata/scene/GeoSceneMap.cpp <span style="color: grey">(7f94c11)</span></li>
<li>src/lib/marble/graphicsview/GeoGraphicsItem.h <span style="color: grey">(653fef0)</span></li>
<li>src/lib/marble/graphicsview/GeoGraphicsItem.cpp <span style="color: grey">(1227316)</span></li>
<li>src/lib/marble/graphicsview/GeoGraphicsItem_p.h <span style="color: grey">(618cddf)</span></li>
<li>src/lib/marble/layers/GeometryLayer.h <span style="color: grey">(8d86aed)</span></li>
<li>src/lib/marble/layers/GeometryLayer.cpp <span style="color: grey">(fbfe9a3)</span></li>
</ul>
<p><a href="https://git.reviewboard.kde.org/r/118717/diff/" style="margin-left: 3em;">View Diff</a></p>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">File Attachments </h1>
<li><a href="https://git.reviewboard.kde.org/media/uploaded/files/2014/06/13/e541a355-80be-40a8-8158-afea0677bd0e__pn2DataNew.zip">pn2DataNew.zip</a></li>
<li><a href="https://git.reviewboard.kde.org/media/uploaded/files/2014/06/13/f04644e8-6318-4b9a-a8d1-2747b405f73b__color10.png">color10.png</a></li>
<li><a href="https://git.reviewboard.kde.org/media/uploaded/files/2014/06/13/5f07bac3-3bcb-4086-b8d6-5b836b8f18dc__color11.png">color11.png</a></li>
</ul>
</td>
</tr>
</table>
</div>
</body>
</html>