[PATCH] KDoubleSpinBox and KDoubleValidator

Marc Mutz Marc.Mutz at uni-bielefeld.de
Wed Jul 17 12:27:14 BST 2002


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Monday 15 July 2002 20:14, Marc Mutz wrote:
<snip>
> Making KDoubleNumInput use
> KDoubleSpinBox is the next step, I agree.
<snip>

Ok, attached patch ( against BRANCH, but should apply against HEAD, too) 
ports KDoubleNumInout to use KDoubleSpinBox.

There's just one incompatibility I came across when testing: The valid 
range now depends on the precision instead of the step size. This 
causes kdeui/tests/knuminputtest:math test to fail. Instead of
[-100,000,000.000,100,000,000.000]
the range is now
[0,100,000.000]
most probably because this test sets the range, precision and value in 
exactly the wrong order, but even with the right order the range would 
be limited to +-2,147,438.000 (INT_MAX/10^3).
I could work around the dependence on the order by keeping 
should-be-values, but I see no point in making the possible range a 
function of the step size instead of the precision, since the user is 
allowed to edit the number and she doesn't expect that hitting (+) 
produces (1.001, 1.010, 1.020), but instead (1.001, 1.011, 1.021), IMO.

Advice?

Marc

- -- 
Marc Mutz <mutz at kde.org>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)

iD8DBQE9NVSj3oWD+L2/6DgRAiorAKC7RSZZSedQUsZDPRXNO9vocujtVgCg7IZo
vIvf7gyH5OiUPcJ1IPtOwuw=
=bgKf
-----END PGP SIGNATURE-----





More information about the kde-core-devel mailing list