KUnitConversion
Go to the documentation of this file.
24 namespace KUnitConversion
33 unit = converter.unit(u);
42 Private(
double n,
const QString& u)
45 unit = converter.unit(u);
58 : d(new
Value::Private())
63 : d(new
Value::Private(n, u))
68 : d(new
Value::Private(n, u))
73 : d(new
Value::Private(n, u))
78 : d(new
Value::Private(n.toDouble(), u))
89 return (d->unit && d->unit->isValid());
92 QString
Value::toString(
int fieldWidth,
char format,
int precision,
const QChar& fillChar)
const
95 return d->unit->toString(d->number, fieldWidth, format, precision, fillChar);
101 const QChar& fillChar)
const
104 return d->unit->toSymbolString(d->number, fieldWidth, format, precision, fillChar);
111 uint div = qPow(10, decimals);
112 double add = 0.5 / (double)div;
114 d->number = (int)((d->number + add) * div) / (
double)div;
133 d->number = value.d->number;
134 d->unit = value.d->unit;
140 return d->converter.convert(*
this, unit);
145 return d->converter.convert(*
this, unit);
150 return d->converter.convert(*
this, unit);
This file is part of the KDE documentation.
Documentation copyright © 1996-2013 The KDE developers.
Generated on Tue Apr 16 2013 20:58:17 by
doxygen 1.8.3.1 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.