KUnitConversion
KUnitConversion::Value Class Reference
#include <value.h>
Public Member Functions | |
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 |
Detailed Description
Constructor & Destructor Documentation
KUnitConversion::Value::Value | ( | double | n, |
const QString & | u | ||
) |
Member Function Documentation
Value KUnitConversion::Value::convertTo | ( | int | unit | ) | const |
bool KUnitConversion::Value::isValid | ( | ) | const |
double KUnitConversion::Value::number | ( | ) | const |
Value & KUnitConversion::Value::round | ( | uint | decimals | ) |
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
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
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-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:23:00 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:23:00 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.