KDE

Create a Hiking Path Symbol Renderer. Final Step 5: Marble Integration

Welcome to Marble, a virtual globe and world atlas that runs on Linux, Windows, MacOS and Android. Find your way and explore the world! :-)

The goal of this task is to integrate the code from Step 4 (Full osmc:symbol support) into Marble. Any hiking route that contains an osmc:symbol tag should have its style adjusted: The generated symbol image should be set as the icon.

This could be done as follows:

  • Create a new directory osmc-symbols in data/svg/ and place the .svg icons there. Reference them in src/lib/marble/libmarble.qrc
  • Rename symbol.h/cpp to sth like OsmcSymbol.h/cpp and place it in src/lib/marble
  • Change OsmcSymbol not to derive from QWidget, and change the paintEvent method into a method that creates and returns a QImage icon.
  • Change StyleBuilder.cpp to set QImage icons on the style of hiking routes which has osmc:symbol tags. It could look similar to https://paste.kde.org/pkly9kacd
  • Note that setting an icon on hiking routes currently has no visible effect. That's intended at the moment, but bad for testing. The patch above has a workaround for testing which sets such an image on fast food places.

When you are done, please create a review request at phabricator.kde.org with your changes.

Got a question or a problem you cannot solve on your own? Please contact your mentors:

Task tags

  • openstreetmap
  • marble
  • qt

Students who completed this task

Sergey Popov

Task type

  • code Code
close

2016