GSoC/GCI Archive
Google Code-in 2013 KDE

Show KML Tours in the Files view (GeoDataTreeModel)

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!

Marble supports the KML standard and can open .kml files. There is a Files panel that shows the outline (structure) of KML files. This task is about extending the outline to support showing Tours (the gx:Tour element).

  • Download the KML tour complete_tour_example.kml
  • Open the file in Marble (in Marble: File => Open)
  • Open the Files panel in Marble (Settings => Panels => Files)
  • Open the complete_tour_example.kml file in a text editor and have a look at its structure
  • Notice that in Marble the placemarks contained in the "Points and polygons" folder are shown, but the children of the tour (playlist items) are not shown
The goal of this task is to show the FlyTo and Wait items of the playlist as children of the tour (the item in the tree that is named GeoDataTour in the second column "Type"). Additionally the name of the Tour should show up in the first column "Name".
To implement this the file src/lib/marble/GeoDataTreeModel.cpp needs to be edited. You'll have to extend methods like hasChildren(), rowCount(), data(), index(), parent() and maybe also flags() and index(GeoDataObject*).
Please note: Implementing this is quite challenging. Experience with Qt and its Model/View concepts will help. Make sure to join IRC (see below) and call for help if you get stuck.

Helpful links: