[kde-edu]: KDE-EDU KPlotWidget and KPlotAxis
Andreas.Nicolai at gmx.net
Sat Jun 18 16:46:41 CEST 2005
(at first, I finally got SVN working, so now I can commit new stuff by
some new functionality is available for KPlotWidget. All data for a single
axis is now available through new member variables LeftAxis and BottomAxis.
Later we may add a TopAxis and RightAxis also, but right now the drawing code
just includes a BottomAxis (X) and LeftAxis (Y) as before. In order to set
each axis properties, for instance the axis label, you now do
to retrieve use
Old functions like setXAxisLabel() are kept for compatibility, but I would
recommand using the axis objects directly as shown above.
I compiled Kalzium and KStars with the new code and both compile fine (I had
to keep some old variables in order not to break the code, maybe some of the
features in the KStarsPlotWidget could be generalized and put in the
You can now also set the number format for axis labels, using
plotWidget->LeftAxis.setLabelFormat(5, 'g', 2);
The arguments are the same as for QString::arg()
You can turn on or off the different axis separately now, using the "visible"
property of the axis objects (member functions isVisible(), setVisible(),
show() and hide(), I used isVisible() instead of visible() because QWidgets
also have the function isVisible() )
More information about the kde-edu