dataabstraction in the curve widget

Casper Boemann cbr at boemann.dk
Tue Jun 21 19:47:01 CEST 2005


Hi

I need some input and ideas on the curve widget.

We would like the curve widget to be part of kde-ui eventually so it would be 
bad if things like histograms or other image specific things were part of the 
widget.

The histogram shown behind the curve is easily solved by letting the widget 
take a QImage as background. That way the caller can decide what (if anything 
is shown).

Now the curve itself should also be as abstract as possible. No need to decide 
what the implementation of the curve should be. But how to do that?

I have thought of just defining an interface that potential curve 
implementations should follow. But I can't seem to take the mental leap as to 
what functions should be there. I would like to avoid specifying integers or 
double or QPoint or some other class, but still I need to be able to both 
draw the curve and modify it, without the curve implementation having to do 
all the work.

Now if no zoom is possible in the curve widget (should it be? other 
applications might need it some day) working in integers seem fine. The curve 
implementation could then convert to double (I think that could work).

Please give some feedback and thoughts. I feel like I'm stuck mentally.

-- 
best regards / venlig hilsen
Casper Boemann


More information about the kimageshop mailing list