KLCDNumber

Hans Meine hans_meine at gmx.net
Thu Dec 12 12:41:05 GMT 2002


Jason Mott <kdedevel at jasonmott.com> writes:
> Perhaps an even more generic way to add such a feature would be to add support 
> for subscript/superscript text to be defined. Then the user of the class can 
> put any abbreviation they wanted (and even make sub classes that behave 
> specifically -- like a digital clock that displays am/pm). I would say since 
> this should be generic, the client code should be able to specify relative 
> size and position of the added text.

MHO (actually, my experience): Don't try to generalize too much in the
first run when you don't have seen enough applications and their needs
(it gets more complicated than necessary and might still miss some
points).

And if you make specification of positions possible, make them
relative as far as possible (in the sense of layout management, maybe
you can even re-use the Qt one by making your widget a compound one),
and try to make points the unit (translating into pixels taking the
current screen's DPI delivered by the X server into account)! Imagine
users running your calc on 75dpi and 200dpi displays (otherwise on the
latter, they will have problems with reading the calc's display).

-- 
Ciao,  /  /
      /--/
     /  / ANS




More information about the kde-core-devel mailing list