[Marble-bugs] [Bug 310464] Support remote images/icons

Dennis Nienhüser earthwings at gentoo.org
Wed Nov 28 11:09:16 UTC 2012


https://bugs.kde.org/show_bug.cgi?id=310464

--- Comment #2 from Dennis Nienhüser <earthwings at gentoo.org> ---
To support remote icons, a good place to start making modifications is 
QImage GeoDataIconStyle::icon() const
in src/lib/geodata/data/GeoDataIconStyle.cpp

Ideally I'd like to see a new class RemoteIconLoader which is used by
GeoDataIconStyle to load icons in the background. This class should use
HttpDownloadManager from Marble or QNetworkAccessManager from Qt to download
passed URLs and create an icon from it. This icon should then be stored in
GeoDataIconStylePrivate::m_icon.

More thoughts:
- The RemoteIconLoader should be shared among all GeoDataIconStyle instances.
Possibly making it a static member is enough
- Caching of icons in memory would be nice to avoid downloading the same icon
several times
- Caching icons on disk might be nice to avoid downloading the same icon
several times over subsequent executions of Marble (HttpDownloadManager would
make that very easy)
- The download must be asynchronous, and icon() will return a null icon because
of that the first time it is queried. Ideally we find a way to signalize the
change of the icon when the download is finished to have it available
everywhere

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the Marble-bugs mailing list