<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/114419/">http://git.reviewboard.kde.org/r/114419/</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;">Great, looks very elegant :-)
</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/114419/diff/1/?file=224605#file224605line206" style="color: black; font-weight: bold; text-decoration: underline;">src/lib/marble/MarbleLegendBrowser.cpp</a>
    <span style="font-weight: normal;">

     (Diff revision 1)

    </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 MarbleLegendBrowser::injectCheckBoxChecker()</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">206</font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">            <span class="n">QString</span> <span class="n">tourPath</span> <span class="o">=</span> <span class="n">MarbleDirs</span><span class="o">::</span><span class="n">path</span><span class="p">(</span> <span class="s">"maps/"</span> <span class="o">+</span> <span class="n">currentMapTheme</span><span class="o">-></span><span class="n">head</span><span class="p">()</span><span class="o">-></span><span class="n">target</span><span class="p">()</span> <span class="o">+</span> <span class="sc">'/'</span> <span class="o">+</span> <span class="n">currentMapTheme</span><span class="o">-></span><span class="n">head</span><span class="p">()</span><span class="o">-></span><span class="n">theme</span><span class="p">()</span> <span class="o">+</span> <span class="n">url</span><span class="p">.</span><span class="n">path</span><span class="p">()</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'd prefer to have the LegendBrowser slightly more "dumb", and just check for url.scheme() and then either emit a signal tourLinkClicked(QString) or open the link directly as before for other links.

ControlView then should listen to that signal and connect it to a new slot, where it extracts the absolute path name and forwards that to TourWidget::open. Ideally it would append just MarbleDirs::path() + "maps/" to the URL and expect the .dgml to specify tour file in the form tour://planet/theme/tour.kml. This has the benefit that tours can be shared between different map themes, or map themes that use more complicated folder structures.

The benefit of LegendBrowser not knowing MarbleWidget is that we are able to introduce non-QWidget interfaces easier (think of QML).
</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/114419/diff/1/?file=224607#file224607line158" style="color: black; font-weight: bold; text-decoration: underline;">src/lib/marble/TourWidget.cpp</a>
    <span style="font-weight: normal;">

     (Diff revision 1)

    </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 TourWidget::togglePlaybackState()</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">158</font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="kt">bool</span> <span class="n">TourWidgetPrivate</span><span class="o">::</span><span class="n">openFile</span><span class="p">(</span> <span class="n">QString</span> <span class="o">&</span><span class="n">filename</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;">const QString &</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/114419/diff/1/?file=224607#file224607line474" style="color: black; font-weight: bold; text-decoration: underline;">src/lib/marble/TourWidget.cpp</a>
    <span style="font-weight: normal;">

     (Diff revision 1)

    </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 TourWidgetPrivate::overrideModifications()</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">474</font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="kt">bool</span> <span class="n">TourWidget</span><span class="o">::</span><span class="n">openTour</span><span class="p">(</span><span class="n">QString</span> <span class="o">&</span><span class="n">filename</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;">const QString &</pre>
</div>
<br />



<p>- Dennis Nienhüser</p>


<br />
<p>On December 12th, 2013, 6:30 p.m. UTC, Mihail Ivchenko 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.</div>
<div>By Mihail Ivchenko.</div>


<p style="color: grey;"><i>Updated Dec. 12, 2013, 6:30 p.m.</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;">Added support for starting KML tours from the legend
GCI task: http://www.google-melange.com/gci/task/view/google/gci2013/5796158626594816

Example of using:
Put this into <legend></legend> element of .dgml:
      <section name="tours" checkable="false" spacing="12">
          <heading>Tours:</heading> 
          <item name="geographic-pole">
              <text><![CDATA[<a href="tour://./test_tour.kml">Test Tour</a>]]></text>   // "./" is really need. 
          </item>
      </section></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/apps/marble-mobile/MobileMainWindow.cpp <span style="color: grey">(2eadff5)</span></li>

 <li>src/apps/marble-ui/ControlView.cpp <span style="color: grey">(fc9022f)</span></li>

 <li>src/lib/marble/LegendWidget.h <span style="color: grey">(e56966a)</span></li>

 <li>src/lib/marble/LegendWidget.cpp <span style="color: grey">(280fd64)</span></li>

 <li>src/lib/marble/MarbleControlBox.cpp <span style="color: grey">(900fa59)</span></li>

 <li>src/lib/marble/MarbleLegendBrowser.h <span style="color: grey">(e7fb4b5)</span></li>

 <li>src/lib/marble/MarbleLegendBrowser.cpp <span style="color: grey">(644dd0f)</span></li>

 <li>src/lib/marble/TourWidget.h <span style="color: grey">(c18c849)</span></li>

 <li>src/lib/marble/TourWidget.cpp <span style="color: grey">(8bd7aa6)</span></li>

</ul>

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







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








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