[Kst] Binding TODO

George Staikos staikos at kde.org
Mon Jan 16 19:15:22 CET 2006


On Saturday 14 January 2006 15:03, Barth Netterfield wrote:
> On January 14, 2006 11:46 am, George Staikos wrote:
> > On Saturday 14 January 2006 13:41, George Staikos wrote:
> > > > // axis time interpretation
> > > > void ...setAxisInterpretation(bool isIntrpreted, intpretation,
> > > > display) // interpretation is one of {JY, CTIME, JD, MJD, RJD, TAI}
> > > > // display is one of {JY, Y/M/D_H:M:S, D/M/Y_H:M:S, QT_TEXT,
> > > > QT_LOCAL, JD, MJD, RJD, KDE_SHORT, KDE_LONG} bool ...isInterpreted()
> > > > string ...Interpretation() // one of {JY, CTIME, JD, MJD, RJD, TAI}
> > > > string ...Display() // one of {JY, Y/M/D_H:M:S, D/M/Y_H:M:S, QT_TEXT,
> > > > QT_LOCAL, JD, MJD, RJD, KDE_SHORT, KDE_LONG}
> >
> >    This one is really ugly.  I think the bool redundant.  We should have
> > a "none" argument instead.  I don't like the string types though.  At
> > least, I don't like "Y/M/D_H:M:S" nor do I like "QT_*" and "KDE_*".  What
> > do we really _want_ here?  Let's make a good interface on the script side
> > and change Kst later.  Also maybe we should use an enumeration like in
> > Line.
>
> We want to either interpret according to one of the different methods, and
> display according to one of the different methods, or not interpret.
>
> One thing we want, but don't (quite) have is a sticky default
> interpretation type which is set in the settings dialog (we have something
> there, but it doesn't behave correctly): planck would us TIA, BLAST would
> use ctime. Then we would p.xaxis.interpret=true, in which case we would get
> the default interpretation.  If we wanted to change it, we would call:
> p.xaxis.interpretation = ???
> p.xaxis.display = ???

  I was thinking more about this.  It's the only binding remaining.  Does it 
make sense to have a class, either TimeInterpretation, or 
AxisTimeInterpretation, and chain the settings off of that?  It seems like a 
generic concept to me.

  Then we would have:

p.xAxis.interpretation.active = true;
p.xAxis.interpretation.input = {enum};
p.xAxis.interpretation.output = {enum};

-- 
George Staikos
KDE Developer				http://www.kde.org/
Staikos Computing Services Inc.		http://www.staikos.net/


More information about the Kst mailing list