[kde-edu]: KPlotWidget ideas
Jason Harris
kstars at 30doradus.org
Mon Jun 20 05:42:10 CEST 2005
Hello,
I have some suggestions for KPlotWidget:
1) I'd like to rename some functions in KPlotAxis to make it clearer
what they do. The functions that deal with tickmark labels are named
with "label", which is a bit confusing, because label() and setLabel()
refer to the *axis* label, not the tick labels. I'd like to change to
"tick" in the following functions:
labelFieldWidth() --> tickFieldWidth()
setLabelFormat() --> setTickFormat()
labelFmt() --> tickFormat()
labelPrec() --> tickPrecision()
...or maybe "tickLabel" instead of "tick"? too wordy?
2) Should we add RightAxis and TopAxis, which can be independent of
BottomAxis and LeftAxis? I already use this in my subclass
(KStarsPlotWidget), but one could argue that we don't need this in the
base class.
3) Control over whether to show axes, tickmarks, and tick labels should
be moved to KPlotAxis, so that it can be controlled separately for each
axis. Maybe still have some convenience functions in KPlotWidget to
control both axes at once. Maybe instead of using DataRect in
KPlotWidget, we should keep the limits in KPlotAxis as well
(KPlotAxis::min() and max()).
I don't want to make the class too complicated, but I'd like it to be
flexible. I think the best strategy is to focus on making the base
widget very easy to use as-is, and try to design it so that it's not too
hard to subclass to extend functionality.
Jason
More information about the kde-edu
mailing list