KUnitConversion
Go to the documentation of this file.
24 using namespace KUnitConversion;
26 class CelsiusConv :
public Complex
28 double toDefault(
double value)
const {
return value + 273.15; };
29 double fromDefault(
double value)
const {
return value - 273.15; };
32 class FahrenheitConv :
public Complex
34 double toDefault(
double value)
const {
return (value + 459.67) * 5.0 / 9.0; };
35 double fromDefault(
double value)
const {
return (value * 9.0 / 5.0) - 459.67; };
38 class DelisleConv :
public Complex
40 double toDefault(
double value)
const {
return 373.15 - (value * 2.0 / 3.0); };
41 double fromDefault(
double value)
const {
return (373.15 - value) * 3.0 / 2.0; };
44 class NewtonConv :
public Complex
46 double toDefault(
double value)
const {
return (value * 100.0 / 33.0) + 273.15; };
47 double fromDefault(
double value)
const {
return (value - 273.15) * 33.0 / 100.0; };
50 class ReaumurConv :
public Complex
52 double toDefault(
double value)
const {
return (value * 5.0 / 4.0) + 273.15; };
53 double fromDefault(
double value)
const {
return (value - 273.15) * 4.0 / 5.0; };
56 class RomerConv :
public Complex
58 double toDefault(
double value)
const {
return (value - 7.5) * 40.0 / 21.0 + 273.15; };
59 double fromDefault(
double value)
const {
return (value - 273.15) * 21.0 / 40.0 + 7.5; };
69 i18nc(
"temperature unit symbol",
"K"),
70 i18nc(
"unit description in lists",
"kelvins"),
71 i18nc(
"unit synonyms for matching user input",
"kelvin;kelvins;K"),
72 ki18nc(
"amount in units (real)",
"%1 kelvins"),
73 ki18ncp(
"amount in units (integer)",
"%1 kelvin",
"%1 kelvins")
76 i18nc(
"temperature unit symbol",
"°C"),
77 i18nc(
"unit description in lists",
"Celsius"),
78 i18nc(
"unit synonyms for matching user input",
"Celsius;°C;C"),
79 ki18nc(
"amount in units (real)",
"%1 degrees Celsius"),
80 ki18ncp(
"amount in units (integer)",
"%1 degree Celsius",
"%1 degrees Celsius")
83 i18nc(
"temperature unit symbol",
"°F"),
84 i18nc(
"unit description in lists",
"Fahrenheit"),
85 i18nc(
"unit synonyms for matching user input",
"Fahrenheit;°F;F"),
86 ki18nc(
"amount in units (real)",
"%1 degrees Fahrenheit"),
87 ki18ncp(
"amount in units (integer)",
"%1 degree Fahrenheit",
"%1 degrees Fahrenheit")
90 i18nc(
"temperature unit symbol",
"R"),
91 i18nc(
"unit description in lists",
"Rankine"),
92 i18nc(
"unit synonyms for matching user input",
"Rankine;°R;R;Ra"),
93 ki18nc(
"amount in units (real)",
"%1 Rankine"),
94 ki18ncp(
"amount in units (integer)",
"%1 Rankine",
"%1 Rankine")
97 i18nc(
"temperature unit symbol",
"°De"),
98 i18nc(
"unit description in lists",
"Delisle"),
99 i18nc(
"unit synonyms for matching user input",
"Delisle;°De;De"),
100 ki18nc(
"amount in units (real)",
"%1 degrees Delisle"),
101 ki18ncp(
"amount in units (integer)",
"%1 degree Delisle",
"%1 degrees Delisle")
104 i18nc(
"temperature unit symbol",
"°N"),
105 i18nc(
"unit description in lists",
"Newton"),
106 i18nc(
"unit synonyms for matching user input",
"Newton;°N;N"),
107 ki18nc(
"amount in units (real)",
"%1 degrees Newton"),
108 ki18ncp(
"amount in units (integer)",
"%1 degree Newton",
"%1 degrees Newton")
111 i18nc(
"temperature unit symbol",
"°Ré"),
112 i18nc(
"unit description in lists",
"Réaumur"),
113 i18nc(
"unit synonyms for matching user input",
"Réaumur;°Ré;Ré;Reaumur;°Re;Re"),
114 ki18nc(
"amount in units (real)",
"%1 degrees Réaumur"),
115 ki18ncp(
"amount in units (integer)",
"%1 degree Réaumur",
"%1 degrees Réaumur")
118 i18nc(
"temperature unit symbol",
"°Rø"),
119 i18nc(
"unit description in lists",
"Rømer"),
120 i18nc(
"unit synonyms for matching user input",
"Rømer;°Rø;Rø;Romer;°Ro;Ro"),
121 ki18nc(
"amount in units (real)",
"%1 degrees Rømer"),
122 ki18ncp(
"amount in units (integer)",
"%1 degree Rømer",
"%1 degrees Rømer")
void setMostCommonUnits(const QList< int > &units)
void setName(const QString &name)
#define UP(id, m, s, d, sy, r, i)
void setDefaultUnit(UnitPtr defaultUnit)
void setSymbolStringFormat(const KLocalizedString &symbolStringFormat)
#define U(id, m, s, d, sy, r, i)
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.