<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/110058/">http://git.reviewboard.kde.org/r/110058/</a>
</td>
</tr>
</table>
<br />
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Hi Paul, thanks for the awesome patch! Quite impressive that you're able to implement this rather massive change (it removes one of the fundamental assumptions) with a reasonable small amount of code.
What I'd like to have is some timing measurements to ensure we're not losing rendering performance when no panning is in effect. Getting Bernhard's thoughts on the rendering part would be great.
I was wondering about the stars plugin -- it does not change its rendering when panning is applied, but I think it needs to take that into account. Torsten, can you have a look at that?
Some nitpicking on code style and API below.</pre>
<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="http://git.reviewboard.kde.org/r/110058/diff/5/?file=139636#file139636line80" style="color: black; font-weight: bold; text-decoration: underline;">src/lib/LayerInterface.h</a>
<span style="font-weight: normal;">
(Diff revision 5)
</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; ">public:</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">80</font></th>
<td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="cm"> * Set the stationary property</span></pre></td>
</tr>
</tbody>
</table>
<pre style="margin-left: 2em; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Please describe its effect</pre>
</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="http://git.reviewboard.kde.org/r/110058/diff/5/?file=139636#file139636line82" style="color: black; font-weight: bold; text-decoration: underline;">src/lib/LayerInterface.h</a>
<span style="font-weight: normal;">
(Diff revision 5)
</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; ">public:</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">82</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">setStationary</span><span class="p">(</span> <span class="kt">bool</span> <span class="n">s</span> <span class="p">);</span></pre></td>
</tr>
</tbody>
</table>
<pre style="margin-left: 2em; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">I'm afraid that API users might confuse stationary with geostationary. What about renaming the property screenStationary?</pre>
</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="http://git.reviewboard.kde.org/r/110058/diff/5/?file=139641#file139641line375" style="color: black; font-weight: bold; text-decoration: underline;">src/lib/MarbleModel.cpp</a>
<span style="font-weight: normal;">
(Diff revision 5)
</span>
</th>
</tr>
</thead>
<tbody style="background-color: #e4d9cb; padding: 4px 8px; text-align: center;">
<tr>
<td colspan="2"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">void MarbleModel::home( qreal &lon, qreal &lat, int& zoom ) const</pre></td>
<td colspan="2"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>
</tr>
</tbody>
<tbody>
<tr>
<th bgcolor="#e9eaa8" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2">373</font></th>
<td bgcolor="#fdfebc" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="kt">void</span> <span class="n">MarbleModel</span><span class="o">::</span><span class="n">home</span><span class="p">(</span> <span class="n">qreal</span> <span class="o">&</span><span class="n">lon</span><span class="p">,</span> <span class="n">qreal</span> <span class="o">&</span><span class="n">lat</span><span class="p">,</span> <span class="kt">int</span><span class="o">&</span> <span class="n">zoom</span> <span class="p">)</span> <span class="k">const</span></pre></td>
<th bgcolor="#e9eaa8" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">375</font></th>
<td bgcolor="#fdfebc" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="kt">void</span> <span class="n">MarbleModel</span><span class="o">::</span><span class="n">home</span><span class="p">(</span> <span class="n">qreal</span> <span class="o">&</span><span class="n">lon</span><span class="p">,</span> <span class="n">qreal</span> <span class="o">&</span><span class="n">lat</span><span class="p">,</span> <span class="kt">int</span><span class="o">&</span> <span class="n">zoom</span><span class="p"><span class="hl">,</span></span><span class="hl"> </span><span class="kt"><span class="hl">int</span></span><span class="o"><span class="hl">&</span></span><span class="hl"> </span><span class="n"><span class="hl">panX</span></span><span class="p"><span class="hl">,</span></span><span class="hl"> </span><span class="kt"><span class="hl">int</span></span><span class="o"><span class="hl">&</span></span><span class="hl"> </span><span class="n"><span class="hl">panY</span></span> <span class="p">)</span> <span class="k">const</span></pre></td>
</tr>
</tbody>
</table>
<pre style="margin-left: 2em; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">I don't like the API too much -- too many parameters that only make sense because of their names. Additionally it requires everyone using the old home() method to adjust their code. Can we leave the original one as is and introduce a new
QPoint globeCenterOffset() const
void setGlobeCenterOffset( const QPoint &offset )
Benefits I see is that existing API users are not affected by it and the method name is a better indicator of its purpose.
</pre>
</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="http://git.reviewboard.kde.org/r/110058/diff/5/?file=139642#file139642line1106" style="color: black; font-weight: bold; text-decoration: underline;">src/lib/MarbleWidget.h</a>
<span style="font-weight: normal;">
(Diff revision 5)
</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">1106</font></th>
<td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "> <span class="n">QTransform</span> <span class="n">transform</span><span class="p">()</span> <span class="k">const</span><span class="p">;</span></pre></td>
</tr>
</tbody>
</table>
<pre style="margin-left: 2em; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Please add API documentation.
Is this actually used? m_transform seems not to be set.
</pre>
</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="http://git.reviewboard.kde.org/r/110058/diff/5/?file=139643#file139643line287" style="color: black; font-weight: bold; text-decoration: underline;">src/lib/MarbleWidget.cpp</a>
<span style="font-weight: normal;">
(Diff revision 5)
</span>
</th>
</tr>
</thead>
<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">287</font></th>
<td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "> <span class="kt">int</span> <span class="n">polarity</span> <span class="o">=</span> <span class="n">m_widget</span><span class="o">-></span><span class="n">viewport</span><span class="p">()</span><span class="o">-></span><span class="n">polarity</span><span class="p">();</span></pre></td>
</tr>
</tbody>
</table>
<pre style="margin-left: 2em; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">I think polarity is calculated wrong when screen panning is active sometimes: You can observe the compass showing wrong values of S or N, and when screen panning the globe towards the screen top, geo panning (changing lon/lat center) by mouse uses the wrong direction.</pre>
</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="http://git.reviewboard.kde.org/r/110058/diff/5/?file=139644#file139644line640" style="color: black; font-weight: bold; text-decoration: underline;">src/lib/MarbleWidgetInputHandler.cpp</a>
<span style="font-weight: normal;">
(Diff revision 5)
</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; ">bool MarbleWidgetDefaultInputHandler::eventFilter( QObject* o, QEvent* e )</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">640</font></th>
<td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "> <span class="n">QLine</span> <span class="nf">l</span><span class="p">(</span><span class="n">d</span><span class="o">-></span><span class="n">m_moveClickLoc</span><span class="p">,</span> <span class="n">event</span><span class="o">-></span><span class="n">pos</span><span class="p">());</span></pre></td>
</tr>
</tbody>
</table>
<pre style="margin-left: 2em; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">l => line or something else less cryptical</pre>
</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="http://git.reviewboard.kde.org/r/110058/diff/5/?file=139644#file139644line684" style="color: black; font-weight: bold; text-decoration: underline;">src/lib/MarbleWidgetInputHandler.cpp</a>
<span style="font-weight: normal;">
(Diff revision 5)
</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; ">bool MarbleWidgetDefaultInputHandler::eventFilter( QObject* o, QEvent* e )</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">684</font></th>
<td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "> <span class="n">boundingRect</span> <span class="o">=</span> <span class="n">boundingRect</span><span class="p">.</span><span class="n">translated</span><span class="p">(</span><span class="n">MarbleWidgetInputHandler</span><span class="o">::</span><span class="n">d</span><span class="o">-></span><span class="n">m_widget</span><span class="o">-></span><span class="n">pan</span><span class="p">());</span></pre></td>
</tr>
</tbody>
</table>
<pre style="margin-left: 2em; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">there's also an in-place translate() method, i.e.
boundingRect.translate( MarbleWidgetInputHandler::d->m_widget->pan() )</pre>
</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="http://git.reviewboard.kde.org/r/110058/diff/5/?file=139646#file139646line305" style="color: black; font-weight: bold; text-decoration: underline;">src/lib/Projections/SphericalProjection.cpp</a>
<span style="font-weight: normal;">
(Diff revision 5)
</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; ">GeoDataLatLonAltBox SphericalProjection::latLonAltBox( const QRect& screenRect,</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">305</font></th>
<td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "> <span class="n">qint64</span> <span class="n">w</span> <span class="o">=</span> <span class="n">viewport</span><span class="o">-></span><span class="n">vwidth</span><span class="p">();</span></pre></td>
</tr>
</tbody>
</table>
<pre style="margin-left: 2em; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">w vs. width and h vs. height seem to be quite confusing local variable names.
</pre>
</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="http://git.reviewboard.kde.org/r/110058/diff/5/?file=139647#file139647line239" style="color: black; font-weight: bold; text-decoration: underline;">src/lib/RenderPlugin.h</a>
<span style="font-weight: normal;">
(Diff revision 5)
</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 RenderPlugin : public QObject, public RenderPluginInterface</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">239</font></th>
<td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="cm"> * Set the stationary property</span></pre></td>
</tr>
</tbody>
</table>
<pre style="margin-left: 2em; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Please describe its effect (see above)</pre>
</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="http://git.reviewboard.kde.org/r/110058/diff/5/?file=139647#file139647line241" style="color: black; font-weight: bold; text-decoration: underline;">src/lib/RenderPlugin.h</a>
<span style="font-weight: normal;">
(Diff revision 5)
</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 RenderPlugin : public QObject, public RenderPluginInterface</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">241</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">setStationary</span><span class="p">(</span> <span class="kt">bool</span> <span class="n">s</span> <span class="p">);</span></pre></td>
</tr>
</tbody>
</table>
<pre style="margin-left: 2em; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">bool enabled or bool stationary</pre>
</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="http://git.reviewboard.kde.org/r/110058/diff/5/?file=139651#file139651line18" style="color: black; font-weight: bold; text-decoration: underline;">src/lib/SphericalScanlineTextureMapper.cpp</a>
<span style="font-weight: normal;">
(Diff revision 5)
</span>
</th>
</tr>
</thead>
<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">18</font></th>
<td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="cp">#include <QtGui></span></pre></td>
</tr>
</tbody>
</table>
<pre style="margin-left: 2em; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">remove</pre>
</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="http://git.reviewboard.kde.org/r/110058/diff/5/?file=139651#file139651line46" style="color: black; font-weight: bold; text-decoration: underline;">src/lib/SphericalScanlineTextureMapper.cpp</a>
<span style="font-weight: normal;">
(Diff revision 5)
</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; ">public:</pre></td>
</tr>
</tbody>
<tbody>
<tr>
<th bgcolor="#e9eaa8" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2">45</font></th>
<td bgcolor="#fdfebc" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "> <span class="n">QImage</span> <span class="o">*</span><span class="k">const</span> <span class="n">m_canvasImage</span><span class="p">;</span></pre></td>
<th bgcolor="#e9eaa8" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">46</font></th>
<td bgcolor="#fdfebc" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "> <span class="n">QImage</span> <span class="o">*</span><span class="k">const</span> <span class="n">m_canvasImage<span class="hl">P</span></span><span class="p">;</span></pre></td>
</tr>
</tbody>
</table>
<pre style="margin-left: 2em; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Please use a less cryptic variable name</pre>
</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="http://git.reviewboard.kde.org/r/110058/diff/5/?file=139651#file139651line114" style="color: black; font-weight: bold; text-decoration: underline;">src/lib/SphericalScanlineTextureMapper.cpp</a>
<span style="font-weight: normal;">
(Diff revision 5)
</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; ">public:</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">106</font></th>
<td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "> <span class="k">if</span> <span class="p">(</span><span class="n">m_panning</span> <span class="o">&&</span> <span class="o">!</span><span class="n">panning</span><span class="p">)</span></pre></td>
</tr>
</tbody>
</table>
<pre style="margin-left: 2em; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">please use curly brackets also for one-liners. More occurrences below.</pre>
</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="http://git.reviewboard.kde.org/r/110058/diff/5/?file=139654#file139654line100" style="color: black; font-weight: bold; text-decoration: underline;">src/lib/ViewportParams.h</a>
<span style="font-weight: normal;">
(Diff revision 5)
</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 ViewportParams</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">100</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">pan</span><span class="p">(</span><span class="n">QPoint</span> <span class="n">translation</span><span class="p">);</span></pre></td>
</tr>
</tbody>
</table>
<pre style="margin-left: 2em; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">pass a const reference, please</pre>
</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="http://git.reviewboard.kde.org/r/110058/diff/5/?file=139654#file139654line110" style="color: black; font-weight: bold; text-decoration: underline;">src/lib/ViewportParams.h</a>
<span style="font-weight: normal;">
(Diff revision 5)
</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 ViewportParams</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">110</font></th>
<td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "> <span class="kt">int</span> <span class="n">vwidth</span><span class="p">()</span> <span class="k">const</span><span class="p">;</span></pre></td>
</tr>
</tbody>
</table>
<pre style="margin-left: 2em; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">The name is too cryptic and lacks camel case. virtualWidth()? Same for vheight, vsize. Can you add API documentation as well, please?
</pre>
</div>
<br />
<p>- Dennis</p>
<br />
<p>On April 18th, 2013, 11:02 p.m. UTC, Paul Nader wrote:</p>
<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" style="background-image: url('http://git.reviewboard.kde.org/static/rb/images/review_request_box_top_bg.ab6f3b1072c9.png'); background-position: left top; background-repeat: repeat-x; border: 1px black solid;">
<tr>
<td>
<div>Review request for Marble, Bernhard Beschow and Dennis Nienhüser.</div>
<div>By Paul Nader.</div>
<p style="color: grey;"><i>Updated April 18, 2013, 11:02 p.m.</i></p>
<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;">Spherical Projection Panning
----------------------------
This new feature allows users to pan the globe during spherical projection mode. To pan the globe: Shift Key + Mouse Left Button
No gestures and no Routing Layer, as yet.
I am more than happy to help anyone porting existing plugins, etc to use panning.
Suggestions and improvements are also welcome.
1. Introduction
The rest if this description explains the design of the spherical panning algorithms proposed for the marble application widget.
Spherical projection panning is the action of translating the globe (or the scene viewpoint) in a plane orthogonal to
the line of sight of the viewer. For flat map (equirect projection) or mercator map (mercator projection) the rotation
and panning actions are roughly equivalent and hence they remain unchanged.
2. Implementation Notes
There are several areas affected by the spherical panning implementation:
o Texture Mapping
o Layers
o Plugins
o Input Event Processing
2.1 Texture Mapping
Panning is implemented in the SphericalScanlineTextureMapper class. When panning is started a snapshot of the earth is constructed
by creating and image 3 times the size of the current viewport. This image is texture mapped and the background is set to transparent.
The image is then displayed translated appropriately to match the screen coordinates. As panning mouse move events continue to be
processed the same image is displayed with the appropriate translation correction. As a consequence there is an initial delay, mostly
unappreciable, at the start of panning but once it is in progress is is very fast as the SphericalScanlineTextureMapper class is only
translating and displaying a pre-built image. When rotating a panned globe the texture mapping algorithm also ensures the appropriate
sections of tiles are rendered taking into account the amount of pan in effect.
2.2 Layers
None of the layers are aware any panning is in effect as it is already taken into account in the texture mapping algorithm. On the other
hand MapInfoDialog and possibly the Routing layer (TBD) are rendered independent of the globe texture layers and also are required to
translate their paint artefacts.
The LayerInterface class has been modified to include a new boolean data member (m_stationary together with a getter and setter)
initialised to false so that by default layers remain statically positioned and the LayerManager class has been modified to test whether
the layer is stationary or alternatively should be panned. If so the LayerManager translates the painter by the current amount of pan.
The layer itself is unaware any panning is taking effect although the viewport display is modified.
The TextureColorizer remains the only exception mainly because it creates a painter of its own to paint on a separate image. It cannot
share the main GeoPainter instance because a display device can only have one painter.
2.3 Plugins
Plugins have also been affected similarly. Some plugins require their paint artifacts to be positioned statically in the screen (eg, the
compass, elevation profile, etc) while others require their paint artifacts to be translated (eg, postal codes, earthquakes, photo, etc).
The approach used is exactly the same as that taken for layers. The RenderPlugin class has been modified to include a new boolean data
memeber (m_stationary together with a getter and setter) initialised to false so that by default plugins remain statically positioned.
The AbstractDataPlugin class has been modified to test whether the plugin is stationary or alternatively should be panned. If so the
AbstractDataPlugin translates the painter by the current amount of pan. The plugin itself is unaware any panning is taking effect
although the viewport display is modified.
The current list of plugins that are modified to be pannable are:
PostalCodePlugin
EarthquakePlugin
PhotoPlugin
StarsPlugin
WikipediaPlugin
OpenCachingComPlugin
WeatherPlugin.cpp
OpenDesktopPlugin.cpp
2.4 Input Event Processing
The MarbleWidgetInputHandler class is responsible for handling most user events such as mouse moves and key presses. MarbleWidgetInputHandler
has been modified to additionally process mouse move events when the shift key is also pressed and the current widget projection is set
to Spherical. The same action during Flat and Mercator projections are processed as a rotation request and handled using the current methods.
When panning commences the input handler records the current position to be used to determine how much panning is in effect. The pan is then
applied to the MarbleWidget through a new method called pan overloaded to take a point or a pair of screen coordinates. The MarbleWidget then
applies the pan to the viewport so that it is accessible in all renderable classes.
Enjoy.
</pre>
</td>
</tr>
</table>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Testing </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;">Ubuntu 11.40 32-bit / Qt 4.8.1 (marble-qt only)</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/QtMainWindow.cpp <span style="color: grey">(cc69642)</span></li>
<li>src/lib/AbstractDataPlugin.cpp <span style="color: grey">(ce527f9)</span></li>
<li>src/lib/GoToDialog.cpp <span style="color: grey">(57b65de)</span></li>
<li>src/lib/LayerInterface.h <span style="color: grey">(46a20da)</span></li>
<li>src/lib/LayerInterface.cpp <span style="color: grey">(c3629de)</span></li>
<li>src/lib/LayerManager.cpp <span style="color: grey">(0df19d2)</span></li>
<li>src/lib/MapInfoDialog.cpp <span style="color: grey">(5219983)</span></li>
<li>src/lib/MarbleModel.h <span style="color: grey">(8753615)</span></li>
<li>src/lib/MarbleModel.cpp <span style="color: grey">(5df138a)</span></li>
<li>src/lib/MarbleWidget.h <span style="color: grey">(9203250)</span></li>
<li>src/lib/MarbleWidget.cpp <span style="color: grey">(be1e228)</span></li>
<li>src/lib/MarbleWidgetInputHandler.cpp <span style="color: grey">(1bdba92)</span></li>
<li>src/lib/PopupItem.cpp <span style="color: grey">(f9f0c2c)</span></li>
<li>src/lib/Projections/SphericalProjection.cpp <span style="color: grey">(cebb73d)</span></li>
<li>src/lib/RenderPlugin.h <span style="color: grey">(90355ed)</span></li>
<li>src/lib/RenderPlugin.cpp <span style="color: grey">(b9b95c9)</span></li>
<li>src/lib/ScanlineTextureMapperContext.cpp <span style="color: grey">(ff3197b)</span></li>
<li>src/lib/SphericalScanlineTextureMapper.h <span style="color: grey">(8ab69b9)</span></li>
<li>src/lib/SphericalScanlineTextureMapper.cpp <span style="color: grey">(5808705)</span></li>
<li>src/lib/TextureColorizer.cpp <span style="color: grey">(f372830)</span></li>
<li>src/lib/VectorMap.cpp <span style="color: grey">(cf3dcef)</span></li>
<li>src/lib/ViewportParams.h <span style="color: grey">(6b97f55)</span></li>
<li>src/lib/ViewportParams.cpp <span style="color: grey">(f82a8b7)</span></li>
<li>src/lib/layers/VectorMapLayer.cpp <span style="color: grey">(f05c88a)</span></li>
<li>src/lib/routing/RoutingInputWidget.cpp <span style="color: grey">(cbfc898)</span></li>
<li>src/lib/routing/RoutingLayer.cpp <span style="color: grey">(1f07854)</span></li>
<li>src/plugins/render/aprs/AprsPlugin.cpp <span style="color: grey">(550192f)</span></li>
<li>src/plugins/render/atmosphere/AtmospherePlugin.cpp <span style="color: grey">(492c111)</span></li>
<li>src/plugins/render/earthquake/EarthquakePlugin.cpp <span style="color: grey">(1205521)</span></li>
<li>src/plugins/render/opencachingcom/OpenCachingComModel.cpp <span style="color: grey">(ee35912)</span></li>
<li>src/plugins/render/opencachingcom/OpenCachingComPlugin.cpp <span style="color: grey">(576198f)</span></li>
<li>src/plugins/render/opendesktop/OpenDesktopPlugin.cpp <span style="color: grey">(b1cef50)</span></li>
<li>src/plugins/render/photo/PhotoPlugin.cpp <span style="color: grey">(cdb6243)</span></li>
<li>src/plugins/render/postalcode/PostalCodePlugin.cpp <span style="color: grey">(87feacd)</span></li>
<li>src/plugins/render/stars/StarsPlugin.cpp <span style="color: grey">(d8d1a08)</span></li>
<li>src/plugins/render/weather/WeatherPlugin.cpp <span style="color: grey">(4be0c5d)</span></li>
<li>src/plugins/render/wikipedia/WikipediaPlugin.cpp <span style="color: grey">(89cf51e)</span></li>
</ul>
<p><a href="http://git.reviewboard.kde.org/r/110058/diff/" style="margin-left: 3em;">View Diff</a></p>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">File Attachments </h1>
<ul>
<li><a href="http://git.reviewboard.kde.org/media/uploaded/files/2013/04/16/17._Satellites.png">Panned</a></li>
</ul>
</td>
</tr>
</table>
</div>
</body>
</html>