[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-core-devel
Subject:    Re: New class KWidgetBlendAnimation
From:       "Riccardo Iaconelli" <riccardo () kde ! org>
Date:       2008-02-01 20:29:05
Message-ID: f57cdca40802011229t51f0cac5ybe465a63fd8300b1 () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (text/plain)]

On Jan 31, 2008 9:54 PM, Matthias Kretz <kretz@kde.org> wrote:

> On Thursday 31 January 2008, Frerich Raabe wrote:
> > Hi Matthias,
> >
> > Matthias Kretz schrieb:
> > > while playing with possible UI effects I think I found a rather useful
> > > one: Fade UI changes.
> >
> > [..]
> >
> > > The class is attached. Please comment on the naming, usefulness, dox
> and
> > > whether we want to have it in kdeui for 4.1. (I want to use it in my
> > > Phonon KCM unless I can be convinced that there's a better UI hint
> than
> > > this animation).
> >
> > I didn't build your class but I just looked at the code a bit and
> wondered:
> >
> > Why do you grab a pixmap of the to-be-changed-widget in the constructor
> > (and then install an event filter on the widget so that you get all
> > paint events so you can update your pixmap)?
> >
> > Isn't it possible to just grab a pixmap within start()? Hmm, you'd need
> > to show something until start() is called. Maybe you could hide()
> > yourself, or make yourself transparent, or resize to 0x0 pixels or so?
>
> I tried many things but so far this is the only way to reliably get a
> pixmap
> of the updated widget. Calling grabWidget in start() gives the old pixmap,
> calling grabWidget the first time paintEvent is called also gives the old
> pixmap.
>
> I did not try to hide the animation widget as I don't want to have any
> flicker. The widget that gets grabbed may not draw its updated version on
> screen until the animation is over.


With Qt 4.4 you get no flickering on those hide()s. That's the alien widgets
fun. =)


> QPainter::setRedirected is pretty useless, too. It would be so easy to
> just
> redirect all paints of the original widget into the pixmap. But that
> doesn't
> work at all.



Bye,
-Riccardo
-- 
GPG key:
3D0F6376
When encrypting, please encrypt also for this subkey:
9EBD7FE1
-----
Pace Peace Paix Paz Frieden Pax Pokój Friður Fred Béke 和平
Hasiti Lapé Hetep Malu Mир Wolakota Santiphap Irini Peoch
Shanti Vrede Baris Rój Mír Taika Rongo Sulh Mir Py'guapy 평화

[Attachment #3 (text/html)]

On Jan 31, 2008 9:54 PM, Matthias Kretz &lt;<a \
href="mailto:kretz@kde.org">kretz@kde.org</a>&gt; wrote:<br><div \
class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid \
rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"> \
<div><div></div><div class="Wj3C7c">On Thursday 31 January 2008, Frerich Raabe \
wrote:<br>&gt; Hi Matthias,<br>&gt;<br>&gt; Matthias Kretz schrieb:<br>&gt; &gt; \
while playing with possible UI effects I think I found a rather useful<br> &gt; &gt; \
one: Fade UI changes.<br>&gt;<br>&gt; [..]<br>&gt;<br>&gt; &gt; The class is \
attached. Please comment on the naming, usefulness, dox and<br>&gt; &gt; whether we \
want to have it in kdeui for 4.1. (I want to use it in my<br> &gt; &gt; Phonon KCM \
unless I can be convinced that there&#39;s a better UI hint than<br>&gt; &gt; this \
animation).<br>&gt;<br>&gt; I didn&#39;t build your class but I just looked at the \
code a bit and wondered:<br>&gt;<br> &gt; Why do you grab a pixmap of the \
to-be-changed-widget in the constructor<br>&gt; (and then install an event filter on \
the widget so that you get all<br>&gt; paint events so you can update your \
pixmap)?<br>&gt;<br>&gt; Isn&#39;t it possible to just grab a pixmap within start()? \
Hmm, you&#39;d need<br> &gt; to show something until start() is called. Maybe you \
could hide()<br>&gt; yourself, or make yourself transparent, or resize to 0x0 pixels \
or so?<br><br></div></div>I tried many things but so far this is the only way to \
reliably get a pixmap<br> of the updated widget. Calling grabWidget in start() gives \
the old pixmap,<br>calling grabWidget the first time paintEvent is called also gives \
the old<br>pixmap.<br><br>I did not try to hide the animation widget as I don&#39;t \
want to have any<br> flicker. The widget that gets grabbed may not draw its updated \
version on<br>screen until the animation is over.</blockquote><div><br>With Qt 4.4 \
you get no flickering on those hide()s. That&#39;s the alien widgets fun. =)<br> \
<br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, \
204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br>QPainter::setRedirected is \
pretty useless, too. It would be so easy to just<br> redirect all paints of the \
original widget into the pixmap. But that doesn&#39;t<br>work at \
all.</blockquote><div><br>&nbsp;</div></div>Bye,<br>-Riccardo<br>-- <br>GPG \
key:<br>3D0F6376<br>When encrypting, please encrypt also for this subkey:<br> \
9EBD7FE1<br>-----<br>Pace Peace Paix Paz Frieden Pax Pokój Friður Fred Béke \
和平<br>Hasiti Lapé Hetep Malu Mир Wolakota Santiphap Irini Peoch<br>Shanti \
Vrede Baris Rój Mír Taika Rongo Sulh Mir Py&#39;guapy 평화



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic