[PATCH] KDoubleSpinBox and KDoubleValidator

Marc Mutz Marc.Mutz at uni-bielefeld.de
Mon Jul 15 19:14:25 BST 2002


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

On Sunday 14 July 2002 21:50, Dirk Mueller wrote:
<snip>
> I don't see the point in adding another class and deprecating the old
> one when it can be done without having to change or extend the API.

I've chosen the current classes for consistency with 
KInt{NumInput,SpinBox,Validator}. There, KIntNumInput uses a 
KIntSpinBox together with a slider. Making KDoubleNumInput use 
KDoubleSpinBox is the next step, I agree.

I only meant to deprecate KFloatValidator and to replace it with 
KDoubleValidator. Renaming KDoubleValidator to KFloatValidator would be 
BIC, since it changes the base class.

Extending KFloatValidator to do what KDoubleValidator does now is 
another option, but then you loose the nice inheritance, you are stuck 
with the inconsistant naming (float<->double), possibly break 
applications using KFloatValidator and not expecting it to limit 
precision and you need to duplicate (read cut'n'paste) the code from 
QDoubleValidator::validate().

> Thanks, this was another longterm TODO item for me.

Yes, it's clearly a gap in both Qt and KDE.

Marc

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

iD8DBQE9MxEP3oWD+L2/6DgRAuYFAKD7pCtZEh8iYP1JYPcrCxrVMcpJQgCgwEji
4NXQcZ0kQpcTi/X5sslih+M=
=K6Tj
-----END PGP SIGNATURE-----





More information about the kde-core-devel mailing list