KUnitConversion
#include <value.h>
|
| | Value () |
| |
| | Value (double n, UnitPtr u) |
| |
| | Value (double n, const QString &u) |
| |
| | Value (double n, int u) |
| |
| | Value (const QVariant &n, const QString &u) |
| |
| | ~Value () |
| |
| Value | convertTo (UnitPtr unit) const |
| |
| Value | convertTo (int unit) const |
| |
| Value | convertTo (const QString &unit) const |
| |
| bool | isValid () const |
| |
| double | number () const |
| |
| Value & | operator= (const Value &) |
| |
| Value & | round (uint decimals) |
| |
| QString | toString (int fieldWidth=0, char format= 'g', int precision=-1, const QChar &fillChar=QLatin1Char(' ')) const |
| |
| QString | toSymbolString (int fieldWidth=0, char format= 'g', int precision=-1, const QChar &fillChar=QLatin1Char(' ')) const |
| |
| UnitPtr | unit () const |
| |
Definition at line 32 of file value.h.
| KUnitConversion::Value::Value |
( |
| ) |
|
| KUnitConversion::Value::Value |
( |
double |
n, |
|
|
UnitPtr |
u |
|
) |
| |
| KUnitConversion::Value::Value |
( |
double |
n, |
|
|
const QString & |
u |
|
) |
| |
| KUnitConversion::Value::Value |
( |
double |
n, |
|
|
int |
u |
|
) |
| |
| KUnitConversion::Value::Value |
( |
const QVariant & |
n, |
|
|
const QString & |
u |
|
) |
| |
| KUnitConversion::Value::~Value |
( |
| ) |
|
| Value KUnitConversion::Value::convertTo |
( |
UnitPtr |
unit | ) |
const |
convert to another unit
Definition at line 138 of file value.cpp.
| Value KUnitConversion::Value::convertTo |
( |
int |
unit | ) |
const |
convert to another unit
Definition at line 143 of file value.cpp.
| Value KUnitConversion::Value::convertTo |
( |
const QString & |
unit | ) |
const |
convert to another unit
Definition at line 148 of file value.cpp.
| bool KUnitConversion::Value::isValid |
( |
| ) |
const |
Check if value is valid.
- Returns
- True if value is valid
Definition at line 87 of file value.cpp.
| double KUnitConversion::Value::number |
( |
| ) |
const |
Number part of the value.
Definition at line 118 of file value.cpp.
| Value & KUnitConversion::Value::operator= |
( |
const Value & |
value | ) |
|
| Value & KUnitConversion::Value::round |
( |
uint |
decimals | ) |
|
rounds value to decimal count
- Parameters
-
Definition at line 109 of file value.cpp.
| QString KUnitConversion::Value::toString |
( |
int |
fieldWidth = 0, |
|
|
char |
format = 'g', |
|
|
int |
precision = -1, |
|
|
const QChar & |
fillChar = QLatin1Char(' ') |
|
) |
| const |
Convert value to a string.
- Parameters
-
| fieldWidth | width of the formatted field, padded by spaces. Positive value aligns right, negative aligns left |
| format | type of floating point formating, like in QString::arg |
| precision | number of digits after the decimal separator |
| fillChar | the character used to fill up the empty places when field width is greater than argument width |
- Returns
- value as a string
Definition at line 92 of file value.cpp.
| QString KUnitConversion::Value::toSymbolString |
( |
int |
fieldWidth = 0, |
|
|
char |
format = 'g', |
|
|
int |
precision = -1, |
|
|
const QChar & |
fillChar = QLatin1Char(' ') |
|
) |
| const |
Convert value to a string with symbol.
- Parameters
-
| fieldWidth | width of the formatted field, padded by spaces. Positive value aligns right, negative aligns left |
| format | type of floating point formating, like in QString::arg |
| precision | number of digits after the decimal separator |
| fillChar | the character used to fill up the empty places when field width is greater than argument width |
- Returns
- value as a string
Definition at line 100 of file value.cpp.
| UnitPtr KUnitConversion::Value::unit |
( |
| ) |
const |
The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:48:00 by
doxygen 1.8.7 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.