[kde-edu]: cleaning up KPlotWidget

Robert Stevenson Neasham robertneasham at gmail.com
Wed Sep 6 11:00:26 CEST 2006


Dear Jason:

Your Plan looks good. why don't you move it to a beta site. let us test it
and get back to you. Not many might use it.

Best and Good Work'

Robert

On 9/5/06, Jason Harris <kstars at 30doradus.org> wrote:
>
> Hello,
>
> After my failed attempt to replace KPlotWidget, I decided to at least give
> it
> some love :).  Since several programs use this class, I want to give
> people a
> chance to comment or object before I commit.  If there are no objections,
> I
> will update all kdeedu programs which use KPlotWidget to the new API.
>
> The changes:
>
> KPlotWidget:
> + get rid of explicit buffering, since this is handled internally by Qt4.
> + Reorganize paint code; renamed drawBox() to drawAxes(), and
> recalcPixRect()
> to setPixRect().
> + Adding TopAxis and RightAxis.  Adding a secondary Data space so these
> two
> axes can optionally show different limits than LeftAxis and BottomAxis.
>
> KPlotAxis:
> + Each Axis now handles the calculation of its own tickmarks (rather than
> KPlotWidget doing it).  The major and minor tickmark positions are stored
> in
> two QList<double>'s.
> + Simplified redundant visibility variables.  Each Axis now has a
> Visibility
> flag (controlling the drawing of the axis line and the tickmarks), and its
> own ShowTickLabels flag.  The Axis label is drawn if it exists.
> + I will also likely rework the tick label formatting code.  Rather than
> three
> separate functions for the field width, format char, and precision, I want
> to
> have a QString that encodes the formatting, such as "7.2g" for field
> width=7,
> format='g' and precision=2.  This will also allow more flexibility.  For
> example, a format string "hh:mm" could be used for expressing time values,
> or
> "dms" for angle values.
>
> Let me hear your feedback; I'll be finishing it up over the next few days
> and
> then will make sure all kdeedu apps work with the new API (unless you tell
> me
> to leave yours alone).  Are there apps outside kdeedu using KPlotWidget?
>
> thanks,
> Jason
> --
> KStars: http://edu.kde.org/kstars
> Community Forums: http://kstars.30doradus.org
> _______________________________________________
> kde-edu mailing list
> kde-edu at mail.kde.org
> https://mail.kde.org/mailman/listinfo/kde-edu
>



-- 
Mr.Robert S. Neasham, Jr.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.kde.org/pipermail/kde-edu/attachments/20060906/5f04bc1a/attachment-0001.html 


More information about the kde-edu mailing list