[kde-edu]: attempt at a KPlotWidget replacement based on QGraphicsView
Robert Stevenson Neasham
robertneasham at gmail.com
Wed Sep 6 11:08:27 CEST 2006
Dear Jason:
Do your Best.
Best
Robert
On 9/5/06, Jason Harris <kstars at 30doradus.org> wrote:
>
> Hello,
>
> I spent the weekend trying to work out a replacement for KPlotWidget based
> on
> QGraphicsView. It seemed like a good idea, because QGraphicsView already
> encapsulates the separation of Data space and pixel space, uses a
> model/view
> architecture, and is supposed to be fast.
>
> Unfortunately, I am rather disappointed with the results. There's no easy
> way
> in QGraphicsView to accomodate the axis labels and tick labels, because
> the
> entire Widget is devoted to the View of the data; there's no way to set a
> QRect for the View that is smaller than the widget itself. So I ended up
> creating a QFrame containing a 3x3 grid of widgets, where the center
> widget
> is the QGraphicsView, and the eight around the edge are to hold the axis
> information. That's pretty ugly.
>
> It also seems much slower than the old KPlotWidget. For example, when
> resizing the plot, there are noticeable redraw lags. In general, it just
> feels like I am using a square peg for a round hole.
>
> It's possible that some of these shortcomings are just because I'm using
> the
> wrong approach, but I'm ready to give up on it. If anyone else wants to
> try
> doing something with the code I've written, I can make it available.
>
> Let me know,
> 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/4d0af8d0/attachment.html
More information about the kde-edu
mailing list