GSoC/GCI Archive
Google Code-in 2013 KDE

Display Playlist Items of KML Tours

completed by: Mikhail Ivchenko

mentors: Torsten Rahn, Dennis Nienhüser

Marble is a virtual globe and world atlas — your Swiss army knife for maps. Find your way and explore the world!

Please note: You can only work on this task when the Tour Panel task is completed.

We are working on integrating support for KML Tours into Marble. The user interface will be a panel (like Routing, Map View, ...) where a tour can be loaded from a .kml file, edited, played and also recorded to a movie file. In this task you'll change the tree view showing the structure of the .kml file loaded by the user to a list view that shows only the playlist items of the tour.

  • Change the QTreeView in the Tour Panel to a QListView
  • When a .kml file is loaded by the user, traverse the parsed GeoDataDocument and locate the GeoDataTour in it, if any. Determine its QModelIndex and set it as the rootIndex of the QListView. Now the playlist items and nothing else should show up in the list view. To have them display something, change the modelColumn property of the list view to 1
  • Clicking on a FlyTo item should center the map on the coordinates of the Camera / LookAt of the FlyTo. In order to do that, extend the GeoDataTreeModel::data method for the MarblePlacemarkModel::CoordinateRole role and return the coordinate set in the Camera / LookAt of FlyTo objects. Connect the activated signal of the list view to a new slot in the TourPanel which uses the CoordinateRole to determine the target to center the map on. Use the centerOn() method of MarbleWidget.