GSoC/GCI Archive
Google Code-in 2011 KDE

Favorite weather stations in Marble

completed by: kharvd

mentors: Earthwings, Torsten Rahn

Marble is a Virtual Globe and World Atlas. It's available on desktop systems (Linux, Windows, Mac) and some mobile devices (Nokia N900, soon Nokia N9/N950). Among it's features is the display of weather stations data (weather forecast) like shown in this screenshot:

[IMAGE http://www.nienhueser.de/marble/touch/weather-usa.png]

The weather station display is realized as a plugin (an "Online Service") that downloads the relevant data (for the visible map region) in the background and displays it at the right position.

Your task is to extend the existing weather plugin such that weather stations can be marked as favorite. Additionally please implement a new "favorites only" mode where not all available weather stations are shown, but only those marked as favorite by the user. When a weather station is marked as a favorite, it should be displayed larger and show more details (weather forecast data, more/larger icons).

The steps to accomplish this task will roughly be as follows:

  • Check out the Marble source code and get it running (see e.g. here)
  • Get a rough understanding of the existing weather plugin (in src/plugins/render/weather)
  • Extend the existing UI (the displayed weather station data) to include a "favorite" button with two states (not favorite and favorite). We have an appropriate icon for that
  • Clicking the icon toggles a station to be favorite or not. This must be recorded (in memory and written to disk to restore it on a restart)
  • When a station is marked favorite, it should be displayed differently. Show the current status (temperature, weather icon) in large and forecast data for the next days smaller, but also with icons. We have the required icons.
  • Add a configuration option to switch to/from "favorite only" mode. In this mode, only favorite weather stations are displayed. Moreover, make sure that data for the other weather stations is not going to be queried anymore in "favorite mode". Last but not least add another configuration option that let's the user choose how often the data for favorite weather stations is refreshed (default around 6 hours). Make sure that in favorite mode the only network requests that go out are those to refresh favorite weather stations. The goal is to have the plugin run all time without doing unnecessary network requests.