[kde-edu]: KDEEDU Plot widget

Andreas Nicolai Andreas.Nicolai at gmx.net
Fri Jun 17 05:11:22 CEST 2005

Hi there,

I'm currently implementing the plot widget into KTouch, works fine so far. I'd 
like to add some new features:

new Functions:

setXAxisLabelFormat(int fieldWidth = 0, char fmt = 'g', int prec = -1);
setYAxisLabelFormat(int fieldWidth = 0, char fmt = 'g', int prec = -1);

These functions store the arguments passed to .arg(...) when the labels are 

Also the space for the y-axis labels isn't big enough, there should be some 
smarter algorithm implemented, like: 
first compose all labels, calculate their widths, add 5% to max width and draw 
labels with that distance to the left of the y-axis

Since the plot widget is already used in KStars I feel reluctant to hack 
around there. Is anyone working on the plot widget right now or would I break 
something if I start changing the drawBox() member function? Alternatively I 
could reimplement the function in the KTouchChartWidget, but I think the 
improvements may be useful for others as well.


More information about the kde-edu mailing list