On Monday 01 September 2008 16:07:08 Gerhard Gappmeier wrote: > The idea behind the tables is, > that it is not necessary to make own classes for each unit that > uses a different conversion and to write the conversion code again > and again for everything.
Simpler conversions already use QHash and conversion code is only in one place (SimpleUnit). > The table works on linear conversion y=k*x+d > and so it can do all typical conversions from temperatures, over lengths, > to speed and so on. > At the moment I don't see a need for a more generic conversion routine > like logarithmic conversions, but the formula could be extended if needed. e.g. Time zone and currency cannot be made with simple tables. > Another important advantage is, that this way it doesn't need much > resources, and it doesn't need string parsing if you want e.g. convert > "mph" to "km/h". This would also be very fast if you need to convert > thousands of values. I didn't think that plasma applets or runners would do mass conversion so performance was not the first priority. Petri
signature.asc
Description: This is a digitally signed message part.
_______________________________________________ Plasma-devel mailing list [email protected] https://mail.kde.org/mailman/listinfo/plasma-devel
