[Clam-devel] Re: QSynth Knobs

David García Garzón dgarcia at iua.upf.edu
Tue Apr 17 11:52:36 PDT 2007


On Tuesday 17 April 2007 20:06:59 Pedro Lopez-Cabanillas wrote:
> > Really? The world is so small! We met him once here in Barcelona
> > like two years ago. Hi Pedro! are you still around Barcelona?
>
> Yes, I'm still here :-) and available to drink a beer, if you want.

Sure, let's meet some day the next week.

> > >> * Pixmap cache was removed. Maybe i did something wrong on the port
> > >> but the widget was very sludgy until it generated all the possible
> > >> possitions and on resizing was worst. Also qt4 does double buffer by
> > >> itself -> no need for pixmap at all.
>
> The point with the pixmap cache was to draw only once each position of
> a knob, when there are several knob instances in the same application.
> It is only worth if all (or many) of them share the same colour and
> size. I recall that it was a little speed optimisation, but of course
> the situation may have changed in newer Qt versions.

The main problems were three: when to draw the pixmap (on demand drawing 
slowed significantly the interaction until most of the pixmaps were drawn), 
multiple range each slider had its own cache, and resizing the knob which 
invalidates the cache. As you say with Qt4, interaction is smooth unless you 
make the knob very large. But in this case cache did still worse. Give it a 
try and tell me.

Maybe pixmap idea could be taken again but i would only cache the common
pixels for any position of the same size. I mean the knob and the nots and 
then draw first the scale, overwrite the pixmap (with transparencies) and 
then the pointer.

> > > those new knob components will be welcome back rightly,
> > > specially on Qsynth, of course ;)
>
> Rui: the widget has been ported already to Qt4 by Chris, and included
> in Sonic Visualiser.
> http://sv1.svn.sourceforge.net/viewvc/sv1/sonic-visualiser/trunk/widgets/Au
>dioDial.cpp

I didn't take it on the first hand because it thought it hadn't the gradient 
implemented. I tested it and it looked plain. Maybe problems with my color 
scheme. (Pau will laugh at me for being so 'darky hacker' ;-) )

Anyway I have a to-do on integrating new features Chris added, notably linear 
mouse interaction but as an option. I am not sure whether the range object he 
uses is usefull in a general way. And I must take a deeper look to other 
features such as the tooltip and the input dialog he added.

David.





More information about the clam-devel mailing list