new panel look and feel

Marco Martin notmart at gmail.com
Sun Apr 20 10:08:01 CEST 2008


On Saturday 19 April 2008, Aaron J. Seigo wrote:
>
> a couple of inneficiencies remain:
>
> !! if the prefix is set, but it doesn't exist in the svg, then we'll get a
> panel that is identical to the default QString() panel; seems wasteful.
>
> ** check to see if the prefix exists first?
ok, put the insert in the else of the check for existence
> !! in the case of a PanelContainment, if the user switches from bottom to
> left, we generate a new panel but keep the old one around. the old panel
> will likely not get used again soon (or even ever), so will be taking up
> space unecessarily.
>
> ** there should be a way to clear the cached panels or set a cache policy?
hmm, there could be either an explicit clearCache() function that deletes 
everything but the currently used prefix
 or the PanelData structure could contain an age attribute that get resetted 
when it's painted and increased when something else is painted, would be 
automagic but requires an iteration of all elements at each paint, i would go 
for the first option if there is not something fantastic that i can't think 
about :P

another thing, now generateBackground is really cluttered of panels[prefix]->
couldn't that function goin paneldata? i'm hesitant of putting functions in 
here and it would need a pointer to the svg but maybe would become more 
readable?

Cheers,
Marco Martin




More information about the Panel-devel mailing list