[patch] K{Int|Double}Validator + new classes
Jaroslaw Staniek
js at iidea.pl
Thu Oct 26 19:07:09 BST 2006
Dirk Mueller said the following, On 2006-10-26 14:03:
>>Related proposals:
>>1. What about having KNumValidator<type> template where 'type' can be:
>>long, ulong, qlonglong, qulonglong, etc? Especiall the long long types can
>>be useful.
>
> Yes, I agree. I've planned to look into this in time before 4.0 but haven't
> found time yet.
This can be part of my porting efforts related to Kexi. Since these things are
quite extensively tested, I can help here. OK? I have working code bits already.
>>2. KDecimalValidator - a validator that handles a pair of integers, so
>>you'll get full precision, including control over decimal places.
>>KFloatValidator is not precise in the practice (it's just a property of
>>float type), and neither KDoubleValidator sometimes.
>
> What do you mean by "full precision" ?
100%, absolute accuracy, unlike in floating point numeral system.
The application of this data type is (no surprise) database, processing when
_currency_ is involved and any data-entry systems.
To make the decimal type fit cleanly to the mentioned KNumValidator<type>
template, I propose introduction of a class (let's name it 'kdecimal') with
all the needed operators implemented.
The next step could be to take advantage of the accuracy of the new type and
bring KDecimalNumInput and/or KDecimalSpinBox as an alternative to
KDoubleSpinBox/KDoubleNumInput.
I can help here as well.
--
regards / pozdrawiam, Jaroslaw Staniek
Sponsored by OpenOffice Polska (http://www.openoffice.com.pl/en) to work on
Kexi & KOffice: http://www.kexi-project.org, http://www.koffice.org
KDE3 & KDE4 Libraries for MS Windows: http://kdelibs.com, http://www.kde.org
More information about the kde-core-devel
mailing list