Customizable Weather Plasmoid: animated images patch and GISMETEO weather support


Small patch for KDE 4 Customizable Weather Plasmoid to support animated images in “satellite images” view and config for GISMETEO weather support.

Update 2009.08.07: starting from CWP 0.9.11 animated images support and GISMETEO config are now in official CWP distribution, thanks to CWP author for prompt response! Moreover, as far as I see they both were fixed and improved during integration, so I recommend using version 0.9.11 instead of my patches and thus this page is left for historical reasons only.

Animated images patch

With this patch applied CWP will try to animate every image it shows in “satellite images” window - this will animate images if they are of appropriate format (tested for MNG and GIF) and do nothing for non-animated images.

This is most useful when “satellite images” feature is used to display some dynamic information, such as atmospheric fronts developed over time, etc.

For animated images you can control animation with mouse wheel: when it is rotated, the automatic animation is stopped and image frames are scrolled in appropriate direction based on wheel rotation.

Additionally, middle mouse button (AKA mouse wheel pressing for most mice) will pause/resume automatic animation.

You can download it here: CWP animated images patch

Known limitations: moving frame sequence backward doesn’t really work for me (at least for my version of Qt/GIF images used).

<rant mode>

In fact it was a bit of a shock for me to discover Qt handles images animation in such a “strange” (to put it politely) way: instead of treating animated images as just another kind of an image, it uses separate class QMovie for it which, to add complexity, has completely different interface compared to QImage and even completely different design (for example QMovie does not have value semantics, as opposed to QImage), so it’s not even enough to replace all QImage usage with QMovie and correct member functions names - you should really rework the whole logic of images handling to make animation happen. I’d expect easier way to handle that from toolkit that “provides you with all the functionality needed to develop advanced GUI applications” …

</rant mode>

Config for GISMETEO weather

This XML config provide basic support for GISMETEO weather forecasts in CWP, mostly useful for xUSSR countries citizens.

It parses information about current weather and 3-day forecast. You should enable “use weather provider icons” option for it to work properly.

It was written and tested for Ukraine site version, but should be easy to modify for the Russian one, most likely just changing URLs in several places and country name should suffice.

You can download it here: CWP GISMETEO config

I’ve also written small HTTP service that combines weather maps images from GISMETEO site and makes them available as animated images to be used in CWP “satellite images” view (which was basically the reason I’ve developed the patch for animated images in the first place), but I’m not sure if there’s any interest in it, so I will consider publishing it if there’s at least somebody who requests that

Post new comment

ndl@home is currently in maintenance. During this maintenance it is not possible to change site content (like comments, pages and users).
Syndicate content

User login