[kde-edu]: KDEEDU Plot widget

Jason Harris kstars at 30doradus.org
Fri Jun 17 15:13:25 CEST 2005


Hi Andreas,

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

> 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 
> created.
> 
Good idea.

> 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
> 
Also good.

> 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.
> 
I think your changes would be useful generally, so please put them in 
the KPlotWidget class directly.  I'm sure you won't break anything, and 
if you do, it can always be fixed.

Good luck, and let me know if you need any help understanding the 
KPlotWidget code.

Jason


More information about the kde-edu mailing list