Add a thumbnailer for the supported geo data files (GPX, OSM, KML, ESRI)
Review Request #118681 - Created June 12, 2014 and submitted - Latest diff uploaded
|Friedrich W. H. Kossebau|
As inspired by https://git.reviewboard.kde.org/r/118618/ I brushed up the thumbnailing code I drafted almost 2 years ago in the train on my way back from the Marble sprint in Prague. A shame I did not do that earlier. It is another example where renderer state would be good to know. The current approach works more or less. Now and then no thumbnail is created, have yet to find out when this happens. And in the attached sample screenshot the New York KML files are for some reason not correctly zoomed in some thumbnails. Should be a useful testbed for the render status work. But IMHO good enough for a merge already. The thumbnailer is only built in non-Qt-only mode. The service desktop files are installed for each geo data file type from the respective runner plugin sources, following the pattern of the App/KPart service desktop files. Future improvements will be to make it configurable which map theme to use (now hardcoded to "earth/openstreetmap/openstreetmap.dgml"). Might get interesting for non-earth geo data files :) surely needs some more input from the experts. Not sure if thumbnails should be cached or not. Set it to "true" for now. Sadly this cannot be controlled case-by-case (e.g. if thumbnail has lower quality due to missing map theme data).
Enabled previews for the geo data files (Dolphin > Preferences > General > Previews) and browsed all kind of folders with geo data files. To get rid of cached thumbnails do "rm ~/.thumbnails/ -r" or set CacheThumbnail=false in the desktop service files.