KUnitConversion
Go to the documentation of this file.
20 #ifndef KUNITCONVERSION_UNIT_H
21 #define KUNITCONVERSION_UNIT_H
23 #include <QtCore/QString>
24 #include <ksharedptr.h>
27 class KLocalizedString;
29 namespace KUnitConversion
39 virtual double toDefault(
double)
const = 0;
40 virtual double fromDefault(
double)
const = 0;
46 Unit(
UnitCategory* category,
int id,
double multiplier,
const QString& symbol,
47 const QString& description,
const QString& match,
48 const KLocalizedString& real,
const KLocalizedString& integer);
50 const QString& description,
const QString& match,
51 const KLocalizedString& real,
const KLocalizedString& integer);
57 QString description()
const;
62 QString symbol()
const;
74 QString toString(
double value,
int fieldWidth = 0,
char format =
'g',
int precision = -1,
75 const QChar& fillChar = QLatin1Char(
' '))
const;
87 QString toSymbolString(
double value,
int fieldWidth = 0,
char format =
'g',
88 int precision = -1,
const QChar& fillChar = QLatin1Char(
' '))
const;
93 double multiplier()
const;
98 void setMultiplier(
double multiplier);
108 bool isValid()
const;
116 double toDefault(
double value)
const;
117 double fromDefault(
double value)
const;
127 #define UP(id, m, s, d, sy, r, i) \
128 (KUnitConversion::UnitPtr(new KUnitConversion::Unit(this, id, m, s, d, sy, r, i)))
129 #define U(id, m, s, d, sy, r, i) (new KUnitConversion::Unit(this, id, m, s, d, sy, r, i))
KSharedPtr< Unit > UnitPtr
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.