KUnitConversion
#include <unit.h>
|
| | Unit (UnitCategory *category, int id, double multiplier, const QString &symbol, const QString &description, const QString &match, const KLocalizedString &real, const KLocalizedString &integer) |
| |
| | Unit (UnitCategory *category, int id, const Complex *complex, const QString &symbol, const QString &description, const QString &match, const KLocalizedString &real, const KLocalizedString &integer) |
| |
| virtual | ~Unit () |
| |
| UnitCategory * | category () const |
| |
| QString | description () const |
| |
| int | id () const |
| |
| bool | isValid () const |
| |
| double | multiplier () const |
| |
| void | setMultiplier (double multiplier) |
| |
| QString | symbol () const |
| |
| QString | toString (double value, int fieldWidth=0, char format= 'g', int precision=-1, const QChar &fillChar=QLatin1Char(' ')) const |
| |
| QString | toSymbolString (double value, int fieldWidth=0, char format= 'g', int precision=-1, const QChar &fillChar=QLatin1Char(' ')) const |
| |
| | QSharedData () |
| |
| | QSharedData (const QSharedData &other) |
| |
Definition at line 43 of file unit.h.
| KUnitConversion::Unit::Unit |
( |
UnitCategory * |
category, |
|
|
int |
id, |
|
|
double |
multiplier, |
|
|
const QString & |
symbol, |
|
|
const QString & |
description, |
|
|
const QString & |
match, |
|
|
const KLocalizedString & |
real, |
|
|
const KLocalizedString & |
integer |
|
) |
| |
| KUnitConversion::Unit::Unit |
( |
UnitCategory * |
category, |
|
|
int |
id, |
|
|
const Complex * |
complex, |
|
|
const QString & |
symbol, |
|
|
const QString & |
description, |
|
|
const QString & |
match, |
|
|
const KLocalizedString & |
real, |
|
|
const KLocalizedString & |
integer |
|
) |
| |
| KUnitConversion::Unit::~Unit |
( |
| ) |
|
|
virtual |
- Returns
- unit category.
Definition at line 99 of file unit.cpp.
| QString KUnitConversion::Unit::description |
( |
| ) |
const |
- Returns
- translated name for unit.
Definition at line 104 of file unit.cpp.
| double KUnitConversion::Unit::fromDefault |
( |
double |
value | ) |
const |
|
protected |
| int KUnitConversion::Unit::id |
( |
| ) |
const |
- Returns
- unit id.
Definition at line 163 of file unit.cpp.
| bool KUnitConversion::Unit::isValid |
( |
| ) |
const |
- Returns
- if unit is valid.
Definition at line 158 of file unit.cpp.
| double KUnitConversion::Unit::multiplier |
( |
| ) |
const |
- Returns
- unit multiplier.
Definition at line 114 of file unit.cpp.
| void KUnitConversion::Unit::setMultiplier |
( |
double |
multiplier | ) |
|
Set unit multiplier.
Definition at line 119 of file unit.cpp.
| QString KUnitConversion::Unit::symbol |
( |
| ) |
const |
- Returns
- symbol for the unit.
Definition at line 109 of file unit.cpp.
| double KUnitConversion::Unit::toDefault |
( |
double |
value | ) |
const |
|
protected |
| QString KUnitConversion::Unit::toString |
( |
double |
value, |
|
|
int |
fieldWidth = 0, |
|
|
char |
format = 'g', |
|
|
int |
precision = -1, |
|
|
const QChar & |
fillChar = QLatin1Char(' ') |
|
) |
| const |
- Parameters
-
| value | number value |
| 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 + unit string
Definition at line 142 of file unit.cpp.
| QString KUnitConversion::Unit::toSymbolString |
( |
double |
value, |
|
|
int |
fieldWidth = 0, |
|
|
char |
format = 'g', |
|
|
int |
precision = -1, |
|
|
const QChar & |
fillChar = QLatin1Char(' ') |
|
) |
| const |
- Parameters
-
| value | number value |
| 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 + unit string
Definition at line 151 of file unit.cpp.
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
KDE's Doxygen guidelines are available online.