[prev in list] [next in list] [prev in thread] [next in thread]
List: koffice-devel
Subject: Re: Better default step size for KoUnitSpinBox
From: Florian Merz <FlorianMerz () gmx ! de>
Date: 2008-03-13 18:51:05
Message-ID: 200803131951.05486.FlorianMerz () gmx ! de
[Download RAW message or body]
Am Donnerstag, 13. März 2008 schrieb Thomas Zander:
> ...
> you type the long point version of each type in the switch, what about
> typing MM_TO_POINT(5);
> and similar statements instead in that switch(). I think that makes it
> more readable.
Will do that.
> You use
> d->stepInPoints = KoUnit::defaultStep(unit);
> I think that should be
> setLineStepPt( KoUnit::defaultStep(unit) );
>
> Can you try if that fixes the problems you stated you saw?
I'll have a look at that tomorrow, if I have the time.
> I'm personally not convinced the placement of the static on KoUnit is the
> best thing, there currently is no place where this is needed as well so
> we would be able to add the functionality without any external API (just
> some code in the KoUnitDoubleSpinBox.cpp).
I know it's not perfect, but it's the best place I could think of. Although
I have to admit, that I don't know the koffice code very well.
> What about doing that and only when someone actually requires this
> feature move the code to have a new public method on KoUnit?
Well, I wrote it for my own tool and then decided to share with the
KoUnitSpinBox. But the tool is not (yet?) in svn so I don't know if that
counts :)
> Let me know what you think!
I used a static variable for defaultStep() because unitName(), does, too.
But honstely, I don't understand why that one is static and then takes a
KoUnit as its first argument.
Also, is there a reason why KoUnit is placed in libs/odf? It took me some
time to find it there. It's an integral part of the application, not just a
part of the file format, right?
_______________________________________________
koffice-devel mailing list
koffice-devel@kde.org
https://mail.kde.org/mailman/listinfo/koffice-devel
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic