[Marble-devel] Review Request 114419: [GCI] Added support for starting KML tours from the legend

Dennis Nienhüser earthwings at gentoo.org
Fri Dec 13 19:49:43 UTC 2013


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/114419/#review45665
-----------------------------------------------------------


Great, looks very elegant :-)



src/lib/marble/MarbleLegendBrowser.cpp
<http://git.reviewboard.kde.org/r/114419/#comment32621>

    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).
    



src/lib/marble/TourWidget.cpp
<http://git.reviewboard.kde.org/r/114419/#comment32620>

    const QString &



src/lib/marble/TourWidget.cpp
<http://git.reviewboard.kde.org/r/114419/#comment32619>

    const QString &


- Dennis Nienhüser


On Dec. 12, 2013, 6:30 p.m., Mihail Ivchenko wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/114419/
> -----------------------------------------------------------
> 
> (Updated Dec. 12, 2013, 6:30 p.m.)
> 
> 
> Review request for Marble.
> 
> 
> Repository: marble
> 
> 
> Description
> -------
> 
> 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>
> 
> 
> Diffs
> -----
> 
>   src/apps/marble-mobile/MobileMainWindow.cpp 2eadff5 
>   src/apps/marble-ui/ControlView.cpp fc9022f 
>   src/lib/marble/LegendWidget.h e56966a 
>   src/lib/marble/LegendWidget.cpp 280fd64 
>   src/lib/marble/MarbleControlBox.cpp 900fa59 
>   src/lib/marble/MarbleLegendBrowser.h e7fb4b5 
>   src/lib/marble/MarbleLegendBrowser.cpp 644dd0f 
>   src/lib/marble/TourWidget.h c18c849 
>   src/lib/marble/TourWidget.cpp 8bd7aa6 
> 
> Diff: http://git.reviewboard.kde.org/r/114419/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Mihail Ivchenko
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/marble-devel/attachments/20131213/69bb1fd2/attachment.html>


More information about the Marble-devel mailing list