[mythtv-theming] Future of UIBlackHoleType in 0.22
stuart at tase.co.uk
Tue Apr 28 15:33:04 UTC 2009
On Tuesday 28 April 2009 16:06:17 George Galt wrote:
> Having looked through the plugins and libmythui files in 0.22 so that
> I can start on porting a plugin, I've noticed an issue I'd like a
> little guidance on. I need to draw an animated image onto a specified
> area of the screen. Looking at UIImageType, it seems that using
> SetImage( QImage * ) is being deprecated (I'm not exactly sure why,
> but that's beside the point). This leaves me with using
> UIBlackHoleType, which appears to only be used by Mythmusic to draw
> the visualization -- it even states in the libmythui files that this
> is the only reason it is being preserved.
To give the best advice it might help if you can give a little more detail on
what you are trying to achieve. Where is this image coming from for example?
Anything in libmyth/* relating to the UI is deprecated and is being replaced
with libmythui. You mention UIImageType, which is the old widget but I suspect
you meant MythUIImage. UIBlackHoleType was not only deprecated in the old UI,
but it does not exist at all in the new library.
MythUIImage::SetImage(MythImage) is deprecated because it bypasses the image
cache and for that reason it was scheduled for removal. It's since been
pointed out that there are limited circumstances where bypassing the image
cache is a good thing. MythZoneMinder for example needs to display ever
changing and unique images, the same image will never be shown twice so the
image cache provides no benefits. The deprecated attribute was left in place
for now to discourage it's use and to help highlight remaining code which
still used it.
> My question is twofold. First, is there a way to draw a QPixmap or
> QImage directly to a UIImageType without first writing to a local
> file, and, second, if not, what is the future of UIBlackHoleType?
> Alternatively, if someone has another suggestion for drawing an image
> directly to a section of a theme, I'd appreciate it.
It is possible to use MythUIImage this way, but as explained it has downsides
and it might not be the best way to achieve what you want which is why I asked
for more information. UIBlackHoleType will probably never return, for video
there will be a dedicated video widget and the mythmusic visualiser is
More information about the mythtv-theming