[mythtv] Depreciated calls to MythUIButtonListItem::setImage(MythImage *image, const QString &name="")

Stuart Morgan stuart at tase.co.uk
Tue Oct 14 22:49:58 UTC 2008


On Tuesday 14 October 2008 23:28:30 Paul Harrison wrote:
> I see that function  is now depreciated so what is the alternative? Some
> documentation would be nice :-)
>
> There's a couple of those calls in MythGallery iconview.cpp the first
> one is easy to replace just by re-ordering things and passing the image
> in the ctor but the second one is more tricky. The only way I can see is
> to save the thumb image to a file and use the SetImage(const QString
> &filename, const QString &name="") to load it back in. Not exactly
> efficient!

Loading by filename is exactly the way it should be done. This is for several 
reasons but the biggest of which is so that it uses the new image cache. The 
mythgallery scaling and cache will be removed at some point, all scaling and 
caching will be done through mythui.

Right now the mythui cache is pretty basic, it lacks threaded scaling and 
delayed loading through the use of events but those features are on the cards.

MythGallery already saves the thumbnail to disk, all we need to do is keep 
track of that filename in the ThumbItem and use it instead of the image. Once 
the mythui image cache is complete we can simplify things further.

The current buggy behaviour of old images being displayed in the wrong places 
will be solved if we load by filename too.
-- 
Stuart Morgan


More information about the mythtv-dev mailing list